"Better" Poison Status Effect

Discussion in 'RGSS3 Script Requests' started by Darthrafael, Oct 12, 2017.

  1. Darthrafael

    Darthrafael Villager

    Messages:
    6
    Likes Received:
    0
    First Language:
    Dutch
    Hi there!

    So, I'm toying around with States, and I don't really like the current way 'Damaging' States are done. Per Default, Poison decreases the victim's HP by 10% of their MHP per Turn, which I find rather OP against enemies with a high amount of HP (since it'll leave them at 1HP after a few turns unless they heal). Is there a better way of doing this that isn't as OP? Like with a damage formula likes Skills have or something? And what about making the damage they deal be affected by Element Resistances (like, a Burning Status deals less damage per turn against a foe with Fire resistance).

    Any help on this would be appreciated.

    P.S. If this is the wrong place to ask, please tell me.
     
    #1
  2. JamesRyan

    JamesRyan Game Designer

    Messages:
    344
    Likes Received:
    85
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    You can do this with Yanfly's Lunatic States script with some knowledge about RGSS: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-states/
    It allows you to setup actions in each phase of states (like when applying state, or when the target starts an action, deals damage or takes damage and even more). Just spend some time to toy with this script and you will be able to create even more crazier states.
     
    #2
  3. bgillisp

    bgillisp Global Moderators

    Messages:
    8,313
    Likes Received:
    6,240
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Right. Lunatic States script or something like that is the better way to go, as you can now make how much poison damage you lose depend on how much MAT the one who inflicts it has, or even, how much LUK the one who inflicts it has. It's all up to you.

    BTW, since this does require a script, I'm going to move this to RGSSx Script Requests.
     
    #3
  4. Darthrafael

    Darthrafael Villager

    Messages:
    6
    Likes Received:
    0
    First Language:
    Dutch
    Ah, thanks for the link and the moving of the thread. Problem is that I have no clue how to use it. Anyone got any good guides to explain how to use it? (Specifically what exactly the 'scripted functions' are and how to make/use them)
     
    #4
  5. JamesRyan

    JamesRyan Game Designer

    Messages:
    344
    Likes Received:
    85
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    Sorry but i can only provide you the script because i nearly know nothing about RGSS. I once used this script before just to make use of its Punishment Package add-on.
     
    #5
  6. Aoi Ninami

    Aoi Ninami Veteran

    Messages:
    276
    Likes Received:
    253
    First Language:
    English
    Primarily Uses:
    RMVXA
    If you just want to change the way poison works, then instead of going the Lunatic States route, you can use this snippet:
    Code:
      class Game_Battler < Game_BattlerBase
        def regenerate_hp
          if hrg < 0
            damage = <custom formula for poison>
          else
            damage = <custom formula for regen>
          end
          perform_map_damage_effect if $game_party.in_battle && damage > 0
          @result.hp_damage = [damage, max_slip_damage].min
          self.hp -= @result.hp_damage
        end
      end
    For example, this is the code I have in my project to make poison and regen scale according to the LUK stat:
    Code:
      class Game_Battler < Game_BattlerBase
        SCALING = 20
       
        def regenerate_hp
          if hrg < 0
            damage = -(((mhp * hrg * SCALING) - luk/2) / luk).to_i
          else
            damage = -(((mhp * hrg * luk) + SCALING/2) / SCALING).to_i
          end
          perform_map_damage_effect if $game_party.in_battle && damage > 0
          @result.hp_damage = [damage, max_slip_damage].min
          self.hp -= @result.hp_damage
        end
      end
    Note: When designing custom formulae for this snippet, remember that .to_i means "convert to an integer", which is pretty important for HP damage.
     
    #6
  7. Darthrafael

    Darthrafael Villager

    Messages:
    6
    Likes Received:
    0
    First Language:
    Dutch
    Ah, thanks, I've been working on a formula with a friend and it's almost done, the only problem is that I need to know what the variable for the victim's level is called? if I use 'level' it gives me an error...
     
    #7
  8. TakeHomeTheCup

    TakeHomeTheCup Veteran

    Messages:
    167
    Likes Received:
    249
    First Language:
    English
    What was the error?
     
    #8

Share This Page