Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Descr formations ai.txt"

From TWC Wiki
Jump to navigationJump to search
(Block Specifications)
(links)
Line 47: Line 47:
 
* hold_fire_and_skirmish - clearly works as fire at will defaults off and skirmish on.
 
* 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).
 
*  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==
 +
*[http://forums.totalwar.org/vb/showthread.php?t=70307 Modifying Formation AI version 2] by [[DARTH VADER]]
 +
*[http://www.twcenter.net/forums/showthread.php?t=59061 Post explaining default melee tag] by [[Sinuhet]]
  
  
 
[[Category:RTWModding]]
 
[[Category:RTWModding]]

Revision as of 06:30, 15 August 2007

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

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