[VX] HoT DoT

Started by shdwlink1993, January 11, 2009, 11:59:38 pm

Previous topic - Next topic

shdwlink1993

January 11, 2009, 11:59:38 pm Last Edit: February 21, 2009, 05:41:45 am by shdwlink1993
HoT DoT
Authors: shdwlink1993
Version: 1.0b
Type: Poison Control
Key Term: Player / Party / Troop Add-on



Introduction

HoT DoT (Apparantly WoW-speak for Healing/Damage over Time), or Poison Control, is a system designed to let you make poison do more than what it always does. In RMXP and RMVX, poison does one thing only. That can be annoying after a while, like having a recharging health stat, or draining your magic.


Features


  • Allows for many kinds of poison.
  • Poisons that can heal you can easily be made.
  • Lets poisons affect other stats besides health.
  • More than one poison affects you at a time.



Screenshots

These would be completely useless.


Demo

The script is pretty plug-and-play, so I don't think this is needed.


Script

Spoiler: ShowHide

#==============================================================================
# HoT DoT
# Author: Shdwlink1993
# Version: 1.0b
# Type: Poison Control
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# HT Date 1.0b: 1/11/2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# #  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
# #
# # Note that if you share this file, even after editing it, you must still
# # give proper credit to shdwlink1993.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                                ~= Function =~
#
# This script is designed to allow you to expand what poison does to your
# character. Poison now is able to affect HP or MP, and take off a fraction or
# a set amount of HP/MP.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                               ~= Version History =~
#
# Version 1.0b ---------------------------------------------------- [1/11/2009]
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                              ~= Customization =~
#
# Customization can be found right under where the Poison Database begins.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                               ~= Compatability =~
#
# - Will not work with other Poison-editing scripts.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

module SL93
 
  def self.hotdot(id)
    case id
    #------------------------------------------------------------------------
    # Poison Database Begins
    #------------------------------------------------------------------------
    #  when STATE_NUMBER then return [TYPE, DAMAGE, VARIANCE, LIMIT_DRAIN]
    #  * STATE_NUMBER is the state you want to be affected by this.
    #  * TYPE refers to the thing sustaining damage.
    #      1 = HP, 2 = MP. If the type is positive, the amount is a literal
    #      number (eg. You lose about 50 HP). If the type is negative, then
    #      the amount is a fraction of the maximum (eg. You lose about 50% of
    #      your HP).
    #  * DAMAGE refers to how much damage is healed/taken.
    #      A Positive amount hurts you and a negative amount heals you.
    #  * VARIANCE refers to how much the damage varies. Positive only.
    #      This depends in part on if the type was positive (~5 HP difference)
    #      or negative (~5% HP difference).
    #  * LIMIT_DRAIN refers to if the poison can leave you with 0 HP/SP.
    #      If true, then it is limited, and stops at 1. If false, then it
    #      isn't.
    #------------------------------------------------------------------------
  when 2 then return [-1, 10, 10, false]  # Standard Poison
    #------------------------------------------------------------------------
    # Poison Database Ends
    #------------------------------------------------------------------------
    end
    return false
  end
 
end

class Game_Battler
 
  def slip_damage?
    return @states.any? {|i| SL93.hotdot(i) != false }
  end
 
  def slip_damage_effect
    ids = []
    for i in @states
      ids.push(i) if SL93.hotdot(i) != false
    end
    for i in ids
      damage = SL93.hotdot(i)[1] if SL93.hotdot(i)[0] > 0
      damage = self.maxhp / SL93.hotdot(i)[1] if SL93.hotdot(i)[0] == -1
      damage = self.maxsp / SL93.hotdot(i)[1] if SL93.hotdot(i)[0] == -2
      if damage.abs > 0 && SL93.hotdot(i)[2] > 0
        amp = [damage.abs - SL93.hotdot(i)[2], 1].max if SL93.hotdot(i)[0] > 0
        amp = [damage.abs * SL93.hotdot(i)[2] / 100, 1].max if SL93.hotdot(i)[0] < 0
        damage += rand(amp+1) + rand(amp+1) - amp
      end
      damage = damage * -1 if SL93.hotdot(i)[0] < 0
      if SL93.hotdot(i)[0] == 1 || SL93.hotdot(i)[0] == -1
        damage = self.hp - 1 if !SL93.hotdot(i)[3] && (0 > self.hp += damage)
        self.hp += damage
      elsif SL93.hotdot(i)[0] == 2 || SL93.hotdot(i)[0] == -2
        damage = self.mp - 1 if !SL93.hotdot(i)[3] && (0 > self.mp += damage)
        self.mp += damage
      end
    end
    return true
  end
 
end

class Game_Party
 
  def on_player_walk
    for actor in members
      if actor.slip_damage?
        actor.slip_damage_effect
        $game_map.screen.start_flash(Color.new(255,0,0,64), 4)
        $game_temp.next_scene = "gameover" if $game_party.all_dead?
      end
    end
  end
 
end



Instructions

Found within the script.


Compatibility


  • Will not work with other Poison-editing scripts.



Credits and Thanks


  • Arxur for the script idea.



Author's Notes

An XP version is available here.
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Arxur

I'm not sure how to set up the script. Could u make an example like:

I want to heal 1000 HP during 4 turns:

when 2 then return [-1, -1000, 10, false]

+ I set the number 2 status effect's duration to last 4 turns?

Thank you for the help! :)

shdwlink1993

You would have it set up like this:

when 2 then return [1, 1000, 0, false]

And thank you for the idea!
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Sally

January 19, 2009, 09:17:22 pm #3 Last Edit: January 19, 2009, 09:41:22 pm by Susys
wow sweet thx soo much <3 u.
edit:

whats VARIANCE? im having trouble setting up my dots and hots :(

Starrodkirby86

Quote from: Susys on January 19, 2009, 09:17:22 pm
whats VARIANCE? im having trouble setting up my dots and hots :(

As quoted:
Quote#  * VARIANCE refers to how much the damage varies. Positive only.
    #      This depends in part on if the type was positive (~5 HP difference)
    #      or negative (~5% HP difference).

That would mean the number you put for Variance would be the minimum/maximum the difference from your exact value would be. If your DoT or whatever was 20 and the Variance was 10, any number from 10 to 30 will be selected. It makes things more random.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Sally

hmm, how do u get 10 and 30?

Starrodkirby86

Quote from: Susys on January 20, 2009, 04:43:12 pm
hmm, how do u get 10 and 30?
It honestly depends on how shdwlink coded the Variance. He might have used RMXP's variance code, or he used his own. I got the numbers 10 and 30 because the original value is 20. There is a 10-number gap between 20 and 10 and 20 and 30, so Variance can select one of those numbers from the lowest to the highest...which is 10 to 30. That's how I always treated Variance.

RMXP calls Variance like: Degree of fluctuation in final effect strength. The effect strength value varies by only as much as the percentage. 15 is an average attack. (This is in the Skills Database)

So if you want to have exact damage, just set the Variance to 0. If you want a minor change, try 1, and as numbers go higher, the varying (Ha, I used the same base word) will expand.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Sally


shdwlink1993

Alright. Variance works basically like this:

If you had your TYPE set to a positive number, then it uses a standard number to determine variance. If you, for instance, had a poison type 1 that dealt 50 damage with a 10 variance, then you could take anywhere between 40 and 60 damage (Both of them being 10 away from 50).

If your TYPE was set to a negative number (meaning that everything is in percentages), then a percentage is used to determine variance. If your poison had a type of -1, 50 damage, and 10 variance, then you would take anywhere between 40% - 60% damage (out of your max).

I hope this helps, Susys. I'm glad to hear that you like it. :)
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Sally

ooh and if you had a 20 varience and 50 damage it will be 30-70?   i get it, thanks :)

suggestion,

cant you make it so it deals,
500-1000 damage over 5 turns? thats how WoW has it.

Aqua

Just have the status last 5 turns and the damage at 750 with variance of 250.

Sally

i made a HoT, and it hurt my teamates insted of healed them,
this is what i have,
Quotewhen 28 then return [1, -3000, 1000, false] #Rejuvenation

Sally


Starrodkirby86

shdw's documentation is wrong. Negative amounts damage the victim while positive amounts actually heal them. He simply forgot to change the script to accommodate this. That means Poison also heals you, apparently.

So shdw, might as well change the configuration help... :P

Long story short.

Change
    when 28 then return [1, -3000, 1000, false] #Rejuvenation

to
    when 28 then return [1, 3000, 1000, false] #Rejuvenation

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Sally

January 31, 2009, 11:03:09 pm #14 Last Edit: January 31, 2009, 11:14:03 pm by Susys
tyvm love you. :)

nop, it still hurts him

Sally


Starrodkirby86

That is really strange. I tried it again and it worked fine. I'm sending the project that I did this on. When the party is inflicted with Sexiness, that means they got the Rejuvenation status, all right?
http://www.sendspace.com/file/vqx81a

Have fun.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




shdwlink1993

@SRK: Thanks for looking after the topic for me. Power+ for you doing my job that I forgot to do, you sly dog (:???: ).

@Susys: Sorry I wasn't answering when I should have. :shy:

Yes, the documentation does have that error that cropped up at the last minute. I'll change that momentarily (and, in a related note, new version by the end of the week, methinks. :)).
Also, I also tried SRK's recommendation and it heals the player (or at least it didn't instantly kill them like it should have). Are you sure it's correct?
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Sally

i have the side view battle maybe thats why it wont work on mine?

Starrodkirby86

Unless the Side-View Battle System affects something related to Status Effects, I can't see the problem. If it does, maybe you should find that area and disable it (Like comment it out or something with =begin and =end). I don't know.

Thanks shdw. I'm sure you have the skill to answer that. :P

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




shdwlink1993

Susys, this depends mainly on what side view battle system you are using. I'd bet that there's more than one out there.
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Sally


Sally

i couldnt find anther rmvx sideview...

shdwlink1993

Susys, I was not wondering what VX sideview battle-systems exist. I was wondering what the name and version of the one YOU are using now for your game is. :haha:
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Sally


shdwlink1993

Basic question I forgot to ask: Is this script below the Battle System. If it isn't, make sure that you have this below the battle system, if it isn't already. The person who coded it did something really unusual (WHY, oh scripter, WHY would you COPY and PASTE the definition from the RTP??? WHY? >_< )

If that doesn't do it, then I'll need you to send me your script file (Data/Scripts.rvdata).
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Sally

yeah i have it under the system

shdwlink1993

Quote from: shdwlink1993 on February 11, 2009, 12:19:41 am
If that doesn't do it, then I'll need you to send me your script file (Data/Scripts.rvdata).
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."