Further Exploration in Settlement Layout in <<Rome:TW>>
By: Han Ben (Chen Zhen)
Translated by: Po-Lung Chia (sephodwyrm), mychinesetranslation.com (shameless self-advertisement)
What is settlement plan ?
The settlement plan is a distribution of buildings, streets, trees, rivers over a contour map in a visual. One point to note is that the modified settlement plan would only be exhibited in siege warfare over the control of the modified settlement or pass. Field battles require a different set of knowledge of modification. In the game, settlement plans include the following:
ONE: UNDERLAYS
- the contours and topography of the settlement is determined by 2 elements: one being the position of the settlement on the map, the other being the underlay model of the city
- The position of the city and the surrounding topography can be modified through this file: \Data\world\maps\base\map_heights.tga. The position of the city can be obtained by calculating backwards via this document. This document provides the real position of the settlement on the grand map – the black dots in the color plaques would be the position of the city. The white dots would represent the ports. We can, via PHOTOSHOP, obtain the (X,Y) co-ordinates of these, and with this formula:
X1 = X*2+1;Y1=Y*2+1
We obtain the (X1,Y1) co-ordinates of the settlement. This co-ordinate would be the real position of the city on map_heights.tga. The gray number ( C ) would be the altitude of the city. The consensus number is 7511.272. We can set this as the ( mH ). The real altitude in meters could be calculated via this formula:
Altitude (in meters) = C/255 * mH
Now we will learn how to control the city’s altitude and the surrounding topography. This is done by editing map_heights.tga. But this is only part of it. We still have to change the topography within the city. This would allow us to form hills or valleys within the city itself. This would require the modification of the underlays model.
The underlays models are placed in the folder: \Data\settlement_plans\underlays
These models can be opened in 3DSmax like how we open unit models. If we want to change the topography of a Roman settlement, we would open underlay_roman_town.cas. After opening this document, we would see that there 2 main parts to the model: the outline and the Underlay. The Underlay model is responsible for the topography and contour of the settlement plan. The outline would be the link between the Underlay and the topography provided by the grand map itself.
The Underlay model can be edited via MAX freely to create your own topographic distribution. But these rules msut be followed:
1. The Outline model is planar, all Z co-ordinates should be set at 0
2. From the viewpoint of the Z axis, the Underlay and Outline should be a perfect overlap with no size change
3. The borders of the Underlay and Outline must also be a perfect match. If they don’t you would see gaps in the ground in the game, and the poor men would fall straight to Tartarus
4. The lowest point of the Underlay cannot be too deep. This is important when the city is already at lower altitudes. This might cause crashes to occur.
5. The Outline should have as few facings possible. A maximum of 6000 is suggested.
We can thus modify a working Underlays model following these guidelines. After modification, we can link the Underlays and Outline to the Scene Root points and provide a few textures. This can then be exported.
TWO: OVERLAYS
The Overlays are textures for the topography, and are designed to fit the Underlays. So we can say that the Underlays are responsible for the contours and topograhy UNDERneath, while the Overlays are responsible for the land OVER the curves. The 2 models should fit with each other without seams. First we would open this document:
\Data\settlement_plans\overlays\ overlay_roman_town.cas
And then we would delete all the original models to provide a clean face to skin the Overlays. We then import our newly modified underlay_roman_town.cas and delete the OUTLINE model.
Now we can skin the overlays model. The methods are the same with that of skinning unit models. But we should consider that the models are larger and hence the skins are not very sharp. We can divide the Overlays model into several individual models and use multiple skinning techniques to skin each model. (NOTE: The Pillar team has our own multiple CAS exporter. This can increase the skin sharpness of buildings, ground surface, siege equipments, trees and other models)
Note, even if you have separated these models, you should not change their co-ordinates. Otherwise if you enter the game, the 2 models would be separated.
We would then link all these to the points of Scene Root, and then export them to overlay_roman_town.cas
THREE: STREET PLANS
The street plan is also displayed as a CAS model, and is stored at \Data\settlement_plans\street_plans folder. If we open pathfinding_roman_town.cas, we would see that this model controls the street plans of the roman town. There are many <<node>> and <<link>> models. They only need to be intercrossed according to the rules. The co-ordinates need not be strictly applied.
The street plan is actually not used to show the streets of the city, nor is it used for setting the contours of the roads. These are both controlled by the Underlay model instead. The street plan has 2 uses:
1. Pathfinding for the troops in the game
2. Providing troop positions for the defending side in an assault.
FOUR: BORDERS
Settlement planning is a big topic with a broad spectrum of associated contents. We can simply say that the walls are divided into segments, which are then joined with a standard linking program into a continuous border. How this connection works is not within our discussion since we have already published a border layout program:
http://www.twcenter.net/forums/showthread.php?t=40060
This tool would help you create your own walls.
After hundreds of repeated experiments, I see that there is another function to the borders. It is used to control the consensus troop deployment points of the attacking side in an assault. For example, if the army is assaulting the city from the north face, then the consensus troop deployment position would be approximately 50 m north. Also, the borders cannot too small because that might lead to a lack of deployment position for the defending side, leading to crashes.
FIVE: COLLISION
Walk areas determines the areas that the troops can walk on and areas that are not. For example, in our Pass model, the troops are only allowed to walk on the winding path on the mountain side, and this was done via modifying the Collision.
The collision fields belong to the “building pathfinding” techniques. These files are also CAS models, and these are usually kept in the folder of Data\models_building\INFO. One usually has to decompress the PAK files to get into the INFO content. CA, wishing to keep these techniques secret, did not publicize any building pathfinding model. This includes our before-mentioned Walk Areas model. These can also be called collision tests from the viewpoint of a 3D game engine. In RTW, we would call it Collision.
For BI, the folder of Data\models_building\INFO contained newly publicized basic building COLLISION model from CA. This allowed us to have better idea on how the collision model works. We can open the building models under BI\Data\models_building\INFO via MAX. We can see that there are 2 models: one begins with COLLISION, the other with COLLISION3D.
Models beginning with COLLISION control the 2D areas of the walking zones. It is a polygon with a Z axis value of 0 throughout. Strictly speaking, it controls for the area that units can walk on. So, if we have a rock in the middle of the map, and require that the soldiers not walk on the rock, we can make a circular shape in the COLLISION model.
The COLLISION3D models are classic 3D collision test models. These automatically raise view points to prevent it from getting into the models itself. We know that when we move our view points onto the buildings, it is automatically lifted with the building.
We can control walking zones for the troops via COLLISION. COLLISION3D is usually left untouched.
SIX: FIXING THINGS TOGETHER
Now we have to copy these files to the various folders of the game and fix the associated TXT files.
1. Copy the completed UNDERLAYS model to: the folder Rome - Total War\Data\settlement_plans\underlays
2. Copy the completed OVERLAYS model to: Rome - Total War\Data\settlement_plans\overlays
3. Copy the completed STREET PLANS model to: Rome - Total War\Data\settlement_plans\street_plans
4. Copy the completed COLLISION model to: Rome - Total War\Data\models_building\INFO
5. Open the TXT file: Data\descr_building_battle\dbb_kevins_buildings.txt
We then add additional information, such as:
roman_town_collision ;can be freely editted
{
stat_cat indestructable ;unknown
localised_name none ;unknown
level
{
min_health 0 ;building life
battle_stats ;unknown
item dummy ;the associated item MODEL
physical_info roman_city_collision_info.CAS ;the associated COLLISION model
}
}
6. Open \settlement_plans\roman_town.txt
7. We can then edit the 4 models via this text model. I will make some commentaries on this file.
plan ;opening…not to be editted
{
target rectangle x -24 z 24 rot 0 width 32 height 32 ;this reflects the central plaza to be seized in the assault
floor roman_town_underlay.cas roman_town_overlay.CAS ;this is the underlay and overlay document names
ground_types roman_town_ground.tga -288 -288 288 288 ;unknown…maybe lacks function
street_plan pathfinding_roman_town.cas ; street plans model
borders ;border{}the middle is the castle wall or border plans. It can be edited with the layouts program
{
gateway, 224, 0, 90, 0.50
tower_external_corner_link, -224, 224, -90, 0.50
tower_straight, 224, -128, 90, 0.50
straight, -224, -192, -90, 0.50
}
; COLLISION OBJECTS
roman_town_collision, 0, 0, 0, 0 ;the prior edited roman_town_collision
roman_tenamentB, -72.16, -23.75, 0.00, 0.500 ;tenement
roman_tenamentD, 50.83, -151.82, 180.00, 0.50 ;tenement
roman_tenamentE, 154.612, 48.753, -158.308, 0.5 ;tenement
tree_B, -24.74, -167.48, 0.00, 1.50 ;tree
}
Bookmarks