Jump to content


Photo

AI Hero Recruiting


  • Please log in to reply
5 replies to this topic

#1 oblivionator

oblivionator
  • Members
  • 73 posts

Posted 11 November 2009 - 06:54 PM

Hello, I have a couple of questions on how to make the AI recruit heroes more early, like hobbit heroes coming out really early in the game. I noticed that the AI will only start recruiting heroes in the second and third phases. I would also like to try and make the AI revive heroes right after they die, returning as a different object, like a Nazgul first being recruited on horse, then once killed, comes back on a fellbeast. The AI will recruit the Nazgul for the first time on horse, but then I never seen them revive the Nazgul with their fellbeast. I think it would have something to do with Mordor's hero build order in skirmishdata INI. Once the Nazgul are removed from Mordor's hero list from both the skirmishaidata and playertemplate INI and the heroes that are left are the Witch-king, Mouth of Sauron, and Gothmog, they continue to revive them as the battle progresses. But once the Nazgul are added into the hero list again, the AI will stop recruiting and reviving their heroes after awhile, probably because the Nazgul revive as different objects. I added their revive-with-fellbeast forms into the hero build order list, but the AI still won't recruit them.

So my question is: Would there be some sort of code or script that could make the AI recruit certain heroes more early in-game, and make them revive certain heroes the moment they die (like the Nazgul)? Any help would be appreciated. :xd:
Posted Image

#2 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 11 November 2009 - 07:30 PM

If you reduce the priority numbers for economy and for research (science) in skirmishai.ini as well as reduce the build priorities of all structures in bascially all three phases (open the faction specific .bse file in WB and select the structures in question) it should have the desired effect.
1. Hero priorities can only be assigned by reducing the rest. No direct number for heroes can be set.
2. After starting the game, the skirmishAI_2 will execute a random skirmish strategy, which is going to influence all of it. SO don't be surprised if what i recommend sometimes works and sometimes doesn't.

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#3 oblivionator

oblivionator
  • Members
  • 73 posts

Posted 14 November 2009 - 05:30 AM

Ok, I'll try that. Thanks for your help. :p

Now I have another question completely unrelated to what I previously asked and it involves WOTR. When a real-time battle is started on a map, I'm trying to get the armies to start off in different locations. Like for example, one opposing army enters Isengard from Dunland, and another opposing army enters Isengard from Fangorn. I would like to get the army from Dunland to start in the south-west corner of the map, and get the army from Fangorn to start in the north-east. But this is just an example, and I'm going to try and do this for a lot of new maps with their own regions on the living-world map. Is there some INI that controls where the armies start or would I have to go into each individual map with WB and edit some things? I see waypoints in maps saying things like "WOTRGatherPoint_Fangorn_1" and "WOTRSpawnPoint_Dol_Guldur_1", but I'm not entirely sure what they do.
Posted Image

#4 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 14 November 2009 - 05:44 PM

That's the waypoints the game uses to assign the SpawnPoints and the 'Walk-there-and-stop'-points for the armies. The first point is always outside the visible map area, the second where they stop inside the visible border and the stretch between these two points should be some sort of road.

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#5 oblivionator

oblivionator
  • Members
  • 73 posts

Posted 15 November 2009 - 02:26 AM

With a little experimenting and your info., I can see how armies and reinforcements are brought into a map when playing WOTR mode. Thank you very much again! :D

This is for RJ-Rotwk btw. I'm led into thinking and attempting something else for the AI.... In WOTR mode, I'm trying to solve the occasional problem where 2 AI players build their bases in similar spots, whether they be allies or enemies. I thought I'd make new maps for WOTR mode, being the same as the original maps, but with more player_start waypoints and altered farm template locations for the AI to build. I started with the Wold map, saving the map as "wotr map wor wold" to avoid overwriting the original map, which is "map wor wold". I went into livingworldregions.inc to change the map the region links to and it works perfectly. But now the AI will only build farms on this map in WOTR mode, but will work fine on this map in regular Skirmish. The map was saved with all my other custom maps in "C:\Documents and Settings\<me>\Application Data\My The Lord of the Rings, The Rise of the Witch-king Files\Maps," so I decided to place it with the other RJ maps in "C:\RJ_RotWK_1_06\maps." Now the map won't appear in the list in regular Skirmish mode, and the AI will still only build farms on the map in WOTR mode. I then tried to put the map with the other maps in the Maps FinalBIG document in "C:\Program Files\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king," but still got the same result. Hmm.... I just want to get the AI working on the map in WOTR mode and don't really care if it doesn't show up in Skirmish, since the map is solely for the AI players not building their bases in similar spots. Does anybody know why they are not working? :p

Edited by oblivionator, 15 November 2009 - 02:30 AM.

Posted Image

#6 oblivionator

oblivionator
  • Members
  • 73 posts

Posted 16 November 2009 - 12:31 AM

Nvm, I figured it out and fixed it. The MapCache file wasn't creating the data for the map in the mod folder, so that's why the map didn't appear in the Skirmish mode list and why the AI wasn't working on the map in WOTR mode. :p Hehe.
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users