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 "On-wall deployment - M2TW"

From TWC Wiki
Jump to navigationJump to search
(View Existing Deployment)
Line 26: Line 26:
 
The attacking AI will only attack one breachable element per block, e.g. if you have three wall breaches under the same block it will only attack/climb one regardless of how much artillery, or how many ladders it has.  If you have a gate and wall elements under the same block it will only attempt to use the gate and not attack the walls.
 
The attacking AI will only attack one breachable element per block, e.g. if you have three wall breaches under the same block it will only attack/climb one regardless of how much artillery, or how many ladders it has.  If you have a gate and wall elements under the same block it will only attempt to use the gate and not attack the walls.
  
==Adding a Deplpoyment Block with IWTE==
+
For the AI to choose to defend on a deployment block the objects within it need to be assigned to a 'perimeter'.
 +
 
 +
==Adding a Deplpoyment Block and Access with IWTE==
 +
===Adding the Deployment Block===
 +
Note the object number of one of the objects you want in the block.  If you don't know the object number trigger ''Assign Perimeters'' from the ''Gameobjects'' tab, the 2d view will then show you the settlement plan with the object numbers displayed, note the number and ''Cancel'' out of the screen.
 +
 
 +
*Go to ''Paths'' tab. 
 +
*Select ''Add deployment block''
 +
*Scroll through the ''Objects'' window and select the object number you want to start with. 
 +
*Click ''Add selected object''
 +
*Click the drop-down under ''Confirm height selected'' and check you have the correct height selected, this menu shows all the possible flat horizontal levels within the object, for standard stone walls you'll want the lowest of the three options, the others are the battlement surfaces.  If you're using a complex new model, note the height of your desired plane from the model.
 +
[[File:Add deployment block M2TW.jpg|400px|Adding deployment block in IWTE]]
 +
*Click ''Confirm height selected''
 +
* You'll now have that object and any other objects that share the same height shown in the 2d view:
 +
[[File:Adding adjacent objects M2TW.jpg|400px|Adding objects to the deployment block]]
 +
*Select an ADJACENT object you want to add, and click ''Add selected object''
 +
*Repeat until you have selected all the objects you want in the block, note they must be attached at the same height.
 +
*When you've added all the objects you need click ''Set edge types''
 +
[[File:Set edge types M2TW.jpg|400px|Setting edge types for the deployment block]]
 +
*The diagram will change to show the edges, box select the edges and click the relevant button.  For a normal wall you'll want 'front' the default by the battlements, 'back' on the other long edge and 'side' at the ends.
 +
*When done click ''Accept edge types''
 +
*Now click the ''OK'' button - IWTE will then calculate the deployment, this may take a while for complicated shapes...
 +
*When it's finished you'll get a diagram that shows the orange blobs where the soldiers will try and stand, these are directional and will be laid out according to your choice of front/back/side edges.  If you've got that wrong you can use 'Change deployment block' to change the edge settings.
 +
 
 +
===Add Doors and Links===
  
  

Revision as of 02:41, 17 March 2021

M2TW Modding Index


In siege battles in Medieval II: Total War infantry can stand and fight on the flat wall surfaces around the perimeter of most settlements, forts and castles. This article explains the mechanics of this process and how to add your own on-wall deployment blocks with IWTE.

To date only infantry units can be deployed on walls, mods that purport to have artillery on walls have achieved the effect by having wide blocks of terrain hidden under a superficial 'wall' structure.

View Existing Deployment

In game when you deploy or give move orders to troops on a wall you will see small yellow symbols which represent where each soldier will stand and the direction they will stand.

View of deployment on wall in game


To view the on wall deployment of an existing settlement in IWTE, Read 3 Binary Files to load the .world, .worldcollision and .animinstances go to the Views tab, and select View World - 2d, View Table Blocks - 2d, View Links/Ladders - 2d and View door points

View of deployment and links in IWTE

Note: in that screen, the on-wall deployment is referred to as 'table blocks' (from the initial decoding of the file structure!) - the 'deployment' mentioned there is the Deployment Outline which limits the area the defending troops can initially deploy into.

Requirements for a Functioning Deployment Block

For a new block to be added in IWTE the objects must share a flat horizontal surface within a very limited tolerance of minor height variation.

For the block to be useable in-game the objects should have collision volumes, and the block must have at least one 'door point' with a 'link/ladder' connection, either directly to a 'ground level door' or to another block that has such a connection.

For the AI to favour standing on an on-wall block that has a reachable wall within it, there must be door points either side of the breach, so it can retreat to either side if the wall is attacked with artillery.

The attacking AI will only attack one breachable element per block, e.g. if you have three wall breaches under the same block it will only attack/climb one regardless of how much artillery, or how many ladders it has. If you have a gate and wall elements under the same block it will only attempt to use the gate and not attack the walls.

For the AI to choose to defend on a deployment block the objects within it need to be assigned to a 'perimeter'.

Adding a Deplpoyment Block and Access with IWTE

Adding the Deployment Block

Note the object number of one of the objects you want in the block. If you don't know the object number trigger Assign Perimeters from the Gameobjects tab, the 2d view will then show you the settlement plan with the object numbers displayed, note the number and Cancel out of the screen.

  • Go to Paths tab.
  • Select Add deployment block
  • Scroll through the Objects window and select the object number you want to start with.
  • Click Add selected object
  • Click the drop-down under Confirm height selected and check you have the correct height selected, this menu shows all the possible flat horizontal levels within the object, for standard stone walls you'll want the lowest of the three options, the others are the battlement surfaces. If you're using a complex new model, note the height of your desired plane from the model.

Adding deployment block in IWTE

  • Click Confirm height selected
  • You'll now have that object and any other objects that share the same height shown in the 2d view:

Adding objects to the deployment block

  • Select an ADJACENT object you want to add, and click Add selected object
  • Repeat until you have selected all the objects you want in the block, note they must be attached at the same height.
  • When you've added all the objects you need click Set edge types

Setting edge types for the deployment block

  • The diagram will change to show the edges, box select the edges and click the relevant button. For a normal wall you'll want 'front' the default by the battlements, 'back' on the other long edge and 'side' at the ends.
  • When done click Accept edge types
  • Now click the OK button - IWTE will then calculate the deployment, this may take a while for complicated shapes...
  • When it's finished you'll get a diagram that shows the orange blobs where the soldiers will try and stand, these are directional and will be laid out according to your choice of front/back/side edges. If you've got that wrong you can use 'Change deployment block' to change the edge settings.

Add Doors and Links