Author Topic: Reduce damage of arena hazards?  (Read 1042 times)

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Reduce damage of arena hazards?
« on: February 21, 2015, 12:42:18 AM »
Is there a way to make the arena hazards less potent?  My bots keep getting killed too easily from the saws and the flame pit in the Robot Wars arena.

Offline cephalopod

Re: Reduce damage of arena hazards?
« Reply #1 on: February 21, 2015, 06:08:26 AM »
I don't know if there's a way to scale down the damage done by flames but for other hazards you can scale back the damage scalar in the arena's .py file.
For example in the hazards on section of DSLRWarena.py you can find this bit

where the number after the hazard's material (metal) is the number you need to scale back. I'll do a bit of testing for flames and edit back here if I find anything but I don't think it's possible.
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Reduce damage of arena hazards?
« Reply #2 on: February 21, 2015, 08:16:58 AM »
I can't remember if the Robot Wars arena uses the hazards module or creates its own emitters so I'll just give a high level explaination of how arena flames work. Unlike flamethrower components, arena flames don't do any damage. For this reason, there is usually a call to plus.damage whenever a bot is supposed to get hurt. The flames class found in Hazards does 25 damage per tick (which usually amounts to 100 HP per second). If the RW Arena uses the hazards module, you'll either need to change the damage delivered for all arenas that use it or tweak the Arena.py so that it doesn't use the same class.

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: Reduce damage of arena hazards?
« Reply #3 on: February 23, 2015, 07:01:41 PM »
That could work, I have a copy devoted exclusively to filming.  What file do I change to adjust the hazards module?

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Reduce damage of arena hazards?
« Reply #4 on: February 24, 2015, 10:24:48 PM »
If it is using the Hazards module than that would mean the code from Hazards.py is being imported. The relevant line is going to be the plus.damage found at the bottom of Flame's Tick method (line 326).