3.0
Introduction to the Level File
This
file contains all the basic information about your map. It contains
the name and race of all the starting ship files, the name of
the resource file, the universe size, the lighting type, the
background type, the sensor manager zoom sizes, the default
song to be played and any ship restrictions. Each of these elements
has their own line and their own series of comma separated attributes.
The
level files must be present in the directory; correctly spelt,
numbered and named exactly the same the same as the directory
(map folder) name in which it resides.
Lets
open up this level file and take a wee look around. There are
three major parts to this file and we will deal with each bit
separately.
3.1
Comment Lines And Game Information
Take
a look at the first 6 lines, they look like this:
;
MissionMan script, Friday, Sep 3 1999, 12:15:09 PM
;
Copyright (c) 1998-99, Relic Entertainment Inc.
;
Multiplayer Level: TutorialMap2
;
Info: The Tutorial Map (2-8)
[The
Tutorial Map (2-8)]
The
first four lines are comment lines, (these are actually generated
by MissionMan). You'll have noted the semicolon in front of
these four lines indicating that the game will ignore these
lines when loading your map yes? We-ell, this ain't strictly
true here, the first two lines, yes, but the third and fourth
lines have to be in the format shown above.
The
'Multiplayer Level' attribute is basically the folder name,
also the name of the level file you are working in. The 'Info'
attribute
it appears can be changed, but its best to follow the format
given above, where the 'Info' tag is the name of your map, as
given on the 6th line, the line in square brackets. This bit
in square brackets is the game name as it appears in the game
itself, when you select your map in Homeworld, that is what
you will see.
Another
wee point here, in the manual it states that: ' The number listed
after the map name shows how many players that map supports.'
You have to do this yourself, its part of the map name.
3.2
The Missionsphere Lines
Under
these lines, every file has a reference line for each ResourceSphere
and Mothership file in the directory in which it resides. What
I'm saying here is that the next three lines all beginning with
'MissionSphere<tab>' (the MissionSphere lines) is telling
the game what files to look for, for the information required
for the resources you have on the map (the ResourceSphere_*.missphere
file) and the player starting co-ordinates (Mothership_*.missphere
files). They look like this:
MissionSphere
-1,?,ResourceSphere,0.0,0.0,0.0,30000.0,0.0,ResourceSphere_1.missphere,1000
MissionSphere
0,R1,Mothership,0.0,0.0,0.0,30000,0.0,Mothership_0.missphere,1000
MissionSphere
1,R2,Mothership,0.0,0.0,0.0,30000.0,0.0,Mothership_1.missphere,1000
"What
are all they numbers and stuff after the 'MissionSphere<tab>'
leader?" I hear you ask. Well, let's go through them, they
are;
PlayerNum,RaceName,Misspheretype,posx,posy,posz,Radius,Sphererotz,Conts,StartRU
3.2.1
PlayerNumber
This
is the player Number assigned to the players by the computer.
-1 for no player (CPU), 0 for the first player, (the Player
starting the Map (i.e. You, unless of course, you are joining
the game over WON), 1 for the second and so on. If you start
a 1v1 against the computer you will take the place of player
0.
3.2.2
RaceName
This
is where you define what race the mission sphere is dealing
with (where; ? = No Race, R1 = Kushan and R2 = Taiidan). When
you assign these, it seems that it means nothing as I find the
computer (at least in the smaller games with 2 players) automatically
assigns the opposite race to what you are playing. Also, in
games over WON all the players will have already decided what
race they wish to use. Still I find it best to set this up as
if it really mattered and usually do so accordingly (here
and in the missionsphere files, perhaps
this is why I see no effect of my naming?).
3.2.3
Misspheretype
This
tells the game what type of file is being dealt with here, where;
'ResourceSphere' is the file containing the resources, and 'Mothership'
is the file containing the player starting fleets & positions.
Remember this has to tie in with the file as named, near the
end of this line, see 'Contents' below.
3.2.4
Posx, Posy, Posz
Homeworld
maps are created by assigning each element of the map (ships,
resources, derelicts) a three-part Cartesian co-ordinate (X,Y,Z
values). The X and Y values are the axis that run along the
midpoint plane and the Z co-ordinate is how far above and below
the midpoint something is located. The centre of all Homeworld
maps is at 0,0,0. This means that elements placed below the
midpoint have negative values and those above it have positive
values. For the Level file however, this matters not a jot,
so don't worry about them at this stage, just leave them as
0,0,0 as the position of the mission sphere is not important
- it only matters that its there.
3.2.5
Radius
The
radius of mission sphere, again it doesn't matter in the slightest
about this. Both the positions and radius of the mission sphere
are MissionMan values, so again just ignore it and leave it
as the universally accepted '30000'
3.2.6
Sphererotz
This
is the angle of rotation of the mission sphere, I
have been told that '1000.0' points towards centre of universe,
again it's a MissionMan generated value so pay it no attention
and leave it at '0'.
3.2.7
Contents
Now
this is important. It refers to the '*.missphere' file,
telling the game what file to go and look for in the folder
that the level file is in. In that file it will find the contents
of the MissionSphere. Pay Attention to this value! If you take
a look at the TutorialMap2.level file I have quoted above then
you will see in the first line, the 'ResourceSphere' line, then
the contents value tells the game that the resources to go in
this MissionSphere will be found in the file called; 'ResourceSphere_1.missphere'.
Be careful of the numbering in the naming of this file as it's
a common error to have the wrong number, or
a letters case doesn't match at some point.
It must be identical to the file name.
3.2.8
StartingRU's
This
does not work. When the developers introduced the default settings
of 1000, 2000 and 4000 RUs that you can set inside the game,
this was left behind, it was originally intended for players
to be able to set their own amounts, and thats why thats here.
In short: Ignore it, its guff.
3.2.9
MissionSphere Line Summary
Ok
then, so that covers the MissionSpheres. To summarise; these
lines name the files the game will find all the resources and
player info it needs. They may look complicated but you will
never need to change much with them, only the PlayerNumber and
contents for the Mothership file and just make sure you name
your ResourceSphere file correctly.
This
next block of lines regards your map settings. Specifically
dealing with the global settings of your map; its background,
the overall size what ship types will be available on it, what
resource types are available on it, and the default music that
will blare out everyone's speakers as the load up your wondrous
maply creations. The following lines must be identical in each
level file:
Lighting
(sets the lighting of your map)
Background
(sets the background to your map)
SmDepthCueRadius
(sets the radius for the depth cue circle
in the sensors manager)
smDepthCueStartRadius
(sets the starting radius for the depth
cue circle in the sensors manager)
smCircleBorder
(sets the radius for the movement depth
cue circle in the sensors manager)
smZoomMax
(sets the maximum zoom range for the sensors
manager)
smZoomMin
(sets the minimum zoom range for the sensors
manager)
smInitialDistance
(Initial Starting Distance?)
smUniverseSizeX
(sets the width of the universe)
smUniverseSizeY
(sets the height of the universe)
smUniverseSizeZ
(sets the depth of the universe)
ExcludeShips
(sets which ships will not be used in a mission)
IncludeShips
(sets which ships will be used in a mission)
ExcludeAsteroid
(sets which asteroid will not be used in a mission)
IncludeAsteroid
(sets which asteroids will be used in a mission)
ExcludeDerelict
(sets which derelicts will not be used in a mission)
IncludeDerelict
(sets which derelicts will be used in a mission)
BaseColor
(sets the base colour of ships)
StripColor
(sets the stripe colours of ships)
AvailableColorSchemes
(sets the colours available for ships)
SongNumber
(sets which song will be played in a mission)
We will
cover thes below more fully, but basically they can be split
into four different areas, and we will deal with each in turn.
Basically this block of attributes deals with:
The
Lighting and Background
lines change
the background and lightning to whatever one you want from the
17 single-player missions. (See
3.4).
World
Size, consisting of SmDepthCueRadius
to smUniverseSizeZ to is a representation
in 3D of how big your level is and other sensor manager settings.
(See 3.5).
Includes
and Excludes are used to include and exclude objects
loading up with the map, and hence designed to speed up the
loading time of the map. (See
3.6).
Optional
Attributes
are as suggested Optional, some you cant change others you may
or may not wish to do, they are discussed below.
(See from 3.7
onwards).
The
Lighting and Backgrund lines are simply dealt with, they will
change the background and lightning to whatever one you want
from the 16 single-player missions, or you can use others either
created with BTG or using the backgrounds from HW:C for example.
This again is simply achieved by naming the background and lighting
files here and including them in all the map folders.
Backgrounds
and Lighting are usually set-up like this:
lighting
ez01
background
ez01, 180, 0
The
backgrounds for all the single player missions are called 'ez01',
ez02', 'ez04' etc, So, for example: ez02 is the second mission,
ez10 is the tenth mission, and ez16 is the last mission. You
can put in any number between 01 and 16, (03 is the same as
01 remember as both these missions occur in orbit of Kharak).
You can also replace 'ez##' with 'default' or if you are feeling
a little more adventurous add your own background by naming
your custom background file here. To add your own background
just make sure the correct files (lighting files: '*.hsf' and
background files: '*.btg') are copied into all the map directories
where the game will find them, and name the file exactly, plus
or minus the .hsf/.btg depending on the name of the lighting
and background file.. ie using Downslope background and downslope
lighting file you do not need the file extension name, if they
are both named identically and the only difference is their
file extention, then you would need them in. (See
the Tutorial Map Part Three).
Certain
maps have a very distinct light source, like the 'SuperNova'
mission, the light source has to be set in a specific way. Its
defined with a degree setting based on a sphere. However, the
light source is stationary, it will always shine from a fixed
point. Luckily, you can rotate the background by adjusting
the two attributes
after the 'ez01' attribute
as listed above. The first attribute
is the 'rotz' (rotation about the z-axis or horizontal rotation),
and the second is the 'roty' (rotation about the y axis or Vertical
'Up/Down' rotation). While you can spin your background about
the z axis (horizontal rotation) to your hearts content I find
the if you rotate you background too far on the vertical axis
(Up/Down) it starts to warp the background, eventually ruining
it big time. So, I would suggest you don't stray over '25' when
changing this last value.
I actually recommend you dont change them from how they are
set in the single-player missions.
This
is a representation in the 3D view of how big your level is.
What the game uses to set the level size dimensions are the
smUniverseSizeX, smUniverseSizeY
and smUniverseSizeZ. You set how
far in and out the camera can zoom on your map with the smZoomMax
and smZoomMin attributes, and the
initial distance this camera sits when a player first goes into
the sensors manager is set with the smInitialDistance
attribute.
Let's
take a look at these lines as they are in the TutorialMap2.level
file;
smDepthCueRadius
50000
smDepthCueStartRadius
20000
smCircleBorder
90000
smZoomMax
500000
smZoomMin
30000
smInitialDistance
145000
smUniverseSizeX
200000
smUniverseSizeZ
100000
smUniverseSizeY
200000
The
first three lines deal with they big circles you see in the
sensors manager, the Depth Cues and Circle Border radii, changing
them appears to do nothing for me, I have always left them well
alone and none of my maps seem to have suffered for it. (IMHO)
The
smZoomMax and the smZoomMin deal with how far
you can zoom out and how far you can zoom in on the sensor manager.
Depending on your overall map size you would scale these accordingly,
its no use being able to zoom out 1,000,000km if you map is
only 200km in length etc. As for how far you want to be able
to zoom in it's really up to you and your map how close in you
want to get on the sensors manager. So far I have never come
across a limit as to the Max or Min zoom.
The
smInitialDistance shows how far out the camera will
be when you go into the sensors manager, just make sure in your
map that it is less than the Max zoom and more than the Min
zoom.
SmUniverseSize
gives the dimensions of the playing area (i.e. how far from
the centre each player can go). The axis are measured from the
centre so above shows that the map has an overall length of
400000 (400km), a height of 200000 (200km) and a width of 400000
(400km). You will know yourself how big you want your map to
be and only need adjust these values accordingly. A point I
should make about this is; if you start up the map and discover
your starting fleet is moving and you have limited control (if
any) over them then that means your fleet has started too far
out, they will move until they reach the playing area of your
map as defined by these values.
In
order to keep level loads times to a minimum, the game can be
told not to bother loading things that never appear in Multiplayer
levels, like Taiidan ships or Pirates or Derelict objects (which
is a place to put objects that don't really belong to a particular
race. The name is carried over from Homeworld). So we set ExcludeShip
attributes. The thing is objects like Crystals and Slipgates
are Derelict objects. So after we set ExcludeShip attributes,
we set IncludeShip attributes for the few items we want back
in the game. Every multiplayer mission should have these includes
and excludes, so don't fiddle with them.
So, all
ships/resources/derelicts etc. need be loaded for every level.
Substantial savings in loading time and texture RAM can
be realised by excluding some things from the load. By default
everything is loaded every level. If something is loaded in
one level and not loaded the next, the space it occupied (in
RAM and texture RAM) is freed for other uses. "But my computer
is the greatest machine of all time!" I hear you cry! "Why
should I exclude things from my map?" Well, I'll let Obithrawn
field this one with a quote from his 'Homeworld Mapmaking Help
and FAQ'
To go along with the story line, or just to create an interesting
map (my map, 'The Strike', for example, only lets you build
strike craft)
To reduce loading time, if you
exclude all the races beside R1 and R2, the loading time will
be significantly less.
If you don't load something, the
RAM will go to using something else, and this will reduce lag.
If you include too much stuff some
of Homeworld's graphics start getting screwy...
See
that 1st point he made? Excluding R1 and R2 ships will remove
them from the Build Manager (as long as they are not on the
map to begin with), so you could quite feasibly exclude all
ships above strike craft, and they will not be available on
your map at all. I suggest you get hold of either; 'The strike'
or 'Planetary Wars' both of which deal with this issue admirably
and can give you a good idea of how easily this is done and
just how much this can change a map.
3.6.1
Ships
The
directives to control this are:
ExcludeShips
race,shiptype
IncludeShips race,shiptype
The
values of race are: R1, R2, P1, P2, P3, or Traders. The value
of 'shiptype' would be any 'shiptype' valid for these races.
'shiptype' can also be 'All' which will include or exclude
that entire race. (Genocide so to speak!) See Below for all
the 'shiptype' values you can use. Continuing with Obithrawn's
FAQ;
"Do
I have to exclude things individually?"
No,
you can exclude an entire race by putting: ExcludeShips Race
(P1, P2, P3, Traders), ALL
"How
can I exclude most things, but not all?"
You
can put: ExcludeShips P1, ALL Then below it put: IncludeShips
P1, P1MissileCorvette
This
will exclude all P1 ships, except for the Missile Corvette.
Click
here to see the
Shiptype List
3.6.2
Resources
As
you can exclude all the 'shiptypes' you have no intention of
using on your map, you can do the same with the resources, specifically
the 'resourcetypes'. The directives to control this are:
Exclude<Asteroids|DustCloud|GasCloud|Nebula>
resourcetype
Include<Asteroids|DustCloud|GasCloud|Nebula>
resourcetype
Click
here to see the
Resourcetype List.
An
important note on Gas Clouds; These are not supported and thus
should not be used. They crash the game outright, so the line
'ExcludeGasCloud
All' should be your only mention (if ever) of Gas Clouds.
3.6.3
Derelicts
The
directives to control this are:
ExcludeDerelict derelicttype
IncludeDerelict derelicttype
Click
here to see the Derelicttype
List.
This
is pretty much an optional line and thus is not important. If
you do not specifically assign a colour then Homeworld will
assign the default colours (as listed below). You can if you
want designate specific colours to certain ships or races using
the command detailed below, but again if you try this with player
race ships, that players colour scheme will take precedence.
The directives to control this are:
BaseColor
DefaultColorschemenumber,Red,Green,Blue
StripColor
DefaultColorschemenumber,Red,Green,Blue
AvailableColorSchemes
Race,shiptype,scheme1,scheme2,scheme3,etc...
By
default, the colour scheme of a ship is based on its race.
See the table below for the defaults.
In order for your fancy colour scheme to show up, you
must enable it for every ship that will use it by using this
directive.
Race
can be any valid race. Type can be any ship valid for that race
or "All". The
Default colour scheme number(s) are in the range of 0 - 7 inclusive.
|
|
R1
(Kushan)
|
0 |
R2
(Taiidan)
|
1 |
P1
(Turanic Raiders)
|
4 |
P2
(Kadeshi Garden Protectors)
|
5 |
P3
(T-Mat)
|
6 |
Traders
(Bentusi & assorted)
|
7 |
3.7.1
Changing Ship Colours on Multiplayer Maps
An
example of how to use the colour schemes, originally conducted
by Roons; In the level file [Roons] first added one pirate ship
type beyond the basic R1/R2 fleet by;
ExcludeShips
P1,All
IncludeShips
P1,p1MissileCorvette
ExcludeShips
P2,All
ExcludeShips
P3,All
ExcludeShips
Traders,All
He
then added these lines creating a black/red stripe colour scheme
that replaces the default colour scheme of number 7;
BaseColor
7, 0, 0, 0
StripeColor
7, 255, 0, 0
Next
he made sure that the colour scheme was available to Kushan
(R1) Missile Destroyers. The default player colour schemes are
available already (0 and 1) and he added his newly defined #7
colour by adding the line;
AvailableColorSchemes
R1 MissileDestroyer
0,1,7
Next
comes the pirates, he decided on purple and set their colour
with the basecolor and stripecolor attributes as before using
default colour scheme 6 and changing it to a putrid purple colour,
then set the Missile corvettes to use this colour with the following
line;
AvailableColorSchemes
P1,p1MissileCorvette
6
In
the Mothership_0.missphere file he then added: a Kushan missile
destroyer in his new colours, a second Kushan missile destroyer,
in the Taiidan default colours , and his purple pirate corvettes;
Ships
Label,-3000.0,-2500.0,0.0,-90.0,R1,MissileDestroyer,1,?|?|colorScheme(7)
Ships
Label,-3500.0,-2500.0,0.0,-90.0,R1,MissileDestroyer,1,?|?|colorScheme(1)
Ships
Label,-3000,-5000,0,90,P1,P1MissileCorvette,5,DELTA_FORMATION|?|colorScheme(6)
This
made a mission sphere where he had 2 funky-coloured missile
destroyers and a formation of purple pirates.
"Great fun for the whole family!" he says.
Don't
worry about the missphere file at the moment we will cover that
later, but what's important from them is the colorscheme(#)
(Canadian spelling!) part after the last pipe ('|'). And that
it must be enabled for every ship that will use it, for both
Taiidan and Kushan missile destroyers to use this colour scheme
for example, you must copy the line 'AvailableColorSchemes
R1 MissileDestroyer
0,1,7' and replace R1 with R2 and so on.
The
directive to control this is:
SongNumber number
SongNumber
is any number between 0 and 49 inclusive. In Appendix A there
is a copy of a file that lists what every song available is,
but you should note that the 'battletracks' are the multiplayer
missions files and are song numbers 10 to 16 inclusive (although
do note that songs 12 and 13 are the same, 13 is just a much
shorter version of 12, and further note that the song everyone
always asks about is Song 11 - Barber's Adagio for strings...).
This wont stop players from changing the song themselves using
the '<' and '>' keys when in the game.
Click
Here to see the full
Song listing.
3.9
Last Word
And
that's the Level file pretty much covered. It may seem like
a lot of information to remember, but if you work methodically
through the file its easily controlled. The level file for the
two player version is almost identical to that of the 8 player,
you are merely adding a few extra lines. This is covered
later in Chapter six, or; 'Finishing
your Map', but for now its just important you realise that
once the 2 player level file is set up, its merely a matter
of copying and pasting a few extra missphere lines to set it
up for 3, 4, 5... etc players.
Moving
on to the Missphere Files themselves, lets get into the guts
of ship and resource placement.
[Top]
[On
to The Mothership File] [Back
to The Description File] [Main]
|