You must be logged in to post messages.
Please login or register

Crusader, Warchest, & Extreme: General Discussion & Help
Moderated by peter2008, Lord Michael I, Lord_of_Hell

Hop to:    
Welcome! You are not logged in. Please Login or Register.31 replies, Sticky
Stronghold 2 » Forums » Crusader, Warchest, & Extreme: General Discussion & Help » SHC AI village walkthrough
Bottom
Topic Subject:SHC AI village walkthrough
« Previous Page  1 2  Next Page »
WL_D Arthus
Master Illuminator
posted 04-05-09 09:19 EST (US)         
work-in-progress

AIV Editor - Before you start
1.Download the mod tools Here

2.open the rar file using Winrar.
That link will give you the newest version

3.FF suggests reading the following before starting:
A.Think about what would affect the castle as your castle will be used on various maps. Building an enormous castle will not always fit into a small section of land or if the land contains hills, trees, especially if that land has areas which cannot be built on; this will stop areas of your castle being built.
B.Ensure essential buildings are placed in the initial game ticks, allowing the AI player to use the market and granary quickly.
C.You can delete the keep and place it elsewhere; the starting hall is a good marker for the centre point of the castle.
D.Ensure buildings and towers have access from a set of stairs.
E.Economic buildings (Farms, etc) are placed by the AI and not by the user.

AIV Editor - Getting started

1.Lets open the editor, browse to the following location:

2.Interface


(save your progress using the "F1" key)
ZOOM
Zoom x1, Zoom x2, Zoom x3. Lets you zoom in or out for a better look at things.

SCROLL
The screen scrolling speed can be altered here.

3. AIV Editor - Game Ticks
AI opponents will use game ticks to build up their castles when playing Stronghold Crusader, each game tick represents one tick in the AI builder. Game ticks are listed in the top right corner of the screen, under zoom and scroll.
An example of how game ticks work is using by placing the wall. If you place sections of wall separately the wall would be placed slowly by the AI player within Stronghold Crusader. If you wanted them to place a whole section of wall at once, you would drag out a section of wall for one game tick. Providing the AI player have stone available to them, the wall will be built all at once.
Troop types are not counted in the in-game ticks and can be placed at any time.

De (Delete)
Point
Flood Fill
Allows you to delete one building or piece of wall at a time by using Point or a whole section of connected wall by using Flood Fill. Deleting one building will move you back by once game tick.

Wa (Wall)
High Wall
Low wall
High Crenel
Low Crenel
Stairs

Ca (Castles)
Tower 1(Lookout Tower)
Tower 2 (Perimeter Turret)
Tower 3 (Defence Turret)
Tower 4 (Square Tower)
Tower 5 (Round Tower)
Oil Smelter
Dog Cage
Killing Pit
Keep
Killing Pit

Ga (Gatehouses)
Small EW
Small NS
Large EW
Large NS
Stairs

We (Weapons and Troops)
Poleturner
Fletcher
Blacksmith
Tanner
Armourer
Barracks
Armoury
Engineers Guild
Tunnelers Guild
Stables

In (Industry)
Stockpile
Woodcutter
Quarry
Ox Tether
Iron Mine
Pitch Rig
Trading Post(Market)

Mi(Troops and siege equipment)
Delete(only deletes troops)
Mgl(Mangonel)
Tre(Trebuchet)
Bow(Archer)
Spr(Spearman)
Mac(Maceman)
Kgt(Knight)
Slr(Slinger)
Sbw(Arabian Archer)
Scm(Arabian Swordsman)
Brz(Brazier)
Oil(Oil pourer)
Bal(Tower mounted Ballista)
Fbal(Fire Ballista)
Xbow(Crossbowman)
Pik(Pikeman)
Swd(Swordsman)
Slv(Slave)
Ass(Assassin)
HBw(Horse Archer)
Gre(Fire Thrower)
Flg(Flag)

Mo (Moats and Pitch) Moat x 1
Moat x 2
Moat x 3
Moat x 4
Pitch

Fo (Food)
Granary
Apple Farm
Dairy Farm
Wheat Farm
Hunter
Hops Farm
Windmill
Bakery
Brewery
Inn

To (Town)
House
Chapel
Church
Cathedral
Healers
Well
Water Pot

Go (Good Stuff)
Maypole
Dancing Bear
Statue
Shrine
Town Garden
Communal Garden
Small Pond
Large Pond

Ba (Bad Stuff)
Gallows
Cess Pit
Stocks
Burning Stake
Dungeon
Rack
Gibbet
Chopping Block
Dunking Stool

AIV Editor - Loading your castle into Stronghold Crusader
Save your castle using F1 and exit the editor:


Copy the .aiv castle file from the villages folder (in my case Emir1) into the Stronghold Crusader/aiv folder which can be found in the steps below:
My computer - Local disk (:C) Program Files Firefly Studios stronghold Crusader - avi

You will get a prompt to overwrite the original file, make a backup of the original and then proceed the AI of your choice now has the ability to build the new castle in skirmish mode.

[This message has been edited by WL_D Arthus (edited 04-05-2009 @ 09:59 AM).]

AuthorReplies:
peter2008
Knight
posted 04-06-09 05:02 EST (US)     1 / 31       
Thanks, Arthus. That's a start.

Helpful hints will be:
- For exchanging .aiv files you need not quit and start the game every time.
- In the aiv folder I created new folders for each AI. There I can hide all the 7 castles just not wanted, to ensure the game will choose exactly the modified file.

---

I did it!

A caliph1 castle with Square Tower, Arabian bowmen and ballista manned by the AI himself .
After I had smashed the tower (you see the damaged Lookout Towers behind), the Caliph replaced everything and everybody:




Ok, the AI castles can become real fortresses. Ever wanted to give the Pig ballistas on his towers.
Where is the core point to tune which and how many troops an AI recruits, and when he attacks?
The Snake launches an attack at having around 150 troops. Imagine we could speed him up to 300 and make his charging army twice as strong.

Of Honour without Fame,
Of Greatness without Splendour,
Of Dignity without Pay
- Walter Benjamin

[This message has been edited by Peter2008 (edited 04-06-2009 @ 11:33 AM).]

Bartimaeus M
Archer
posted 04-06-09 06:46 EST (US)     2 / 31       
1.
Thx for the guide
2.
I have tried this like and have kinda managed what he set, but not using what I think he would like to do it. Meaning, with the pig, he sometimes takes a while because he has little food etc. so I decided to make his keep slightly bigger and adding bread chain productions with 3 extra housing so that, when the bread was stocked above 20, he sold it and managed to always have some money leading to to constandly charge you.

3. Also I have a question about the troop flags etc. Does this determine the amount of defensive troops? OR waht and what is the Flag used for??

thanks Bartmaeus
surajsubba
Archer
posted 04-06-09 11:03 EST (US)     3 / 31       
A very helpful walktrough. Thank you WL_D Arthus

I'm hoping to see some creative castles for the AI

'.___________'-._______________.-'__________.'
.--.________.-~"^'~-.____'~-.-~+=≡↵-._◊◊_.-↵≡=+~-.-~'____.-~'^"~-.________.--.
.-________'.__'.____.-~"'_________"'~-._..-~+=↵≡+-.._◊Ĭ◊_..-+≡↵=+~-.._.-~'"_________"'~-.____.'__.'________-.
'._.-'^'-._ __'-._.-~"_"'~.-=◊↵Dark Water.wip↵=~-._◊_.-~=↵Skirmish Masters↵◊=-.~'"_"~-._.-'___.-'^'-._.'
WL_D Arthus
Master Illuminator
posted 04-06-09 15:47 EST (US)     4 / 31       
No problem guys, i'll work on a Q&A shortly but this walkthrough had to come first to prevent newb questions early in the mods existance.
I'll add to it as time permits.
von Schmidt
Archer
posted 04-06-09 19:20 EST (US)     5 / 31       
I gotta try changing some castles this looks awesome. Thanks for the walkthrough, Arthus!

IT GOES IT GOES IT GOES IT GOES GUILLOTINE

YAH
von Schmidt
Archer
posted 04-07-09 13:55 EST (US)     6 / 31       
I have a problem. Whenever I try to save my edited rat castle, it won't work! My new file won't overwrite the other one. It will never work! I just finished a slightly modified castle, then pressed F1 and saved it, then reloaded it and it was gone! I have no idea what's going wrong, any help?

Another thing: How do I make the Rat produce wheat farms? Will he automatically make wheat farms if I do bread stuff for him? How do I change their weapon production, or get him to make iron mines? I wanted to try a rat with a keep full of swordsmen, but I don't know how to do this! And it seems that I can only place 10 of each type of soldier... can someone help?


Thanks!

IT GOES IT GOES IT GOES IT GOES GUILLOTINE

YAH
Bartimaeus M
Archer
posted 04-07-09 14:50 EST (US)     7 / 31       
If you place the farms outside the keep the rat should find a suitible place for them, as well as the mills in bakeries, put them inside (or whereever). I not sure about making certain troops unless you place the unit things inside the keep (eg select xbow (crossbowman unit thing) and place them somewhere), then I think he may place some of those in places.

As for the not saving thing, I save it as a random name and then place in it a folder (also containing the back-yps of my AVIs) and then test him out. I dont understand why it may not work for you.

I'll do a test based on what you did, then Ill get back to you
------------------------------------------------------------ --
At the moment, The Rat does build the extra walls and mills etc. Haven't got him to do wheat farms for some reason, I may move them out futher then I places them. Also, I'll try about the troops thing but at the moment, it doesn't look good :/
------------------------------------------------------------ --------

Well, I got him to produce bread sucessfully Yay! but not the troops, also I have noticed that by default FF have not placed farms for the rat in some AVI's Yet!, he still builds them. I wondering if some of it is coded base on the AI level.

I will keep trying though.

---------------------------------------------

Overall.
========
I started with a blank Village, placed 4 wheat farms out of the way, along with 2 irons mines. Placed 2 mills and 10 bakeries 5 housees and a granary.

Then I placed the extra stockpiles and the market which I later changes to the begiing (order the buildings constrction). I also placed the Armorers and barracks along with the Armoury and a Blacksmith.

When I loaded the Game, the Rat began with the markets and extra stockpiles But then placed wood cutter huts and apple farms. Then the wheat and houses cam along with a mill abd 3 bakeries. I started building my own keep just so the steward whould shut up. Then looked back and saw no Iron mines were built. Also the bakeries were set to sleep and only 3 wheat farms had been built. Then I notice a Quarry and an Ox tailor which I hadn't placed in the editor.

Also the Troops where being built (the standard number of Bowmen and spearmen). They just stood at the barracks and then attacked me.

It seems some buildings are adaptable like the quarries that aren't placed in the AVI editor, and some basic farms but yet iron mines aren't which would mean you would need to predict the place the keep faces and then build the village based on the map! Most of the buildings function that I placed as long as they were working (no flour = bakeries to sleep).

So my question is, "How do I make some buildings not fixed as the apple farms I didn't place still showed up!"

[This message has been edited by Bartimaeus M (edited 04-07-2009 @ 03:44 PM).]

WL_D Alexus
Archer
posted 04-07-09 15:52 EST (US)     8 / 31       
Unfourtunately the AI mod isn't exacltly what we all wished it was.

You can't control everthing the AI does and you must consider the original AI's character. The rat makes spears and bows, therfore he has no need for iron. The same with the food, he has apples because he is a simple AI. Even when he creates the wheat farms he will simply sell the flour before a baker can touch it.

So before you start designing an AI for a certain character, play the AI and see what he builds. If you want an AI that creates wheat and bread, then choose Saladin, if you want one who makes iron mines, replace your file with Lionheart etc.

All of the AI will place things like farms, mines, wood cutters etc. read the guide that came with the mod, thats what its there for.

I do not agree with what you have to say, but I'll defend to the death your right to say it -Voltaire
Bartimaeus M
Archer
posted 04-07-09 16:02 EST (US)     9 / 31       
well, the bakers did make bread, but then the iron mines he used on one map where he placed one out of 4, and sold the iron steiaght away, so if they rely on money for somethings, and the way they work is slow, then placing buildings that produce what they would sell, would increase their reaction, remaking times?
Crossbow Dude
Archer
posted 04-18-09 16:02 EST (US)     10 / 31       
when I open village, all I get is a blank screen. I can't do anything and the only way to exit is by pressing esc. Please help.

Cross

-(`*.,'`,.*)-
-,'`.O.'`,-
Strongholder at heart forever!
-*'`.'O`'.'`*-
-(_.*'`''`*._)-
qtlilkeg
Archer
posted 04-20-09 14:34 EST (US)     11 / 31       

Hey guys,

It appears the AI's will never place more than three
each of: mangonel, ballista, and fire ballista.
If anyone can figure out how to bypass to this limitation, let us know.

You can actually see this limit in saladin5.aiv, which
builds 8 towers, but only places 6 engines (3 ballista +
3 mangonels).


-Qt
artofmath
Archer
posted 04-20-09 21:05 EST (US)     12 / 31       
Can't you add extra ballistas or mangonels to the towers?

Also, I've been playing around with the AI Village thingy. I can't seem to be able to place on towers any more than 10 of one unit. Is it a bug?

..."religion is the opium of the masses"... - Karl Marx.

[This message has been edited by artofmath (edited 04-21-2009 @ 00:12 AM).]

WL_D Arthus
Master Illuminator
posted 04-21-09 18:54 EST (US)     13 / 31       
Not a bug, just the limit it seems. The AIV editor doesn't let you get too creative and it is actually missing some key features. Apparently you can't set way points for monks either, they forgot
artofmath
Archer
posted 04-21-09 23:00 EST (US)     14 / 31       
I think these limits are there for a good reason: the sprite limit.

Since the sprite limit is only 2,000, in a 8-player game it means that each player is allocated about 250 troops, peasants, and animals together. We've all noticed that AIs don't launch their first real attack (not counting horse archer raids, etc.) until their entire castle is complete, so if each castle requires more than 250 troops to fully garrison, the AIs will never attack in a 8-player game, lending to a very boring game, slowing it down quite a bit.

Plus, since AIs seem to be able to rebuild towers when troops are sitting in their foundations, I think it's to stop designers and modders from creating an inpenetrable castle. Imagine a castle built solely from 40 square towers, manned by 20 mangonels and 20 ballistas. Any siege equipment will be immediately skewered by ballistas and any significant troop concentration will be splattered to 1/3 of its original strength.

Make sense?

Could we put up an AI mods section in the downloads section of SHH? I think it would build a nice modding community, which I would be happy to be part of.

..."religion is the opium of the masses"... - Karl Marx.

[This message has been edited by artofmath (edited 04-21-2009 @ 11:02 PM).]

WL_D Arthus
Master Illuminator
posted 04-21-09 23:10 EST (US)     15 / 31       
I already asked Sir Hugh, hopefully a mod section will be up shortly

[This message has been edited by WL_D Arthus (edited 04-21-2009 @ 11:10 PM).]

MNICY
Archer
posted 04-22-09 16:38 EST (US)     16 / 31       
awesome!

Lords: Conquest - Medieval MMOG
"Come to think of it, how many people CAN fit on a pike?" -artofmath
"How to kill the Rat: Build 20 Horse archers and 10 swords men. Laugh at him." -Lord Michael I
artofmath
Archer
posted 04-22-09 21:55 EST (US)     17 / 31       
Will Sir Hugh also move the current AI files to this new DL section?

I've just finished a new Saladin AI, a truly omnidirectional castle (a bit Emir-like, but more siege weapons), where no matter the direction of the attack, at least half of the castle defenders will be able to fight, and without any blind spots. I might try to make a few AIs where the castle follows some renaissance fort design priciples. Will upload ASAP.

..."religion is the opium of the masses"... - Karl Marx.
WL_D Arthus
Master Illuminator
posted 04-28-09 06:23 EST (US)     18 / 31       
Will Sir Hugh also move the current AI files to this new DL section?
Well i haven't received a reply from the seraphs yet but i imagine so
Idealy it would already be up and running, i'm not sure what is involved in getting it up but iv'e been pushing for it - i know you guys would like to have it up asap.

I would too.
qtlilkeg
Archer
posted 05-18-09 13:31 EST (US)     19 / 31       
Knights and spearmen alike,

Here's a bunch of things I've learned when using the AIV editor lately.


First of all, the AIV editor is a rather primitive tool, but don't underestimate what you can actually do! You can add a lot more variety to the Crusader games with this tool.

When an AI castle is placed on a map, it is rotated such that what is 'up' in the AIV editor will face the center of the map. This is why the very assymetric castles (esp Phillip) provided in the game works.


AIs don't repair towers or gates that have been damaged. But they do repair their walls if they get smashed. For this reason, an AI that has walls that protect his towers will be more 'sustainable' and harder to bring down. See the Crusader invasion game '4Boys' and '4Brothers' for a few examples how I use walls to protect towers and gates.


You can add safety to an AI castle by combining high and low walls. A unit that stands on a high wall cannot climb down to a neighboring low wall. Not even assassins can do this. So if you have a two tiles thick wall where the outer is a low wall and the inner is a high wall, you have eliminated the threat of assassins and siege towers. I first explored this in 'TheCastleOfDrMoreau', and more extensive 'assassin proofing' of aiv castles is done in '4Boys' and '4Brothers'.


To add some safety to units in a tower, it is better to access the tower through a gate rather than stairs. If the enemy breaks through the outer defenses, they can easily run up stairs with a few fast units (macemen) and kill off the tower units. But if the access is by a gate, the gate will close and the tower units are well protected against ground troops. The only way to take out the tower units is by assassins or the standard (old and boring) method of going in with a large amount of bowmen. An example game with gate access to towers is the enemy castle in '4Brothers'.


A tower mounted ballista has better precision and much longer reach than a mangonel. For this reason, a ballista is the preferred defense against approaching enemy siege equipment. Unfortunately, an AI has a limit of three ballistas. In the AIV editor, you can place up to five, but no AI will ever use more than three. Combining these facts, you will see that the 'best' shape of a Crusader castle is a triangle with a tower mounted ballista in each corner. Unfortunately, a triangle has fairly poor 'inner space' for buildings. What a nice feature if Firefly could allow four instead of three! It would double the available space and simplify castle design a LOT by building a square castle!
On a side note: a tower ballista has approximately 8 tiles longer reach than a catapult. So, a catapult must be moved into the fire range of a tower ballista if all parts (towers, walls, gates) of the castle is less than 8 tiles 'outside' a large tower with a ballista in it. A trebuchet on the other hand has longer reach than any other unit. So no matter how well you design an AI castle, it is no match for a human to bring it down. Unfortunately, AIs are too stupid to take advantage of the very long reach of the treb and mostly build their trebs within reach of a castle they try to attack.
Example of a triangular aiv castle is in '4Boys'.


Some AIs use two different types of bowmen. Wolf and Frederick use both archers and crossbows. So, if you want to build a 'strong' AI castle, Wolf and Frederick are good candidates. You can tell them to place both crossbows and archers in a tower for better defenses.


If you place AI units in the Crusader map editor (NOT the AIV editor), the AI will usually move all units to his keep. There are some notable exceptions:
Sheriff's macemen
Frederick's pikemen and slaves
and possibly others, will stand where you place them. You can even direct them to attack a building or an enemy.
An example game of this is the opening scene of the game "4BrothersAttack" (which will be submitted soon).


When an AI places a tower mounted engine (ballista or mangonel), the AI only checks that there is a tower where he wants to place the equipment. He never checks if the tower belongs to him or not! And he never checks if anyone else has placed equipment in the tower earlier. The result of this is that you can build castles with multiple engines in the towers!
This 'feature bug' is exploited in the enemy castle in the game '4Brothers', where each tower has 3-4 engines.


When you place troops in the AIV editor, you can place up to 10 'circles' (5 for ballista/mangonel/fire ballista). Each circle for normal troops represent not one unit, but one group. The size of the group depends on how you start the game. When you set up the playing mode in the 'custom game', you select a map, which AI to use and such. Then you select 'normal game' (Little gold, few troops), 'crusader game' (Little gold, many troops), or 'deathmatch' (much gold, few troops). You can also select to have human or computer advantage. With human advantage and 'few troops' (normal or deathmatch), each circle represents 0-2 units. With max computer advantage and 'many troops' (crusader game), each circle is 5-7 units. So in a Wolf castle, you could place up to about 60 archers and 60 xbows at most.


Each AI has their favorite troops, and stubbornly refuse to use anything else. For example, Wolf uses xbows and archers as his main bowmen. If you place arabian bows in the AIV editor, he simply ignores those. Even though he sometimes hire some himself!




Now to some variations of the Crusader game:

The most obvious 'enhancement' to an AI castle is to add 'Good Things' to all AIs as many designers have already explored. A Wolf with 'Good Things' is one of the better choices of a strong castle.


If you want to design an eco-style mission with a nice twist, you can design an AI castle, but intentionally NOT give the AI a market in his .aiv file. Then make this AI an ally of the human player in the game. The AI will basically be the 'slave' of the human to collect goods.
This style of game design opens up new possibilities. For example, disallow the human player from building any weapons shops. Now, the human has to rely on the AI producing weapons, so it is crucially important for the human to defend the ally. If the ally dies, the human cannot hire more troops and has lost the game.
With a bit of imagination, there are many other ways to 'force' a human to cooperate with an AI in interesting ways. For example, Phillip and Sheriff never places quarries and buys all their stone from the market to complete their castles. So if they don't have a market, you have to give them stone. This was explored in the eco mission '4BrothersDefense'.


-Qt

[This message has been edited by qtlilkeg (edited 05-18-2009 @ 01:39 PM).]

MNICY
Archer
posted 05-22-09 03:41 EST (US)     20 / 31       
very informative post qtlilkeg!
Thanks

Lords: Conquest - Medieval MMOG
"Come to think of it, how many people CAN fit on a pike?" -artofmath
"How to kill the Rat: Build 20 Horse archers and 10 swords men. Laugh at him." -Lord Michael I
Tool18
Archer
posted 07-17-09 17:13 EST (US)     21 / 31       
Are there any sort of download links from where you can get fun/improved/better AI's made by other people?
Sir Hugh
BfME2H/SHH Seraph
posted 07-17-09 19:12 EST (US)     22 / 31       
Check out our Crusader Mod download section.

________                                         ________
\________\------______ _____------/________/
\_______\---\\\\ Sir Hugh ////---/_______/
\_____\--\\| Seraph |//--/_____/
\\//\\//
Mane1730
Archer
posted 11-28-09 14:41 EST (US)     23 / 31       
Hiho, dear friends!

I actually wanted to try this tool today so I built a more or nice aiv-file for the wazir, switched it into the "aiv"-order of the game (of course I replaced the original wazir1.aiv after making a backup of it) and started the game. The only thing that unfortunately happened is that the game got a problem and ended just as I started the battle :[
Can someone help me?
Heroesflorian
Archer
posted 12-18-09 18:16 EST (US)     24 / 31       
Hi guys,

I just wanted to create a modification of Saladin for a certain mission... the problem is that I uses a second stockpile, as you can see in the picture.

When I start the game, Saladin simply ignores the additional stockpiles - he does not build them, being an enormous problem for him.
If I pre-build them in the map, id does not work either. The reason is that his keep is moved and/or rotated when I start the game. And if i "fix" the keep by adding ocean around it, well then he can't build a castle^^ Adding only small pieces of ocean will cause Crusader to move the keep again to a different place. Moreover, sometimes he moves one of the additional stockpiles together with the keep, what's rather confusing...
Can anyone help here?

Thanks in advance.

Heroesflorian

Ever expect the unexpected!
Life is a row of mistakes, but avoiding them will not make life shorter!
Every kind of biological life is egoistical, but the human race is the only known one that successfully manages to destroy the living room of its own descendants.

Some of my better creations: The Ancient Knight, Ain Ebel Warfare, United AIV, Dark Skies over Al'Shareed
peter2008
Knight
posted 01-15-10 07:55 EST (US)     25 / 31       
Hello Heroesflorian,

sorry for the late reply. Looks to me that one simply cannot make an AI place stockpile parts separated from the very first one. There is no function for him - like we humans do - to build a continuing line (or figure) of parts and then delete the superfluous connecting ones.

I doubt we could lay down a buildings sequence with different buildings on - almost - the same place: such a line of stockpile parts and very soon other buildings that make the AI delete single parts. (Like the AI may remove some woodcutter's huts, farms, etc. as the installation of his castle proceeds. But these working buildings actually are not part of the AIV.)

An impressive outline you designed there. Good luck with the reorganisation. Feel free to open an own thread for your map project.

Of Honour without Fame,
Of Greatness without Splendour,
Of Dignity without Pay
- Walter Benjamin
« Previous Page  1 2  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Stronghold 2 | HeavenGames