teleporters on random map
teleporters on random map
Hello, is there any way to set the density of teleporters on a random map? I have tried the bzfs option '-density' but it does not apply to teleporters. The list of Server Variables on the wiki has no way of doing it either. Is it possible? thanks in advance --MDSKPR
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: teleporters on random map
I could only think of a custom random-map-script which applies different density settings for boxes, pyramids and teleporters.
As far as I know there is no specific option to set the teleporter density.
As far as I know there is no specific option to set the teleporter density.
Re: teleporters on random map
do you know where this random map script is?
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: teleporters on random map
There are several around but you probably need to write your own for this particular purpose.
Re: teleporters on random map
If you're comfortable tweaking and recompiling bzfs, you could just edit src/bzfs/WorldGenerators.cxx to increase/decrease the minimum amount of teleporters.
So as you can see, there is a minimum of 8, then a random amount of extra flags based on the world size (or perhaps less if the world size is smaller than normal?).
Code: Select all
float worldfactor = worldSize / (float)DEFAULT_WORLD;
...
int numTeleporters = 8 + int(8 * (float)bzfrand() * worldfactor);
Re: teleporters on random map
awesome! thanks blast *digs into the code*
Re: teleporters on random map
blast, would it be possible in the next version to make -t have an argument, lets say -t 13 to make thirteen teleporters on the map?
Re: teleporters on random map
Almost anything is "possible".