Forgotten Hope Public Forum

Forgotten Hope 2 => Modding => Topic started by: Drawde on 02-03-2010, 21:03:36

Title: Is it possible to add new AI object classes for setStrType?
Post by: Drawde on 02-03-2010, 21:03:36
BF2 (and FH2) currently has 6 object classes/types used by "aiTemplatePlugIn.setStrType" in objects.ai files: Infantry, LightArmour, HeavyArmour, NavalArmour, Helicopter and Airplane. Anyone know if it's possible to add more via modding, or if the classes are hard-coded?

Adding "Unarmoured Vehicle", "Medium Armour" and "Static Gun" classes would be very handy for improving the AI's target selection and weapon use - e.g. aircraft could be set to strafe unarmoured and light vehicles but not medium/heavy armour, tanks could be set to only use special AP rounds on heavy armour, etc. Currently, having all tanks/armoured cars as "heavy armour" and all guns, APCs and softskins as "light armour" makes it difficult to get the AI to use the right weapon type; HE rounds, for example, are the best choice against AT guns, but not too effective against halftracks.
Title: Re: Is it possible to add new AI object classes for setStrType?
Post by: cannonfodder on 16-03-2010, 07:03:12
Judging from this thread on BFSP...: http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=13232&hl=aiTemplatePlugIn.setStrType

...I'd say they're hard-coded.
Title: Re: Is it possible to add new AI object classes for setStrType?
Post by: Drawde on 25-03-2010, 21:03:54
Judging from this thread on BFSP...: http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=13232&hl=aiTemplatePlugIn.setStrType

...I'd say they're hard-coded.

Shame  :( Thanks for the information anyway.

I'm wondering, though, if it would be possible to use the "Helicopter" and "NavalArmour" armour classes (unused in FH2, I don't think NavalArmour was used even in vBF2) as substitutes for new armour types (unarmoured and heavy respectively). Armour types don't affect the AI's usage of vehicles (korben_dallas's post in the thread you linked to refers to changing the AI behaviour category) but would it affect weapon damage/penetration? I assume not - I think these "armour classes" are only used by the AI, actual armour data is stored elsewhere - but I'm not 100% certain.
I'll probably try this out anyway and see what happens...
Title: Re: Is it possible to add new AI object classes for setStrType?
Post by: cannonfodder on 26-03-2010, 10:03:02
...I'm wondering, though, if it would be possible to use the "Helicopter" and "NavalArmour" armour classes (unused in FH2, I don't think NavalArmour was used even in vBF2) as substitutes for new armour types (unarmoured and heavy respectively)...
I don't see why not, and it would certainly help the bots prioritize their targets better.


Quote
...I assume not - I think these "armour classes" are only used by the AI, actual armour data is stored elsewhere - but I'm not 100% certain...
Yeah, AFAIK the "armor class" is how the bots identify what a vehicle is...i.e.: A bots "target" falls into one of the 6 armor classes (in FH's case, 4 armor classes), which mainly determines whether or not a bot will attack it.