grimjaw
General
Posts: 506
Joined: Wed Feb 09, 2011 5:38 am
Location: Arkansas

Commands used by the AI for various actions

Wed Feb 03, 2021 6:08 pm

When the AI decides to build a unit from a defined force pool, I have to imagine it invokes a command with parameters. There will probably either be a number of units specified or a number of commands issued for the same type of single unit build, as well as a location.

What I'd like to know is if the AI is using the same set of commands that I'd use via script (CreateGroup/CreateUnit), or if it's calling a different procedure. If it's calling a different command, is it possible to call that command via script? If it isn't, is it then possible to invoke CreateUnit and having that command pull SU names from the model/unit values instead of having to specify them?

Here's the reason I ask. As much as possible, I am trying to prevent redundancy of historical regiment names. I don't want the name "10th North Carolina Cavalry" to go to more than one unit. I can remove that name from the list of model names in the files, but that means I have to create it via script if I want it in the game. What I'd prefer is for the CreateUnit command to pull names from the file, or use the command that the AI uses to build units, since it is presumably doing that.

Any ideas? I am stating this clearly enough?

grimjaw
General
Posts: 506
Joined: Wed Feb 09, 2011 5:38 am
Location: Arkansas

Re: Commands used by the AI for various actions

Mon Feb 08, 2021 10:07 pm

Answered my own question through tinkering, but in case anyone else was wondering ...

Calling CreateUnit without specifying SUFlavorName or SerName will have the engine pull those names from the record of the unit.

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 3 guests