Files
assaultcube-/docs/mapediting5.xml
T
RandumKiwi 2372b40d73 Map editing documentation -> Cfg files
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2343 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-08-19 06:05:27 +00:00

236 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml-stylesheet type="text/xsl" href="transformations/cubedoc2xhtml.xslt"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" lang="en" xml:lang="en">
<head><title>Map editing: Config files</title></head>
<body>
<h1>Map editing: Config files</h1>
<p>
When you first start a map, be sure to use the <b>/newmap</b> command, rather than editing
an existing map.
Issuing the <i>newmap</i> command ensures that your map uses the default map settings, rather than
using the existing configuration for that map (if it did use the existing configuration, upon 2nd load, the map will become messed up).
</p>
<p>
Map config files will <b>ONLY</b> be needed if you want to utilize any of the below:
<ul>
<li>
<a href="#textures">Custom textures</a>
</li>
<li>
<a href="#models">Custom mapmodels</a>
<ol>
<li>
<a href="#clips">Custom "nothing" clips</a>
</li>
</ol>
</li>
<li>
<a href="#skymap">Custom skymaps</a>
</li>
<li>
<a href="#water">Custom watercolouring or water textures</a>
</li>
<li>
Custom fog distances and colours
</li>
<li>
Ambient sounds
</li>
<li>
Using the "loadnotexture" command
</li>
</ul>
The first step to using any of the above in your map is copying the
<a href="../config/default_map_settings.cfg">/config/default_map_settings.cfg</a> file into your
<a href="../packages/maps">/packages/maps</a> folder
and then renaming it to the same name as what your map will be called (i.e. foobar.cfg).
Whenever your map is loaded, it will look for your maps config file (which it can only
find if it's named the same as your map). If it can't find
the config file for your map, it will automatically load
<a href="../config/default_map_settings.cfg">the default config</a> instead.
</p>
<p>
<b>Warning:</b> <u>PLEASE</u> be aware when adding custom content to your map, to make sure you use
<u>LOWERCASE</u> through out the config file and make sure file names of your custom content also use lower case.
If you don't, some operating systems such as linux, will not load the commands or files due to the fact that an
uppercase letter in linux is counted as a completely different letter to a lower case letter. So it is absolutely
vital that the filenames match (even in the file-name extension!)
</p>
<p>
<b>Warning:</b> Don't use single slashes in the config file to issue commands, as the commands won't work if you do.
</p>
<p>
<b>Note:</b> You may see "comments" in the config files. Comments are lines of wiriting in the config file that
have had 2 forward-slashes put in front of them. Using comments is a good way to advise the reader of the config
file about things in the config file. Comments are ignored by the AssaultCube engine. Below is an example of a comment:<br />
<b>// This is a comment!</b>
</p>
<h2 id="textures">Custom textures</h2>
<p>
When you want to add custom textures to your config file, be sure that the textures tile seamlessly.
This means that your texture, when lined up against itself in all directions, should match itself.
</p>
<p>
Preferably, textures should be 256x256 pixels. But, each cube in AssaultCube measures 32x32 pixels, so, as
long as the image is a multiple of 32 pixels and doesn't take up too much space, the texture should work fine. If
the image is not a multiple of 32 pixels, it will not fit on the cube properly and will be unaligned and look strange.
When creating/using custom textures, remember that too much detail/size could make that texture in the map too laggy!
</p>
<p>
You will notice in the default config a command "texturereset". This ensures that all the textures
in your map are always shown in the correct order, so make sure you leave this where it is! Textures are in a numbered
list and the "texturereset" command resets that list, so that your map is not using the last maps texture list.
The first and second textures in the list are hardcoded as the
skymap and water textures.
</p>
<p>
You are allowed to add new textures anywhere below where it says
<b>//-----brickwalls-------</b> Putting it above this will
create some problems. If you are just starting your map, it would be fine to replace textures in the list, or slot
your textures anywhere between the current texture list. However, if you have already started your map and are just
now adding a new texture, it would be wise to place your texture at the very end of the list, so that your map does
not get messed up!
</p>
<p>
To add a new texture, use this format: <b>texture 0 "./folder/file.jpg"</b> on a single line.
Replace "folder" with the folder name and "file" with the name of the image. Be sure to put all your content
inside a seperate folder so that it does not get mixed in with everyone elses content.
</p>
<p>
<b>Note:</b> All textures <b>MUST</b> be placed inside <a href="../packages/textures">/packages/textures/</a>.
</p>
<p>
<b>Warning:</b> There is a texture command above the water textures in the default config that has the comment "dummy".
Do not touch or remove this as it will break some configurations.
</p>
<p>
<b>Warning:</b> There can only be maximum of 256 textures in your map! Any more won't be loaded.
</p>
<h2 id="models">Custom mapmodels</h2>
<p>
To use your own custom mapmodels in AssaultCube, all models must be of either md2 or md3 format and
be placed inside <a href="../packages/models/mapmodels">/packages/models/mapmodels</a>. You will need
to create a seperate folder for your mapmodel. Inside it, you will need to place the model with the name "tris"
(and the .md2 or .md3 extension). You will also need to place the skin in the same folder with the name "skin.jpg".
</p>
<p>
You will see a command called "mapmodelreset". All mapmodels can be placed below this. The mapmodelreset command
ensures that the mapmodels in the numbered list are reset, meaning that everything appears as it should, rather than
using the last maps mapmodel numbering.
</p>
<p>
To add a mapmodel, use this format: <b>mapmodel X Y Z 0"model-folder"</b> on a single line.
Replace "model-folder" with the name of the folder that the mapmodel is in (for example, if the file is
in /packages/models/mapmodels/tree, you would put "tree" there).|
</p>
<p>
Mapmodels use an invisible force to make them feel solid (i.e. you colide against them, rather than falling through
them). This invisible force is called a "clip".
<ul>
<li>
<b>W:</b> Defines the total width/length (in radius) that the invisible force (clip) should take up
from the centre of the mapmodel.
</li>
<li>
<b>X:</b> Defines the total height that the invisible force (clip) should take up.
</li>
<li>
<b>Y:</b> Defines the initial height off the ground you would like the mapmodel to appear.
</li>
<li>
<b>0:</b> The last zero on the mapmodels clipping should be left alone. Do not touch this value and leave it assigned at zero. Changing or
removing this number will break the mapmodel command.
</li>
</ul>
</p>
<p>
<b>Note:</b> The mapmodel number is defined by where the mapmodel is placed inside the mapmodel list, i.e. the 21st
mapmodel command will be the 21st mapmodel
</p>
<p>
<b>Tip:</b> If you define the mapmodel to have 0 clipping of the width/length but give it a height
clipping (for example, a clipping of 8 high)
then that model will actually take up the width/length of 1 single cube with the height you defined
(if you define both to be 0, then it won't be clipped)
</p>
<h3 id="#clips">Custom "nothing" clips</h3>
<p>
<a href="mapediting3.xml#clips">Nothing clips</a> can be used to block off areas that you don't want to
be accessed by players, see this <a href="mapediting3.xml#clips">link</a> for more details. To create a customised
nothing clip, do it how you would normally create a mapmodel but use the word "nothing" where the folder name should
be. Choose your own customised clip (invisible force that you collide against) as you would normally (i.e. define
the clip width/length and height).
</p>
<h2 id="skymap">Custom skymaps</h2>
<p>
All skymaps should be placed in their own individual folder inside
<a href="../packages/textures/skymaps/">packages/textures/skymaps/</a>. <br />
Six pieces make up a skymap and should be named as below (replace "foobar" with the name of the skymap):
<ul>
<li>
<b>foobar_bk.jpg</b> - For the back part of the skymap.
</li>
<li>
<b>foobar_dn.jpg</b> - For the bottom part of the skymap.
</li>
<li>
<b>foobar_ft.jpg</b> - For the front part of the skymap.
</li>
<li>
<b>foobar_lf.jpg</b> - For the left part of the skymap.
</li>
<li>
<b>foobar_rt.jpg</b> - For the right part of the skymap.
</li>
<li>
<b>foobar_up.jpg</b> - For the top part of the skymap.
</li>
</ul>
Look for the part of the config with the commands "loadsky". Delete or "comment out" the current skymap
commands there so they don't conflict with your skymap. Then, on a single line, use this format to add your skymap:
<b>loadsky "textures/skymaps/FOLDER/SKYMAP-NAME"</b>. Replace "folder" with the folder name you used, and "skymap-name"
with the skymaps filename (i.e. foobar).
</p>
<p>
<b>Note:</b> There are a selection of skymaps already available for you to use if needed. Just uncomment the one you want (comment the others).
</p>
<p>
<b>Note:</b> The skymap is hardcoded as the first texture, in the texture list.
</p>
<h2 id="water">Custom watercolouring or water textures</h2>
<p>
Water colouring is very simple. Add this command to a line in your config file: <b>watercolour R G B</b>. Replace
<b>R</b> with the red colour for the water, <b>G</b> with the green colour for the water and <b>B</b> with the blue
colour for the water to choose your colouring mix. When using this command, ensure that you create a value for each
colour (even if the value is just "1"), otherwise, the command may not work correctly
</p>
<!--
TO DO:
* loadnotexture
* fog + fogcolour
* mapsound
* watercolour + watertexture (2nd texture in list)
- Ask driAn about dummy texture..
- Ask/check what the "Z" in mapmodels is for...
- Ask why watercolour needs to be in cfg.
-->
</body>
</html>