FUSILIER'S PROFILE
Fusilier
0
Search
Filter
[VX Ace] [Yanfly] Enemy Animations
These are all the instances of viewport mentions that weren't listed under either popup or info windows, which aren't a problem. Can anything in here be fiddled with or am I going to have to plunge into game_battler?
#-------------------------------------------------------------------------- # alias method: initialize #-------------------------------------------------------------------------- alias sprite_battler_initialize_abe initialize def initialize(viewport, battler = nil) sprite_battler_initialize_abe(viewport, battler) @popups = [] @popup_flags = [] end #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(viewport, battler, value, rules, flags) super(viewport) @value = value @rules = rules @rules = "DEFAULT" unless YEA::BATTLE::POPUP_RULES.include?(@rules) @fade = YEA::BATTLE::POPUP_SETTINGS[:fade] @full = YEA::BATTLE::POPUP_SETTINGS[:full] @flags = flags @battler = battler create_popup_bitmap end #-------------------------------------------------------------------------- # create_popup_bitmap #-------------------------------------------------------------------------- def create_popup_bitmap rules_array = YEA::BATTLE::POPUP_RULES[@rules] bw = Graphics.width bw += 48 if @flags.include?("state") bh = Font.default_size * 3 bitmap = Bitmap.new(bw, bh) bitmap.font.name = rules_array[8] size = @flags.include?("critical") ? rules_array[2] * 1.2 : rules_array[2] bitmap.font.size = size bitmap.font.bold = rules_array[3] bitmap.font.italic = rules_array[4] if flags.include?("critical") crit = YEA::BATTLE::POPUP_RULES["CRITICAL"] bitmap.font.out_color.set(crit[5], crit[6], crit[7], 255) else bitmap.font.out_color.set(0, 0, 0, 255) end dx = 0; dy = 0; dw = 0 dx += 24 if @flags.include?("state") dw += 24 if @flags.include?("state") if @flags.include?("state") || @flags.include?("buff") c_width = bitmap.text_size(@value).width icon_bitmap = $game_temp.iconset icon_index = flag_state_icon rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) bitmap.blt(dx+(bw-c_width)/2-36, (bh - 24)/2, icon_bitmap, rect, 255) end bitmap.font.color.set(rules_array[5], rules_array[6], rules_array[7]) bitmap.draw_text(dx, dy, bw-dw, bh, @value, 1) self.bitmap = bitmap self.x = @battler.screen_x self.x += rand(4) - rand(4) if @battler.sprite.popups.size >= 1 self.x -= SceneManager.scene.spriteset.viewport1.ox self.y = @battler.screen_y - @battler.sprite.oy/2 self.y -= @battler.sprite.oy/2 if @battler.actor? self.y -= SceneManager.scene.spriteset.viewport1.oy self.ox = bw/2; self.oy = bh/2 self.zoom_x = self.zoom_y = rules_array[0] if @flags.include?("no zoom") self.zoom_x = self.zoom_y = rules_array[1] end @target_zoom = rules_array[1] @zoom_direction = (self.zoom_x > @target_zoom) ? "down" : "up" self.z = 500 end #-------------------------------------------------------------------------- # public instance variables #-------------------------------------------------------------------------- attr_accessor :actor_sprites attr_accessor :enemy_sprites attr_accessor :viewport1 attr_accessor :viewportPopups #-------------------------------------------------------------------------- # alias method: create_viewports #-------------------------------------------------------------------------- alias spriteset_battle_create_viewports_abe create_viewports def create_viewports spriteset_battle_create_viewports_abe @viewportPopups = Viewport.new @viewportPopups.z = 200 end #-------------------------------------------------------------------------- # alias method: dispose_viewports #-------------------------------------------------------------------------- alias spriteset_battle_dispose_viewports_abe dispose_viewports def dispose_viewports spriteset_battle_dispose_viewports_abe @viewportPopups.dispose end #-------------------------------------------------------------------------- # alias method: update_viewports #-------------------------------------------------------------------------- alias spriteset_battle_update_viewports_abe update_viewports def update_viewports spriteset_battle_update_viewports_abe @viewportPopups.update end end # Spriteset_Battle #-------------------------------------------------------------------------- # overwrite method: perform_damage_effect #-------------------------------------------------------------------------- def perform_damage_effect $game_troop.screen.start_shake(5, 5, 10) if YEA::BATTLE::SCREEN_SHAKE @sprite_effect_type = :blink if YEA::BATTLE::BLINK_EFFECTS Sound.play_actor_damage end #-------------------------------------------------------------------------- # overwrite method: use_sprite? #-------------------------------------------------------------------------- def use_sprite?; return true; end #-------------------------------------------------------------------------- # new method: screen_x #-------------------------------------------------------------------------- def screen_x return 0 unless SceneManager.scene_is?(Scene_Battle) status_window = SceneManager.scene.status_window return 0 if status_window.nil? item_rect_width = (status_window.width-24) / $game_party.max_battle_members ext = SceneManager.scene.info_viewport.ox rect = SceneManager.scene.status_window.item_rect(self.index) constant = 128 + 12 return constant + rect.x + item_rect_width / 2 - ext end
[VX Ace] [Yanfly] Enemy Animations
Alright, to be a little more specific, here's where the game defines the actor's location for the battle animation to play
But changing the z value doesn't seem to do anything, and I can't for the life of me find any numericals to go with the enemy animation flags.
#============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # overwrite method: perform_damage_effect #-------------------------------------------------------------------------- def perform_damage_effect $game_troop.screen.start_shake(5, 5, 10) if YEA::BATTLE::SCREEN_SHAKE @sprite_effect_type = :blink if YEA::BATTLE::BLINK_EFFECTS Sound.play_actor_damage end #-------------------------------------------------------------------------- # overwrite method: use_sprite? #-------------------------------------------------------------------------- def use_sprite?; return true; end #-------------------------------------------------------------------------- # new method: screen_x #-------------------------------------------------------------------------- def screen_x return 0 unless SceneManager.scene_is?(Scene_Battle) status_window = SceneManager.scene.status_window return 0 if status_window.nil? item_rect_width = (status_window.width-24) / $game_party.max_battle_members ext = SceneManager.scene.info_viewport.ox rect = SceneManager.scene.status_window.item_rect(self.index) constant = 128 + 12 return constant + rect.x + item_rect_width / 2 - ext end #-------------------------------------------------------------------------- # new method: screen_y #-------------------------------------------------------------------------- def screen_y return Graphics.height - 120 unless SceneManager.scene_is?(Scene_Battle) return Graphics.height - 120 if SceneManager.scene.status_window.nil? return Graphics.height - (SceneManager.scene.status_window.height * 7/8) end #-------------------------------------------------------------------------- # new method: screen_z #-------------------------------------------------------------------------- def screen_z; return 100; end #-------------------------------------------------------------------------- # new method: sprite #-------------------------------------------------------------------------- def sprite index = $game_party.battle_members.index(self) return SceneManager.scene.spriteset.actor_sprites[index] end #-------------------------------------------------------------------------- # new method: draw_mp? #-------------------------------------------------------------------------- def draw_mp? return true unless draw_tp? for skill in skills next unless added_skill_types.include?(skill.stype_id) return true if skill.mp_cost > 0 end return false end #-------------------------------------------------------------------------- # new method: draw_tp? #-------------------------------------------------------------------------- def draw_tp? return false unless $data_system.opt_display_tp for skill in skills next unless added_skill_types.include?(skill.stype_id) return true if skill.tp_cost > 0 end return false end #-------------------------------------------------------------------------- # alias method: input #-------------------------------------------------------------------------- alias game_actor_input_abe input def input if @actions.nil? make_actions @action_input_index = 0 end if @actions[@action_input_index].nil? @actions[@action_input_index] = Game_Action.new(self) end return game_actor_input_abe end end # Game_Actor #============================================================================== # ■ Game_Enemy #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # overwrite method: perform_damage_effect #-------------------------------------------------------------------------- def perform_damage_effect @sprite_effect_type = :blink if YEA::BATTLE::BLINK_EFFECTS Sound.play_enemy_damage end #-------------------------------------------------------------------------- # new methods: attack_animation_id #-------------------------------------------------------------------------- def atk_animation_id1; return enemy.atk_animation_id1; end def atk_animation_id2; return enemy.atk_animation_id2; end #-------------------------------------------------------------------------- # new method: sprite #-------------------------------------------------------------------------- def sprite return SceneManager.scene.spriteset.enemy_sprites.reverse[self.index] end end # Game_Enemy
But changing the z value doesn't seem to do anything, and I can't for the life of me find any numericals to go with the enemy animation flags.
[VX Ace] TP Rate
I fiddled around with it a while and it seems that the only difference was where I'd put the line. Moving it to the very bottom like you did seems to have fixed it, which was strange because defining the regeneration rate with max_tp because the custom max_tp was defined actually worked fine. Mind boggling, but it works now, so thank you a ton!
[VX Ace] TP Rate
Unfortunately I can confirm that does not work, even if it would very much seem to. A 10% TP gain effect on an attack is still always a flat 10 TP no matter what.
[VX Ace] TP Rate
You are my hero and I love you.
EDIT: Okay that worked great for regenerating TP, but not TP Gain percents. What would I need to do to get this to work?
EDIT: Okay that worked great for regenerating TP, but not TP Gain percents. What would I need to do to get this to work?
#-------------------------------------------------------------------------- # * [TP Gain] Effect #-------------------------------------------------------------------------- def item_effect_gain_tp(user, item, effect) value = effect.value1.to_i @result.tp_damage -= value @result.success = true if value != 0 self.tp += value end
[VX Ace] TP Rate
I think this might actually be the last problem remaining in the scripts I haven't personally touched, so I apologize for posting all these topics at once. I didn't like TP being always out of 100 so I downloaded and plugged in this script
But the Calculate TP percentage correctly part just doesn't work. Even though my Max_TP is fine and I can set the Init_TP fine as well, I have no idea what I should be putting to make TP_Rate scale correctly. It doesn't matter whether my Actor has 500 or 50 max TP, he always regens 10 per turn with a TRG of 10%.
#============================================================================== # Action Point System v1.0 (16/02/2013) #============================================================================== # AUTHOR: # esrann (sakari.rannikko@gmail.com) # # Feel free to adapt to your own needs. Give credit if you want. #-------------------------------------------------------------------------- # DESCRIPTION: # This snippet allows you to set up a formula for calculating actor's # maximum TP (default formula: Actor TP = Actor AGI divided by 2). # Also the TP is set to 100% at battle start (unless Preserve TP is enabled). #-------------------------------------------------------------------------- # USAGE: # Can be used to create for example an Action Point System: # - Set battle commands to reduce TP # - When out of TP in battle, use item/skill to restore points. # (for example, set 'Wait' skill to restore TP) #-------------------------------------------------------------------------- # INSTALLATION: # Install this script in the Materials section in your project's # script editor. #============================================================================== #============================================================================== # ++ Game_BattlerBase #============================================================================== class Game_BattlerBase #-------------------------------------------------------------------------- # alias : max_tp | Calculate maximum TP using a formula #-------------------------------------------------------------------------- alias esrann_max_tp max_tp def max_tp esrann_max_tp # alias self.mmp / 2 # edit this formula end #-------------------------------------------------------------------------- # alias: tp_rate | Calculate TP percentage correctly #-------------------------------------------------------------------------- alias esrann_tp_rate tp_rate def tp_rate esrann_tp_rate # alias @tp.to_f / max_tp end end # class Game_BattlerBase #============================================================================== # ++ Game_Battler #============================================================================== class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # alias : init_tp | Set initial TP to maximum #-------------------------------------------------------------------------- alias esrann_init_tp init_tp def init_tp esrann_init_tp # alias self.tp = max_tp / 4 end end # class Game_Battler
But the Calculate TP percentage correctly part just doesn't work. Even though my Max_TP is fine and I can set the Init_TP fine as well, I have no idea what I should be putting to make TP_Rate scale correctly. It doesn't matter whether my Actor has 500 or 50 max TP, he always regens 10 per turn with a TRG of 10%.
[VX Ace] Counters
[VX Ace] Counters
VX Ace's default counter attacks both negate the damage dealt to the battler, and then don't let you choose a skill to counter with. This is a problem. I've tried the Victor Engine counter scripts, but they still negate all damage dealt to the countering battler, which doesn't help me. I've also tried Tsukihime's Battle Reaction script, which works, but has the awful problem of constantly messaging the player with "X reacts to Y!" even when the chance to react doesn't proc, meaning it's spamming them with reaction messages even when the Actor isn't reacting at all. Does anyone either know how to fix this problem with Tsukihime's script, or else know of a script that accomplishes this that I've missed? I've considered trying to chop out as many references to the notification itself in the bowels of the code but I'm leery of ruining it somehow.
[VX Ace] [Yanfly] Enemy Animations
I'm using glorious Yanfly's Battle Engine script because I love the way it has party portraits set up along the bottom of the battle screen and how the enemy attacks are animated on those portraits. I do have a problem however, in that the animated enemy attacks appear behind the portraits themselves, making them kind of difficult to see, and that I can't figure out how to get the portrait sprite itself to Flash as though it were a Target for the purposes of the animation used. I would enormously appreciate it if someone who knows jack squat about Ruby had some kind of modification in mind to accomplish this.
Pages:
1













