creating random maps

Requests for assistance and other HOWTOs.

Moderator: Board moderators

Xzatia
Newbie
Posts: 3
Joined: Sun Apr 03, 2005 3:04 am
Location: the Milky Way Galaxy

creating random maps

Post by Xzatia »

Im having trouble making randomly geneated dungeons.
Well i have no clue on how to start one.

Can u help/tell me where to start?
:?
cavesomething
Forum Fanatic
Posts: 852
Joined: Sun Jun 13, 2004 2:07 am
Location: Hemel Hempstead

Post by cavesomething »

the best thing to do is to look at the maps that already use them.

here is an example from the training centre in scorn.

Code: Select all

arch flagstone
x 1
y 8
end
arch stair_down
msg
layoutstyle onion
symmetry 0
xsize 40
ysize 40
monsterstyle humanoid
dungeon_level 10
dungeon_depth 30
decorstyle furniture
wallstyle wooden
floorstyle stones2
exitstyle sstair
orientation 2
expand2x 1
treasureoptions 1
endmsg
slaying /!
x 1
y 8
end
ok, fairly complex, but don't worry, here is another example, from a low level quest outside scorn, this one I am going to comment.

It will be helpful to use the map editor to view the files that are pointed to. The map editor can be found at http://home.in.tum.de/~vogl/CFJavaEditor/index.html and will require java, alternitively you can try using crossedit, but this isn't recommended.

I am refering to filenames in the maps distribution, so get a copy of this if you haven't already. You can get the map pack from http://prdownloads.sourceforge.net/cros ... 2?download be warned it is fairly bulky (15MB).

I'm going to assume that you have downloaded this and extracted all the files and are now sitting with the map editor working and open pointing at the directory containing the maps. (if you aren't post again and tell us).

on with the random map definition:

arch mountain2
elevation 10750
x 33
y 15
end
The square the entrance is on.

arch mountain_cave2
the picture to use for the entrance

msg
layoutstyle maze
other options here are rogue, spiral, snake, onion, these define where the walls can go

floorstyle stones2
the floor will be one of the tiles on the mapstyles/floorstyles/stones2
which is included with the map distribution.


wallstyle dungeon2
equivilently for walls in styles/wallstyles/dungeon2

exitstyle sstair
similar for stairs, but with two files for up and down stairs, styles/exitstyles/up/sstair and styles/exitstyles/down/sstair

decorstyle goblinjunk
stuff that makes the map look pretty and fits in with the general theme - styles/decorstyles/goblinjunk

monsterstyle humanoid
the type of the monsters, here monsterstyle is humanoid so it will use something in styles/monsterstyles/humanoid/ for the monsters which one depends on how hard the map is.

dungeon_level 1
the starting level, would set the difficulty but that is done further on.

dungeon_depth 5
how many levels to have

orientation 1
go down stairs rather than up them

difficulty 2
recall I said it would use something in styles/monsterstyles/humanoid/ for the monsters? now we know, it is styles/monsterstyles/humanoid/humanoid2 (a mixture of orcs and kobolds.)

final_map /quests/peterm/quests/goblin_chief
when we are done, put this map at the exit from the last random map.

endmsg
slaying /!
needed to tell the map parser it is a random map

is_floor 0
elevation 10852
x 33
y 15
end

to understand the meaning of the individual fields in more detail and some of the other fields that can be used, look at the file crossfire/doc/Developers/random-maps which is distributed with the server. This can also be found at http://cvs.sourceforge.net/viewcvs.py/* ... ps?rev=1.4

Getting more advanced, if you want to make random maps that are substantially different to anything else then you will need to look at making your own styles. The styles are found in the maps distribution, and are documented in crossfire/doc/Developers/random-styles or http://cvs.sourceforge.net/viewcvs.py/* ... es?rev=1.2
Xzatia
Newbie
Posts: 3
Joined: Sun Apr 03, 2005 3:04 am
Location: the Milky Way Galaxy

Post by Xzatia »

thanx

I get it now
Post Reply