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

Stronghold 2 and Legends: Scenario Design and Modding Forum
Moderated by ericgolf, peter2008, Doomsword

Hop to:    
Welcome! You are not logged in. Please Login or Register.83 replies, Sticky
Stronghold 2 » Forums » Stronghold 2 and Legends: Scenario Design and Modding Forum » AI Castles .aic files
Bottom
Topic Subject:AI Castles .aic files
« Previous Page  1 2 3 4  Next Page »
Doomsword
Earl
posted 04-24-09 19:55 EST (US)         
I've yet to look at the castle editor and I was under the impression that it is used to change the footprint of an AI's castle. Is this change saved to the map file or does it change some other game file?

I just assumed it would alter one of the game files and that I would need to include this altered file in the DL. Any one dl'ing the map would then have to mod the game slightly to have the change take affect. Am I right or wrong with this assumption.

I would like to use this program since Barclay in my current map is not quite finishing his castle for some reason. He is leaving out 1 small piece of wall next to his keep allowing me to waltz right on in bypassing his inner gate. I'm just not keen on requiring people to mod their game to play my map.
I have been playing with the AI Castle Editor a lot recently. The Queen never finished her castle and after a little muddling around, the editor is really easy to use. It's got some issues that could be tweaked but they are more annoyances than anything else.

Fixing that problem with Barclay would not be hard and then yes you would have to supply the updated .aic file for downloaders to drop into the Castles folder. A wonderful path of opportunity for custom maps if people can follow along because you can get a lord to build to into custom terrain and timing. Some of the War missions use special .aic files for the lords.

I've been building aic. files to release as a bundle. Fixing existing errors and making more defensive castles that will work flawlessly with the existing files. You can just add more castles to a lords repertoire by increasing the file name integer e.g. Queen_01.aic to Queen_09.aic . I was thinking about seeing if anyone else was interested in getting involved to make a SH2 Heaven AI Castle bundle with a whole lot of working designs, because the default small AI castle in the game is pretty lame. There is plenty of room to design bigger castles too.
You can just add more castles to a lords repertoire by increasing the file name integer e.g. Queen_01.aic to Queen_09.aic
I never really noticed this before but from this statement I'm assuming that the AI's in the game already have a number of designs to use when building their castles. I wonder what factors are used to determine what design an AI will use? The space available perhaps or is it just a random choice? It would have been really nice if we could specify what design an AI should use.
I've been building aic. files to release as a bundle. Fixing existing errors and making more defensive castles that will work flawlessly with the existing files.
This is a great idea Doomsword! I wasn't impressed with the existing designs of the AI's castles either. I agree that most castles are quite small but size can be an issue on 6-8 player Kingmaker maps. Some just don't have the room for a very large castle layout.

I'm looking forward to this bundle to see and what you come up with! I would be willing to help with this but I'd need to know what you've done so far first. I was about to begin work on a new siege map but maybe I'll take a look at the AI castle editor instead.

ps...

It took me most of the morning but I finally got the Java version I needed to run the AI editor. I've only taken a quick look and so far I like what I see (mostly). I see what you mean by annoying. Too bad the editor doesn't default to the castles directory where the .aic files are stored in the first place when you go to open one.

I noticed that Barclay has 3 layouts to choose from yet he always uses the second layout in my current map. I'm glad it stays the same yet I wonder why that is? I also noticed that the missing wall tile in his castle should not be missing. In the editor it shows the wall in this spot overlapping the corner tower of the keep. I willing to bet that the person who created this layout knew about the missing wall tile and tried to fix it without success and just gave up on it and moved on. This suggests that getting the AI to build the way you want is as difficult as getting the AI to attack the way you want.

Anyway, I'm off to see what I can do with this and try to get the hang of it.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
AuthorReplies:
Ouly
Archer
posted 05-11-09 16:36 EST (US)     26 / 83       
In my last test I realized that each AI has set number of bowmen that are used for rally points and that amount varies for each.

Fewer rally points means more bowmen at each spot.

I counted the bowmen each had and 1/2 hour later that number had not changed.

The Bishop had 14 crossbows and didn't make use of the troop pool.

5 bowmen appeared at the troop pool for the others.

William had 24 bowmen total on the walls.
Sir Grey had 15 total(1 each at 10 rally spots and 5 at the pool)
The King had 25 total
Seren had the most by far at 40 (unless I counted 1 spot double)

I can't remember the others but it was around 16-18 for the Hawk and 20-22 for the Queen. This is bad news if you want to make a sprawling design for Sir Grey or the Bishop.

The King's castle this test demonstrated to me the importance of opening up rally spots quickly when building. I had built a fairly large square castle for him with an isolated keep at the center. I used 4 large gates, 4 bastions in the corners and 2 great towers near the keep. In the test only 1 gate built before the walls started building and no other gate or tower was built for quite some time. Since all of his range rally spots were on the towers and gates, most of his bowmen ended up on the first gate.(18) When 2 more rally spots were eventually built he placed 1 bowman each on those. The troop pool was on the keep where 5 showed up. I ended up with 7 empty rally spots because he reached his limit of 25 bowmen before most of the rally spots were built. Needless to say, this design was a flop.

Some AI's will buy a few bowmen at the start and place those at rally spots if you have any open. The barracks and the engineer's guild are a good start for early rally spots. After the initial buy, bowmen appear at a certain rate for each as weapons become available.(built?) The different rates may be a result of more or less efficient building placements or a set rate for each AI.( the Queen didn't put bowmen on the walls quicker even though I gave her a couple extra fletchers early) If a new rally spot is open, the next bowman goes there. If not, the AI cycles through the order of existing spots placing him at the next in the order.

So...assuming all rally spots are built quickly.....Give Sir Grey 5 rally spots and the troop pool and you should get 2 bowmen at each spot and 5 at the pool. Use Seren instead and she would have 7 bowmen at each spot and 5 at the pool.

Hope this helps.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Ouly
Archer
posted 05-12-09 17:07 EST (US)     27 / 83       
This post ties in with my last one concerning build rates of defensive bowmen for the AI's. The Hawk has the fastest build rate of all the AI's and is a tricky AI to build a large castle for.

Seren may only produce 4-6 bowmen for the walls in the time it takes the Hawk to build all 20(?) of his defenders. All the bowmen will be built and placed at early rally points before any of the large towers are complete.

I've tried several larger designs for him but none have worked so far. They will work for other AI's but not the Hawk. The only way I can see to get his bowmen into towers is to place several lookout towers early and then build the rest of the castle around them. I'll test this idea tonight. If it doesn't work then the Hawk will be stuck with either small castles or no bowmen in towers.

On another note, a good tactic is to use the troop pool rally spot for the last big tower that is built in a design. That way at least 5 bowmen are guaranteed to appear there.(except for the Bishop who doesn't use the troop pool)

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.

[This message has been edited by Ouly (edited 05-12-2009 @ 05:11 PM).]

Doomsword
Earl
posted 05-13-09 08:03 EST (US)     28 / 83       
It seem that AI estates develop crime only if you give them a Dungeon/Courthouse. Kind of a bummer. I like to use it in my castles. I've only seen them generate one criminal.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Ouly
Archer
posted 05-15-09 11:30 EST (US)     29 / 83       
I finally began work on Barclay's castles and realized that he puts the most bowmen on the walls.

While both he and Seren have 30 bowmen for the orange rally spots, Seren has 10 in the troop pool and Barclay has 20.

This makes placing more than 1 troop pool useful, especially for Barclay.

I'm not positive what the pool is for, maybe readily available replacements for the regular defenders.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Ouly
Archer
posted 05-18-09 15:00 EST (US)     30 / 83       
While splitting Barclay's troop pool into 4-5 groups works good, I haven't had any luck splitting Seren's troop pool. Every time I place more than 1, the editor seems to not save the extra spots. When I reload, I only have 1.

I've now got 3 designs for each AI that I'm happy with except Olaf. I left his as is.

I may play around with a few more unorthodox designs just for the fun of it. Perhaps make a custom 1 on 1 war scenario where Barclay makes a large thick walled well defended castle surrounded by moat that you get to pound to dust with trebuchet while filling in the moat.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-18-09 19:13 EST (US)     31 / 83       
Nice, I have two finished

Castles numbered 05 or more do not work.

The castle I made for Seren has two troop pool points saved. That last part sounds fun. I should get some more done this week. I have a few that just need to be reworked.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Ouly
Archer
posted 05-20-09 22:58 EST (US)     32 / 83       
The castle I made for Seren has two troop pool points saved.
That's weird. I tried it with all 3 of her castles and the same thing happened, the extra 1 kept disappearing. Oh well...

Something else I found while testing. The AI has a bad habit of placing the Inn in the way of the castle footprint. Several times now I've seen the Inn parked square in the way of a large tower that hadn't built yet. Even when there was room elsewhere for it. Very annoying. It may be worthwhile to manually place the Inn for AI's that use it.

I've seen an iron mine and ox tethers in the way of a tower as well.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.

[This message has been edited by Ouly (edited 05-20-2009 @ 11:01 PM).]

Doomsword
Earl
posted 05-24-09 20:40 EST (US)     33 / 83       
I read in a thread on SHK that engineers with oil did not work, but I have used them and seen them functioning properly. I have also seen them not working, I wonder what the deciding factor may be.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Ouly
Archer
posted 05-25-09 07:14 EST (US)     34 / 83       
I tried using oil engineer's with no luck. I put a an oil smelter in 3 castles for Grey but he never recruited an engineer to run it. The 3 oil engineer's I had placed just stood about the smelter waiting for oil.

Perhaps only certain AI's can use them.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-25-09 11:44 EST (US)     35 / 83       
After a few hours of oil research here's the deal.

Most AI's sell off their Pitch right away, except three. The King, Lord Barclay and, Lady Seren. All three of these handle Pitch a different way. Lord Barclay will build Pitch Rigs if able, the others will not. Lady Seren actually appears to buy Pitch. The King seems to keep what he starts with so he will only have some when starting with a high rank.

I have had all three place Oil Engineers as directed, it takes a little while sometimes, they walk very slow and have to go to the stockpile. Also not having enough Iron at one time will get in the way of building the smelting pot but when starting at the highest rank they will work. Yay burning of enemies!!

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Doomsword
Earl
posted 05-25-09 13:12 EST (US)     36 / 83       
After reading the SHK thread again, I see we can add pitch ditches if we add a line to the java .txt file and a .gif. Seren or Barclay might use them. The Grainery could be added too.
If anyone wishes to use pitch in custom AIs, open up your buildings.txt file. Scroll to the very end, and create a new line with the following on it:
203,0,0,1,1,pitch.gif,Pitch,1,0,0,1,0,1,-1,0,-1,Military
Do not leave a blank line at the end of the file, make sure this line is the last thing in buildings.txt. You'll also need to add a 20 pixel x 20 pixel square picture into the pics directory called 'pitch.gif', either take a screenshot or just make something in Paint that you like. As for adding the granary, I don't seem to know the building ID - was it discovered?
Here is an image for the pitch.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\

[This message has been edited by Doomsword (edited 05-25-2009 @ 01:41 PM).]

Ouly
Archer
posted 05-25-09 17:01 EST (US)     37 / 83       
Very cool about the oil & pitch! I just wish I'd known about this a week ago before uploading a castle pack with my scenario.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-25-09 18:07 EST (US)     38 / 83       
I've started to look at those today, playing one lord at a time on the Grasslands. I noticed in the large Queen one there's a space at the Treasury that needs a block of wall to fill in early. The tower takes a while to fill in. I like the King one that is kinda figure 8, Oil Engineers would be nice on the tower next to the front gate.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\

[This message has been edited by Doomsword (edited 05-25-2009 @ 06:11 PM).]

Ouly
Archer
posted 05-25-09 18:29 EST (US)     39 / 83       
Yeah, some of those castles have been edited so many times, the build order gets a bit messed up. Some could have used a bit more tweaking. All the more reason to plan and build them right the first time.

Still, some are pretty good I think.

I'll have to add some oil & pitch to a few to juice up their defenses.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-26-09 23:38 EST (US)     40 / 83       
Hooray!! Seren just lit the her pitch with an Archer and burned all my horsemen You have to place braziers on walls or some buildings. They do not show up in Towers or on the Keep.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\

[This message has been edited by Doomsword (edited 05-26-2009 @ 11:38 PM).]

King of Scots
Archer
posted 05-27-09 00:19 EST (US)     41 / 83       
Hey guys sorry I ain't been around for a while, this is cool to hear about! I've been messing with the thingy on and off for almost a year now, but mostly just adding improvements to old castles and trying to figure out how to get more strategic placement of troops. you guys have gotten a lot further than I ever could! (Of course I hardly have any time either so...) Sounds like it's working out well! Any idea on the (possible) release date of a castle pack?

Keep up the good work lads!!

Alba an Aigh

Canada, eh!?

[This message has been edited by King of Scots (edited 05-27-2009 @ 00:24 AM).]

Ouly
Archer
posted 05-27-09 10:38 EST (US)     42 / 83       
Hail King of Scots! It's nice to hear that someone else is interested in what we're working on here.

It'll be up to Doomsword as to a castle pack release date. This was his idea so I'll leave it up to him to put together the castle pack and release it as a stand alone AI update. Each AI can use 4 different footprints, so between the 2 of us, there should be some interesting designs.

If you want to see what I came up with so far, you can get them with my war scenario 'First Command'. I made 3 designs for most AI's. A few are originals that I edited, but most are new. I may update mine later on adding pitch and oil, or just wait for Doomsword's castle pack if he plans to include any of mine.

No braziers in towers!? Now that's annoying.

I got pitch to work in the editor but haven't made any changes to the castles yet to see if it would work properly in the game. The absence of oil engineers and pitch in the AI's original castles had me wondering. It's good to hear that it does work.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-27-09 21:37 EST (US)     43 / 83       
Hey King of Scots, thanks for the encouragement. I couldn't say when it might be ready, still a good amount of work to be done, but I believe it will be worth it It should not be too long.

Of course I want to use some of yours Ouly, a major point of this project was to try and get other people to contribute so the designs have a more diverse nature. I would like to send you the .aic's I've made so far, after I fix the Seren00 I just tested the pitch with. I have a small castle for almost everyone, except the Hawk and Seren's which are medium size. After seeing your larger layouts working, I'm starting on a few of those.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Ouly
Archer
posted 05-28-09 08:46 EST (US)     44 / 83       
I'd enjoy seeing what you've come up with so far Doomsword. My email is markoulton'at'hotmail'dot'com. I think the easiest way would be to send me your entire 'castles' folder.

I did some testing today and found that the largest designs will build on grasslands only if 5 or more opponents are selected. The readme author for the AI editor suggested that the game chooses a random castle for an AI to build. This doesn't appear to be the case. Repeating a test shows the same designs building in the same spots.

My project for today will be to make a new kingmaker map for 6 players. I hope to get all sizes to build and to keep them separated enough that siege engines are not in range of neighbouring castles. Grasslands has opponents too close together.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Ouly
Archer
posted 05-29-09 09:04 EST (US)     45 / 83       
My new kingmaker map works as I had hoped. While not much to look at, it plays really well.

6 equal castle estates separated enough so they don't interfere with each other and 4 neutral estates to fight over. All my castle designs will play on it with 1 large, 3 medium and 1 small design typically building.

Much like grasslands, it's flat and very open with no eye candy. I'm considering redoing it to make it more attractive but anything I do will likely detract from how it plays and nothing will change the very symmetrical look of the map.(3 estates on each side, each separated by a strip of wilderness with a row of 4 neutrals down the center.) The symmetry was necessary for good separation and to ensure all designs would build.

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Ouly
Archer
posted 05-30-09 13:27 EST (US)     46 / 83       
Hail Doomsword! I just checked out the castles you sent me. Nice designs! I especially liked Edwin's and the King's. The illusion that you can gain the King's walls from the engineer's guild is a nice touch.(intentional? ) I also really liked the orientation of the armoury in your designs. I can't believe I never thought of that.

I ran a long test before checking them out in the editor and found a few issues.

In the King's design, the men intended for the large gate ended up on the ground to the right. His footprint rotated 90^ counter-clockwise in my test. I had similar issues with rotation and ended up putting the rally points on large gates and all keeps pretty much dead center. Otherwise, bowmen would end up on the ground occasionally.

The bastion near the gate in Williams design didn't build either. I think the 1 closest piece of moat caused that problem.

I liked the Hawk's design but no defenders ended up on the outer curtain except on the Barracks. He's a tough 1 to make a castle for because of the speed at which he builds defenders. Personally, I think that design would work better for an AI like the queen or Serene who build defenders very slowly. That way you could likely add bowmen to the bastions and large gate and actually get them to show up.

Other than those few glitches, well done! Keep em comin!

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-31-09 11:41 EST (US)     47 / 83       
Hail Doomsword! I just checked out the castles you sent me. Nice designs! I especially liked Edwin's and the King's. The illusion that you can gain the King's walls from the engineer's guild is a nice touch.(intentional? ) I also really liked the orientation of the armoury in your designs. I can't believe I never thought of that.
I'm pretty happy with the king's. The engineers guild is mostly to block ladder access to the last section of wall that I was forced to add. Edwin was kind of an experiment, that I like the results of. I made the Bull's similar forcing them to patrol the walls but I entrapped the engineer guild and the catapults.
I ran a long test before checking them out in the editor and found a few issues.

In the King's design, the men intended for the large gate ended up on the ground to the right. His footprint rotated 90^ counter-clockwise in my test. I had similar issues with rotation and ended up putting the rally points on large gates and all keeps pretty much dead center. Otherwise, bowmen would end up on the ground occasionally.
I see. The gate not placing right in the editor doesn't help either. Fixed. I also changed the moat a little to avoid entrapment issues and get the Hunters to not build in the way.
The bastion near the gate in Williams design didn't build either. I think the 1 closest piece of moat caused that problem.
I thought that might happen but its only sometimes. The other end of the moat works well though
I liked the Hawk's design but no defenders ended up on the outer curtain except on the Barracks. He's a tough 1 to make a castle for because of the speed at which he builds defenders. Personally, I think that design would work better for an AI like the queen or Serene who build defenders very slowly. That way you could likely add bowmen to the bastions and large gate and actually get them to show up.
I was getting troops on the large gate but didn't really bother with rally points for those bastions because no one shows up. They are mostly for the extra ballista. That is one of the earlier ones I made, not sure it will make the final cut, certainly not without changes. I do want to make a new one for him.

Some other things still are issues. Seren was only making 2 oil engineers and one was the smelting pot filler. Maybe she should have pitch or oil but not both. I also deleted some pitch near the merc tent because her whole town was buning down, lol. Another well wouldn't hurt.
I made a test King and the oil did not work at all Going to test Barclay and the oil some more next.

Thanks for the feedback

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Ouly
Archer
posted 05-31-09 18:42 EST (US)     48 / 83       
Thanks for the feedback
No problem!

I never thought to test your castles defenses. I just let them build and fill out their defenders. It's too bad about the King not using oil because I think all his engineer's showed up. I hope someone uses it properly! Have you actually seen an engineer dump oil?

As for Seren, 1 engineer with oil isn't worth the effort. Maybe just pitch traps for her.

I probably won't get a chance to do much testing along this line for a bit. A job I have at the moment is keeping me on the go for about 12 hours a day. I am soooo sore right now and tired.

Later...

What's with the old saying, "Like having your cake and eating it too"? That's easy.
Now, eating your cake and still having it, that's a wee bit harder to do.
Doomsword
Earl
posted 05-31-09 18:54 EST (US)     49 / 83       
The King design I gave you, the oil works perfectly, I assaulted the place enough to test it and have seen it burn. It's another I made for the king that doesn't work, inexplicably.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
Doomsword
Earl
posted 05-31-09 20:38 EST (US)     50 / 83       
More on Oil.

I forgot to give the Hawk a Market in a new design and saw he kept his Pitch, so I gave him a Smelting Pot and started up a game and it worked , sorta. The new design came up three times and the oil worked perfect on one of them. The other two only spawned the filler and no carriers . Not that denying them a Market was any kind of solution.

/\.........................../\
/..\_______________/..\
/..Angel Doomsword.\
/_/./././|||||||||||||\.\.\.\_\
/_/./_/{||||||||||}\_\.\_\
/_/......X..|||..X......\_\
« Previous Page  1 2 3 4  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Stronghold 2 | HeavenGames