[bf1942] maplist.con got overwritten ;/

Fritz Elfert felfert at to.com
Sun Jan 19 15:23:38 EST 2003


Or, take this little program. It takes the gamedir and a gametype as
argument,
scans all maps and outputs a list of possible maps for a given gametype.
Nice for generating a maplist on the fly.

Compile it with gcc -o bf1942maps bf1942map.c

Usage Example:

bf1942maps /opt/gameroot/home/bf1942 GPM_CTF
Battleaxe
Berlin
Bocage
El_Alamein
Gazala
GuadalCanal
Kharkov
Kursk
Stalingrad
Wake

Possible arguments for gametype: GPM_CQ, GPM_CTF, GPM_COOP, GPM_TDM

A script which generates a map-file would then look like this:

#!/bin/sh
GAMEDIR=/opt/gameroot/home/bf1942
GAMETYPE=GPM_CQ
STARTMAP=El_Alamein

MAPLIST=`bf1942maps $GAMEDIR $GAMETYPE`
(
    FIRSTMAP=
    STMAPINLIST=false
    for f in $MAPLIST ; do
        echo "game.addLevel $f"
        test -n "$FIRSTMAP" || FIRSTMAP=$f
        test "$f" = "$STARTMAP" && STMAPINLIST=true
    done
    if $STMAPINLIST ; then
        echo "game.setCurrentLevel $STARTMAP"
    else
        echo "game.setCurrentLevel $FIRSTMAP"
    fi
) > $GAMEDIR/mods/BF1942/Settings/maplist.con


Ciao
 -Fritz
----- Original Message -----
From: "Bill Wood" <wawoodtx at attbi.com>
To: <bf1942 at icculus.org>
Sent: Sunday, January 19, 2003 8:11 PM
Subject: RE: [bf1942] maplist.con got overwritten ;/


> You can recreate your maplist.con from a Windows game. Do Multiplay,
> Create game, select all of the levels and do Start Local, then just
> Alt-F4 to quit. Then find the maplist.con in Settings with all of the
> maps. But here it is too:
>
> game.addLevel Midway
> game.addLevel Battle_of_the_Bulge
> game.addLevel Berlin
> game.addLevel Bocage
> game.addLevel Coral_Sea
> game.addLevel El_Alamein
> game.addLevel Gazala
> game.addLevel GuadalCanal
> game.addLevel Iwo_Jima
> game.addLevel Kharkov
> game.addLevel Kursk
> game.addLevel Omaha_Beach
> game.addLevel Battleaxe
> game.addLevel Market_Garden
> game.addLevel Stalingrad
> game.addLevel Tobruk
> game.addLevel Wake
> game.setCurrentLevel Battle_of_the_Bulge
>
>
> -----Original Message-----
> From: Kevin J. Anderson [mailto:lestat at counter-strike.net]
> Sent: Sunday, January 19, 2003 5:28 AM
> To: bf1942 at icculus.org
> Subject: [bf1942] maplist.con got overwritten ;/
>
>
> somewhere along the way, my maplist.con was overwritten.  Anyone please
> send one w/ all of the standardmaps?
>
> thx,
>
> kevin
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bf1942maps.c
Type: application/octet-stream
Size: 2446 bytes
Desc: not available
URL: <http://icculus.org/pipermail/bf1942/attachments/20030119/cefe1803/attachment.obj>


More information about the Bf1942 mailing list