Celestial Impact Forum Index
Author Message

<  Maps  ~  Loading user created maps

creamola
Posted: Sat Nov 10, 2007 7:04 pm Reply with quote
Developer Joined: 04 Apr 2007 Posts: 136 Location: Stockholm, Sweden
Edit: This guide should now be up-to-date according to v1.01

Forge guide - How to load your own created maps

When you have created a map in forge and saved it using the "wo_dump <filename>" command the map file will show up in the Celestial Impact root-directory. This file by itself is not enough to be used as a CI-map, you also need a corresponding world script. This guide will go through all the neccessary tokens in the world script as well as include an example file.

At any time you need to specify xyz-coordinates you can use cg_drawcoords 1 in the console to find out the coordinates of a particular place. The first three coordinates on the upper row displays your current position in the map.

The first thing you need to do is to create a folder called "maps" in the Celestial Impact directory.
Move your map file into the map folder and then create the world script in the same folder.

A world script is basically a textfile having .world as extension instead of .txt
The world script file should preferrably have the same name as the map file.
For example:
If I had a map file called mymap.vo2 I would name the world script mymap.world

This is an example of how a world script might look like:


/*************************
* Example World Script *
************************/

name "My Map"
loadingMiniImage maps/mymap_mini.disk.tga
loadingImage maps/mymap.disk.tga
matter maps/mymap.vo2
skyBox game/sky_orange/sky.material
description "An example map"

maxItems 18
itemSpawnTime 100

numMushrooms 7
numStones 15
numProbes 2
numBarrels 6

coreAltitude 5
spaceAltitude 22

skyAnglesSpeed 1.5 0 0

musicPath game/c_music/ingame.ogg
musicVolume 1

rules CR
maxplayers 6

itemLifeAmount 50
itemArmorAmount 75
itemBerserkAmount 20
itemBerserkMax 2

spark_rain_interval 40

//
// Weapons
//
meelgun
{
spawnWeapon
}
minigun
{
spawnWeapon
}

shotgun
{

}

grengun
{

}

railgun
{

}

dirtgun
{
spawnWeapon
skipItem
tickRate 1200
tickMax 25
}

blueTeamWM 0
redTeamWM 2

//
// World Materials
//
worldMaterials
{
0 game/wm/tridmood.material
1 game/wm/chill.material
2 game/wm/purple.material
4 game/wm/brownmud.material
5 game/wm/marb.material
6 game/wm/red.material
7 game/wm/blue.material
8 game/wm/brim.material
9 game/wm/green.material
10 game/wm/slime.material
11 game/wm/mossy.material

}


crZoneBluePos 0 0 0
crZoneBlueRadius 1000
crZoneRedPos 0 0 0
crZoneRedRadius 1000

spawnBluePos -5 2 6
spawnBlueRadius 2

spawnRedPos 0 0 0
spawnRedRadius 1000

fogColor 0.2 0.2 0.7
fogRadius 12
fogSight 20
fogLod game/c_models/sphere/0003.lo3

spectatorPos -8.5 6.7 15.8
spectatorAngles 0 86 184

//
// World Tags
//
worldTags
{
spawn_crystal0 -6.42 -1.79 4.40
spawn_crystal1 -3.26 6.70 2.38
spawn_crystal2 10.35 0.18 -4.08
meteor_rain_dir 0 1 0

spawn_blue_drone 10.88 -4.10 8.60
spawn_red_drone -8.81 -0.21 -10.80

spawn_blue_crystal -10.88 -4.10 8.60
spawn_red_crystal -8.81 -0.21 -10.80
}


/********************************
* End of example World Script *
*******************************/

Easiest way to create a world script is to copy the above example and start editing the parameters of the tokens to your liking.

---------Description of Tokens---------

name
The name of the map that will be displayed in the map info box

loadingImage & loadingMiniImage
The path to the loading images that is used during loading of this map.
This attribute defines two images. One larger that will be used during loading and one smaller that is displayed in

the map info box in the create server menu. The small image must have the same name as the larger one with "_mini" added after the name.

For example:
large image name is "myimage.disk.tga"
small image name should be "myimage_mini.disk.tga"

It is important that the images end in .disk.tga otherwise they won't show up when playing on pure servers.

Both images must be saved in .tga format.
The large image should be 512*512 pixels
The small image should be 256*256 pixels

The loading images will not be transferred to other clients when a client is downloading map from a server running the map. If you want people to have your loading images aswell you have to distribute the map manually.

matter
This is the path to the map file. The map file must have the file extension .vo2

skyBox
This defines the sky to be used on this map.
The skies to choose from are:
sky_astro
sky_blue
sky_green
sky_mw
sky_orange
sky_red

Just replace the name sky name in the path with the one you want
For example, to change from orange sky to blue sky
change game/sky_orange/sky.material
into game/sky_blue/sky.material

description
A short description of the map that will be displayed in the map info box

maxItems
Maximum number of total items that are present in the world.
Balance the number with your map size.

itemSpawnTime
amount of time in milliseconds between item spawns

numMushrooms
How many mushrooms that appear in the world

numStones
How many stones that appear in the world

numProbes
How many crasched probes that appear in thew world

numBarrels
How many barrels that appear in the world

------\\\ Parameters for spherical gravity ///------

coreAltitude
Specifies the radius of the core.
The core is indestructible.

spaceAltitude
Specifies the how far from the asteroid center that the space start.
It is not possible to build terrain that would go above the spaceAltitude

------\\\ End spherical gravity parameters ///------


------\\\ Parameters for linear gravity ///------
To obtain the kind of gravity that Donot uses, use the following 3 parameters instead of the parameters of the spherical gravity section

example:

linearGravity
deathFloor -40
spaceBox 24 24 24

linearGravity
This just states that the engine should use linear gravity. This should be alone on a line with no value.

deathFloor
This sets how far you will fall before getting killed when falling outside the map. The bigger the negative value, the longer you fall.

spaceBox
This takes 3 parameters which decide the boundaries of the map in width height and depth.

------\\\ End parameters for linear gravity ///------

skyAnglesSpeed
Specifies the speed the asteroid rotates with and which of the three axises it rotates around.
The speed is measured in degrees per second.


musicPath
Specifies the path to the music file used for this map.
Currently there is only one file available which has the path
game/c_music/ingame.ogg

Remove the musicPath token if you don't want any music on the map

musicVolume
Sets the volume of the music using a percentage value between 0 and 1.
For example, to set the volume to half the normal volume of the music, set it to 0.5


rules
Specifies the default rules for this map.
The following rules are available:
CR
DM
CC
f

CR means Crystal Rounds
DM means Deathmatch
CC means Capture the Crystal
f means forge mode

The specified rule will be the one that is checked as default when selecting this map in the create server menu but is not enforced. Any of the other rules can still be used when playing this map


itemLifeAmount
Specifies how much health each health item should contain.
(default is 50)

itemArmorAmount
Specifies how much armor each armor item should contain.
(default is 75)

itemBerserkAmount
Specifies how many seconds berserk will last
(default is 20)

itemBerserkMax
Specifies the maximum amount of berserker items that can exist at the same time.
(default varies depending on map-size)

spark_rain_interval
Defines how often the spark rain should appear

Weapons section
Each weapon must be on the form:

weaponname {

}

The possible weapon names are:
meelgun
minigun
shotgun
grengun
railgun
dirtgun

Including the optional token spawnWeapon inside the brackets
will make players start with that particular weapon each time they spawn.

Including the optional token skipItem inside the brackets will have the map not spawning ammo for that weapon.

For example, to add the shotgun and remove the minigun as starting weapon and take away dirt ammo spawns it would look like:

meelgun
{
spawnWeapon
}
minigun
{

}

shotgun
{
spawnWeapon
}

grengun
{

}

railgun
{

}

dirtgun
{
spawnWeapon
skipItem
}

The dirtgun also contains two extra tokens tickRate and tickMax

tickRate specifies how often dirtammo is regenerated, specified in milliseconds.

tickMax defines the upper limit of dirt ammo regeneration.
(i.e. set it to 20 and ammo will stop regenerating once you reach 20 ammo).


worldMaterials
This specifies which of the CI world materials you want your world to be able to contain.
This section must be on the form:

worldMaterials
{
<number> <material path>
}

With the number increasing for each material you add.
Switching place on two materialpaths with eachother will also switch the places the particular materials appears in your map



blueTeamWM & redTeamWM
Specifies which one of the world materials that is used when the blue/red team uses the dirtgun.
Specify using the number corresponding to the world material you want.
For example:
blueTeamWM 0 will set "tridmood" as the material for team blue
redTeamWM 2 will set "purple" as the material for team red


crZoneBluePos & crZoneBlueRadius
Set the capture point of the blue team that is used during crystal rounds.
Use captureBluePos to set the xyz-coord for the capture point and captureBlueRadius for the radius of the capture zone.
The official crystal round maps are using the whole asteroid as capture zones by using radius 1000


crZoneRedPos & crZoneRedRadius
Same as captureBluePos & captureBlueRadius but for the red team

spawnBluePos & spawnBlueRadius
Defines the possible spawning areas using a radius around a point.
These are used for every game mode except CC in which the teams spawn close to their base.

spawnRedPos & spawnRedRadius
Same as spawnBluePos & spawnBlueRadius but for the red team

fogColor
Defines the color of the atmosphere fog this map uses.
The color is set using a percentage value of how much red, green and blue should be used.
For example, to create a yellow fog set
fogColor 1 1 0
which corresponds to 100% red 100% green and 0% blue
If you wanted a grey fog instead you would set
fogColor 0.5 0.5 0.5
which corresponds to 50% red 50% green 50% blue

fogRadius
Sets the radius of the fog sphere with respect to the center of the asteroid

fogSight
Sets how good the sight through the fog should be.
A higher value results in a more clear view whilst a lower value results in a thicker fog.

fogLod
This token must be set to game/c_models/sphere/0003.lo3

spectatorPos
Set the initial position of spectators using xyz coords.

spectatorAngles
Set the angle at which the spectators will initially look.

worldTags
The worldTags token is a container for some tags
It must be on the form:
worldTags
{
<token> <parameter>
}


spawn_crystal#
Sets a possible spawn point for the crystal in crystal rounds using xyz-coordinates.
Multiple spawn points can be set. The crystal will randomly spawn in one of these locations when the map starts.
Replace the # with a 0 for the first spawn point and use increasing numbers for any extra spawn points
For example:
spawn_crystal0 -6.42 -1.79 4.40
spawn_crystal1 -3.26 6.70 2.38

This will set two possible spawn points for the crystal.

This token must be inside the worldTags container.

meteor_rain_dir
Specifies the direction of the meteor rain using 3 parameters that go between 0 and 1

This token must be inside the worldTags container.


spawn_blue_drone
Specifies the position of the blue drone using xyz-coordinates.
The drone does nothing special but could be used as marker for a capture zone.

This token must be inside the worldTags container.


spawn_red_drone
Specifies the position of the red drone using xyz-coordinates.
The drone does nothing special but could be used as marker for a capture zone.

This token must be inside the worldTags container.




Once you are finished with the world script, the map will be available in the create server menu.


Last edited by creamola on Wed Aug 27, 2008 5:59 pm; edited 2 times in total

_________________
Daniel Wikell
Game Design, 2D art and the rest of the stuff that noone else does
Celestial Impact
View user's profile Send private message
Vesuvius
Posted: Sun May 25, 2008 9:27 pm Reply with quote
Joined: 24 May 2008 Posts: 20
Is there a special tag required to make the dirtgun recharge?
View user's profile Send private message
creamola
Posted: Sun May 25, 2008 9:59 pm Reply with quote
Developer Joined: 04 Apr 2007 Posts: 136 Location: Stockholm, Sweden
Yes. It is part of the new changes that I unfortunately haven't had time to update yet.
If you stroll around the game.pack (its a disguised zip) and you can find the world files for the official maps. Look inside them and you'll see whats needed for a regular map.

Here's what you need to change

Enter this inside the dirtgun block:

tickRate 1500
tickMax 20


tickRate is measured in milliseconds
tickMax defines the upper ammo limit that is regening. (i.e. tickMax 20 means that it won't regen above 20)

Hopefully I'll have time to update the whole guide in a few days.

_________________
Daniel Wikell
Game Design, 2D art and the rest of the stuff that noone else does
Celestial Impact
View user's profile Send private message
Vesuvius
Posted: Mon May 26, 2008 12:18 am Reply with quote
Joined: 24 May 2008 Posts: 20
Thanks.

Also, is there a convenient way to get the coordinates of a specific location? It seems awkward to place flags by guess and check.
View user's profile Send private message
creamola
Posted: Mon May 26, 2008 7:01 am Reply with quote
Developer Joined: 04 Apr 2007 Posts: 136 Location: Stockholm, Sweden
use the console command cg_drawcoords 1 to print coordinates

_________________
Daniel Wikell
Game Design, 2D art and the rest of the stuff that noone else does
Celestial Impact
View user's profile Send private message
NoMercy
Posted: Mon May 26, 2008 4:22 pm Reply with quote
Joined: 24 May 2008 Posts: 5
You have to do sv_cheats 1 first.
View user's profile Send private message
creamola
Posted: Tue May 27, 2008 8:41 am Reply with quote
Developer Joined: 04 Apr 2007 Posts: 136 Location: Stockholm, Sweden
This guide is now updated to be accurate with v.1.00

A summary of things changed:

added loadingMiniImage

changed specifications for loading-images.

added CC to possible rules

added itemLifeAmount

added itemArmorAmount

added itemBerserkAmount

added itemBerserkMax

added spark_rain_interval

added optional tokens skipItem, tickRate and tickMax for the dirtgun.

changed captureBluePos to crZoneBluePos and captureBlueRadius to crZoneBlueRadius

changed captureRedPos to crZoneRedPos and captureRedRadius to crZoneRedRadius

added spectatorPos

added spectatorAngles

_________________
Daniel Wikell
Game Design, 2D art and the rest of the stuff that noone else does
Celestial Impact
View user's profile Send private message
Daemon
Posted: Mon Jun 09, 2008 3:42 am Reply with quote
Joined: 03 Jun 2008 Posts: 27 Location: Guntersville, AL
how do i get .world instead of .txt?

_________________


Halo Wars, coming soon!
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Taza
Posted: Mon Jun 09, 2008 4:44 am Reply with quote
Joined: 26 May 2008 Posts: 17 Location: South Australia, Australia
If you have "Hide extensions for known filetypes" off you can just change the file name to change it. You can find it in Control Panel>Folder Options>View.
View user's profile Send private message
creamola
Posted: Mon Jun 09, 2008 7:21 am Reply with quote
Developer Joined: 04 Apr 2007 Posts: 136 Location: Stockholm, Sweden
Also when in the save dialog of the textfile from notepad you can switch to list "all file types" instead of all .txt files. That way the file should have typed in extension instead of adding a .txt afterwards

_________________
Daniel Wikell
Game Design, 2D art and the rest of the stuff that noone else does
Celestial Impact
View user's profile Send private message
Drift2Cyber
Posted: Sun Jun 29, 2008 5:50 am Reply with quote
Joined: 27 Jun 2008 Posts: 2
I got an Error when typing in cg_drawcoords 1.

It said it cheat protected?
View user's profile Send private message
Silverfish
Posted: Sun Jun 29, 2008 10:32 am Reply with quote
Joined: 22 Nov 2007 Posts: 57 Location: Sweden
Drift2Cyber wrote:
I got an Error when typing in cg_drawcoords 1.

It said it cheat protected?

You have to write sv_cheats 1 to activate cheats first, I think that's the command at least.
View user's profile Send private message

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 1
Post new topic

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum