Page 1 of 1

Modding, new units, and the AI and special abilities

Posted: Mon Apr 09, 2018 9:25 pm
by JamesManhattan
So I have been modding the game HELL. It makes the perfect base for an individual miniature skirmish game. It has a very robust rule system and I like the A.I. a lot.

My question is: I made some new custom units, and I can figure out how to give them special abilities by adding their name as a BSF file in the Battle/Scripts and putting the "include" lines for the special ability. The problem is the A.I. never makes use of the abilities. Do I need to trick the system into thinking my new unit is similar to an existing unit, such as an Arachne? Or is it something else?

Re: Modding, new units, and the AI and special abilities

Posted: Mon Apr 09, 2018 9:39 pm
by pipfromslitherine
You would need to look at the AI scripting to determine how it is using unit abilities. You can find it in CORE/AI/AI.BSF



Re: Modding, new units, and the AI and special abilities

Posted: Tue Apr 10, 2018 1:42 am
by JamesManhattan
On experimenting, 1: I tried taking away TangledWeb in the Arachne.BSF file and giving a regular Arachne Flaming Arrow and Sword of Valor and the AI did use Flaming Arrow and Sword of Valor. So if you change what powers it has it seems to adjust and use different powers. That Arachne would not ever use Sting, or Nightmare ever though.

2: I tried copying the entire Arachne line in the squads.csv to a new line, and renamed it to Arachne_MyUnit and made a Arachne_MyUnit.BSF script file and that worked. I then just switched the 3D model. It made use of all the powers like it was an Arachne but looked different. Maybe the AI looks for the word Arachne in the unit name.

When I made my own new unit but gave it powers in a BSF that did not work.

There is a lot of logic built on the stats of a unit I noticed in the code. The powers all work off those stats too, and I think if you don't give a custom unit a high enough stat to make good use of Sword of Valor the AI won't use it. I think it also hinges on the enemy unit. If the enemy unit is so weak, the AI seems to not waste a power on the weak enemy. I think that might be why my first Arachne was never using Nightmare or Sting, it was the other enemy units I was testing in the scenario were not good targets for those powers so the AI did not use the power.