"Zombie world" One life scenario offline (max difficulty)

Making or wanting help making your own asset? Check in here
Post Reply
rPoXoTauJIo
PR:BF2 Developer
Posts: 1979
Joined: 2011-07-20 10:02

Re: "Zombie world" One life scenario offline (max difficulty)

Post by rPoXoTauJIo »

1. Create folder 'tweaker' in mods/pr/python/game
2. Create file 'tweaker.py'
3. Put stuff below inside.

Code: Select all

# gun disable
import host
import bf2

def init():
    host.registerGameStatusHandler(onGameStatusChanged)


def onGameStatusChanged(status):
    print status
    if status == 0 or status == 1:
        try:
            liveTweak()

def liveTweak():
    host.rcon_invoke("""
        ObjectTemplate.active rushmg_dshk
        ObjectTemplate.ammo.nrOfMags 1
        ObjectTemplate.ammo.magSize 0
        ObjectTemplate.ammo.autoReload 0
        """)
4. Create __init__.py there.
5. Put this inside.

Code: Select all

# gun disable
import tweaker
tweaker.init()
6. Init your custom module in mods/pr/python/game/__init__.py:

Code: Select all

import tweaker
Profit, not even client side changes needed.
Image

assetruler69: I've seen things you smurfs wouldn't believe. Apaches on the Kashan. I watched burned down tank hulls after the launch of the single TOW. All those moments will be lost in time, like tears in rain.

Time to give up and respawn.
User avatar
Ason
PR:BF2 Developer
Posts: 1755
Joined: 2012-10-22 10:29

Re: "Zombie world" One life scenario offline (max difficulty)

Post by Ason »

why do you need techies then? Just remove them in GPO or change them to civi cars?
Image
Post Reply

Return to “PR:BF2 Community Modding”