DUNGEONDEVDUDE'S PROFILE
DungeonDevDude
1237
You can call me “D3”. I’m just a guy who makes games as a hobby. Not always good at it, but I always have fun!
Search
Filter
[RMVX ACE] Check if an actor has evaded an attack?
Whoops!
Well, thanks for sending! :D
I'm going to take a look at this and play with Marrend's snippet and see if I can come up with something.
Well, thanks for sending! :D
I'm going to take a look at this and play with Marrend's snippet and see if I can come up with something.
[RMVX ACE] Check if an actor has evaded an attack?
author=Marrend
Not sure how much this helps, but, the default processing for the evasion check seems to be in Game_Battler?
class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # * Calculate Evasion Rate for Skill/Item #-------------------------------------------------------------------------- def item_eva(user, item) return eva if item.physical? # Return evasion if physical attack return mev if item.magical? # Return magic evasion if magic attack return 0 end #-------------------------------------------------------------------------- # * Apply Effect of Skill/Item #-------------------------------------------------------------------------- def item_apply(user, item) @result.clear @result.used = item_test(user, item) @result.missed = (@result.used && rand >= item_hit(user, item)) @result.evaded = (!@result.missed && rand < item_eva(user, item)) if @result.hit? unless item.damage.none? @result.critical = (rand < item_cri(user, item)) make_damage_value(user, item) execute_damage(user) end item.effects.each {|effect| item_effect_apply(user, item, effect) } item_user_effect(user, item) end end end
*Edit: Maybe as a test-run, insert a new code-block with something like...
class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # * Apply Effect of Skill/Item #-------------------------------------------------------------------------- def item_apply(user, item) @result.clear @result.used = item_test(user, item) @result.missed = (@result.used && rand >= item_hit(user, item)) @result.evaded = (!@result.missed && rand < item_eva(user, item)) if @result.hit? unless item.damage.none? @result.critical = (rand < item_cri(user, item)) make_damage_value(user, item) execute_damage(user) end item.effects.each {|effect| item_effect_apply(user, item, effect) } item_user_effect(user, item) elsif @result.evaded user.add_state(44) end end end
...this, and observe if the state is applied after a successful evasion? Might not hurt to set a character's (or enemy's) EVA to, like, 90% or 100% for the purposes of testing too.
Well, that snippet worked, but when the actor dodged it added the state to the enemy. So now, I guess the next step would be to change it so the "target" gets the state, and only when a specific actor is targeted.
I could make an equipment tag that says if the target's notebox contains this tag, add the state.
[RMVX ACE] Check if an actor has evaded an attack?
author=unity
I don't know a thing about coding, but I have a script Craze made called Regrowth Options that does something like this. It has options for "when a character evades" but it seems to mainly do things like restoring HP, TP, or MP, but maybe it'd give you a clue, if nothing else?
I'd link you to it on his old blog, but it just 404s, so I can paste it here if you like!
That's actually a great idea!
I think I may have a copy of that script somewhere in my super old VX Ace failures...
Can you link it here, just in case :P
[RMVX ACE] Check if an actor has evaded an attack?
I'm trying to using Yanfly's Lunatic States Found Here in order to create an effect where if a character evades an attack, they receive a buff to their stats.
However, I'm running into trouble forming the check to see if the User has properly evaded the attack.
I figure this is stored somewhere in the game_results or game action_results, as I was able to create a state that granted bonus on hitting a critical using similar methods.
So far, I have a passive state applied to said character. I'm using a "react effect" on that state that says the following:
I've also tried "if user.result.evaded" and "state_origin.result.evaded" but whenever the actor dodges, nothing happens. That state(44) is a bonus state that has the actual bonuses.
Am I just completely off? Thanks for taking the time to read this :).
However, I'm running into trouble forming the check to see if the User has properly evaded the attack.
I figure this is stored somewhere in the game_results or game action_results, as I was able to create a state that granted bonus on hitting a critical using similar methods.
So far, I have a passive state applied to said character. I'm using a "react effect" on that state that says the following:
when "EVADEBONUS"
if @result.evaded
user.add_state(44)
end
I've also tried "if user.result.evaded" and "state_origin.result.evaded" but whenever the actor dodges, nothing happens. That state(44) is a bonus state that has the actual bonuses.
Am I just completely off? Thanks for taking the time to read this :).
Top Games Of the Decade?
Undertale
Celeste
NieR Automata
Breath of the Wild
Super Mario Odyssey
Spider-man PS4
Smash Ultimate
Persona 5
Sonic Mania
A hat in time
Celeste
NieR Automata
Breath of the Wild
Super Mario Odyssey
Spider-man PS4
Smash Ultimate
Persona 5
Sonic Mania
A hat in time
What's the Worst RPG Maker Game You've Played and Why
That one Raywin game on steam. Went around YouTube for a while as a bad game. My friend got it as a joke.
What do you think was the best year/era for RPG Maker?
Honestly, I have a certain fondness for the Don Miguel era because it helped to introduce me to this community and internet culture as a kid.
[RMVX ACE] Battle Animations?
author=unity
This is an issue I've always had with Yanfly's battle engine in Ace. I'm no coder, so I'd also be really excited if anyone's figured out a way to fix this.
Yeah, seems like a lot of people have been plagued by this. I was able to get some help from @housekeeping . I’ll share that snippet when I get home. It didn’t work for me, but I think that’s because some of my other scripts may be messing with it.
EDIT: ..and I was right. There was another script below it that was messing with the fix.
Here's the code that will allow battle animations to play above yanfly's HUD in VX Ace (as shared to me by @Housekeeping)
#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
# This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# * Create Viewport
# ALIAS
# viewport2 was bumpped up to 101 to display over BattleStatus
# viewport2 effects screenflashes + actors(actors viewport changed below)
# viewport3 was bumpped up to 150 to still be above viewport2
# think this one is for weather
#--------------------------------------------------------------------------
alias qyf_vp_fix create_viewports
def create_viewports
qyf_vp_fix
@viewport2.z = 101
@viewport3.z = 150
end
#--------------------------------------------------------------------------
# * Create Actor Sprite
# By default, the actor image is not displayed, but for convenience
# a dummy sprite is created for treating enemies and allies the same.
# OVERWRITE
# viewport changed to viewport2 from viewport1
#--------------------------------------------------------------------------
def create_actors
@actor_sprites = Array.new(4) { Sprite_Battler.new(@viewport2) }
end
end
Like Unity said, I know this plagues a lot of people, so I'm hoping people can find this helpful!
[RMVX ACE] Battle Animations?
Hey guys,
I'm trying to draw Battle Animations above Yanfly Battle Status Window in VX Ace.
By default, the battle animations automatically show behind the HUD and actor faces.
I'm trying to work with the Viewports in Spriteset_Battle. i think animations and effects are drawn on Viewport2? While fade in and fade out measures are handled by 3... I tried playing with the Z values there for viewport2, but can't get anything working.
Anyone have any success editing this kind of thing?
I'm trying to draw Battle Animations above Yanfly Battle Status Window in VX Ace.
By default, the battle animations automatically show behind the HUD and actor faces.
I'm trying to work with the Viewports in Spriteset_Battle. i think animations and effects are drawn on Viewport2? While fade in and fade out measures are handled by 3... I tried playing with the Z values there for viewport2, but can't get anything working.
Anyone have any success editing this kind of thing?