Modding Resource Header
Title: Guide to editing battlemap buildingsPosted by: Duke JohnModding area: Buildings (battle map)Required programmes:SceneMainTool, 3DS Max, Vercingetorix's CAS extractor, Vercingetorix's X-Pak, an image editor capable of editing .DDS files (such as PS or PSP), Notepad (or other text editor)
Related links: xpak Tutorial, Modelling New 3D Units for RTW-useful modelling guideSummary: This tutorial explains how to edit the buildings that appear in battle. It requires some knowledge of modding the game and modelling. Like all modelling in Rome it requires 3ds max.
__________________________________________________
One of the last few hindrances has been crossed as we are now able to edit battlemap buildings:
This guide will start on a higher level, since I do not want to spend the time at the moment to make a thorough guide. However since the discovery is so important for other mods I will write some quick pointers so that experienced modellers/modders will know what to do. I spent 4 days trying to find out how it all works and I would really appreciate if someone would take the bother to explain things more detailed as they start to understand how it works.
Preparation
Unpak in this sequence: battle_open.pak -> models_buildings_textures.pak -> patch_0.pak. Then delete/rename these packs.
Download the SceneMainTool from http://www.deep-shadows.com/hax/ follow instructions (use the right version!) to install.
The files
There are the following files you need to keep in mind when editing buildings:
Data\items\building_name.item
You can import this with Vercingetorix's tool. The export function does not work as it will make the file unreadable for R:TW.
Data\models_building\building_name_LODlevel.cas
Place here your edited buildings. Once converted they are no longer used.
Data\models_building\textures\texture_name.tga.dds
Just a texture for the building. R:TW buildings mostly use tiled textures, but I have experienced some loss of materials when exporting, so I use a single material/texture and use UV mapping.
Data\settlement_plans\building_group.txt
Open a txt file and notice that it contains a list of item names with coordinates (x,y,z) and rotation. Not important for editing buildings, but every building or building group you see in R:TW is written out in these txt files.
There are some more folders in settlement_plans and they deal with pathfinding, texturing of the ground, etc.
Data\descr_building_battle\dbb_.txt
Only important (for me at this moment) if you want to make buildings passable by troops (they can walk through walls)
By setting physical_info none there is no BPI file that the game checks. The BPI files contains physical data about the boundaries of the buildings and probably things such as where soldiers can enter towers, stand on walls, but that is just speculation since BPI files cannot be modded at the moment.Code:generals_stake_fence { stat_cat indestructable localised_name none no_shadow level { min_health 0 battle_stats item generals_stake_fence physical_info none } }
Importing and exporting a building
I do not go into how to model a building, so for starters I will just explain how to import and export the building. Import an item you wish to edit. Remove all lower LOD levels, LOD1 is the highest level and keep that. Ungroup LOD1.
Then edit the model just so that it looks a bit different (move a single vertice), you will then know in R:TW that you are seeing your edited model.
Then use the SceneMainTool. The result is a scene root that you need to rename to Scene Root. If you look at the Schematic View you will see that all meshes (name of the meshes is not important by the way) are linked to the Scene Root. If not then link them.
Then export the building as CAS, use the exact same name as the item and then add the LOD levels. Some buildings only have 2 LOD levels others have 3 or 4. (If you want to know exactly which LOD levels the engine requires skip the saving of the CAS files and go on.) Commonly used LOD levels are: _HIGH, _MED, _LOW, _LOWEST, _VERY_LOW. For example ABANDONED_HOUSE needs the following CAS files:
ABANDONED_HOUSE_HIGH.CAS
ABANDONED_HOUSE_MED.CAS
ABANDONED_HOUSE_LOW.CAS
ABANDONED_HOUSE_LOWEST.CAS
Save them all in Data\models_building.
Next you need to delete the ITEM in Data\ITEMS as the engine will convert the CAS files to a single ITEM when loading the game/battle.
That should be all. If there are questions that show that you have put thought into it but still cannot get it work then feel free to ask. If not then try harder
Cheers,
Rob
Bookmarks