States that applied damage over time (DoT) always dealt damage that was equal to some percentage amount of the player's HP. In Blizz ABS, any state that had 'slip damage' checked as true would always do damage equal to 2% of the battler's max HP every second (40 frames).

This script modifies that and allows some customizable DoT amounts. States with 'slip damage' will now be associated with a skill. In other words, every time DoT takes place, the affected battler will now take damage as if it was attacked by a skill. Essentially, you can make a DoT state called "Burn" and assign it to the skill "Fire". Instead of the battler taking 2% of max HP damage, it will now take damage as if it were being hit by "Fire".

Also, you can assign how many times DoT will take place during the duration of the state. No longer will DoT have to take place every second of gameplay. You can make DoT take place once every 3 seconds, only once in 20 seconds, or even 3 times every second.Features

Damage over time can be represented with skill damage rather than being a set number.

Damage can take place a number of ticks during its duration rather than every second.

Because damage over time is a skill, damage is based on the battler’s stats (if configured in the database as such). As the battler gets stronger, so does the damage over time.

=begin===============================================================================Skill Damage Over Time (Blizz ABS add-on) Ver. 1.02- By KK20 [8/12/12]=============================================================================== [Change Log]Version 1.02 : <> If the battler increased or decreased its stats after applying a DoT state, the DoT damage was adjusted to this change. This has been fixed 1.01 : <> If DoT state was applied through an event, Nil Error was thrown <> Added the option to make DoT damage pop up===============================================================================

[Description] States that applied damage over time (DoT) always dealt damage that was equal to some percentage amount of the player's HP. In Blizz ABS, any state that had 'slip damage' checked as true would always do damage equal to 2% of the battler's max HP every second (40 frames).

This script modifies that and allows some customizable DoT amounts. States with 'slip damage' will now be associated with a skill. In other words, every time DoT takes place, the affected battler will now take damage as if it was attacked by a skill. Essentially, you can make a DoT state called "Burn" and assign it to the skill "Fire". Instead of the battler taking 2% of max HP damage, it will now take damage as if it were being hit by "Fire".

Also, you can assign how many times DoT will take place during the duration of the state. No longer will DoT have to take place every second of gameplay. You can make DoT take place once every 3 seconds, only once in 20 seconds, or even 3 times every second.

[Features] - Assign skills to states that deal DoT - Customize how many times DoT takes place - Maintains Blizz ABS's original slip_damage_effect, just in case you want to use the original "2% of max HP damage every second" somewhere - Can display DoT damage as pop up damage

[Instructions] > In order for skills to deal damage over time, check the box "Slip Damage"

> If you want the state to wear off after so many seconds, check the box "Release at the end of battle". If you want the state to remain forever until it is cured, don't check it.

> How frequent DoT takes place is based on the following formula: FREQUENCY = TURNS / TICKS where TURNS is the value you put in "After [ x ] turns" in the database and TICKS is the number of times you want DoT to take place (config below)

#----------------------------------------------------------------------------- # DISPLAY_DOT_DAMAGE - Set to true if you want the damage values to pop up # during battle when affected by a DoT state. #----------------------------------------------------------------------------- DISPLAY_DOT_DAMAGE = true

def self.dot_states(state_id) return nil unless $data_states[state_id].slip_damage case state_id #-------------------------------------------------------------------------- # self.dot_states(state_id) # Configure what skill you would like to associate to the DoT state here. # Also, configure how frequent the DoT takes place during the duration of # the state. # Format: # When STATE_ID then return [SKILL_ID, TICKS] # # STATE_ID: The state's ID value located within the database # SKILL_ID: The skill's ID value located within the database # TICKS : The number of times DoT will take place #-------------------------------------------------------------------------- when 3 then return [7, 5] # when Venom, then use skill 'Fire' 5 times when 8 then return [13, 1] # when Paralyzed, then use skill 'Thunder' 1 time else return nil end end

#-------------------------------------------------------------------------- # Add State # # This method has been EDITTED by KK20. #-------------------------------------------------------------------------- def add_state(state_id, force = false) # For an ineffective state if $data_states[state_id] == nil # End Method return end # If not forcefully added unless force # A state loop already in existance for i in @states # If a new state is included in the state change (-) of an existing # state, and that state is not included in the state change (-) of # a new state (example: an attempt to add poison during dead) if $data_states[i].minus_state_set.include?(state_id) and not $data_states[state_id].minus_state_set.include?(i) # End Method return end end end # If this state is not added unless state?(state_id) # Add state ID to @states array @states.push(state_id) # If this state does Skill DoT, find the actor that caused this state if Skills_DoT.dot_states(state_id) != nil if @state_giver_attacker.nil? @states_caused_by_characters_list[state_id] = nil else @states_caused_by_characters_list[state_id] = Battler_Stats_Array.new(@state_giver_attacker) end end # If option [regarded as HP 0]is effective if $data_states[state_id].zero_hp # Change HP to 0 @hp = 0 end # All state loops for i in 1...$data_states.size # Dealing with a state change (+) if $data_states[state_id].plus_state_set.include?(i) add_state(i) end # Dealing with a state change (-) if $data_states[state_id].minus_state_set.include?(i) remove_state(i) end end # line change to a large rating order (if value is the same, then a # strong restriction order) @states.sort! do |a, b| state_a = $data_states[a] state_b = $data_states[b] if state_a.rating > state_b.rating -1 elsif state_a.rating < state_b.rating +1 elsif state_a.restriction > state_b.restriction -1 elsif state_a.restriction < state_b.restriction +1 else a <=> b end end end # If added forcefully if force # Set the natural removal's lowest number of turns to -1 @states_turn[state_id] = -1 end # If not added forcefully unless @states_turn[state_id] == -1 # Set the natural removal's lowest number of turns @states_turn[state_id] = $data_states[state_id].hold_turn end # If unable to move unless movable? # Clear action @current_action.clear end # Check the maximum value of HP and SP @hp = [@hp, self.maxhp].min @sp = [@sp, self.maxsp].min end #-------------------------------------------------------------------------- # Remove State # # This method has been EDITTED by KK20. #-------------------------------------------------------------------------- def remove_state(state_id, force = false) # If this state is added if state?(state_id) # If a forcefully added state is not forcefully removed if @states_turn[state_id] == -1 and not force # End Method return end # If current HP is at 0 and options are effective [regarded as HP 0] if @hp == 0 and $data_states[state_id].zero_hp # Determine if there's another state [regarded as HP 0] or not zero_hp = false for i in @states if i != state_id and $data_states[i].zero_hp zero_hp = true end end # Change HP to 1 if OK to remove incapacitation. if zero_hp == false @hp = 1 end end # Delete state ID from @states and @states_turn hash array @states.delete(state_id) @states_turn.delete(state_id) # Clear the state-causing-actor value from hash @states_caused_by_characters_list.delete(state_id) end # Check maximum value for HP and SP @hp = [@hp, self.maxhp].min @sp = [@sp, self.maxsp].min end #-------------------------------------------------------------------------- # State Change (+) Application # # This method has yet been EDITTED by KK20. #-------------------------------------------------------------------------- def states_plus(plus_state_set) # Clear effective flag effective = false # Loop (added state) for i in plus_state_set # If this state is not guarded unless self.state_guard?(i) # Set effective flag if this state is not full effective |= self.state_full?(i) == false # If states offer [no resistance] if $data_states[i].nonresistance # Set state change flag @state_changed = true # Add a state add_state(i) # If this state is not full elsif self.state_full?(i) == false # Convert state effectiveness to probability, # compare to random numbers if rand(100) < [0,100,80,60,40,20,0][self.state_ranks[i]] # Set state change flag @state_changed = true # Add a state add_state(i) end end end end # Reset variable @state_giver_attacker = nil # End Method return effective endend

So upon playing with this beautiful script (which has been pretty fun...i made 1000 ticks in like 4 seconds.. causing a waterfall of numbers lol).I found something odd. (i know.. leave it to kiwa)

So i decided to make a healing spell (-10 damage) into a Dot... in my brain healing spell into a DOT= HoT (Heal over Time)so..i went about it and heres what i found.

it ticked 1 damage and 3mana each tick.The mana is probably due to a common event set to restore mana every little bit..odd that its now displayed during the duration of the "HoT" state and no other time.

not that this is really important but for the greater understanding i'm curious. will this work in heal forms?

Theoretically it should heal. I mean, the damage done follows the exact same process as being hit by the skill itself. I'll have to check it out sometime. I probably did something stupid like [1, damage].max to prevent negative values (which would heal).

# * TYPE refers to the thing sustaining damage. # 1 = HP, 2 = SP. 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).

undefined method '[] =' for nil:NilClassI thought I had a compatibility issue because your demo works fine. But I removed all my other scripts and it still happened for some reason. I even moved my Part 1 into your demo and it worked fine. So I'm totally stumped on why this would be happening and I don't know enough about coding to understand what that error message means.

I'll be sure to take a look at it tomorrow. Considering this was made 2 years ago, some things might have changed in different versions of Blizz-ABS.

EDIT:It seems that you have a script located below mine that modifies the Game_Battler#initialize method.SHIFT + CTRL + F to look for all instances of class Game_Battler in any of your scripts below Skill Damage Over Time. Find the scripts that do NOT alias the initialize method.

[Instructions] > In order for skills to deal damage over time, check the box "Slip Damage"

> If you want the state to wear off after so many seconds, check the box "Release at the end of battle". If you want the state to remain forever until it is cured, don't check it.

> How frequent DoT takes place is based on the following formula: FREQUENCY = TURNS / TICKS where TURNS is the value you put in "After [ x ] turns" in the database and TICKS is the number of times you want DoT to take place (config below)

Make sure that your database and script configurations are setup properly.I was able to move the script just above 'Critical Sound' (had to remove Z-HUD scripts because I'm missing graphics) and get the script to work with the following configuration and by transferring my Enemies, Skills, and States files from the demo to the empty project.

The problem seems simpler than I thought though. It actually only happens when I load a save file that didn't start with the program, if I start a new game then it doesn't crash. I'm kind of embarrassed that I didn't notice this sooner.

But now the problem seems to be that it doesn't really do damage "over time", but simply only when the state is applied.

Right, the script doesn't work with old save files. Every actor and enemy must be initialized with this specific variable that helps keep track of states applied. This only occurs when a new game is started (a saved game just loads the actor and enemy data--it doesn't need to re-initialize them).

For your current problem, you need to configure your states and/or script accordingly. For example, your Venom state has a 300 turn limit (in Blizz-ABS, that means 300 seconds) that is never removed (you didn't check the 'Release at the end of battle' box). Read 4.2.1. Status Effects in the Blizz-ABS manual.

Secondly, reread my script instructions, namely this part:

Quote

> How frequent DoT takes place is based on the following formula: FREQUENCY = TURNS / TICKS where TURNS is the value you put in "After [ x ] turns" in the database and TICKS is the number of times you want DoT to take place (config below)

when 3 then return [122, 1]if TURNS = 300 and TICKS = 1, you are effectively saying that the damage frequency is once every 300 seconds. Go ahead and wait out a full 5 minutes--you'll see damage take place again.

If Venom is supposed to be removed after 5 minutes, check the 'Release at the end of battle' box and change the TICKS value to something larger, like 60 (which would be 300 / 60 = damage every 5 seconds).

I guess I took "plug and play" a little too seriously, I just figured if a script doesn't say it will corrupt old save files then it's good to go, but it this just a default with Blizz ABS features I'll keep in mind that I shouldn't be running new features with old save files. But thanks for helping me out.