Jump to content


Photo

How do you make the AI buy Units in....


  • Please log in to reply
7 replies to this topic

#1 ArronSwan

ArronSwan
  • Members
  • 168 posts

Posted 10 November 2008 - 11:29 PM

How do you make the AI buy Units instead of Hordes?


"I'm THE WAY, THE TRUTH and THE LIFE..."
Yeshua HaMashach (Jesus Christ)


#2 Hebblewhite

Hebblewhite

    Artificially Intelligent

  • Project Team
  • 131 posts
  • Location:North Wales, UK
  • Projects:WOP-AI (bfme AI plugin), Darkness Rising, Rhovanian Alliance
  •  Mysterious AI Guy...

Posted 11 November 2008 - 12:13 PM

How do you make the AI buy Units instead of Hordes?


By "units" do you mean for example building a bunch of individual uruk-hai warriors instead of an actual horde of them? If so, you need to add "IsengardFighter" to the "LIB - Object Lists" script which can be found in "Libraries.BIG --> lib_object_lists.map".

Then, simply add your new unit to the AI build teams of your choice. For example, to get the AI system to build our new Urukhai warrior, you'd need to replace every instance of "IsengardFighterHorde" in "Libraries.BIG --> ai_isengard.map". Simply open the ".map" file, and then select "EDIT --> EDIT TEAMS". You'll see a big list of all of the different AI Build Teams that are called at relevant points during a skirmish match.

Select one that you know contains uruk-hai hordes (such as "Attack - Basic Team"). Then simply replace "IsengardFighterHorde" with "IsengardFighter" in the UNIT TYPE box. Do the same thing in other teams until youget the effect you're looking for. A cool way to do it could be start start your enemy AI off (in the early patrol teams) with single uruk units and then swap over to hordes later on to provide greater challenge.

NOTE: You might want to increase the Min/Max numbers if you're going with single units or you'll end up with an AI army that never throws more than 2 or 3 individual uruk warriors at you!


Cheers,

Hebblewhite.
Reassuringly Expensive...

Blade with whom I have lived,
Blade with whom I now die,
Serve right and justice one last time,
Seek one last heart of evil,
Still one last life of pain,
Cut well old friend, and then... farewell


Posted Image

#3 ArronSwan

ArronSwan
  • Members
  • 168 posts

Posted 11 November 2008 - 05:18 PM

I made to the Edit Teams box, but I'm have a hard trying to find out how to edit the team. what do I do?


"I'm THE WAY, THE TRUTH and THE LIFE..."
Yeshua HaMashach (Jesus Christ)


#4 Hebblewhite

Hebblewhite

    Artificially Intelligent

  • Project Team
  • 131 posts
  • Location:North Wales, UK
  • Projects:WOP-AI (bfme AI plugin), Darkness Rising, Rhovanian Alliance
  •  Mysterious AI Guy...

Posted 11 November 2008 - 05:22 PM

I made to the Edit Teams box, but I'm have a hard trying to find out how to edit the team. what do I do?


When the dialog box pops up, you'll see a small list on the left-hand side and then another window on the right. If you select PLAYER from the left-hand list you should see all of the Build Teams that I was talking about earlier. Double left-click to select one of them.

You'll be presented with another big dialog box, and it's there that you'll find the unit names and min/max values (in the lower part of the dialog box). Be careful what you change at first though, 'cos you could mess up your faction AI! ;)



Cheers,

Hebblewhite.
Reassuringly Expensive...

Blade with whom I have lived,
Blade with whom I now die,
Serve right and justice one last time,
Seek one last heart of evil,
Still one last life of pain,
Cut well old friend, and then... farewell


Posted Image

#5 ArronSwan

ArronSwan
  • Members
  • 168 posts

Posted 13 November 2008 - 01:02 AM

I made to the Edit Teams box, but I'm have a hard trying to find out how to edit the team. what do I do?


When the dialog box pops up, you'll see a small list on the left-hand side and then another window on the right. If you select PLAYER from the left-hand list you should see all of the Build Teams that I was talking about earlier. Double left-click to select one of them.

You'll be presented with another big dialog box, and it's there that you'll find the unit names and min/max values (in the lower part of the dialog box). Be careful what you change at first though, 'cos you could mess up your faction AI! :good:



Cheers,

Hebblewhite.



I'm click on the Basic Team but no other window is popping up.


"I'm THE WAY, THE TRUTH and THE LIFE..."
Yeshua HaMashach (Jesus Christ)


#6 Hebblewhite

Hebblewhite

    Artificially Intelligent

  • Project Team
  • 131 posts
  • Location:North Wales, UK
  • Projects:WOP-AI (bfme AI plugin), Darkness Rising, Rhovanian Alliance
  •  Mysterious AI Guy...

Posted 13 November 2008 - 10:34 PM

I'm click on the Basic Team but no other window is popping up.


Ok. Lets start again:

1) Extract the entire "Libraries.BIG" file to a place of your choice.

2) Open the "ai_faction.map" file that you want to edit (depends on which faction/units you want to play around with etc.). I'm gonna stick with "ai_isengard.map".

3) Open "ai_isengard.map" using WorldBuilder.

4) When its finished you should see a bunch of "BASE_FLAG" objects in the main map editer area (where you'd usually see the terrain and 3D world stuff). Select "Edit --> Edit Teams...".

5) This will bring you to the "Team Builder" dialog box. In the list on the left you'll probably see a couple of entries like "(neutral)" followed by "Player". Select "Player".

6) The second you select it, you'll see a whole bunch stuff appear in the box on the right-hand side. These are the main Object Team Template definitions used during skirmishes. They basically define which units and heroes will move around together on the battlefield and the general tasks they will perform. Just to get started, select "Attack - Basic Team" from the list (double left-click on it).

7) You will be presented with the "Edit Team Template" dialog box. Look down towards the centre part of the menu box, and you'll see some options for "Min", "Max" and "Unit Type". In this case (ai_isengard --> Attack - Basic Team), the min and max values will be set to 2, and the only units assigned to the group will be "IsengardFighterHorde". You need to change the fighter horde to a plain "IsengardFighter" entry instead. This means that the basic attack team for the faction will consist of individual units instead of a horde. Obviously, because the min/max values are set to 2, you'll never get more than 2 units at a time...

8) When you've got that sorted out, use the same convention to change any of the group templates you like. Eventually, you'll start to get a feel for the settings that work best.


Hope that clears it up for you. :p


Cheers,

Hebblewhite.
Reassuringly Expensive...

Blade with whom I have lived,
Blade with whom I now die,
Serve right and justice one last time,
Seek one last heart of evil,
Still one last life of pain,
Cut well old friend, and then... farewell


Posted Image

#7 ArronSwan

ArronSwan
  • Members
  • 168 posts

Posted 14 November 2008 - 01:09 AM

I did as you said untill I double click but I releazed they're are X's on the Things, take a look:

Posted ImagePosted Image


"I'm THE WAY, THE TRUTH and THE LIFE..."
Yeshua HaMashach (Jesus Christ)


#8 Hebblewhite

Hebblewhite

    Artificially Intelligent

  • Project Team
  • 131 posts
  • Location:North Wales, UK
  • Projects:WOP-AI (bfme AI plugin), Darkness Rising, Rhovanian Alliance
  •  Mysterious AI Guy...

Posted 14 November 2008 - 08:04 PM

I did as you said untill I double click but I releazed they're are X's on the Things, take a look:

Posted ImagePosted Image


From the look of it, you've opened the wrong file. It should be (as in my above example) "ai_isengard.map" (or equivalent for other factions). It looks as though you've opened "ai_isengardskirmish.map" or "ai_isengardsps.map". All faction AI is inherited from the main "aifaction.map" file - if a file is inherited from another it will show up as a shortcut and will be uneditable (like the example in your picture).
Reassuringly Expensive...

Blade with whom I have lived,
Blade with whom I now die,
Serve right and justice one last time,
Seek one last heart of evil,
Still one last life of pain,
Cut well old friend, and then... farewell


Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users