GREATREDSPIRIT'S PROFILE
sherman
o
o
Search
Filter
Altima
author=bicfarmer
Played in one go to see how far i can get. A while after i got all the characters the game crashed with an error about the zealous engine. Yanfly plz
nooooooo
It could be my own problem too. There's an error.log file generated when the game crashes, I'm curious what crashed so could you please send that to me?
On the plus side, if the auto save works you hopefully didn't lose too much progress!
What are some shitty short Older RPGmaker games?
Have I got a game for you: Action 52 RMN Edition!
[RMVX] Halve/Double Damage after Damage Calculation via State
[RMVX] Halve/Double Damage after Damage Calculation via State
Alright, third demo project: Download here!
I added a new property to states, seen in the Physical Damage Up and Magic Damage Up:
With these states the attacker's physical and magic damage are increased. Like vulnerability, 200 = 200% = x2 damage, 100 = 100% = no change, 50 = 50% = x0.5 damage, stacks multiplicatively.
This is not applied to healing! Damage boost & vulnerability are only applied if a skill's base damage is 1 or greater. There might be other cases I missed with all the other damage algorithm bits too.
CHeck the YERD Custom Damage GRS bits, the new line of code is stuff like:
That happens right after the vulnerability checks.
(Regular attacks are a bit different, the "user" is called "attacker" there)
Does this cover your use cases? And if you experience any bugs, let me know!
I added a new property to states, seen in the Physical Damage Up and Magic Damage Up:
<physdmg 200>
<magicdmg 200>
With these states the attacker's physical and magic damage are increased. Like vulnerability, 200 = 200% = x2 damage, 100 = 100% = no change, 50 = 50% = x0.5 damage, stacks multiplicatively.
This is not applied to healing! Damage boost & vulnerability are only applied if a skill's base damage is 1 or greater. There might be other cases I missed with all the other damage algorithm bits too.
CHeck the YERD Custom Damage GRS bits, the new line of code is stuff like:
damage *= user.state_multiplier(:phys_dmg) damage *= user.state_multiplier(:magic_dmg)
That happens right after the vulnerability checks.
(Regular attacks are a bit different, the "user" is called "attacker" there)
Does this cover your use cases? And if you experience any bugs, let me know!
[RMVX] Halve/Double Damage after Damage Calculation via State
I was going to make a state flag that gives bonus damage when the attacker has it. It wont' change ATK/SPI or any other stat, but the state could say "150% physical damage" and all physical damage would be multiplied by x1.5 (aka +50% damage)
[RMVX] Halve/Double Damage after Damage Calculation via State
Check the Vulnerability Up, Protect, and Shell states. In their notes they have stuff like:
It sets the vulnerability and is treated like a % where 100 is 100%. Higher numbers = more vulnerable to physical/magical damage, so <physvul 200> is 200% vulnerable, or x2 damage from physical damage. Lower numbers is less vulnerable, so <magicvul 50> is 50% vulnerable, or 50% vulnerable to magic attacks.
These stack multiplicatively, so if a character has both Vulnerability Up and Protect, they have 200% * 50% = 100% physical vulnerability.
This only applies to states right now. There's no other way to get vulnerability as I coded it.
As I did it, the vulnerability is only applied to the target of damage too. A battler can't do extra damage because of a state they have (ie Physical Damage up or so) since I didn't think of that at all. I can make changes if you want that.
e: reread and yeah, I did miss you wanted the buffs completely. I'll add that too
<physvul 200>
<magicvul 200>
<physvul 50>
<magicvul 50>
It sets the vulnerability and is treated like a % where 100 is 100%. Higher numbers = more vulnerable to physical/magical damage, so <physvul 200> is 200% vulnerable, or x2 damage from physical damage. Lower numbers is less vulnerable, so <magicvul 50> is 50% vulnerable, or 50% vulnerable to magic attacks.
These stack multiplicatively, so if a character has both Vulnerability Up and Protect, they have 200% * 50% = 100% physical vulnerability.
This only applies to states right now. There's no other way to get vulnerability as I coded it.
As I did it, the vulnerability is only applied to the target of damage too. A battler can't do extra damage because of a state they have (ie Physical Damage up or so) since I didn't think of that at all. I can make changes if you want that.
e: reread and yeah, I did miss you wanted the buffs completely. I'll add that too
[RMVX] Halve/Double Damage after Damage Calculation via State
Sure, I grabbed that and added my vulnerability to it. Demo link. Since the YERD Custom Damage has its own ATK & SPI F values, my script uses those >0 to tell if physical or magic vulnerability apply (attack for physical, spirit for magical). I tagged my changes with GRS in the YERD Custom Damage script in the demo project if you want to see and make further changes to what I did.
[RMVX] Halve/Double Damage after Damage Calculation via State
Here's something I whipped up: Demo Project!
It'll have to be inserted into your damage algorithms since idk Yerd Custom Damage Formula. I created two new values for states/battlers: Physical and Magical Vulnerability. It's a multiplier for physical/magical damage. 100 is 100% vulnerability. The bigger the number the more damage, 200% is x2 damage. Smaller is less damage, 50% is half damage.
They stack multiplicatively, so 50% and 200% vulnerability will become 100%. A 0% vulnerability will negate all damage.
Input values for mitigation are like so:
See the project file for examples. The Hero has some skills that inflict states that change mitigation.
For adding it to your own damage value, use stuff like:
Will get the state multiplier for physical vulnerability
Same for magical vulnerability
These will return floating point values and VX wants Integers so make sure your damage values are Integers when you're done with them (holdover from my own code I shoved in)
Can make the damage an integer.
See the example damage algorithm below or in the demo project for how to use it.
Code for posterity:
(I adapted some code from one of my own projects so there's a bit of excess in here)
And example added to damage algorithms:
It'll have to be inserted into your damage algorithms since idk Yerd Custom Damage Formula. I created two new values for states/battlers: Physical and Magical Vulnerability. It's a multiplier for physical/magical damage. 100 is 100% vulnerability. The bigger the number the more damage, 200% is x2 damage. Smaller is less damage, 50% is half damage.
They stack multiplicatively, so 50% and 200% vulnerability will become 100%. A 0% vulnerability will negate all damage.
Input values for mitigation are like so:
<physvul 100>
<magicvul 100>
See the project file for examples. The Hero has some skills that inflict states that change mitigation.
For adding it to your own damage value, use stuff like:
state_multiplier(:phys_vul)
Will get the state multiplier for physical vulnerability
state_multiplier(:magic_vul)
Same for magical vulnerability
These will return floating point values and VX wants Integers so make sure your damage values are Integers when you're done with them (holdover from my own code I shoved in)
damage = Integer(damage)
Can make the damage an integer.
See the example damage algorithm below or in the demo project for how to use it.
Code for posterity:
# I'm changing a bit how this is all calculated # Put more generic stuff in here class Game_Battler # Get the state multiplier for a stat def state_multiplier(stat) mul = states.compact.inject(1) {|product, state| product * get_state_rate(state, stat) } return mul end # Get the individual stat bonus (we don't do agi or eva because ugh) def get_state_rate(state, stat) case stat when :maxhp, :maxmp, :cri stat_fixed = stat # yf uses :hp, I use :maxhp, gotta fix that here stat_fixed = :hp if stat == :maxhp stat_fixed = :mp if stat == :maxmp x = state.stat_per[stat_fixed].nil? ? 1.0 : state.stat_per[stat_fixed] / 100.0 return x when :atk return state.atk_rate / 100.0 when :def return state.def_rate / 100.0 when :spi return state.spi_rate / 100.0 when :agi return state.agi_rate / 100.0 when :hit, :eva # I didn't do these return 1 when :phys_vul # Physical Vulnerability return state.physical_vulnerability / 100.0 when :magic_vul # Magical Vulnerability return state.magical_vulnerability / 100.0 else return 1 end end end class RPG::State PHYSICAL_VUL_REGEX = /<PhysVul[\s]+([0-9]+)>/i MAGICAL_VUL_REGEX = /<MagicVul[\s]+([0-9]+)>/i def physical_vulnerability return @phys_vul unless @phys_vul.nil? if @note =~ PHYSICAL_VUL_REGEX @phys_vul = $1.to_i else @phys_vul = 100 end return @phys_vul end def magical_vulnerability return @mag_vul unless @mag_vul.nil? if @note =~ MAGICAL_VUL_REGEX @mag_vul = $1.to_i else @mag_vul = 100 end return @mag_vul end end
(I adapted some code from one of my own projects so there's a bit of excess in here)
And example added to damage algorithms:
class Game_Battler #-------------------------------------------------------------------------- # * Calculation of Damage From Normal Attack # attacker : Attacker # The results are substituted for @hp_damage #-------------------------------------------------------------------------- def make_attack_damage_value(attacker) damage = attacker.atk * 4 - self.def * 2 # base calculation damage = 0 if damage < 0 # if negative, make 0 damage *= elements_max_rate(attacker.element_set) # elemental adjustment damage /= 100 if damage == 0 # if damage is 0, damage = rand(2) # half of the time, 1 dmg elsif damage > 0 # a positive number? # Apply physical mitigation damage *= state_multiplier(:phys_vul) damage = Integer(damage) # I did math in floats but VX wants ints so oops @critical = (rand(100) < attacker.cri) # critical hit? @critical = false if prevent_critical # criticals prevented? damage *= 3 if @critical # critical adjustment end damage = apply_variance(damage, 20) # variance damage = apply_guard(damage) # guard adjustment @hp_damage = damage # damage HP end #-------------------------------------------------------------------------- # * Calculation of Damage Caused by Skills or Items # user : User of skill or item # obj : Skill or item (for normal attacks, this is nil) # The results are substituted for @hp_damage or @mp_damage. #-------------------------------------------------------------------------- def make_obj_damage_value(user, obj) damage = obj.base_damage # get base damage if damage > 0 # a positive number? damage += user.atk * 4 * obj.atk_f / 100 # Attack F of the user damage += user.spi * 2 * obj.spi_f / 100 # Spirit F of the user unless obj.ignore_defense # Except for ignore defense damage -= self.def * 2 * obj.atk_f / 100 # Attack F of the target damage -= self.spi * 1 * obj.spi_f / 100 # Spirit F of the target end # Apply physical vulnerability if the atk_f is > 0 damage *= state_multiplier(:phys_vul) if obj.atk_f > 0 # Apply magical vulnerability if the spi_f is >0 damage *= state_multiplier(:magic_vul) if obj.spi_f > 0 damage = Integer(damage) # I did math in floats but VX wants ints so oops damage = 0 if damage < 0 # If negative, make 0 elsif damage < 0 # a negative number? damage -= user.atk * 4 * obj.atk_f / 100 # Attack F of the user damage -= user.spi * 2 * obj.spi_f / 100 # Spirit F of the user end damage *= elements_max_rate(obj.element_set) # elemental adjustment damage /= 100 damage = apply_variance(damage, obj.variance) # variance damage = apply_guard(damage) # guard adjustment if obj.damage_to_mp @mp_damage = damage # damage MP else @hp_damage = damage # damage HP end end end
What are you thinking about? (game development edition)
It'll be fine. Most content stuff is algorithms trying to recognize stuff like music or videos. It won't pick up on pixel art of a NES on part of a screen.















