How to prevent demo server from choosing random map?

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Skull Kid
Posts: 191
Joined: Fri Aug 03, 2012 8:44 pm
Location: Sweden

How to prevent demo server from choosing random map?

Post by Skull Kid »

In the maplist.con, I wrote this:

Code: Select all

game.addLevel kursk GPM_COOP bf1942
game.addLevel berlin GPM_COOP bf1942
game.addLevel iwo_jima GPM_COOP bf1942
game.setCurrentLevel kharkov GPM_COOP bf1942
But STILL, I can NOT force my server to start Kharkov always, not just a random of these four :( Does anyone know how to solve this?
Regards,

Skull Kid
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: How to prevent demo server from choosing random map?

Post by Apache Thunder »

I noticed that Kharkov isn't among the "addLevel" entries. You may need to add the entry for the current level command to set the map correctly. ;)

Code: Select all

game.addLevel kharkov GPM_COOP bf1942

Also even the retail game is hard-coded to always advance to the next map after the server closes. So if you had one round on Kharkov and exited the server, the current level command gets updated to load the next map. I don't even think the server needs to exit for this to happen. It updates the file the moment the server starts.

You might be able to set the file attribute for the maplist.con file to read-only to try and prevent this, but I haven't tried this myself so I can't say for sure if that would work.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: How to prevent demo server from choosing random map?

Post by Swaffy »

Can he make a batch file that changes the current map then starts up the game server?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: How to prevent demo server from choosing random map?

Post by freddy »

Swaffy wrote:Can he make a batch file that changes the current map then starts up the game server?
yes that should be one solution, i dont remember the exact syntax to use but i think it is posted somewhere on this forum

edit: for windows, but should work for linux start scripts to, look at the +map part
"C:\Program Files\EA GAMES\Battlefield 1942\BF1942.exe" +game DesertCombat +map BFE_TestingMap +restart 1 +hostServer 1
http://battlefieldmodding.com/ssm/phpBB ... 4ee7c85f0c
Post Reply