- Joined
- Mar 24, 2014
- Messages
- 579
- Reaction score
- 219
- First Language
- English
- Primarily Uses
- RMVXA
Lunatic States
I've already tried Custom Slip Effect by Victor Saint and Slip Damage EX by AdiktuzMiko
I couldn't get elemental damage to work in Slip Damage EX, and Custom Slip Effect recalculates the your formula per turn, which is a no go.
What I'm trying to do is have slip damage states that receive a value only once until they are removed and account for elemental damage. I'm using a variable to set the amount of slip damage received because I want the state's damage to differ depending on the skill that applies it.
#==============================================================================# # ▼ Yanfly Engine Ace - Lunatic States Package - Slip Damage## -- Requires: YEA - Lunatic States v1.00+# #==============================================================================$imported = {} if $imported.nil?$imported["YEA-LSP-SlipDamage"] = true#==============================================================================# ▼ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# To install this script, open up your script editor and copy/paste this script# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.# # Install this script under YEA - Lunatic States. Then, proceed to use the# proper effects notetags to apply the proper LSP Slip Damage item desired.# Look within the script for more instructions on how to use each effect.# #==============================================================================# ▼ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that# it will run with RPG Maker VX without adjusting.# # This script requires YEA - Lunatic States v1.00+ to work. It must be placed# under YEA - Lunatic States v1.00+ in the script listing.# #==============================================================================if $imported["YEA-LunaticStates"]class Game_BattlerBase #-------------------------------------------------------------------------- # ● Lunatic States Package Effects - Slip Damage # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #-------------------------------------------------------------------------- alias lunatic_state_extension_lsp3 lunatic_state_extension def lunatic_state_extension(effect, state, user, state_origin, log_window) case effect.upcase #---------------------------------------------------------------------- # Slip Damage Effect No.0: Slip Damage # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Affected recieves increasing damage based on the state's remaining turns. # # Recommended notetag: # <while effect: slip damage x> # <close effect: slip damage x> #---------------------------------------------------------------------- when /SLIP DAMAGE[ ](\d+)/i @var = $game_variables[$1.to_i] if !@rem.nil? dmg = ((@rem / 100) * state_origin.level) / @state_turns[state.id] else dmg = ((@var / 100) * state_origin.level) / @state_turns[state.id] end if $imported["YEA-BattleEngine"] && dmg > 0 text = sprintf(YEA::BATTLE:
OPUP_SETTINGS[:hp_dmg], dmg.group) user.create_popup(text, "HP_DMG") end user.perform_damage_effect user.hp = [user.hp - dmg, 1].max @rem = @var if @rem.nil? #---------------------------------------------------------------------- # Stop editting past this point. #---------------------------------------------------------------------- else so = state_origin lw = log_window lunatic_state_extension_lsp3(effect, state, user, so, lw) end end end # Game_BattlerBaseend # $imported["YEA-LunaticStates"]#==============================================================================# # ▼ End of File# #==============================================================================For example, if you add: v[1] = 3000 to the skill's damage formula and: <while effect: slip damage 1> as a notetag of the state which is applied by the skill.
The inflicted target will receive an increasing amount of damage per turn until the state is removed.
As you can see I tried a potential fix for one of those problems already (don't know how well it works), but I'm not sure how to go about dealing with elemental damage.
Edit:
I've updated the code.
I can add elemental damage via notetag, even got it to display properly with Yanfly's Battle Engine. The only question I have left now is whether or not my code will be effective at accepting the variable's value only once per application of the state?
To simplify, if I set $game_variables[1] to 3000 and apply the state right after. I don't want the damage to change if I set $game_variables[1] to 200 or something later. However, it should change if the actor were to add that state again at another time, or a different party member uses the same state.
I've already tried Custom Slip Effect by Victor Saint and Slip Damage EX by AdiktuzMiko
I couldn't get elemental damage to work in Slip Damage EX, and Custom Slip Effect recalculates the your formula per turn, which is a no go.
What I'm trying to do is have slip damage states that receive a value only once until they are removed and account for elemental damage. I'm using a variable to set the amount of slip damage received because I want the state's damage to differ depending on the skill that applies it.
#==============================================================================# # ▼ Yanfly Engine Ace - Lunatic States Package - Slip Damage## -- Requires: YEA - Lunatic States v1.00+# #==============================================================================$imported = {} if $imported.nil?$imported["YEA-LSP-SlipDamage"] = true#==============================================================================# ▼ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# To install this script, open up your script editor and copy/paste this script# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.# # Install this script under YEA - Lunatic States. Then, proceed to use the# proper effects notetags to apply the proper LSP Slip Damage item desired.# Look within the script for more instructions on how to use each effect.# #==============================================================================# ▼ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that# it will run with RPG Maker VX without adjusting.# # This script requires YEA - Lunatic States v1.00+ to work. It must be placed# under YEA - Lunatic States v1.00+ in the script listing.# #==============================================================================if $imported["YEA-LunaticStates"]class Game_BattlerBase #-------------------------------------------------------------------------- # ● Lunatic States Package Effects - Slip Damage # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #-------------------------------------------------------------------------- alias lunatic_state_extension_lsp3 lunatic_state_extension def lunatic_state_extension(effect, state, user, state_origin, log_window) case effect.upcase #---------------------------------------------------------------------- # Slip Damage Effect No.0: Slip Damage # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Affected recieves increasing damage based on the state's remaining turns. # # Recommended notetag: # <while effect: slip damage x> # <close effect: slip damage x> #---------------------------------------------------------------------- when /SLIP DAMAGE[ ](\d+)/i @var = $game_variables[$1.to_i] if !@rem.nil? dmg = ((@rem / 100) * state_origin.level) / @state_turns[state.id] else dmg = ((@var / 100) * state_origin.level) / @state_turns[state.id] end if $imported["YEA-BattleEngine"] && dmg > 0 text = sprintf(YEA::BATTLE:
The inflicted target will receive an increasing amount of damage per turn until the state is removed.
As you can see I tried a potential fix for one of those problems already (don't know how well it works), but I'm not sure how to go about dealing with elemental damage.
Edit:
I've updated the code.
#==============================================================================# # ▼ Yanfly Engine Ace - Lunatic States Package - Slip Damage## -- Requires: YEA - Lunatic States v1.00+# #==============================================================================$imported = {} if $imported.nil?$imported["YEA-LSP-SlipDamage"] = true#==============================================================================# ▼ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# To install this script, open up your script editor and copy/paste this script# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.# # Install this script under YEA - Lunatic States. Then, proceed to use the# proper effects notetags to apply the proper LSP Slip Damage item desired.# Look within the script for more instructions on how to use each effect.# #==============================================================================# ▼ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that# it will run with RPG Maker VX without adjusting.# # This script requires YEA - Lunatic States v1.00+ to work. It must be placed# under YEA - Lunatic States v1.00+ in the script listing.# #==============================================================================if $imported["YEA-LunaticStates"]class Game_BattlerBase #-------------------------------------------------------------------------- # ● Lunatic States Package Effects - Slip Damage # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #-------------------------------------------------------------------------- alias lunatic_state_extension_lsp3 lunatic_state_extension def lunatic_state_extension(effect, state, user, state_origin, log_window) case effect.upcase #---------------------------------------------------------------------- # Slip Damage Effect No.0: Slip Damage # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Affected recieves increasing damage based on the state's remaining turns. # # Recommended notetag: # <while effect: element x damage y> # <close effect: element x damage y> #---------------------------------------------------------------------- when /ELEMENT[ ](\d+)[ ]DAMAGE[ ](\d+)/i @var = $game_variables[$2.to_i] !@rem.nil? ? x = @rem : x = @var dmg = ((x / 100) * state_origin.level) / @state_turns[state.id] rate = element_rate($1.to_i) ; dmg = (dmg * rate).to_i if $imported["YEA-BattleEngine"] && dmg > 0 text = sprintf(YEA::BATTLE:
OPUP_SETTINGS[:hp_dmg], dmg.group) user.make_rate_popup(rate) user.create_popup(text, "HP_DMG") end user.perform_damage_effect user.hp = [user.hp - dmg, 1].max @rem = @var if @rem.nil? #---------------------------------------------------------------------- # Stop editting past this point. #---------------------------------------------------------------------- else so = state_origin lw = log_window lunatic_state_extension_lsp3(effect, state, user, so, lw) end end end # Game_BattlerBaseend # $imported["YEA-LunaticStates"]#==============================================================================# # ▼ End of File# #==============================================================================
Last edited by a moderator:

