Ok here is how you do it.
I will use the Kharkov_l1b map as an example.
Copy the entire Kharkov_l1b directory (which is found under Media subdir) to a new directory (also under Media), I named it Kharkov_l10. Go into this new directory and rename the scene xml from Kharkov_L1Bscene.xml to Kharkov_L10scene.xml
Ok now open up this xml file in notepad.
look at the first few lines
Code: Select all
<textures>
<texture type="Diffuse" layer="0" mediaId="tiled_grass02.dds" tileX="48" tileY="48" rotationZ="-45" />
<texture type="Mask" layer="1" mediaId="L1B_terrainFOREST.png" tileX="1" tileY="1" rotationZ="0" />
<texture type="Diffuse" layer="2" mediaId="tiled_forest04.dds" tileX="84" tileY="84" rotationZ="21" />
</textures>
<children>
<xFileNode isFacingCamera="false" clampingEnabled="false" isMapNode="true" cullingEnabled="true" zBufferEnabled="true" mediaId="L1B_terrainFIELD" hasHeight="true" hasAlpha="false" referenceAlpha="1" buildingType="None" shadowType="None" nodeId="1">
<vector x="0" y="0" z="0" />
<orientation yaw="0" pitch="0" roll="0" />
<textures>
<texture type="Mask" layer="1" mediaId="L1B_terrainROAD.png" tileX="1" tileY="1" rotationZ="0" />
<texture type="Diffuse" layer="0" mediaId="kharkov_road01.dds" tileX="48" tileY="48" rotationZ="-20" />
</textures>
look at the .dds files above, in this case tiled_grass02.dds, tiled_forest04.dds and Karkov_road01.dds. These are the DX compressed bitmaps which define the ground and road textures.
Next you will need a paint editor or file format convertor which can change between (or save) in dds format. I use photoshop with the nvidia sdk plugins that does this all for me. There are many other free programs out there which can do the same however. In a pinch you can also just use bmps, but these take up a lot of video memory so are not very efficient for vid cards with small onboard mems.
I just made a change to the tiled_grass02.dds in this example, but you may want to change the others as well.
Load up tiled_grass02.dds into your editor (you can find this in the terrain/textures folder) . Make "snowy" changes as you see fit and then save the new file as something else into your Kharkov_L10 directory (like tiled_snow.dds). Don't overwrite the original otherwise you will break all the existing maps which use this texture. The format for the dds is DXT1 no alpha (this gives the best compression).
Ok now you need to tell the game to use this new texture instead of the old one. To do this change the line tiled_grass02.dds in the xml above to tiled_snow.dds (or whatever you called it) and then save the xml.
Now we need a new media xml file to tell the game about where to find these resources.
In the Kharkov_L10 directory make a new xml called "media.xml" and edit it thus
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE resources [
<!ELEMENT resources ANY>
<!ELEMENT resource ANY>
<!ATTLIST resource id ID #REQUIRED>
]>
<resources path="Media/">
<resource id="tiled_snow.dds" filename="kharkov_L10/tiled_snow.dds" />
</resources>
and then save.
You now have a new working winter map!
In order to make some more changes to the map to make it look nicer, you can edit the forest and road.dds as well (using the same technique above, make sure you edit their entry into the media.xml as well)
Open the Kharkov_l10.xml again and then scroll down to the very bottom, you should see this:
Code: Select all
<light globalAmbient="150" zFar="500" type="Directional">
<vector x="-15" y="-15" z="0" />
<diffuse a="255" r="255" g="255" b="255" />
<ambient a="255" r="255" g="255" b="255" />
</light>
<skyBox>
<north>kharkov_skybox2-north.dds</north>
<east>kharkov_skybox2-east.dds</east>
<south>kharkov_skybox2-south.dds</south>
<west>kharkov_skybox2-west.dds</west>
<top>kharkov_skybox2-south.dds</top>
<bottom>kharkov_skybox2-south.dds</bottom>
</skyBox>
If you want to use a different more wintery skybox for your map then change these values to different values as found in the skybox subdir off the main Media dir. You can set the colour of the lighting and the "fogginess" of the map by changing the lighting values. I used the following for my example map
Code: Select all
<light globalAmbient="150" zFar="100" type="Directional">
<vector x="-15" y="-15" z="0" />
<diffuse a="255" r="255" g="255" b="255" />
<ambient a="255" r="255" g="255" b="255" />
</light>
<skyBox>
<north>skybox4-north.dds</north>
<east>skybox4-east.dds</east>
<south>skybox4-south.dds</south>
<west>skybox4-west.dds</west>
<top>skybox4-south.dds</top>
<bottom>skybox4-south.dds</bottom>
</skyBox>
In order to give it a more wintery feel.
At some stage you may want to change the summer trees for winter ones, or summer houses for snow covered ones, etc which you can do in scenedit.
Also this example basically leaves the entire map structure alone, it just changes the look and feel of it. If you want to change the geometry or otherwise that will have to wait for another tutorial.
Oh and one more thing there is a minimap.png image which represents a thumbnail of the whole map. You may want to edit this in your paint program to better match the new paint scheme.
Whilst you now have a new map which you can use in the editor and game, I will need to provide another tut to teach you how to incorporate this map into the RBG/RCG system (it isn't hard provided that you didn't move too much stuff around).