Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
Battlefield 2 - Turn Off the Game Demo Timer (Read 207 times)
Jun 15th, 2005 at 12:22pm

Mr_Spock   Offline
Colonel
That is illogical, You
aint Nothin but a hound
Dog
Queensland

Gender: male
Posts: 84
*****
 
Well I find the gameplay most stimulating, except for the 12 min time limit. so If you wish to turn the game clock off, and it stays off even when the timer reaches zero, follow these instructions, for you will be going into the comand structure and adding this icon " # "
Thats all, and this will turn off the time limit.

Open up the file gpm_cq.py with notepad, you will find it under Battlefield 2 Standalone Demo Servermodsbf2pythongamegamemodes
then locate:
host.registerHandler(´TimeLimitReached´, onTimeLimitReached, 1)
and replace by:
#host.registerHandler(´TimeLimitReached´, onTimeLimitReached, 1)


Scripting in BF2 is based on Python scripting language, a very smart move from the developers.


now to make it easyer for some.......
1.program files
2.E A GAMES
3.Battlefield 2 Demo
4.Mods
5.bf2
6.python
7.game
8.gamemodes
9.Right click on the gpm_cq.py . open with notepad. and add the # mark before the host word. I´ll post what the config lines look like, and the last line is the one changed...........

# conquest

TAKEOVERTYPE_CAPTURE = 1
TAKEOVERTYPE_NEUTRALIZE = 2

SCORE_CAPTURE = 2
SCORE_NEUTRALIZE = 2
SCORE_CAPTUREASSIST = 1
SCORE_NEUTRALIZEASSIST = 1
SCORE_DEFEND = 1

Top = 0
Middle = 1
Bottom = 2

import host
import bf2
import math
from game.scoringCommon import addScore, RPL
from bf2 import g_debug

g_controlPoints = [] # cache, as this map won´t change

def init():
# events hook
host.registerGameStatusHandler(onGameStatusChanged)
if host.sgl_getIsAIGame() == 1:
host.sh_setEnableCommander(1)
else:
host.sh_setEnableCommander(1)

#host.registerHandler(´TimeLimitReached´, onTimeLimitReached, 1)



.............................

I trust This will make many happy, good luck and have fun.  Grin
 

...
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print