[RMVX ACE] PETS AND SUMMONS V1.1A SCRIPT BUG
Posts
Pages:
1
I have trouble with the script Pets and Summons v1.1a by Vlue.
https://forums.rpgmakerweb.com/index.php?threads/pets-and-summons.27210/
I use a skill with the note tag <SUMMON 5, 10, 0> to summon the Actor with ID 5. This also works. However, every animation is displayed on Actor 1, even if the summoned Actor 5 applies an item to itself, heals their HP or MP... every animation is played on Actor 1 instead of Actor 5. I use Yanfly Battle Engine Ace.
This is obviously a script bug. Unfortunately, this script seems to be no longer be supported.
Can anyone help me fix this bug?
https://forums.rpgmakerweb.com/index.php?threads/pets-and-summons.27210/
I use a skill with the note tag <SUMMON 5, 10, 0> to summon the Actor with ID 5. This also works. However, every animation is displayed on Actor 1, even if the summoned Actor 5 applies an item to itself, heals their HP or MP... every animation is played on Actor 1 instead of Actor 5. I use Yanfly Battle Engine Ace.
This is obviously a script bug. Unfortunately, this script seems to be no longer be supported.
Can anyone help me fix this bug?
Just to say, I'm using the compatibility version of the pets summon script because of yanfly battle engine ace. It's not v1.1.
It's this:
https://pastebin.com/ef084qjG
Any help? I know, that's a tough one.
It's this:
https://pastebin.com/ef084qjG
Any help? I know, that's a tough one.
While I did post a few findings on Discord, I'll post here as well for anybody else that wants to look into this.
So, I put in some console commands in an attempt to output some data points. The first test was just to get the x-coordinates of the actors involved.
The end-result for that was...
...as so. Didn't matter how many people were in the party, the summoned actor's `screen_x` was a constant value, 127. So, how is that value derived?
At no point in the process do the `puts` methods print anything to the console after the summoned actor is added. Which feels wrong to me, because a value is obviously being generated, I just don't know how the hell it does so.
So, I put in some console commands in an attempt to output some data points. The first test was just to get the x-coordinates of the actors involved.
class Sprite_Popup < Sprite_Base 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 puts(@battler.name, @battler.screen_x) # <- This line of code, right here! 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 end
The end-result for that was...
Eric 115 Natalie 193 Terence 271 Alice 127
...as so. Didn't matter how many people were in the party, the summoned actor's `screen_x` was a constant value, 127. So, how is that value derived?
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # 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 # Debugging lines start here puts(name, self.index) if self.index == $game_party.members.size - 1 puts(name) puts(item_rect_width) puts(ext) puts(rect.x) end # Debugging lines end here return constant + rect.x + item_rect_width / 2 - ext end end
At no point in the process do the `puts` methods print anything to the console after the summoned actor is added. Which feels wrong to me, because a value is obviously being generated, I just don't know how the hell it does so.
Pages:
1