|
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. Open Up TutorialMap4.level file from the HWC
Tutorial map file folder.
3.1
Comment Lines And Game Information
Open
Up TutorialMap4.level file from the HWC Tutorial map file folder.
Or indeed any level folder from any HW:C map. Take
a look at the first 6 lines, they look like this:
;
MissionMan script, Thursday, Jul 20 2000, 8:17:09 PM
; Copyright (c) 1998-99, Relic Entertainment Inc.
; Multiplayer Level: HWCTutorialMap4
; Info: HWC Tutorial Map (2-4)
[HWC Tutorial Map (2-4)]
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' tag is the folder name, also the name of
the level file you are working in. The 'Info' tag 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 HW:C, 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,16759.0,-85466.0,0.0,30000.0,0.0,Resource.missphere,1000
MissionSphere
0,RACE_SECT,sMothership,1000.0,0.0,0.0,30000.0,0.0,Mothership_0.missphere,1000
MissionSphere
1,RACE_SECT,sMothership,9000.0,-1000.0,0.0,30000.0,0.0,Mothership_1.missphere,1000
MissionSphere
2,RACE_SECT,sMothership,9000.0,-1000.0,0.0,30000.0,0.0,Mothership_2.missphere,1000
MissionSphere
3,RACE_SECT,sMothership,9000.0,-1000.0,0.0,30000.0,0.0,Mothership_3.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, RACE_SECT = Som-Taaw RACE_BEAST =
Beast, RACE_KUSHAN = Kushan and so on). 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
HW:C
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, bizarrely, 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 bit 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.missphere'. Be careful
of the naming of this file as it's a common error to have a
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 Background lines are simply dealt with, they will
change the background and lightning to whatever one you want
from the 17 single-player missions, or you can use others either
created with BTG or using the backgrounds from Homeworld for
example. This again is simply achieved by naming the background
and lighting files here and including them in the map folder.
Backgrounds
and Lighting are usually set-up like this:
Lighting
mission03
Background
mission03,200,0
There
are 17 missions in the Cataclysm single player game which means
there are 17 backgrounds to choose from when making your level
look pretty. In the case of tutorialmap4 the background is from
Mission 3. You can change the number to anything between 1 and
17.
The
other numbers( ,200,0 ) are rotational values. Don't touch!
Why? Lighting. Each level is lit to match the Background. If
you alter the rotational values, things look weird. Since we're
on Lighting, it probably wouldn't surprise you that if you change
the Background number, you need to change the Lighting number
to match. backgrounds for all the single player missions are
called 'mission01', mission02',
'mission03'
etc, So, for example: mission02
is the second mission, mission10
is the tenth mission, and mission17
is the last mission. You can put in any number between 01 and
17.
You
can also replace 'mission##'
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 'mission' attribute as listed above. The first value
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 3D 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 TutorialMap4.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.
3.5.1
World Size
Cataclysm
will crash if your map is too big. The Limit on how big your
map can be is 500000 (500km) or a smUniverseSizeX,
smUniverseSizeY and smUniverseSizeZ
maximum of 250000 (250km).
So
we're stuck with smaller maps. Having said that, 250km is still
pretty big, it does mean that from end to end there is a good
500km to hide in, and on a 500x500x500 map that's a good 125,000,000
cubic kilometers! And still within the limits. And having said
all this, a lot of players eschew the big maps anyway. And with
FOW etc, most players will think long and hard before entering
into a giant map game.
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, not 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 the updated '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 RACE_SECT and RACE_BEAST,
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 Cataclysm's graphics
start getting screwy...
See
that 1st point he made? Excluding RACE_SECT
and RACE_BEAST
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.
3.6.1
Ships
The
directives to control this are:
ExcludeShips
race,shiptype
IncludeShips race,shiptype
The
values of race are: RACE_SECT,
RACE_BEAST,
RACE_KUSHAN,
RACE_TAIIDAN,
RACE_P1,
or RACE_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
(RACE_P1,
RACE_TRADERS
etc ),
ALL
"How can I exclude most things, but not all?"
You
can put: ExcludeShips RACE_BEAST,
ALL Then below it put: IncludeShips RACE_BEAST,
bMissileCorvette
This
will exclude all Beast
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|Nebula>
resourcetype
Include<Asteroids|DustCloud|Nebula>
resourcetype
Click
here to see the
Resourcetype List.
3.6.3
Derelicts
The
directives to control this are:
ExcludeShips RACE_DERELICT,derelicttype
IncludeShips RACE_DERELICT,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 HW:C 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.
|
|
|
|
Som-Taaw
|
?
or 0
|
|
Beast
|
?
or 1
|
|
Taiidan
Imperialists
|
?
or 2
|
|
Taiidan
Loyalists
|
?
or 3
|
|
Kith
Manaan
|
?
or 4
|
|
Pirates
|
?
or 5
|
|
Kith
Nabaal
|
?
or 6
|
|
Kith
S'jet
|
?
or 7
|
3.7.1
Changing Ship Colours on Multiplayer Maps
An
example of how to use the colour schemes, originally conducted
by Roons for homeworld, here's how its done in HW:C; In the
level file first add one Turanic
Raiders
pirate ship type beyond the basic RACE_SECT/RACE_BEAST
fleet by;
ExcludeShips RACE_P1,All
IncludeShips
RACE_P1,p1MissileCorvette
ExcludeShips
RACE_KUSHAN,All
ExcludeShips
RACE_TAIIDAN,All
ExcludeShips
RACE_TRADERS,All
Then
add 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
make sure that the colour scheme is available to our Turanic
Raiders pirate (P1) Missile Corvette.
The default player colour scheme for the Turanic
Raiders is already
set at 6 and is available already we add this newly defined
#7 colour by adding the line;
AvailableColorSchemes
RACE_P1,p1MissileCorvette
6,7
In
the Mothership_0.missphere file then add
a Turanic
Raiders Missile
Corvette in the new colours,
and a second Turanic
Raiders Missile
Corvette, in the Turanic
Raiders default colours.
Ships
Label,-3000,-5500,0,90,P1,P1MissileCorvette,5,DELTA_FORMATION|?|colorScheme(7)
Ships
Label,-3000,-5000,0,90,P1,P1MissileCorvette,5,DELTA_FORMATION|?|?
There
you have it, you can see your changes right off if you follow
this exercise.
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
Som-Taaw and Beast workers to use this colour scheme for example,
you must name both the Som-Taaw 'sWorker' and the Beast 'bWorker'
in seperate lines.
[See
also Preset Race
colours - Use the 'Back' Function on your browser to return
here.]
The
directive to control this is:
SongNumber number
SongNumber
is any number between 0 and 49 inclusive. The single player
mission music is 1 to 17 inclusive. This wont stop players from
changing the song themselves using the '<' and '>' keys
when in the game.
The
directive to control this is:
Lensflare value
This
is a "don't touch" attribute, but as we whiz by, a brief explanation
on it. Things like slipgates and the Siege Cannon create lens
flare. If you take this attribute out, they won't. So why take
it out. LensFlare pretty..
3.10
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. If you make versions
of your map for more or less players, the level file for a 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]
|