News: Blizz-ABS, the ultimate Action Battle System!
Pages: [1] 2  All
  Print  
Author Topic: [XP] HoT DoT  (Read 11619 times)
shdwlink1993
Ethereal Devastator
****

Level: 63
Offline Offline

Gender: Male
Posts: 435



View Profile WWW
« on: January 12, 2009, 06:02:09 AM »

HoT DoT
Authors: shdwlink1993, KK20
Version: 1.04
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

1.04 by KK20
(click to show/hide)

1.01b by shdwlink (has a few bugs)
(click to show/hide)

Instructions

Found within the script.

Compatibility

  • Low probability of working with the SDK.
  • Will not work with other Poison-editing scripts.
  • Must be placed above Tons of Addons.

Credits and Thanks

  • Arxur for the script idea.

Author's Notes

A VX version is available here.

EDIT: Fixed a very stupid problem in the documentation (And a very stupid error in the script itself - I fixed it in time for VX though.). xD
« Last Edit: October 20, 2012, 08:43:37 AM by Ezel Berbier » Logged

Stuff I've made:

(click to show/hide)

"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."
winkio
Epiq
Administrator
Guardian of Chaos
*****

Level: 192
Online Online

Gender: Male
Posts: 4350


I am lying.


View Profile
« Reply #1 on: January 12, 2009, 06:09:23 AM »

Nice job and this looks compatible with BABS too!  i'll test it out to make sure.  Definitely a useful script:)
Logged

I am currently working on Blizz-ABS, since Blizzard has retired.  If you have any suggestions, post them here: http://forum.chaos-project.com/index.php/topic,6164.msg104939.html#msg104939
Kagutsuchi
Ethereal Devastator
****

Level: 2
Offline Offline

Gender: Male
Posts: 468


The God of .. eating souls?


View Profile WWW
« Reply #2 on: January 12, 2009, 08:14:46 PM »

yay! Awesome stuff *power up*
Logged

gameus
Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
Global Moderator
Chaos Ultimate
****

Level: 394
Online Online

Gender: Male
Posts: 6369



View Profile
« Reply #3 on: January 20, 2009, 01:34:33 AM »

So is this compatible with BABS?

I wanted to know before using it.
Logged

shdwlink1993
Ethereal Devastator
****

Level: 63
Offline Offline

Gender: Male
Posts: 435



View Profile WWW
« Reply #4 on: January 20, 2009, 01:58:37 AM »

@game_guy: It really should be compatible with Blizz-ABS.

@Kagutsuchi + Winkio: Thanks! :D
Logged

Stuff I've made:

(click to show/hide)

"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."
mroedesigns
Ethereal Devastator
****

Level: 31
Offline Offline

Gender: Male
Posts: 394


I seeee you


View Profile WWW
« Reply #5 on: June 18, 2011, 10:07:22 AM »

Would this need a plugin for RMX-OS to make the effects 'global' or not?
Logged

Fenriswolf
Awakened Visionist
**

Level: 2
Offline Offline

Gender: Male
Posts: 81



View Profile
« Reply #6 on: February 19, 2012, 06:55:42 PM »

I've been having a small problem with this script.

As mentioned in the script, a "-" in front of the second value,
will cause the amount to be healing in stead of damage.

But when I made a state that is supposed to heal (ofcourse using the "-"),
it does damage anyway.

The odd thing about it, is that the damage appears as green (which is normally healing).

I guess it's just a simple math error, but I couldn't figure out the cause myself.

Anybody mind giving me a hand?
It's a small script, so spotting the issue shouldn't be hard for someone with experience with ruby.
Logged
KK20
Fixes things by hitting it with a wrench
Global Moderator
Chaos User
****

Level: 267
Offline Offline

Gender: Male
Posts: 1823



View Profile
« Reply #7 on: February 19, 2012, 08:51:25 PM »

Actually, there were a few more bugs with this script than what you said. I went ahead and fixed them.
The following is updated to Version 1.02.
(click to show/hide)
Logged




(click to show/hide)
Fenriswolf
Awakened Visionist
**

Level: 2
Offline Offline

Gender: Male
Posts: 81



View Profile
« Reply #8 on: February 19, 2012, 08:57:22 PM »

Great, thanks a lot for the fixes.

Noticed the third bug as well, but I just ignored it by halving the values,
but this is better Happy

EDIT:
I noticed another bug, or new bug actually.

This is the configuration part of the script:
(click to show/hide)

As mentioned in the instructions, when the first value is negative the second value will be used as a percentage,
while when positive, it will be used as a literal number.

But, since the update, when making the first value negative,
it turns the damage into healing (which isn't supposed to happen, but only when the SECOND value is negative).

Not an issue that is a big bother on my part, but I figured I'd mention it.
« Last Edit: February 20, 2012, 10:02:17 PM by Fenriswolf » Logged
KK20
Fixes things by hitting it with a wrench
Global Moderator
Chaos User
****

Level: 267
Offline Offline

Gender: Male
Posts: 1823



View Profile
« Reply #9 on: March 21, 2012, 07:59:01 AM »

Hah, didn't see that edit until now. Changes listed in log.
(click to show/hide)
Logged




(click to show/hide)
gameus
Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
Global Moderator
Chaos Ultimate
****

Level: 394
Online Online

Gender: Male
Posts: 6369



View Profile
« Reply #10 on: March 21, 2012, 08:52:03 AM »

Hah, didn't see that edit until now. Changes listed in log.
(click to show/hide)

Nice job, I modified the first post and put your edit in there. :3
Logged

vvalkingman
Awakened Visionist
**

Level: 1
Offline Offline

Gender: Male
Posts: 50

Take pride in yourself, your dreams, & what you do


View Profile
« Reply #11 on: April 08, 2012, 06:10:34 PM »

Thanks for the bug fixes Happy I know this is kind of cosmetic...but is there a way that negative states that actually cause damage will have a red screen flash while those that are positive(healing) have a blue or green screen flash? Currently, all states that are affected by HoT DoT put out a red flash while walking. Just curious Happy
Logged
KK20
Fixes things by hitting it with a wrench
Global Moderator
Chaos User
****

Level: 267
Offline Offline

Gender: Male
Posts: 1823



View Profile
« Reply #12 on: April 08, 2012, 08:04:00 PM »

Noticed a couple more things I missed. Updated to Version 1.04:
(click to show/hide)
Logged




(click to show/hide)
Kiwa
Transcended Spirit
***

Level: 3
Offline Offline

Posts: 114


View Profile
« Reply #13 on: September 03, 2013, 05:51:39 PM »

I don't know if I'm doing something wrong.

I've tried this script 2 times now and I just cant manage to figure it out.
any idea of what I'm doing wrong?

So i want to create a "Slip Damage" that can do more damage than the standard option (as well as heals). I found this script because i failed at mod-ing the standard code to work how i wanted it.

Like i said i've used it 2 times and cant manage to get it to work

Leaving the stock venom as 3....No matter how I mod the code....
Quote
when 3 then return [ 1, 50, 15, false]  # Standard Poison
I cant make it actually change the damage on the "Slip Damage".
I turned Slip damage on and off from the venom state. it will still tick at a 1/100 rate (par to stock) regardless.
but it just wont follow the code.
I understand the instructions in the code. i followed them.. i also moded them to huge numbers. still to only see 1/100...

Im not using ANY battle mods or poison mods other than BABS. but others say it works with BABS.
The script is placed under BABS.

Any help would be appreciated :D thanks friends!
Logged
KK20
Fixes things by hitting it with a wrench
Global Moderator
Chaos User
****

Level: 267
Offline Offline

Gender: Male
Posts: 1823



View Profile
« Reply #14 on: September 04, 2013, 10:05:30 PM »

Actually, upon further insight, this script is not compatible with Blizz-ABS. Slip damage in BABS takes place under the class Map_Battler while this script takes place in class Game_Battler. Replace the class with this:
Code: [Select]
class Map_Battler < Game_Character
  
  def slip_damage?
    return @states.any? {|i| SL93.hotdot(i) != false }
  end
  
  def slip_damage_effect
    ids = []
    sp_damage = 0
    self.battler.damage = 0
    # Get the HoT/DoT states applied to the character
    for i in battler.states
      ids.push(i) if SL93.hotdot(i) != false
    end
    
    for i in ids
      # If the state damages/heals by a literal number
      if SL93.hotdot(i)[0] > 0
        damage = SL93.hotdot(i)[1]
      # If the state damages/heals HP by a percent
      elsif SL93.hotdot(i)[0] == -1
        damage = self.battler.maxhp * SL93.hotdot(i)[1] / 100
      # If the state damages/heals SP by a percent
      elsif SL93.hotdot(i)[0] == -2
        damage = self.battler.maxsp * SL93.hotdot(i)[1] / 100
      end
      
      # If damage/heal amount is not zero and variance exists
      if damage != 0 && SL93.hotdot(i)[2] > 0
        # Variance based on literal numbers
        amp = (damage.abs < SL93.hotdot(i)[2] ? damage.abs - 1 : SL93.hotdot(i)[2]) if SL93.hotdot(i)[0] > 0
        # Variance based on percentages
        amp = [damage.abs * SL93.hotdot(i)[2] / 100, 1].max if SL93.hotdot(i)[0] < 0
        # Apply variance amounts to damage/heal amount
        damage += rand(amp+1) + rand(amp+1) - amp
      end
      
      # If HP damage/heal
      if SL93.hotdot(i)[0].abs == 1
        hp = self.battler.hp
        # If limit_drain and actual HP damage being done (not healing)
        if SL93.hotdot(i)[3] and damage > 0
          self.battler.hp = [hp - damage,1].max # Leave 1 HP
        else
          self.battler.hp -= damage
        end
        # Add total damage to variable
        self.battler.damage += damage
      # If SP damage/heal
      elsif SL93.hotdot(i)[0].abs == 2
        sp = self.battler.sp
        # If limit_drain and actual SP damage being done (not healing)
        if SL93.hotdot(i)[3] and damage > 0
          self.battler.sp = [sp - damage,1].max # Leave 1 SP
        else
          self.battler.sp -= damage
        end
        # Add total SP damage to variable
        sp_damage += damage
      end
    end
    # Modify @damage to be SP damage if no changes to HP were made
    self.battler.damage = sp_damage if self.battler.damage == 0
  end
  
end
« Last Edit: September 18, 2013, 12:37:19 AM by KK20 » Logged




(click to show/hide)
Kiwa
Transcended Spirit
***

Level: 3
Offline Offline

Posts: 114


View Profile
« Reply #15 on: September 17, 2013, 05:13:24 PM »

KK to the rescue! sorry I didn't reply sooner.

the code worked for the literal numbers such as losing a consistent -10 HP every time. But this wont cause a scaling skill that i'm trying to get. so i tried the percent ability to the script.
but when i used a percent it kept giving me errors. not sure whats up.

the error says NoMethodError occurred.
undefined method 'maxhp' for#<Map_Enemy:0x9127c08>

the line that has the error is probably different than your code so ill link the direct line it says
Code: [Select]
damage = self.maxhp * SL93.hotdot(i)[1] / 100

Ill play with it some more tomorrow if you don't get to it first.
Thanks for the help :D
Logged
KK20
Fixes things by hitting it with a wrench
Global Moderator
Chaos User
****

Level: 267
Offline Offline

Gender: Male
Posts: 1823



View Profile
« Reply #16 on: September 18, 2013, 12:36:44 AM »

My bad. On that line and somewhere below it for 'maxsp', make it
Code: [Select]
self.battler.maxhp
self.battler.maxsp
Logged




(click to show/hide)
Kiwa
Transcended Spirit
***

Level: 3
Offline Offline

Posts: 114


View Profile
« Reply #17 on: September 18, 2013, 04:25:50 PM »

KK20! lots of love friend!

Thanks for that. it works beautifully.
For others looking for the code that works with BABS here it is
(click to show/hide)

***EDIT***

The original Class is included as a comment if you may be wondering what that is at the end.
« Last Edit: September 18, 2013, 04:37:27 PM by Kiwa » Logged
LiTTleDRAgo
Astral Trancist
*****

Level: 500
Offline Offline

Gender: Male
Posts: 733


猫は可愛いです


View Profile
« Reply #18 on: September 19, 2013, 05:44:41 AM »

I make it compatible with BABS & VX

(click to show/hide)
Logged

Kiwa
Transcended Spirit
***

Level: 3
Offline Offline

Posts: 114


View Profile
« Reply #19 on: September 19, 2013, 07:40:55 AM »

Hey Drago I plugged in your code replacing the script i had posted above.
there were no syntax errors, the script ran fine... but when the enemy received the venom state i couldn't see any damage being done.

I wanted to let you know about it. it may be an oversite or it may be one of my scripts are incompatible. im using the other version i posted. im not requesting that you fix it. i just wanted to let ya know.
These are current scripts that could be the culprerate if its script headbutt related

(click to show/hide)

***EDIT***

Also I'm looking to add the damage be visible.. so as each tick of the venom hits the damage is displayed as any other spell would show.
is there quick line i could add to make that possible? or is that a huge project? lol

***EDIT***
Actually now I'm back with another idea..
So it dawned on me... that if I have a boss fight...and im removing 10% per tick...any class that can apply a venom would be extremely powerful against bosses lol
so i was wondering if i could make a request. I want the game to have a Scale to it. so i want to be able to tweek it.
anywhoo here is the situation if anyone is interested in taking it on.
(click to show/hide)

I was looking into displaying the slip damage on screen and changing the poison myself..but ive realized i just don't have a clear enough understanding of the systems im using.


« Last Edit: September 19, 2013, 02:13:06 PM by Kiwa » Logged
Pages: [1] 2  All
  Print  
 
Jump to:  


*
*
Shoutbox
Latest Shouts
View All
Today at 02:45:14 AM WhiteRose: I actually got half-way through writing one, but then something came up and I lost it. Haha.
September 18, 2014, 08:15:20 PM Ryex: I'm looking forward to those comments Rose. Topic is in the projects section. 
September 18, 2014, 06:50:16 PM soulshaker3: Talking about ideas I had one great too for an MMO but i don't think i can make it more than that, an idea.
September 18, 2014, 12:58:25 PM Blizzard: LMAO
(click to show/hide)
September 18, 2014, 12:56:33 PM Kiwa: @Blizz: Lol...funny
September 18, 2014, 12:39:32 PM Blizzard: LOL http://www.pidjin.net/2014/09/16/hungry-eyes/
September 18, 2014, 08:47:04 AM Blizzard: We're gonna hit 666 members soon! Again.
September 18, 2014, 06:12:52 AM Kiwa: @Zex lololol. that's the greatest picture ever. next step shes gonna show her bulge.."ITS A TRAP!"
September 18, 2014, 04:59:16 AM Zexion: I like how she does the hair flick thing
September 18, 2014, 12:37:40 AM soulshaker3: It's all a matter of perspective

View All


HB Games RpgMaker.org