map rotation

Questions and answers about the how and why of making maps.
Post Reply
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

map rotation

Post by big_daddy2 »

i am wondering hwo to make maps rotate from one to another and so on
i already know how to time them by doing -time (time in seconds) in the configs no i am wondering if its a plugin i need or i put somthing in the configs, if it is a plugin i will have to have the .dll plugin, thanks alot


i have also read the wiki's and i do not think its in there unless i skipped something and i also can not find how to do it so it would b much appreicated if you could help with my map making
User avatar
halo3
Private First Class
Private First Class
Posts: 122
Joined: Tue Dec 27, 2005 11:24 pm
Location: ohio,usa
Contact:

Post by halo3 »

u do it by doin a plugin
Image
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike »

halo3
You can do it with scripts as well.
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

Post by big_daddy2 »

hi binary how do u use a script? i dont mean to sound stupid but how do you?
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike »

big_daddy2 wrote:hi binary how do u use a script? i dont mean to sound stupid but how do you?
At least your not lazy like halo3... :lol:


Halo3
Dos command line, it's like bash or tcsh? haven't you heard of "shell"? it's what you use to run bzflag servers with? aka bzfs?

big_daddy2
Here's a script it's three random maps rotated out, first one has 4 shots, second has 5, third has 6.

First has password of "pass" second of "pass2" third of "pass3"

Code: Select all

@ECHO OFF
:STARTOVER

START /WAIT /D"C:\Program Files\BZFlag2.0.8" bzfs.exe -j -ms 4 +r -password pass
START /WAIT /D"C:\Program Files\BZFlag2.0.8" bzfs.exe -j -ms 5 +r -password pass2
START /WAIT /D"C:\Program Files\BZFlag2.0.8" bzfs.exe -j -ms 6 +r -password pass3

ECHO STARTED OVER
GOTO STARTOVER
basic explanation:
@ECHO OFF
the @ sign causes the commands not to be shown in the window

:STARTOVER
a label where we can send the execution of the script to.

START <parameters>
The command that starts bzfs.exe
parameters include /WAIT This tells START to stop and wait for bzfs to end (when -time runs out the script will then execute the next map... rotating it to the second one)

/Dpath
the path that START works out of...
if there is a space in the path you need to but quotes "" around it.
example:
/D"C:\Program Files\BZFlag2.0.8"

command/parameters
the command and it's paramters to execute
example:
bzfs.exe -cr

and the last command, GOTO STARTOVER
basically it sends the execution of the script back up to the label we created at the first. STARTOVER... so it will just loop through all three of those windows.



This is a great starting point:
http://www.computerhope.com/batch.htm

And a link on the same website but for the START command:
http://www.computerhope.com/starthlp.htm

big_daddy2
All you have to put in your own commands, just create a text file, write out the script, then save it and change the extension from .txt to .bat


Also! if you add to your START the parameter /HIGH it should pull more resources to the server that way. (not sure about that though.... but it makes sense)
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

Post by big_daddy2 »

ok where do i put the map names to rotate?

and the confs? (like say if the map names are map1,map2,map3 and the confs, conf,conf2.conf3)

and also how do u time it to switch maps with out killing the tanks?
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

Post by big_daddy2 »

i also now under stand its like running bzfs servers, :lol-old:
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike »

big_daddy2 wrote:ok where do i put the map names to rotate?

and the confs? (like say if the map names are map1,map2,map3 and the confs, conf,conf2.conf3)
You would add them to the START command.

Basically all you need is this:

Code: Select all

@ECHO OFF
:STARTOVER


ECHO STARTED OVER
GOTO STARTOVER
All you do is put your START command in the middle...

And I included three examples in my first post and a basic tutorial *and* links.

START /WAIT /D"C:\Program Files\BZFlag2.0.8" bzfs.exe -world map1.bzw -conf conf1

Just copy and paste that into your script and change map1 to map2 to map3 etc. etc.
(change the conf as well)


Oh and I didn't explain what /WAIT was in my last post... it stops the script when you issue that start, and waits for bzfs to finish (when -time runs out bzfs will quit)

And you're on your own now, I have a big week ahead of me.
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

Post by big_daddy2 »

but wait you didn't explain how to put a time limt on each with out killing the tanks..... i mean -time kills you and makes you rejoin and doesn't switch the map
User avatar
halo3
Private First Class
Private First Class
Posts: 122
Joined: Tue Dec 27, 2005 11:24 pm
Location: ohio,usa
Contact:

Post by halo3 »

lol binary i aint no lazy :p
Image
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

big_daddy2 wrote:but wait you didn't explain how to put a time limt on each with out killing the tanks..... i mean -time kills you and makes you rejoin and doesn't switch the map
Add the -g option, and the server will shut down when time expires.
Post Reply