gametechmods

Robot Arena => General Support => Topic started by: helloface on September 23, 2013, 12:05:00 PM

Title: How do I increase arena hazard damage?
Post by: helloface on September 23, 2013, 12:05:00 PM
The old stock hazards are basically useless. How to I increase the damage done by the hazards?
Title: Re: How do I increase arena hazard damage?
Post by: Galacticruler on September 23, 2013, 12:12:52 PM
I'd imagine it has something to do with the .py?
Title: Re: How do I increase arena hazard damage?
Post by: helloface on September 23, 2013, 01:19:36 PM
Probably. I don't delve into that too much so I wouldn't know where to look.
Title: Re: How do I increase arena hazard damage?
Post by: Galacticruler on September 23, 2013, 07:04:06 PM
alright, should have to to with Hazard.py, though at a quick glance I saw nothing that looked like damage values.
Title: Re: How do I increase arena hazard damage?
Post by: Mr. AS on September 23, 2013, 07:33:47 PM
in the arena PY, there should be a line similar to this:

Code: [Select]
self.SetSubMaterialSound("floorsaw", "metal", .8, "Sounds\\sawblade_hits_loop.wav")^example from combat arena, or "box.py"
you see that number next to "metal"? that determines how much damage the hazards do. feel free to jack it up to 10000+ if you want sudden-death hazards.
Title: Re: How do I increase arena hazard damage?
Post by: helloface on September 23, 2013, 08:05:32 PM
Thanks  :thumbup
Title: Re: How do I increase arena hazard damage?
Post by: RedSawn on September 24, 2013, 05:20:13 AM
You can also speed up the hazards but yeah, changing the material multiplier (as I call it) is the most straight-forward solution. Notably the self.SetSubMaterialSound line can be used to make the floor and wall colliders do damage to give pure flippers a damage source, but the points aren't attributed to the flipper. (Make the sound the arena material uses slience though, otherwise everything in contact with the surface will make that noise)
Title: Re: How do I increase arena hazard damage?
Post by: helloface on September 24, 2013, 12:05:26 PM
Awesome! Now wedge rammers can do decent damage too!
I have a good idea...
Title: Re: How do I increase arena hazard damage?
Post by: RedSawn on September 25, 2013, 06:00:14 AM
Yup, just have to find the names in the GMF to use them. Be wary that if you make the number too high for the arena floors/walls it will do damage per second even while the bot is stationary, and the damage potential may be low for DSL without surpassing that limit (Depends how much damage you think a T-Minus toss would do compared to a spinner). I'd tell you the number I settled on but I didn't keep much from my old games after I built my new PC, the bot files mostly.
Title: Re: How do I increase arena hazard damage?
Post by: helloface on September 28, 2013, 02:00:49 PM
Another question, how can I increase the power of the saws (to trap bots) & spikes (to flip bots) etc?
Title: Re: How do I increase arena hazard damage?
Post by: RedSawn on September 29, 2013, 04:50:53 AM
Certainly. Some hazards when defined in the arena's py file have variables to be declared other then the position of the hazard itself.

Quote from: box.py
self.spikes1 = Hazards.Spikes(prism, 40000, (-3.7, -2.2, -5.2))
For the spikes, the second value is the power it extends and retracts(!) with.

Unfortunately there's no values you can change for the saws within the arena .py, and you'll have to change Hazards.py itself. (Alternatively you could make your own hazard declaration and define the hazard as being that instead inside the arena .py, but that's a bit more in-depth)

Quote from: Hazards.py
class Saws(Hazard):
    def __init__(self, a_prismatic, location = (0, 0, 0)):
        Hazard.__init__(self, location)
        #statuses: 0=off, 1=on
        self.status = 0
        self.prismatic = a_prismatic
        self.prismatic.SetAutoLock(False)
        self.prismatic.SetPowerSettings(2.0, -2000)
        self.timer = 0
        self.refcount = 0
The power is the second value again, and for the saw to work correctly it has to be negative. Just how it's scripted. It works the same as the spikes, it uses the same power for extending and retracting.