AI infantry please don't attack buildings!
#1
Posted 08 December 2006 - 02:25 PM
I've seen some threads about how making infantry not to deal damage to wall hubs, or else, but i seek something else.
I noticed AI infantry does not attack wall segments, and i'd like some other structures to be spared, but i can't find how it's managed. I thought it was maybe something in the kindof of the structure, but anything i tried failed.
Has anybody an idea where to look?
Thank you
#2
Posted 08 December 2006 - 03:12 PM
In BFME2 (because not sure about ROTWK) at one point the infantry COULD attack walls. When i changed the armor values around and made them take no damage at all from infantry, the ai didnt even try to attack it. Most structures use the same Armorsets (i think) so you may find yourself making new armor sets so that every structure just cant be attacked
Maybe you should try that... if thats what you ment anyway.
Edited by Theo, 08 December 2006 - 03:14 PM.
#3
Posted 08 December 2006 - 03:50 PM
However, i already tried this, without success :(
BUT, i think i found the answer in Cahik's AI tutorial, just a few seconds ago, a BIG thanks to him. In case someone ever needs the answer too, here is a quote from Cahik's tut:
1. Unit attack priorities
Ini.big -> data\ini\default\skirmishaidata.ini
First thing we can change here are attack priorities. This tells computer what will unit attack most likely. Code looks like this ( it is not complete list just part):
CombatChainDefinition CavalryCombatChain
Unit = CAVALRY
TargetTypes = STRUCTURE PIKEMAN CAVALRY ARCHER INFANTRY
TargetPriorityModifiers = 50.0 0.0 50.0 150.0 50.0
End
So basicly this tells computer that all units that are cavalry will attack most likely ARCHERS, then STRUCTURES, CAVALRY or INFRANTRY and if no other target is around the PIKEMAN.
TargetTypes = STRUCTURE PIKEMAN CAVALRY ARCHER INFANTRY
This part is hardcoded so make no changes to that.
TargetPriorityModifiers = 50.0 0.0 50.0 150.0 50.0
Here you can give numbers in the sameorder as type sof target in TargetTypes. The higher numer the higher is priority to attack this type of units. 0.0 means that AI will attack this target only when no other is around. And negative number means that it will not attack that type of targets at all.
But it is not all. We need to give computer information what type of unit is our new unit. So we put code like this in horde or unit code ( in unit code only when it is single unit and has no horde ).
ThreatBreakdown IsengardUrukCrossbowHorde_DetailedThreat
AIKindOf = CAVALRY
End
So this two lines say to computer what attack priorities will new unit have Unit = CAVALRY and AIKindOf = CAVALRY.
#4
Posted 08 December 2006 - 05:00 PM
Did you try removing the armor types altogether; so not having slash set to 0%, but either commenting it out or deleting it completly?Thanks for your reply Theo
However, i already tried this, without success :(
But anyway glad to hear you fixed it.
Edited by Theo, 08 December 2006 - 05:01 PM.
#5
Posted 08 December 2006 - 05:39 PM
#6
Posted 08 December 2006 - 06:43 PM
#7
Posted 08 December 2006 - 08:34 PM
Edited by Dark Lord of the Sith, 08 December 2006 - 08:34 PM.
My Political Compass
Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users