Introduction[]
This tutorial will teach you how to configure and integrate a 3dsmax model in order to use it in Act of War as an building. This follows the tutorial "how to integrate a 3dsmax model as a unit".
Prepare your model[]
Open the AoWUsineVehiculesLod0od0_016.max file. You can see the buildings, but also several big boxes around it. Thoses boxes are not visible in the game, but define several things :
- VCollision_XX : define the collisions with walls, etc
- VSelection_XX : define the selection box
- VVision_XX : to block the vision of the units
- VSol_XX : define the ground area of the building
If you have several boxes, name them VCollision_01, VCollision_02, etc.
Export the model usinelod0.Ase2ndfbin in the folder <GameDirectory>\CustomData\XFiles3\Usine
Use it in the game[]
To create a building, create MyBuilding.ndf in <GameDiretory>\AOW\DataLight\TypeWarriorLazy\BatimentsGeneres\MyBuilding.ndf
<ndf> export TypeWarrior_MyBuilding is TypeWarrior_ElementIndestructible : ModeleASE = 'CustomData\XFiles3\Usine\usine' Classement = 'Custom/$MyBuilding' </ndf>
And to test it with CTRL+P / CTRL+D, add this code in <GameDirectory>\DataLight\effet\TestModding\test.ndf :
<ndf> Test is SEQ with [ TEffetCreateWarrior : AccesseurPositionPlancher = DefaultConst/AccesseurPositionPlancher_PickedPoint TypeWarriorAsString = '$/TypeWarrior/TypeWarrior_MyBuilding' AccesseurCamp = DefaultConst/AccesseurCampDuJoueur ] </ndf>
We do not put the building in test.ndf in order to make it loaded at the start of the game, and so visible in the editor (otherwise it is loaded when you type CTRL+P).
Use it in the Editor[]
The Classement parameter in TypeWarrior_ElementIndestructible permits to define where the unit will be in the Editor.
Launch the editor with this mod, and launch the Unit tool creation button. In the new window there is now a "Custom" Category. Inside there is our MyBuilding unit that you can drop in the map (right click).
To visualize a model quickly, you can directly drag & drop it in the editor.