Editing Mission Builder

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 47: Line 47:


=== Texture Painting ===
=== Texture Painting ===
First, we just want to put a basic sand texture across the whole map.  Select '''Terrain Texture Editor''' mode.  The tool bar should look like this:
 
We'll go into more advanced texture painting later, but for now we just want to put a basic sand texture across the whole map.  Select '''Terrain Texture Editor''' mode.  The tool bar should look like this:


[[File:MB Screen4.jpg]]
[[File:MB Screen4.jpg]]
Line 55: Line 56:
[[File:MB Screen5.jpg]]
[[File:MB Screen5.jpg]]


This might be a good time to save.
Feel free to go back to first person mode (hit escape) and drive around a bit.  This might also be a good time to save.
 
OK, now we need to make the track.  I find it easier to draw the track on with textures first before sculpting the terrain, so choose '''Terrain Texture Painter''' mode.  The eight boxes on the right are the eight textures you can use for this mission.  It's a little restrictive, but you can blend textures together to get some nice effects.  Press the '''Add''' button under one of the empty slots (only one will work), and choose afrika9dark.
 
You've probably noticed the circular green and red cursor when you move your mouse around the terrain.  This is the brush used for all terrain operations (sculpting, painting etc.).  The red area gets the full effect and the green area gets partial effect.  You can change the siza and shape in the '''Brush''' menu.  For now, set it to size 9x9, and draw on a rough outline of your track, something like this:
 
[[File:MB Screen6.jpg]]
 
You can't see the whole thing due to depth fog but trust me, it's a figure 8.  You'll also want to add in an area for the cars to start, if they don't start on the track (and it makes it a little easier later on if they don't).
 
OK, track laid out.  The next step is to flatten out the track surface and add in hills and so on.


=== Terrain Editing ===
=== Terrain Editing ===


Once you have the empty area, it's time to build your race track.  Select '''Terrain Editor''' mode from the '''Window''' menu, and set Action to '''Adjust Height'''.  This will allow you to alter the terrain and sculpt your track out of the barren desert.  You'll see when you move your mouse around that there is a circle on the ground, red in the centre and green around the edge.  This shows the area your tools will affect.
Once you have the empty area, it's time to build your race track.  Select XXX mode from the menu.  This will allow you to alter the terrain and sculpt your track out of the barren desert.  You'll see when you move your mouse around that there is a circle on the ground, red in the centre and green around the edge.  This shows the area your tools will affect.
Hold down the left mouse button and drag up and down, you will see hills and pits created.  This is the main way to modify the terrain.  Feel free to stick some hills and pits in the area around your track.  You can use Alt-1 to Alt-6 to change the size of the affected area.  You can also make other changes to it from the '''Brush''' menu.
The default tool is raise/lower.  Hold down the left mouse button and drag up and down, you will see hills and pits created.  You can use Alt-1 to Alt-XXX to change the size of the affected area.  You can also make other changes to it from the XXX menu.
Next, let's use smooth mode.  Choose a brush slightly wider than your track, then drag the smoothing tool around the track.  This will remove sharp edges and small bumps, making for an easier ride.  It's also useful if you've generated some sharp edges with the other tools, and want to make them look a bit more natural.  '''Flatten''' mode is a more extreme version of this, if you want to give the feel of a more manmade track.
To start with, let's use flatten mode.  Select it from the menu, and pick a size 4 brush (Alt-4).  Pick somewhere that looks a bit like the track you want, then click and drag around the area of your track, and you should see the ground start to flatten out and look a bit more like a track.
Experiment with the other modes if you want - there's a reasonably good undo function if you mess up.  Once you feel the track is ready, it's time to add objects.  Don't get too perfectionist - you can always come back later.
Next, smooth mode.  Choose a smaller brush, then drag the smoothing tool around the track.  This will remove sharp edges and small bumps, making for an easier ride.  It's also useful if you've generated some sharp edges with the other tools, and want to make them look a bit more natural.
 
Experiment with the other modes if you want - there's a reasonably good undo function if you mess up.  Once you feel the track is ready, move on to some detailed texturing.
Don't forget to recalculate the lighting once you finish adjusting the terrain.  My version of the track now looks something like this:
 
[[File:MB Screen7.jpg]]
 
I decided to have a steep cliff part at the crossroads, so I moved the starting area around to face the other direction.  You can just paint over the darker sand with light sand if you want to remove part of the track.


=== Creating Models ===
=== Creating Models ===


OK, we have a textured terrain area with roads drawn in.  The next step is to add scenery and obstacles. Go to '''World Editor Creator''' mode.  The toolbar on the right should look something like this:
OK, we have a textured terrain area with cliffs and roads drawn in.  The next step is to add scenery and obstacles.
 
[[File:MB Screen8.jpg|left|caption|frameless]]
 
The top part of the toolbar shows the objects currently in the scene - currently just the default ones.  The tree view at the bottom lists all the objects you can add.  There are a ''lot''.  Play around and try out various different models.  I'm mostly just going to be using the Darkwind track barriers, which are in the dwBarriers folder.  To create one, just click on it and the model will be created wherever the camera is looking.  Should look something like this:
 
[[File:MB Screen9.jpg|center]]
 
The object is black because we haven't recalculated the lighting yet.  Do that and it looks like this:
 
[[File:MB Screen10.jpg|center]]
 
You can move the object by grabbing and dragging the axes, or the object itself.  Alt-drag will rotate, and control-alt-drag will scale.  Holding down shift aligns the axes to the world rather than the object (only needed if you've rotated it).  Put a few barriers and obstacles around your track, and don't forget to save regularly.  In the next section we'll look at the mechanics of making your track usable by the AI.
 
Here is my track after adding the obstacles and barriers.  Don't forget the start line!
 
[[File:MB Screen11.jpg]]


=== Waypoints, Checkpoints and Spawn Areas ===
=== Waypoints, Checkpoints and Spawn Areas ===


There are three types of object we need to add for the race track to work.  There will not be visible in the game, but control the logic of the race.  Waypoints tell the AI where to drive, checkpints make sure players drive around the track correctly, and spawn points tell the game where the cars should be placed at the start of the race.
We'll start with spawn points, but first we need to quickly cover SimGroups.
==== SimGroups ====
'''SimGroups''' are just containers that you can put other objects in.  Sometimes they're necessary (as we'll see for spawn points) and sometimes they're just a way of keeping your object list tidy.  You can find them at the very bottom of the list of objects, under '''System'''.  When you create one you'll be asked to give it a name, but it won't appear in the mission, it just exists in the tree view.  They're also a pain to delete, so try not to create more than you need.
Create one now to store some objects you created.  When it appears in the tree view, alt-click on it and the background will change colour.  This is now your active '''SimGroup''', and any new objects (including other simgroups) will be created inside it.  To stop that, just alt-click on ''MissionGroup'', which is your main '''SimGroup''' which stores the whole scene.  A highlighted '''SimGroup''' looks like this:
[[File:MB_Screen12.jpg]]
I've created a '''SimGroup''' called ''PitBarriers'' to hold the barriers around the pit (imaginative, huh?) and highlighted it.  If I create a new object it will be added to that group, or I can add all the barriers by selecting them (ctrl-click for multiple selection) and choosing '''Add Selection to Instant Group''' from the '''World''' menu.  Now if I select the simgroup I can move, rotate or scale all the barriers at once.
OK, that's enough about simgroups for now, on to the interesting part.
==== Spawn Areas ====
First, create a '''SimGroup''' called ''PlayerDropPoints'' to hold all the spawn points (don't forget to make ''MissionGroup'' active first).  We're going to need 25, one for each car in a maxxed out race.  With PlayerDropPoints set as your active group, create a '''SpawnSphereMarker''' (found in '''Shapes->Misc''').  What you get looks something like this:
[[File:MB_Screen13.jpg]]
It's too big, but we can fix that.  Select '''World Editor Inspector''' from the '''Window''' menu.  The bottom of the right hand bar looks like this:
[[File:MB_Screen14.jpg]]
I pressed '''Expand All''' so you can see everything.  This mode lets you manually set positions, rotations, scales and other attributes of objects.  You need to press '''Apply''' after every change or it'll lose your edits.  In this case, we want to change the radius down to something sensible.  Set it to two then hit apply, you should see something like this:
[[File:MB_Screen15.jpg]]
Much more sensible.  The box next to apply is for naming your spawn points.  Call this one spawn1.  This is where the car in pole position will spawn.  The y axis shows the direction it will be facing.  Couple of useful tips here - copy and paste will make it much less painful to do the other 24, and ctrl-D will drop the object, making it sit on the ground.  Useful if you end up with a spawn point in mid air.  Now go ahead and create the other 24.  The finished product should look something like this:
[[File:MB_Screen16.jpg]]
I'm pretty sure it's the order of points in the container which determines which car goes where rather than the name, so it's less confusing if you keep the two the same.
==== Checkpoints ====
The number of checkpoints you need depends on the details of your track.  You need enough to make sure the drivers don't take any shortcuts, or at least not ones you haven't planned.  More is usually better if you're not sure.
Checkpoints are '''Trigger''' objects of the type '''CheckPointTrigger'''.  You can find them in '''Mission Objects->Mission''', and creating one gets you a popup like this:
[[File:MB_Screen17.jpg]]
Pressing the button allows you to select the type of trigger.  You can call it whatever you want, but I'm just going to call mine checkpoint1.  This will be the first checkpoint ''after'' the start/finish line.
Hitting OK will get you a tiny yellow box.  You need to resize this to go across your track - the controls are the same as for other objects.  Make sure you cover the whole track out as far as someone could legitimately drift.  It also needs to be set into the ground, and go high enough to catch jumps.  Mine looks like this:
[[File:MB_Screen18.jpg]]
I decided to extend it a long way out to the right, in case someone drifts up there by mistake.  It's set inside the barrier on the left.  The actual checkpoint is the angled red cuboid here - the yellow box is just a bounding box, it's the inner one cars will use.  Now we just need to add a couple of parameters to the object.  In '''World Editor Inspector''' mode you can use the '''Add''' button next to '''Dynamic Fields''' to create new parameters.  These are name/value pairs.  Create one called ''isLast'' with a value of zero, and one called ''checkpoint'' with a value of one.  The result should look like this:
[[File:MB_Screen19.jpg]]
The ''checkpoint'' value sets the order cars have to pass through the checkpoints, and ''isLast'' sets whether going through the checkpoint ends a lap.  You should now be able to go round and create all the checkpoints for your track.  Make sure the last one is properly lined up with the finish line, and set isLast to 1.
Important point - copying and pasting a trigger will sometimes leave you with the previous object selected instead of the new one.  Make sure you know what you're editing the name of!
==== Waypoints ====
OK, this is the tricky bit.  Waypoints tell the AI how to drive around the track - where they should turn and what speed they should be going.  They're hard to get right, particularly because it's nearly impossible to test them in the editor - the physics is just too different.  Still, you can at least test that the car tries to go around the track, even if it can't quite manage it.
Waypoints are grouped together into Car Paths.  As this is a race track, we only need one.  Wilderness maps need more, to cover every major route.  To create one, go to '''Mission Objects->Mission''', and create a '''Path'''.  Name it ''CarPath''.  Now make this the active group (alt-click), and you're ready to add waypoints.
Waypoints are '''PathMarker'''s, found just below the path object.  Create one and scale it up a bit, and it should look like this:
[[File:MB Screen20.jpg]]
One important point with waypoints - never ever rotate them.  It doesn't do anything, but the collision shape will rotate, so your track doesn't behave the way you expect.  You will need to add one dynamic field to the marker.  Call it ''speed''.  This is the speed in metres per second the AI will try to be going when it hits this waypoint.  Sam's rule of thumb:  "I use 200 for a waypoint you can take flat-out, maybe 40 for ones that can almost be done flat-out, and anything down to about 20 or 25 for tighter corners".  The sequence number sets the order of the waypoints.  It should sort itself out automatically, but you may need to edit it if you play around with the order or something.
Now try creating another waypoint.  You should see a line between them, something like this:
[[File:MB Screen21.jpg]]
This isn't exactly the path the cars will take, but it's a useful confirmation that you've got the points in the right order.  Now you should be able to add all the waypoints you need for your track.  As with checkpoints, more is better.  Inserting extras in the middle of the order is difficult, so it's better to have too many than too few.
The finished version of my carpath looks like this:
[[File:MB Screen22.jpg]]
Now you'll want to test your track.  To do this, you'll need the following file:
[[http://www.filedropper.com/bugfix bug fix]]
This makes the AI cars work in race mode, without it they only work in wilderness maps.  Unzip the file and put it in the darkwind/server/scripts folder in the mission builder.  You'll need to restart the mission builder too.  Now load up your track, drive your car a little out of the way, enter editing mode, and press 1.  An AI car should spawn and drive around the track.  They're not too bright and the physics isn't too good but if it makes it to the finish line with only a couple of helping nudges I generally consider the waypoints good.
=== Finishing Touches ===
A few random things you can use to modify the look of your mission.
==== Water ====
Water is created in cubes - either single small areas or one big enough to fill the entire map.  You can find '''Water''' under '''Mission Objects'''.  Don't worry about the parameters, they're easy to change later.
[[File:MB Screen 23.jpg]]
Once you have your water (it will look like a 2D sheet, only the surface is really visible) you can move it into place and start changing the parameters.  I recommend opening up a level which has water you like the look of, and copying that.  You can make the water appear to flow, change the colour, and all sorts of other things.  I've copied the water from the gates of Elms, and made it look a bit less appealing.
[[File:MB Screen 24.jpg]]
==== Weather ====
You can also play with the depth fog.  If you look through the list of objects which are created for you, you should be able to find '''Sky'''.  There are various different parameters - in this screenshot I've reduced the fog distance and visible distance down to almost nothing.
[[File:MB Screen 25.jpg]]
You can also change the fog colour (it uses [http://en.wikipedia.org/wiki/RGB#Numeric_representations RGB] colour values).  Here I've produced a nice pink fog.  Very pretty.
[[File:MB Screen 27.jpg]]
The final thing you can try is to change the sky texture.  Have a look at '''MaterialList''' under '''Media'''.  This is your current sky texture.  If you find that file, there will be others in the same directory with the same extension.  Those are the other possible sky textures.  Play around until you find one that suits the mood of your level.  This is the stormy sky texture, but there are a lot of others.
[[File:MB Screen 26.jpg]]
==== Sunlight ====
The last thing to try is changing the colour of the sunlight, if you want a sunset or stormy feel.  Find the '''Sun''' object, and you can change the colour in the same way as with the fog.  You will need to recalculate lighting for this to work.  Here is an example with a reddish sun, although it turned out a bit too pink to really look like sunset.  I also set the fog to yellowish brown, to blend in with the desert a bit better.
[[File:MB Screen 28.jpg]]
== Creating a Wilderness Map ==
This guide goes over some of the parts of the mission builder that are most relevant to wilderness maps.  Honestly there's not that much of a difference between a race track and a wilderness map - it's just more work, as you have to take into account that players can and will drive anywhere on the map.  If you feel confident in your ability to make a map, just skip to the end and add the car paths and spawn areas, and you'll be good to go.
=== Terrain Generation ===
Unlike race tracks, the whole area is important.  Players will be able to go everywhere, so we need to make sure there's something interesting in every direction.
The first thing to do is to look at other maps in the area, try and work out how they were created.
I'll be using an empty map to demonstrate these transformations.  The sun has been turned down to reduce glare, and fog is reduced.
[[File:MBW_Screen1.jpg]]
The green area shows where the terrain will repeat.  Darkwind maps loop forever (as you probably noticed), and this line shows the edge of the map section. You can't paint textures outside this area - you need to head over to the other side of the map.  It doesn't have any effect in-game though.
Making a map starts in terrain terraform editor mode.  There are two types of transformation - generators and modifiers. They work in order from top to bottom, and can be layered to produce complex effects.
==== Generators ====
Generators override the terrain, and wipe out everything above them in the stack.  There's no point using more than one of these, they just override each other.  The "New Seed" button gives a different random terrain.  The green minimap in the bottom left shows a preview of the terrain that will be generated.
*'''fBm Fractal''' - basic hilly terrain.  Hill frequency is (more or less) the number of hills in the area.  Roughness is the steepness of the hills (I think - it doesn't actually seem to do much).  Detail adds smaller hills between the large ones.  This is the most useful generator for most areas.
[[File:MBW_Screen2.jpg]]
*'''Rigid MultiFractal''' - produces ridges or sand dunes.  This is used for most of the terrain along the SS-Elms route.  Frequency and detail as above.
[[File:MBW_Screen3.jpg]]
*'''Canyon Fractal''' - Produces steep-sided canyons.  Think of Sarsfield, or The Maze.  Chaos adjusts how winding the canyons are.  With low numbers of canyons and moderate roughness, this can produce rolling hills.
[[File:MBW_Screen4.jpg]]
''Low Chaos''
[[File:MBW_Screen5.jpg]]
''High Chaos''
*'''Sinus''' - produces small bumps all over the map.  The graph will be important for a lot of operations, so it's worth explaining how it works.  The height of the graph shows how much of that size effect will be part of the final terrain - large bumps on the left, small ones on the right.  A couple of examples:
[[File:MBW_Screen6.jpg]]
''Small Ripples''
[[File:MBW_Screen7.jpg]]
''Large Ripples''
[[File:MBW_Screen8.jpg]]
''Varied Ripples''
* '''Bitmap''' - claims to use an 8 bit bitmap as the base for a terrain.  Unfortunately I can't work out which folder it looks in for bitmaps.  Anyone who works it out, let me know.
==== Modifiers ====
*'''General''' - sets max and min terrain height.  This is the biggest effect on the "hilliness" of the terrain.  This is always the first transformation, and can't be deleted.
*'''Turbulence''' - adds extra noise and roughness to the terrain.  It gives a twisting sort of effect.  Requires clicking on a higher level and back before seeing any effects.
[[File:MBW_Screen9.jpg]]
''No Turbulence''
[[File:MBW_Screen10.jpg]]
''Light Turbulence''
[[File:MBW_Screen11.jpg]]
''Heavy Turbulence''
*'''Smoothing''' - the opposite.  Smooths out rough edges and makes a more even, rolling terrain.  Number of iterations has the biggest effect on the outcome.
[[File:MBW_Screen12.jpg]]
''No Smoothing''
[[File:MBW_Screen13.jpg]]
''Light Smoothing''
[[File:MBW_Screen14.jpg]]
''Heavy Smoothing''
*'''Smooth Ridges/Valleys''' - smooths only the top of mountains and ridges.  Useful to avoid sharp peaks that cars have trouble driving over.
[[File:MBW_Screen15.jpg]]
''No Smoothing''
[[File:MBW_Screen16.jpg]]
''Heavy Smoothing''
*'''Filter''' - applies a transform based on the height of the terrain - each input height can be linked to an output.  There are all sort of complex effects that can be achieved like this, although I haven't experimented much.
[[File:MBW_Screen17.jpg]]
''The original terrain''


[[File:MBW_Screen18.jpg]]
''Filtering used to set the terrain to three levels''
*'''Thermal Erosion/Hydraulic Erosion''' - don't appear to do anything.  Let me know if you work it out.
=== Automatic Texture Generation ===
Painting the whole map by hand would be slow and impractical, so unless we just want uniform sand we need to automatically paint textures.
This is more art than science.  I've managed to get it to work, more or less, but I'm not sure exactly what the rules are.
Use the add material button to add textures to your level.  They come with a standard fractal distortion, just to add a bit of roughness to the edges and make the whole thing appear a little more natural.  There are two additional placement options:
* '''Place by Height''' - Good for putting rock textures on the tops of hills, or underwater textures at the bottom of pools.  Here's a quick example:
[[File:MBW_Screen19.jpg]]
You can see that the sand is restricted to the middle layer, with red sand at the bottom of pits and black rock at the top of the hills.
* '''Place by Slope''' - Best used in combination with place by height.  In this example, the black rock has been set to large slopes only, so the plateau on top reverts to the yellow sand.
[[File:MBW_Screen20.jpg]]
=== Sculpting the Map ===
The techniques here are the same as for the race track above.  Try to look at the map as you would playing it.  Think about points where the player can sit at the top of a cliff or behind a pit and get easy kills, or use areas the AI has trouble navigating in order to escape.  Then stop them.  Remember, you score points for every player who dies on your map, double points if you can get them to drive into pits.
It's up to you how much hand sculpting you want to do.  Some maps are just a few tweaks on top of a generated terrain, whereas some (The Pits is a good example) are largely built by hand.  Hand built terrain can look amazing, but it's a lot of work - up to you.  I prefer to have the computer do most of the work because I'm a lazy programmer.
==== Regenerating Textures ====
If you adjust the terrain and want to automatically texture it, you'll need to swap into Terraform Editor mode and back out again before your changes are recognised.  There are actually a few situations like this, and swapping between modes or turning fractal distortion off and on again usually fix them.  If not, you may need to quit and restart.
=== Decorations ===
Again, this is covered in the race track section.  Adding just a few trees or shrubs can make a big difference.
Note that even though the terrain will loop, the objects won't be recreated.  You can put objects outside the mission area though, which is a good idea if you have something like a bridge.
=== Car Paths and Spawn Areas ===
This is the major technical difference between a wilderness map and a race track.  Like the track, car paths are needed to direct the AIs along your roads (not that they pay any attention, but you have to make the effort).  However the form of the path is different and you may need more than one.  You will also need multiple spawn areas, along with ambush points.
==== Car Paths ====
The simplest maps (which is most of them) have a single car path that follows a single road across the map.  These are by far the easiest to make.  Make a path just like you would for the race track, but instead of a loop you want a single line from one edge of the mission area to the other.  The AI will head the first waypoint on the next repeat of the map when they get to the last waypoint on this repeat, so make sure the two points are close to each other.  You also need to make the points big enough that the AIs won't miss them if they're driving slightly off road.
More complex maps may have multiple car paths that join and split it complex ways, but I can't help you there.  Have a look at the gates of SS if you want an idea of how bad it can get.  Then just stick to making maps with a single road on.
==== Spawn Areas ====
There are three types of spawn area available.  Trader and Pirate spawns are the normal spawn points, and do what you expect them to.  Traditionally the pirates spawn 100m - 200m behind the traders, but you could try some more unorthodox things if you want.  Bear in mind that a head-on spawn will (I believe) put the players in the pirate spot, with the AIs facing them in the trader spot.
These types of spawn consist of a SimGroup named in the form PlayerDropPoints1Pirate or PlayerDropPoints1Trader, which contains four SpawnSpheres.  These mark (in order) the front-left, front-right, rear-left, and rear-right corners of the area.
[[File:MBW_Screen21.jpg]][[File:MBW_Screen22.jpg]]
''Traders(left) and Pirates (right)''
The third type is the ambush, named in the form AmbushPoints1Pirate.  These are optional, but I like to add one to each spawn point, just to stop people getting complacent.  These consist of 25 or more SpawnSpheres, which each give the position and facing of a single car.
[[File:MBW_Screen23.jpg]]
''Ambush points''
You can have as many spawn areas as you like, just keep increasing the number.  One nice trick (which I didn't think of when making Oil Slick, unfortunately) is to add spawns at both ends of your path, facing towards the centre.  Driving the map in both directions adds a bit of variety, and it means players will be seeing all that nice decration you added from both sides.
== Submitting Your Mission ==


== Notes ==
== Notes ==
Line 434: Line 115:


'''Checkpoints'''
'''Checkpoints'''
ONLY USED ON RACE TRACKS
ONLY USED ON RACETRACKS
You need a set of these, probably between 5 and 10 of them. In fact, the more the better. Make sure they overlap the track boundaries generously, so we don't penalise people who drift over the edges a little.
You need a set of these, probably between 5 and 10 of them. In fact, the more the better. Make sure they overlap the track boundaries generously, so we don't penalise people who drift over the edges a little.


Line 445: Line 126:


'''Spawn Areas'''
'''Spawn Areas'''
RACE TRACKS HAVE 1 SPAWN AREA ONLY
RACETRACKS HAVE 1 SPAWN AREA ONLY
The spawn area is specified by using ''two SpawnSpheres'' inside a SimGroup called PlayerDropPoints. These two SpawnSpheres show the opposite corners of a rectangle into which the cars will be spawned. The first is the 'front' of the starting grid and the second is the 'back' of the grid. The rotation of the first SpawnSphere will be the rotation that cars are spawned at.
The spawn area is specified by using ''two SpawnSpheres'' inside a SimGroup called PlayerDropPoints. These two SpawnSpheres show the opposite corners of a rectangle into which the cars will be spawned. The first is the 'front' of the starting grid and the second is the 'back' of the grid. The rotation of the first SpawnSphere will be the rotation that cars are spawned at.


Line 470: Line 151:
__isOffroad __- this takes 2 possible values, or can be omitted. A value 1 means this waypoint is only for offroad vehicles (e.g. the buggy or the landrunner) to use (they have better tyre friction and this can be significant in places where other cars slide a lot). A value 2 means this waypoint is only for non-offroad vehicles. If you omit the isOffroad field then all cars use the waypoint.
__isOffroad __- this takes 2 possible values, or can be omitted. A value 1 means this waypoint is only for offroad vehicles (e.g. the buggy or the landrunner) to use (they have better tyre friction and this can be significant in places where other cars slide a lot). A value 2 means this waypoint is only for non-offroad vehicles. If you omit the isOffroad field then all cars use the waypoint.


RACE TRACKS HAVE 1 CARPATH
RACETRACKS HAVE 1 CARPATH


ARENAS HAVE BETWEEN 2 AND 4 CARPATHS
ARENAS HAVE BETWEEN 2 AND 4 CARPATHS
Line 480: Line 161:
The key thing here is to recognise that the terrain repeats itself, and the CarPaths need to connect to themselves or another CarPath in order to provide data for the NPCs to drive the road over multiple terrain repetitions. It can get a bit confusing, but if you stick to a single carpath that covers exactly 1 terrain repetition then it will work fine. More complex terrains are harder (take a look at gates of somerset for example).
The key thing here is to recognise that the terrain repeats itself, and the CarPaths need to connect to themselves or another CarPath in order to provide data for the NPCs to drive the road over multiple terrain repetitions. It can get a bit confusing, but if you stick to a single carpath that covers exactly 1 terrain repetition then it will work fine. More complex terrains are harder (take a look at gates of somerset for example).


=== Some extra notes on getting waypoints and checkpoints right: ===
== Some extra notes on getting waypoints and checkpoints right: ==


Waypoints:
Waypoints:
Line 504: Line 185:
The order of these, rather than their name, determines their position on the grid  
The order of these, rather than their name, determines their position on the grid  


=== Notes on Racetracks: ===
(1) To get the cars spawning at the right place, make sure that the SpawnSpheres are *inside* the PlayerDropPoints simgroup, not after it. To be inside, they need to be directly after the { symbol and before the }; symbols
Like this:
  new SimGroup(PlayerDropPoints) {
    spawnspheres are in here..
  };
(2) The scale of the Marker objects (which define the NPC route around the track) is very important. The position of the markers obviously defines where the NPCs should steer towards, but until they cross the edge of a Marker they won't move onto the next one. So if the scale is "1 1 1" they'll have a very hard time driving the track since they will insist on passing through a precise area 1x1 metre in size. If you open up one of the existing files, such as the Northern Desert Circuit, you'll see how the size is used to make them start turnning before they get to the apex in many cases.
(3) Don't worry about the looping constraint, that will be easy to fix by forcing the track to always have 1 lap races.


[[Category: World]]
[[Category: World]]
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wiki:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)