Map Editor

Please post here for questions and discussion about unit modeling and general game modding. You can also post your new units and modifications here.

Moderator: EagleMountainDK

User avatar
Mobius
Posts: 10339
Joined: Thu Jun 29, 2006 10:13 pm
Location: California
Contact:

RE: Map Editor

Post by Mobius »

ORIGINAL: Mraah
Erik and Mobius,
Slightly off topic ...
In theory, could a 2km x 2km map simply be done by allowing a scale change in the options menu or an INI file that would double the range and the 3D models reduced to 50% with a slight reduction in poly count? So, instead of doubling the map you shrink it and you're basically working with a 1km x 1km map but with smaller objects.
In theory anyone could compress the values in various tables to get a 1:2 scale if you wanted. Except the models would be bigger than real scale. Some people were thinking of doing modern armor at 2x2km. This would be a lot of table changes but one could do it as the engine is up to it. (Except no ATGMs and thermal sights) For me I wouldn't mess with it at this juncture.

Also, I thought the map names were hard coded so you couldn't add new maps. But I haven't looked into it for some time.
All your Tanks are Belong to us!
panzer
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Map Editor

Post by Stridor »

ORIGINAL: Mobius
Also, I thought the map names were hard coded so you couldn't add new maps. But I haven't looked into it for some time.

????

You can add as many new maps as you like, the raison d'être of this thread.
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: Map Editor

Post by Mraah »

ORIGINAL: Stridor

7. PCK uses textures and masks to show textured terrain on the 3D Mesh. The textures are dds files http://en.wikipedia.org/wiki/DirectDraw_Surface which can easily be edited in most graphic editors. There are many freeware tools to convert bmp to dds if you don't have an editor which allows you to save .dds natively.

I find that the DXTBMP program works great for this! I've used it for Silent Hunter IV when creating radar scope maps.

Here's the link, and look for the DXTBmp button like in my screen shot :

http://fly.to/mwgfx/

Rob





Image
Attachments
DXTBmp.jpg
DXTBmp.jpg (33.85 KiB) Viewed 261 times
jamespcrowley
Posts: 362
Joined: Tue Jun 10, 2003 12:58 am
Location: Chichester UK

RE: Map Editor

Post by jamespcrowley »

[&:]

All of this looks horribly complicated to me.

I vote for a post-release expansion pack with a fully functioning map editor and maybe some more mini campaigns and additional models.
Cheers

Jim
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Map Editor

Post by Stridor »

ORIGINAL: James Crowley

[&:]

All of this looks horribly complicated to me.

I vote for a post-release expansion pack with a fully functioning map editor and maybe some more mini campaigns and additional models.

James,

It really isn't too complex at all. I can see your point about looks complicated though. [;)]

Post release, once my work settles down I plan on releasing a step by step tutorial on how you can make your own high quality maps for the game. Each step I promise will be easy to understand. There will of course be several steps, but seen as a step by step process I hope I can show you that anyone with some desire can make their own maps.

Because PC is 3D mesh based (as opposed to 2.5D tile based) even a built-in editor will be to a certain extent more complex than what you have probably seen in the past. Any built-in editor would also need to reinvent the wheel c/w what is already out there as they all do similar things. I think you would still need to have external programs in the future anyway like a graphics editor for doing textures/masks.
jamespcrowley
Posts: 362
Joined: Tue Jun 10, 2003 12:58 am
Location: Chichester UK

RE: Map Editor

Post by jamespcrowley »

Stridor,

OK, that seems fair and ceratinly something that I would be interested in.

In the mean time, all the while that PCK hasn't gone gold, I'm sort of hoping that you might be secretly squeezing a few new maps into the random battle generator [:D]
Cheers

Jim
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Map Editor

Post by Stridor »

ORIGINAL: James Crowley

Stridor,

OK, that seems fair and ceratinly something that I would be interested in.

In the mean time, all the while that PCK hasn't gone gold, I'm sort of hoping that you might be secretly squeezing a few new maps into the random battle generator [:D]

James, you never know. You never know ...
rickier65
Posts: 14253
Joined: Thu Apr 20, 2000 8:00 am

RE: Map Editor

Post by rickier65 »

ORIGINAL: Stridor

ORIGINAL: James Crowley

[&:]

All of this looks horribly complicated to me.

I vote for a post-release expansion pack with a fully functioning map editor and maybe some more mini campaigns and additional models.

James,

It really isn't too complex at all. I can see your point about looks complicated though. [;)]

Post release, once my work settles down I plan on releasing a step by step tutorial on how you can make your own high quality maps for the game. Each step I promise will be easy to understand. There will of course be several steps, but seen as a step by step process I hope I can show you that anyone with some desire can make their own maps.

Because PC is 3D mesh based (as opposed to 2.5D tile based) even a built-in editor will be to a certain extent more complex than what you have probably seen in the past. Any built-in editor would also need to reinvent the wheel c/w what is already out there as they all do similar things. I think you would still need to have external programs in the future anyway like a graphics editor for doing textures/masks.


Sounds good to me as well. Any chance you'll do this using open source tools? I tried doing some maps once for 2nd Manassas but it was too much for me to comprehend. So maybe a simple step by step I can follow.

Thanks
Rick
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Map Editor

Post by Stridor »

ORIGINAL: Rick

ORIGINAL: Stridor

ORIGINAL: James Crowley

[&:]

All of this looks horribly complicated to me.

I vote for a post-release expansion pack with a fully functioning map editor and maybe some more mini campaigns and additional models.

James,

It really isn't too complex at all. I can see your point about looks complicated though. [;)]

Post release, once my work settles down I plan on releasing a step by step tutorial on how you can make your own high quality maps for the game. Each step I promise will be easy to understand. There will of course be several steps, but seen as a step by step process I hope I can show you that anyone with some desire can make their own maps.

Because PC is 3D mesh based (as opposed to 2.5D tile based) even a built-in editor will be to a certain extent more complex than what you have probably seen in the past. Any built-in editor would also need to reinvent the wheel c/w what is already out there as they all do similar things. I think you would still need to have external programs in the future anyway like a graphics editor for doing textures/masks.


Sounds good to me as well. Any chance you'll do this using open source tools? I tried doing some maps once for 2nd Manassas but it was too much for me to comprehend. So maybe a simple step by step I can follow.

Thanks
Rick

Yes all the tools will be freeware or shareware free trial for 30 days. You could easily make 30 meshes in 30 days before the time limit on MS3D expires
User avatar
Mad Russian
Posts: 13255
Joined: Sat Mar 15, 2008 9:29 pm
Location: Texas

RE: Map Editor

Post by Mad Russian »

ORIGINAL: Stridor

I think you would still need to have external programs in the future anyway like a graphics editor for doing textures/masks.

PC/3 is going to have a map editor that will require external programs to use? How much sense does that make? I don't see that being a good solution to the map editor issue.

But then again PCK isn't out yet and I'll want to see how it goes before I get too up in the air about anything.

All this discussion and speculation, is just a pastime that keeps people busy until the game actually comes out, and they can see for themselves.

It will be refreshing to see gamers talking about "what is" instead of what "might be".

Good Hunting.

MR
The most expensive thing in the world is free time.

Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
User avatar
Erik Rutins
Posts: 39671
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Map Editor

Post by Erik Rutins »

ORIGINAL: Mad Russian
ORIGINAL: Stridor
I think you would still need to have external programs in the future anyway like a graphics editor for doing textures/masks.

PC/3 is going to have a map editor that will require external programs to use? How much sense does that make? I don't see that being a good solution to the map editor issue.

No, that's not the plan. I think what Stridor was saying though is that some of these third party tools might still be useful. Some of them are very good at what they do and for skilled users may be quicker than a built-in map editor.
All this discussion and speculation, is just a pastime that keeps people busy until the game actually comes out, and they can see for themselves.

Exactly.
It will be refreshing to see gamers talking about "what is" instead of what "might be".

Amen. [8D]
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Erik Rutins
Posts: 39671
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Map Editor

Post by Erik Rutins »

How do you mod a map from this:

Image
Attachments
6289925EC0..4EE46709.jpg
6289925EC0..4EE46709.jpg (105.58 KiB) Viewed 257 times
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Erik Rutins
Posts: 39671
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Map Editor

Post by Erik Rutins »

To this:



Image
Attachments
4FE7167963..88D002DA.jpg
4FE7167963..88D002DA.jpg (86.05 KiB) Viewed 257 times
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Erik Rutins
Posts: 39671
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Map Editor

Post by Erik Rutins »

Stridor explains it!

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

<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

<?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:

<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

<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).

Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Erik Rutins
Posts: 39671
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Map Editor

Post by Erik Rutins »

One thing I realize was not well covered in the documentation was the Scene Editor. Again, it's a rough internal tool so we released it "as is" rather than keep it internal but there wasn't time to polish it up or write better docs for it.

A key point that was left out though...

After you open a Scene file, you can also open the terrain map within the Scen Editor to work on it while still seeing the 3D terrain. This make editing the terrain map MUCH easier than doing it in a separate program and hoping it all matches up.

1. Click on the "Map.bmp" menu. Choose Open.
2. Navigate to the Media/Level folder for the level you are working on, choose the map.bmp file there
3. You will now see the terrain map overlaid on the 3D map in the scene editor.
4. Click on the Common Palette sub-menu under Map.bmp to choose the color you want to add to the terrain map (see the color key in the addendum)
5. Choose the Size sub-menu to set the size of the "brush"
6. Hold down the Alt key and move the mouse to "paint" the new terrain color.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: Map Editor

Post by Mraah »

Stridor,

I tried my hand at converting the Level 5 map into a spring map. Unfortunately, when I run it through game it still shows me the winter graphics.
I feel as though there's something left to do, but I can't find this final step.

What I did :

1. Created a copy of Level 5 folder
2. renamed it MR_Level5
3. renamed the XML to MR_Level5scene.xml
4. replaced ALL the snow dds entries with the grass entries.
5. created a template for the map
6. ran it thru the RBG and the RCG ... still shows the winter map

Question ... is the final step changing more names to MR_Level5 ?

Thanks in advance,
Rob

EDIT NOTE : resized screenshot to 1024 ... i keep forgetting how big 1900 is.

Image
Attachments
mr-level5-2.jpg
mr-level5-2.jpg (194.9 KiB) Viewed 257 times
User avatar
jomni
Posts: 2827
Joined: Mon Nov 19, 2007 12:31 am
Contact:

RE: Map Editor

Post by jomni »

I would appreciate it if there's a mechanism to create maps from google earth. [:D]
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Map Editor

Post by Stridor »

ORIGINAL: Mraah

Stridor,

I tried my hand at converting the Level 5 map into a spring map. Unfortunately, when I run it through game it still shows me the winter graphics.
I feel as though there's something left to do, but I can't find this final step.

What I did :

1. Created a copy of Level 5 folder
2. renamed it MR_Level5
3. renamed the XML to MR_Level5scene.xml
4. replaced ALL the snow dds entries with the grass entries.
5. created a template for the map
6. ran it thru the RBG and the RCG ... still shows the winter map

Question ... is the final step changing more names to MR_Level5 ?

Thanks in advance,
Rob

EDIT NOTE : resized screenshot to 1024 ... i keep forgetting how big 1900 is.

Sorry Rob, I don't quite follow you. The image you posted is of a mostly spring map as shown in scenedit. It should look identical to this in the *game* itself.

It is important in the template section to define the season as "summer" (the deafult is actually winter) otherwise the RBG will think it is a winter map.

But it sounds from your post that the map itself is not showing up the changes you made in the game??????

If it loads like that in scenedit, it should be identical in the game.

Try just making a plain jane scenario with your new map (set the models to "summer") and then try playing it in the game. What do you get?
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Map Editor

Post by Stridor »

ORIGINAL: jomni

I would appreciate it if there's a mechanism to create maps from google earth. [:D]

Now that would be something [8D]

Hopefully my tutorial will show you something along those lines, but I doubt there will be an application in which you drag a box around a google map and then it appears in the game. Sorry [;)]
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: Map Editor

Post by Mraah »

ORIGINAL: Stridor

It is important in the template section to define the season as "summer" (the deafult is actually winter) otherwise the RBG will think it is a winter map.

Try just making a plain jane scenario with your new map (set the models to "summer") and then try playing it in the game. What do you get?

Me thinks these are the two reasons ... I was wondering how to change the settings ... by geoge I think I've got it!

Well, you got it ... I just kinda poke along [:D].

I'll holler the results.

Rob
Post Reply

Return to “Maps, Models and Mods”