Difference between revisions of "Techtree - M2TW"
Line 1: | Line 1: | ||
− | |||
===Overview=== | ===Overview=== | ||
+ | Techtree buildings and slots are the mechanism in M2TW where buildings such as barracks and churches that are defined in '''[[export_descr_buildings.txt]]''' appear within the 3d models of settlements that have constructed those buildings. Most vanilla settlements have a variety of techtree slots with different category names and sizes. | ||
+ | |||
+ | When the game loads a campaign battle-map with a settlement it searches the pre-loaded '''[[.worldpkgdesc]]''' files for matches to the category name and size of slot, if available it will load the ones for the buildings that have been constructed at that settlement, if no EDB buildings are built or are available for a slot it will load the result of pkgs that match category name and size with '''slot_filler''' as the type. | ||
+ | |||
+ | When the game loads a custom battle battle-map with a settlement selected it loads the matching pkgs for the highest level of EDB building that can be built for that settlement level. | ||
+ | |||
+ | |||
===Editing TechTreeSlots=== | ===Editing TechTreeSlots=== | ||
Line 12: | Line 18: | ||
===Link to EDB=== | ===Link to EDB=== | ||
+ | [[File:EDB building name.png|300px|thumb|name of building in EDB for techtree]] | ||
− | === | + | ===Other Uses=== |
− | As well as the obvious use of allowing a barracks to appear as built within a settlement, a techtree can be used to load more-or-less anything! For instance in certain TATW mods a techtree is used to load a dummy settlement outside the main actual settlement, to represent a closely adjacent settlement without having to import all the models manually. To achieve this (as the dummy settlement is obviously not built via EDB) the techtree slot is set up with a unique category name and size and a [[.worldpkgdesc]] created to match that category and size but with "slot_filler" as the 'type'. | + | As well as the obvious use of allowing a barracks to appear as built within a settlement, a techtree can be used to load more-or-less anything! For instance in certain TATW mods a techtree is used to load a dummy settlement outside the main actual settlement, to represent a closely adjacent settlement without having to import all the models manually. To achieve this (as the dummy settlement is obviously not built via EDB) the techtree slot is set up with a unique category name and size and a [[.worldpkgdesc]] created to match that category and size but with "slot_filler" as the 'type'. Note that settlements loaded in techtree slots lack some of the normal functionality such as plazas and firing arrow towers and whilst it is possible to get onto walls the AI will not use dummy settlements defensively. |
[[Category:M2TW Battle Map Modding]] | [[Category:M2TW Battle Map Modding]] |
Revision as of 07:04, 16 March 2019
Contents
Overview
Techtree buildings and slots are the mechanism in M2TW where buildings such as barracks and churches that are defined in export_descr_buildings.txt appear within the 3d models of settlements that have constructed those buildings. Most vanilla settlements have a variety of techtree slots with different category names and sizes.
When the game loads a campaign battle-map with a settlement it searches the pre-loaded .worldpkgdesc files for matches to the category name and size of slot, if available it will load the ones for the buildings that have been constructed at that settlement, if no EDB buildings are built or are available for a slot it will load the result of pkgs that match category name and size with slot_filler as the type.
When the game loads a custom battle battle-map with a settlement selected it loads the matching pkgs for the highest level of EDB building that can be built for that settlement level.
Editing TechTreeSlots
With Hex Editor
The picture at the top right shows the TechTreeSlot section of the .world file viewed in a hex editor. It would be possible to edit the TechTreeSlot name, size and location in the .world file, but please note that each string e.g. the 'market' name, is preceded by an integer that gives the count of characters, this must be correct or the game will CTD. The 'size' e.g. 64x64 is also a text string, so 64x64 requires a preceding integer of 5, and 128x64 an integer of 6. The location and rotation are given as float values. Attempting to add a new slot via hex-editor is not recommended.
With IWTE
The second image on the right shows a large town settlement open in IWTE with the 2d view of the world switched on and then 'View TechTrees and Change TechTree selected. The IWTE functions allow the location to be changed by dragging the selected techtree in the 2d view. Changes to the rotation, tech category, and tech tree size are made in the bottom left panel. Click the OK button (not shown) when done, and remember to go back to 'WorldFiles' tab and 'Save 3 binaries'. Techtree slots can also be added or deleted.
Link to EDB
Other Uses
As well as the obvious use of allowing a barracks to appear as built within a settlement, a techtree can be used to load more-or-less anything! For instance in certain TATW mods a techtree is used to load a dummy settlement outside the main actual settlement, to represent a closely adjacent settlement without having to import all the models manually. To achieve this (as the dummy settlement is obviously not built via EDB) the techtree slot is set up with a unique category name and size and a .worldpkgdesc created to match that category and size but with "slot_filler" as the 'type'. Note that settlements loaded in techtree slots lack some of the normal functionality such as plazas and firing arrow towers and whilst it is possible to get onto walls the AI will not use dummy settlements defensively.