Difference between revisions of "Descr formations ai.txt"
m (Removed category "Battle Map Modification" (using HotCat)) |
m (Text replacement - "http://www.twcenter.net" to "https://www.twcenter.net") |
||
Line 44: | Line 44: | ||
hold_fire_and_engage_at_will_and_skirmish | hold_fire_and_engage_at_will_and_skirmish | ||
hold_fire_and_engage_at_will | hold_fire_and_engage_at_will | ||
− | Taken from [ | + | Taken from [https://www.twcenter.net/forums/showthread.php?659584-quot-default_melee_state-quot-flag this post]. Due to the amount of time taken in researching this he requests that he be given credit as a courtesy if any mod uses these findings. |
Brief testing of some of the functions shows: | Brief testing of some of the functions shows: | ||
Line 53: | Line 53: | ||
==External Links== | ==External Links== | ||
− | *[ | + | *[https://www.twcenter.net/forums/showthread.php?t=64097 Modifying Formation AI version 2] comprehensive tutorial on modding formations by [[DARTH VADER]] |
− | *[ | + | *[https://www.twcenter.net/forums/showthread.php?659584-quot-default_melee_state-quot-flag Post explaining default melee tag] by [[Sinuhet]] |
Revision as of 11:54, 10 February 2020
WIP adding notes as things found, please add to. All comments so far relate to RTW version of file - notes of differences for M2TW if any need to be included
Contents
Overview
descr_formations_ai.txt is used in RTW/BI and M2TW and controls the formation used by the AI throughout battles and the default formation of units set up for the human player at the start of a battle. descr_formations.txt has a similar layout but only controls the formation of groups of units, and not entire armies.
Most of file usage is explained at the top of the file itself and in comments, so far only additional pieces of information are being included here.
Block Specifications
Note that blocks must start numbered 0 and be numbered consecutively, missing or re-using number causes message-less CTD when entering battle. This is quite easy to do accidentally so make sure you've set your formation to high priority and seen it working in battle before moving on to next one.
unit_type
There are examples of phalanx being used as a selector in the original file shield_wall can apparently be used in the same way to select only shield_wall capable units.
unit_formation
unit_formation shield_wall
will make all shield_wall capable units in block start by default in shield_wall mode
default_melee_state
Possible basic commands, with effect if used on their own;
- skirmish - enables skirmish mode by default for any unit with the ability (missile and skirmish class units). Turns off fire_at_will default setting on archers.
- defend - sets units on guard mode, which also disables skirmish and fire at will setting for archers
- fire_at_will - units use fire_at_will (as usual) but archers are not on skirmish setting by default
- hold_fire - turns skirmish and fire at will off by default.
- engage_at_will - turns skirmish and fire at will off by default. Not sure of usage but it does seem to be a valid command see below.
Beware of inventing things:
- skirmish_off - also turns skirmish and fire at will off by default.. But so does:
default_melee_state blahblah
So unless CA actually coded in blahblah somewhere, that might just be games response to adding in things it doesn't understand, anything without clearly observable result needs careful checking to see if it is actually doing anything! Unlike those examples though hold_fire and engage_at_will do seem to work in combination, see below. Putting blahblah in combination with fire at will, stops the whole combined command working, eg fire at will stops working if used in combination with an invalid command.
Combinations:
Combining by use of commas or space separated commands does not work, however Sinuhet has discovered and reported that use of _and_ between commands works. Some combinations that he has tested:
fire_at_will_and_defend_and_skirmish fire_at_will_and_defend fire_at_will_and_skirmish defend_and_skirmish hold_fire_and_defend_and_skirmish hold_fire_and_defend hold_fire_and_skirmish fire_at_will_and_engage_at_will_and_skirmish fire_at_will_and_engage_at_will engage_at_will_and_skirmish hold_fire_and_engage_at_will_and_skirmish hold_fire_and_engage_at_will
Taken from this post. Due to the amount of time taken in researching this he requests that he be given credit as a courtesy if any mod uses these findings.
Brief testing of some of the functions shows:
- fire_at_will_and_skirmish - works as expected and skirmish units appear with skirmish setting on by default and archers have fire_at_will default by on. Using other way around eg. skirmish_and_fire_at_will, produces same result as blahblah.
- fire_at_will_and_defend - also produces clearly observable result of fire at will and guard mode being selected by default.
- hold_fire_and_skirmish - clearly works as fire at will defaults off and skirmish on.
- fire_at_will_and_engage_at_will - gives fire at will on by default and skirmish off, but without guard mode activated. Not sure what difference that generates over fire_at_will on its own, but it is clearly a valid command as the fire_at_will part remains operational. (fire_at_will_and_blahblah invalidates the fire at will command).
External Links
- Modifying Formation AI version 2 comprehensive tutorial on modding formations by DARTH VADER
- Post explaining default melee tag by Sinuhet