Well, lets try this again. I just need to remember to copy before I submit, just in case.
So, we have made our cells, walls, and a blank monsters file. That leaves only 2 files left. We will start with the main configuration file, which will use the information that we defined in our cells cfg. For the main file, you can name it whatever you want (ie jail.cfg) and do not have to worry about any special ending such as wall, cells, or mon.
The format for this file is:
Code: Select all
<map name> <map width> <map height> <default floor> <default ceiling> <title bar image>
<walls file> <cells file> <events file> <monsters file>
SPECLITS fr fg fb fd lr lg lb
audio/config <number of audio files>
<audio file name> <audio start time> (repeat once for each audio file. Must match number of files in the line above)
SPECCELL <stair x> <stair y> <number of traps>
<trap x> <trap y> <trap type> <trap number> (repeat once for each trap. Must match the number of traps in the line above)
RANDITEMS <number of random items>
<item name with underscores> <relative frequency> (repeat once for each item. Must match the number of items in the line above)
<map x> <map y> <cell name> (repeat for each cell in your map)
Originally, I gave my own descriptions for each of these files, but I will just copy from the tutorial, since they did a good job with this part.
First Line:
Map name – the name to represent this map (unique from other maps)
map width – the width in cells of the map
map height – the height in cells of the map
default floor – path to a default floor texture – will be used in all cells unless a floor texture is specified for a cell in the walls.cfg file
default ceiling – the default ceiling texture for all cells
title bar image – this is an image that contains text or whatever you’d like to go above the Upper Left window (navigation window)
Second Line:
Walls file – the name of the walls.cfg file for this map (ie – maps/mywalls.cfg)
Cells file – the name of the cells.cfg file for this map (ie – maps/mycells.cfg)
events file – the name of the events.cfg file for this map (ie - maps/myevents.cfg)
monster file – the name of the monster.cfg file for this map (ie - maps/mymon.cfg)
SPECLITE line:
The keyword SPECLITE followed by the lighting values, 7 real numbers ranging from 0.0 to 1.0 (inclusive) - with values for the following fog/colors:
fr - fog color – red
fg – fog color – green
fb – fog color – blue
fd – fog density (0.0 is no fog)
lr - ambient light – red
lg – ambient light – green
lb – ambient light – blue
audio/config 1: This line states that the audio config files for this map are contained in the audio/config directory, and that there is only one audio config. It can be ‘0’ if no ambient audio is used, or more than 1 if you use multiple time-based audio config files (see ‘rennibister.cfg’ for an example).
audio file name/ start time – the name of the audio config file, and the time to start this config. If there is only one audio config, then the value will be ‘0’ (for ‘start at midnight’). If there is more than one, then this is the hour (24-hour day) that the particular config will become ‘active’. There will be exactly the same number of config-file lines as specified in the config count (on the line above).
SPECCELL line:
The Keyword SPECCELL
stairX – the x location (cell wise) of the ENTRY stairs
stairY – the y location (cell wise) of the ENTRY stairs
numOfTraps – the total number of traps in this map
special note – the stairX and stairY line are needed for the RELO spell
Trap Lines:
trapX – the x location of the trap
trapY – the y location of the trap
trapType – the type of trap, 1 for normal (script based), 2 for spinners, 4 for anti-magic, and 8 for darkness traps
trapNum – needed if trap is of type 1, calls the corresponding numbered trap script (trap000x) so setting this to 2 would call script: trap0002.py
RANDITEMS line:
The keyword RANDITEMS
numOfRandItems: an integer value, that specifies the total number of unique items you are about to list
Item lines:
The name of the item, as given in bl2d_items.txt, with spaces replaced by
underscores ‘_’ so a Dwarven War Axe is listed as Dwarven_War_Axe.
Spelling and capitalization matter
relativeFreq - The relative frequency of the item drop. A larger number relative to the numbers given for other items listed means this item drops
more often.
The actual map definition:
mapX – the x coordinate of the cell
mapY – the y coordinate of the cell
cellName – the name of the cell to place at this x/y location
Here are some hints and tips:
1. When you are first making the map, do not include any random item drops or traps. Test the way the map looks first, and add these features later.
2. Give some extra room around the edge of the map. I usually number the bottom left corner of my maps 10, 10. I also add an extra 10 spaces to the total number of cells. For example, if my map is 22 x 22, I would set my map width and height at 50 x 20. This would give me plenty of room around the edge of the map that I can use for wrap-around, or anything else I may need.
3. Wrap-around magic is done by using scripts, which we will get into later. While testing your maps, the wrap-around is not necessary, as long as you understand that anything you see outside of your normal map are will not be seen by the normal users.
4. Any blank cell does not need any definition. It will use the default that you set up in the cells.cfg file.
5. When first testing a map, set your lights to a high number, so you don't have to worry about casting light spells.
6. The trap scripts are defined as follows:
- 1-falling rocks
2-poison needles in floor
3-poison darts
4-non-poison darts
5-poisinous gas
6-noxious gas (from Growler?)
7-spiked hammer
8-spiked roller
9-jets of flame
That is all for this file. This would leave us with only 1 more map file to define. Pretty soon, we will be able to test the maps we made, and see what we did wrong.