Sie sind auf Seite 1von 18

TUTORIAL

MAKING A NEW MAP


FOR

1.THE USEFULL TOOLS

MILKSHAPE 3D 1.8.5: http://chumbalum.swissquake.ch/ms3d/download.html

This tool allow you to export your own .MESH and .SKELETON

DXTBMP: http://www.btinternet.com/~mnwright/download/dxtbmpx.EXE

This FREE tool is usefull for making transparency on .DDS .TGA textures

XNVIEW: http://www.xnview.com/en/download.html

This FREE tool can read and save too many graphic file formats (.DDS .PNG ...)

2. MAKING A MAP FOR RACEMODE

Introduction:
The best way to make a map you need to draw it on a paper.
You need to give a name for your new race map.
You can use the textures from another map of course.

Create the map directory: !!!Make this only when your map is totally finished!!!
Make a FunRace directory into \zero gear\Assets\Maps\ just make a copy of
ChampionCircuit directory and rename it FunRace
Rename the lua script and the xml too: FunRace.xml FunRaceClient.lua
FunRaceServer.lua

Modeling your FunRace map:


Launch MILKSHAPE3D and zoom out all 2d views
Disable Snap To Grid
Firstly you make a road plane
The road plane need more segments HDVS 4 HDVS 4
Go to Materials Tab and click New and click on the first <none>
Now you load a texture for your road plane i use tarmac.dds

and click on Assign (Materials Tab)

To make your road track speedly you can duplicate your road plane:
Click on Edit> Duplicate Selection or Ctrl+D for shortcut
And move your copy (Duplicate01) on Z only

to fit the vertex correctly you need to do that:


Go to Select> Vertex and selection the vertex that's join each road plane
and click on Vertex> Flatten> Z or Ctrl+Shift+Z
Now you need to make a left corner.
I make five straight road plane. I make another road plane for the start of the
left corner. You need to select the last six vertex and rotate and move them.
You use only the Top View for rotate an move.
You make more copy of road plane to finish your left corner.
You surely need to fit your vertex often you can use Vertex>Snap Together
To rotate the road plane X 0.0 Y 90 Z 0.0

To make your next corner easy you can use Vertex> Mirror left right...
Now you finished your road track.
You don't forget to fit each vertex correctly Vertex>Snap Together
Now you need to change the height of this map because it flat.
Easy you just need to move the vertex of your road Move Y only
Now your road look like this:

Making some floor:


You need more texture.
Go to Materials Tab>Click on New and load grass2.dds
(from \zero gear\Assets\Textures)
The way to make your grass:
Basically just make a copy of a road plane and change the material to grass
And move some vertex...
You don't forget to fit each vertex correctly Vertex>Snap Together

Now for the left corner:


Just make a copy of a grass plane and just move the vertex to fit the corner
It a long process!!
You can weld two vertex in one: Use this only on the grass plane!!
Vertex> Weld Together

It the same way to make a dirt.


Just create a new material (dirtstrip.dds)

Make a copy of a road plane assign the dirtstrip.dds


and rotate y 90 (if necessary) delete some vertex not usefull (dirt plane).
You don't forget to fit each vertex correctly Vertex>Snap Together

Tip: When you make a duplicate>left right sometime you don't see your
duplicate mesh Select it in Groups Tab (the last one) and Move 0 0 0 absolute
Look like this:

Don't worry about the grass and dirt height plane you solve that when you
finished your map

Now you want to put a trim around this corner:


Create a new material and load trim.dds
Copy a dirt plane and change the material to the trim material.
Move the vertex to fit the corner.
Make more copy to finish your trim corner.
Now you need something to close the corner.
Make a cylinder with the grass material (Stacks: 1 Slices: 14)
Delete this vertex see the image at the bottom

You move the vertex to fit the trim Vertex>Snap Together

The Uvmap is not good to solve that:


Select the last object (Groups Tab)
Press Ctrl +T or Windows> Texture Coordinate Editor

Click on Redraw to redraw the 3d viewport


You can select and move the vertex to fit the uvmap.

When you finished your map.


Save your FunRace.ms3d file.
Export your map File>Export> Ogre and save into FunRace.mesh and
FunRace.material
Your FunRace.material file need to be edited like this for each material
(textures of your map). You need to add the championskybox material.
For example:

material championskybox
{
technique
{
pass
{
lighting off
depth_write off
diffuse 1 1 1 1
ambient 1 1 1 1

texture_unit
{
cubic_texture ccsky_front.dds ccsky_back.dds
ccsky_left.dds ccsky_right.dds ccsky_top.dds ccsky_bottom.dds separateUV
tex_address_mode clamp
}
}
}
}
material Material01
{
technique
{
pass
{
ambient 0.2 0.2 0.2 1
diffuse 0.8 0.8 0.8 1

texture_unit
{
texture test.jpg -1
}
}

by this:

material Material01
{
technique
{
pass
{
lighting off
ambient 0 0 0 1
diffuse 1 1 1 1
specular 0 0 0 1
emissive 0 0 0

texture_unit
{
texture test.jpg -1
}
texture_unit
{
cubic_texture rim50.dds combinedUVW
tex_address_mode clamp
colour_op_ex add src_texture src_current
colour_op_multipass_fallback one one
env_map cubic_normal
}
}

Making the physic map

Now you need to make a collision for your map.


Load you FunRace.ms3d into milkshape3d.
Basically you just rename some materials:
Materials Tab
Click on the Grass Material> click on the first None
And rename the grass material to grassmat
Do the same for the others textures.
Rename the road and trim materials to defaultmat
Rename the dirt material to dirtmat

Save your map with a new name into this directory


FunRace\Physics\FunRacePhys.ms3d

Now Export to Wavefront OBJ FunRacePhys.obj


Delete the FunRacePhys.mtl.
Make a copy of champion_circuit_c.mtl and rename it FunRacePhys.mtl.

Now you need to convert your FunRacePhys.obj to


FunRacePhys.obj.murphyrocks.
To do that make a copy of FunRacePhys.obj and FunRacePhys.mtl into this
directory \zero gear\Client

and make a 1.bat file and write and execute the bat file

zerogear.exe FunRacePhys.obj
When finished copy FunRacePhys.obj.murphyrocks into \FunRace\Physics\
Your map is finished!!!

Editing the xml file and spawn point

Now you need to edit the FunRace.xml


You need to change this lines:

<Map name="Champion Circuit" onload="ChampionCircuitMapLoad"


onunload="ChampionCircuitMapUnload">

by

<Map name="FunRace" onload=" FunRace MapLoad" onunload=" FunRace


MapUnload">

and this line:

<Script profile="Client"
name="Maps/ChampionCircuit/Scripts/ChampionCircuitClient.lua" />
<Script profile="Server"
name="Maps/ChampionCircuit/Scripts/ChampionCircuitServer.lua" />

by

<Script profile="Client" name="Maps/FunRace/Scripts/ FunRace


Client.lua" />
<Script profile="Server" name="Maps/ FunRace /Scripts/ FunRace
Server.lua" />

Save your FunRace.xml

For editing spawn points


Search SpawnPoint1 into your FunRace.xml
Load your FunRace.ms3d into Milkshape3d
Create a little box and click on Move Absolute

You just need to found 16 coordinates with editing the


X Y Z values and write into your xml:
<MapObject type="ScriptObject" name="SpawnPoint1" sync="false">
<Profiles>
<Profile name="Server" />
</Profiles>
<Connections />
<Parameters>
<Parameter name="ScriptObjectPath" type="STRING" data="Scripts/"
/>
<Parameter name="ScriptObjectFileName" type="STRING"
data="PlayerSpawnPoint" />
<Parameter name="ScriptObjectTypeName" type="STRING"
data="PlayerSpawnPoint" />
<Parameter name="PositionX" type="FLOAT" data="3.953" />
<Parameter name="PositionY" type="FLOAT" data="0.767" />
<Parameter name="PositionZ" type="FLOAT" data="-73.637" />
<Parameter name="EulerX" type="FLOAT" data="0" />
<Parameter name="EulerY" type="FLOAT" data="-90" />
<Parameter name="EulerZ" type="FLOAT" data="0" />
</Parameters>
</MapObject>

Do the same stuff for all spawn points

Info the EulerY value is the horizontal rotation of the spawn karts

When you have finished with your spawn points save your FunRace.xml

Editing the Lua script

Open FunRaceClient.lua and edit this lines:

function ChampionCircuitMapLoad(raceMap)
function ChampionCircuitMapUnload()

by:

function FunRaceMapLoad(raceMap)
function FunRaceMapMapUnload()

and save

Open FunRaceServer.lua and edit this lines:

function ChampionCircuitMapLoad(raceMap)
function ChampionCircuitMapUnload()

by:

function FunRaceMapLoad(raceMap)
function FunRaceMapMapUnload()
and save

Now Your Map is Totally finished.

You just need to make the weaponbox, checkpoints and pathnodes see the
Eikester tool.
For testing your map Create a private server with 2 max player

Tutorial by Vaultboy

Das könnte Ihnen auch gefallen