Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: encounter maps
- To: crossfire (at) ifi.uio.no
- Subject: Re: encounter maps
- From: Kjetil Torgrim Homme <kjetilho>
- Date: Mon, 11 Apr 1994 05:53:48 +0200
- In-reply-to: Klaus Elsbernd's message of Sat, 09 Apr 1994 12:20:29 +0200 <>
+--- Klaus Elsbernd:
| 1) We introduce a keyword in the definition of maps or the
| archetypes which allows to randomly place groundfloor in maps. [...]
Actually, this sounds like a nice idea to generalize the object
definition. I'd like to see it as
oneof face
ytree_2.111
ytree_2.112
endoneof
However, this isn't necessarily the best way to get the functionality
you want. One alternative route is to add to the artifact
functionality, and allow people to specify objects to be
artifacts. (That would necessitate more flexible naming of
artifacts. "jungle of big trees" is OK, but it gets tedious to find
meaningful names to distinguish types after a while).
The other thing I wanted to say, is that it is _TRIVIAL_ to add varied
encounter maps to the game. Just draw some suitably sized tiles
similar to the ones found in lib/maps/terrain, and change the line
sprintf(buf2, "%s/%s/%s_%ld", LibDir, MapDir, mapobs[x][y]->race,
RANDOM()%2+1);
here ---------------^
in server/encounter.c. Now, there's one catch - that code assumes
there's the same number of alternatives for all terrain types. I've
already sent a patch to do determine that number dynamically to Mark.
(Map creators can actually make their own terrains, and use them by
setting the race variable in the trees in their magic forests or
whatever. E.g.:
Object tree
race /peterm/terrain-tiles/forest
end
The code will then use /peterm/terrain-tiles/forest_1 or .../forest_2)
Kjetil T.