From 99aec45c5c2dbc096a079fb9de56cadfc3fcbdee Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Mon, 22 Apr 2024 23:50:54 +0100 Subject: [PATCH] Anim Editor: bug fixes relating to deleting particles, added some animations --- .../003_AnimationEditor_side_panes.rb | 3 +- .../Anim Editor elements/003_ParticleList.rb | 3 +- .../905_Anim player/010_Battle code.rb | 3 +- .../Example anims/Move/DEFENSECURL.txt | 33 -- PBS/Animations/Example anims/Move/SCRATCH.txt | 30 -- .../Example anims/Move/TAILWHIP.txt | 36 -- PBS/Animations/Normal/Defense Curl.txt | 40 +++ PBS/Animations/Normal/Scratch.txt | 319 ++++++++++++++++++ PBS/Animations/Normal/Tackle.txt | 1 + PBS/Animations/Normal/Tail Whip.txt | 24 ++ 10 files changed, 389 insertions(+), 103 deletions(-) delete mode 100644 PBS/Animations/Example anims/Move/DEFENSECURL.txt delete mode 100644 PBS/Animations/Example anims/Move/SCRATCH.txt delete mode 100644 PBS/Animations/Example anims/Move/TAILWHIP.txt create mode 100644 PBS/Animations/Normal/Defense Curl.txt create mode 100644 PBS/Animations/Normal/Scratch.txt create mode 100644 PBS/Animations/Normal/Tail Whip.txt diff --git a/Data/Scripts/904_Anim Editor/003_AnimationEditor_side_panes.rb b/Data/Scripts/904_Anim Editor/003_AnimationEditor_side_panes.rb index eff548ee2..b9c4cbbbc 100644 --- a/Data/Scripts/904_Anim Editor/003_AnimationEditor_side_panes.rb +++ b/Data/Scripts/904_Anim Editor/003_AnimationEditor_side_panes.rb @@ -560,7 +560,7 @@ AnimationEditor::SidePanes.add_property(:particle_pane, :foe_invert_y, { AnimationEditor::SidePanes.add_property(:particle_pane, :foe_flip, { :new => proc { |pane, editor| - pane.add_labelled_checkbox(:foe_flip, _INTL("Flip Sprite"), false) + pane.add_labelled_checkbox(:foe_flip, _INTL("Flip sprite"), false) }, :refresh_value => proc { |control, editor| focus = editor.anim[:particles][editor.particle_index][:focus] @@ -610,6 +610,7 @@ AnimationEditor::SidePanes.add_property(:particle_pane, :delete, { AnimationEditor::ParticleDataHelper.delete_particle(editor.anim[:particles], p_index) editor.components[:particle_list].delete_particle(p_index) editor.components[:particle_list].set_particles(editor.anim[:particles]) + p_index = editor.particle_index editor.components[:particle_list].keyframe = 0 if editor.anim[:particles][p_index][:name] == "SE" editor.refresh end diff --git a/Data/Scripts/904_Anim Editor/Anim Editor elements/003_ParticleList.rb b/Data/Scripts/904_Anim Editor/Anim Editor elements/003_ParticleList.rb index 2dce84454..958f13c74 100644 --- a/Data/Scripts/904_Anim Editor/Anim Editor elements/003_ParticleList.rb +++ b/Data/Scripts/904_Anim Editor/Anim Editor elements/003_ParticleList.rb @@ -200,7 +200,7 @@ class AnimationEditor::ParticleList < UIControls::BaseControl end def particle_index - return -1 if @row_index < 0 + return -1 if @row_index < 0 || @row_index >= @particle_list.length ret = @particle_list[@row_index] return (ret.is_a?(Array)) ? ret[0] : ret end @@ -335,6 +335,7 @@ class AnimationEditor::ParticleList < UIControls::BaseControl @particle_list.push([i, property]) if value.is_a?(Array) end end + @row_index = @particle_list.length - 1 if @row_index >= @particle_list.length # Dispose of and clear all existing list/commands sprites dispose_listed_sprites # Create new sprites for each particle (1x list and 2x commands) diff --git a/Data/Scripts/905_Anim player/010_Battle code.rb b/Data/Scripts/905_Anim player/010_Battle code.rb index bfdd765aa..548512951 100644 --- a/Data/Scripts/905_Anim player/010_Battle code.rb +++ b/Data/Scripts/905_Anim player/010_Battle code.rb @@ -75,8 +75,7 @@ class Battle::Scene move_type = move_data.type default_idx = move_data.category default_idx += 3 if target_data.num_targets > 1 || - (target_data.num_targets > 0 && move_data.status?) || - target_data.affects_foe_side + (target_data.num_targets > 0 && move_data.status?) # Check for a default animation wanted_move = ANIMATION_DEFAULTS_FOR_TYPE_CATEGORY[move_type][default_idx] anims = find_move_animation_for_move(wanted_move, 0, user_index) diff --git a/PBS/Animations/Example anims/Move/DEFENSECURL.txt b/PBS/Animations/Example anims/Move/DEFENSECURL.txt deleted file mode 100644 index ba564c0dc..000000000 --- a/PBS/Animations/Example anims/Move/DEFENSECURL.txt +++ /dev/null @@ -1,33 +0,0 @@ -# See the documentation on the wiki to learn how to edit this file. -#------------------------------- -[Move,DEFENSECURL] -Name = Example anim -NoTarget = true - - SetX = 0,0 - SetY = 0,0 - - Graphic = Examples/fly copy - Focus = User - SetFrame = 0,5 - SetX = 0,5 - SetY = 0,0 - SetZ = 0,27 - SetOpacity = 0,100 - SetX = 1,3 - SetY = 1,-1 - SetOpacity = 1,110 - SetX = 2,6 - SetY = 2,-3 - SetOpacity = 2,140 - SetX = 3,3 - SetOpacity = 3,170 - SetY = 4,-2 - SetOpacity = 4,230 - SetX = 5,-1 - SetY = 5,-5 - SetOpacity = 5,255 - SetX = 6,4 - SetOpacity = 6,233 - - Play = 0,Defense Curl diff --git a/PBS/Animations/Example anims/Move/SCRATCH.txt b/PBS/Animations/Example anims/Move/SCRATCH.txt deleted file mode 100644 index c4cbd7c88..000000000 --- a/PBS/Animations/Example anims/Move/SCRATCH.txt +++ /dev/null @@ -1,30 +0,0 @@ -# See the documentation on the wiki to learn how to edit this file. -#------------------------------- -[Move,SCRATCH] -Name = Example anim - - SetX = 0,0 - SetY = 0,0 - - SetX = 0,0 - SetY = 0,0 - - Graphic = Examples/scratchbattle - Focus = Target - SetX = 1,15 - SetY = 1,-22 - SetZ = 1,27 - SetFrame = 2,1 - SetX = 2,-1 - SetY = 2,-6 - SetFrame = 3,2 - SetX = 3,-17 - SetY = 3,10 - SetFrame = 4,3 - SetX = 4,-33 - SetY = 4,26 - SetFrame = 5,4 - SetY = 5,42 - SetVisible = 6,false - - Play = 0,Slash10,80 diff --git a/PBS/Animations/Example anims/Move/TAILWHIP.txt b/PBS/Animations/Example anims/Move/TAILWHIP.txt deleted file mode 100644 index af3ae4238..000000000 --- a/PBS/Animations/Example anims/Move/TAILWHIP.txt +++ /dev/null @@ -1,36 +0,0 @@ -# See the documentation on the wiki to learn how to edit this file. -#------------------------------- -[Move,TAILWHIP] -Name = Example anim - - SetX = 0,0 - SetY = 0,0 - SetX = 1,21 - SetY = 1,3 - SetX = 2,40 - SetY = 2,11 - SetX = 3,15 - SetY = 3,14 - SetX = 4,-21 - SetX = 5,-44 - SetY = 5,6 - SetX = 6,-22 - SetY = 6,4 - SetX = 7,0 - SetY = 7,0 - SetX = 9,21 - SetY = 9,3 - SetX = 10,40 - SetY = 10,11 - SetX = 11,15 - SetY = 11,14 - SetX = 12,-21 - SetX = 13,-44 - SetY = 13,6 - SetX = 14,-22 - SetY = 14,4 - SetX = 15,0 - SetY = 15,0 - - SetX = 0,0 - SetY = 0,0 diff --git a/PBS/Animations/Normal/Defense Curl.txt b/PBS/Animations/Normal/Defense Curl.txt new file mode 100644 index 000000000..71e49be55 --- /dev/null +++ b/PBS/Animations/Normal/Defense Curl.txt @@ -0,0 +1,40 @@ +# See the documentation on the wiki to learn how to edit this file. +#------------------------------- +[Move,DEFENSECURL] +Name = Essentials +NoTarget = true + + + Graphic = Normal/Defense Curl ball + Focus = User + SetY = 0,32 + SetZ = 0,10 + SetZoomX = 0,250 + SetZoomY = 0,250 + SetOpacity = 0,128 + MoveZoomX = 0,3,150 + MoveZoomY = 0,3,150 + SetOpacity = 5,255 + MoveZoomX = 9,4,300 + MoveZoomY = 9,4,300 + MoveOpacity = 9,4,0 + SetVisible = 13,false + + Graphic = Normal/Defense Curl swish + Focus = User + SetY = 7,32 + SetZ = 7,5 + SetZoomX = 7,90 + SetZoomY = 7,90 + SetAngle = 7,90 + SetOpacity = 7,160 + MoveAngle = 7,10,810 + SetColorRed = 12,160 + SetColorGreen = 12,160 + SetColorBlue = 12,248 + SetColorAlpha = 12,255 + MoveZoomX = 12,5,130 + MoveZoomY = 12,5,130 + MoveOpacity = 16,1,0 + + Play = 0,Normal/Defense Curl diff --git a/PBS/Animations/Normal/Scratch.txt b/PBS/Animations/Normal/Scratch.txt new file mode 100644 index 000000000..673538367 --- /dev/null +++ b/PBS/Animations/Normal/Scratch.txt @@ -0,0 +1,319 @@ +# See the documentation on the wiki to learn how to edit this file. +#------------------------------- +[Move,SCRATCH] +Name = Essentials + + + FoeInvertX = true + MoveX = 0,1,-2 + MoveX = 1,2,2 + MoveX = 3,2,-2 + MoveX = 5,2,2 + MoveX = 7,1,0 + + Graphic = Normal/Scratch marks + Focus = Target + SetX = 0,51 + SetY = 0,-102 + SetZ = 0,30 + SetZoomX = 0,75 + SetAngle = 0,150 + SetOpacity = 0,0 + SetColorRed = 0,248 + SetColorGreen = 0,248 + SetColorAlpha = 0,255 + MoveOpacity = 0,1,255 + MoveX = 0,3,-44 + MoveY = 0,3,60 + MoveColorGreen = 2,1,144 + MoveOpacity = 2,5,0 + SetVisible = 7,false + + Graphic = Normal/Scratch marks + Focus = Target + SetX = 1,19 + SetY = 1,-50 + SetZ = 1,25 + SetZoomX = 1,75 + SetAngle = 1,150 + SetOpacity = 1,128 + SetColorRed = 1,248 + SetColorGreen = 1,248 + SetColorAlpha = 1,255 + MoveOpacity = 1,7,0 + SetVisible = 8,false + + Graphic = Normal/Scratch marks + Focus = Target + SetX = 2,-12 + SetY = 2,6 + SetZ = 2,25 + SetZoomX = 2,75 + SetAngle = 2,150 + SetOpacity = 2,128 + SetColorRed = 2,248 + SetColorGreen = 2,248 + SetColorAlpha = 2,255 + MoveOpacity = 2,7,0 + SetVisible = 9,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 0,-11 + SetY = 0,-17 + SetZ = 0,5 + SetZoomX = 0,40 + SetZoomY = 0,40 + SetOpacity = 0,0 + SetColorRed = 0,248 + SetColorGreen = 0,248 + SetColorBlue = 0,128 + SetColorAlpha = 0,255 + MoveOpacity = 0,1,255 + MoveX = 0,13,-57 + MoveY = 0,13,-54,EaseOut + MoveZoomX = 4,9,0 + MoveZoomY = 4,9,0 + MoveOpacity = 4,9,0 + MoveColorGreen = 4,9,96,EaseOut + MoveColorBlue = 4,9,32,EaseOut + SetVisible = 13,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 1,-3 + SetY = 1,-24 + SetZ = 1,5 + SetZoomX = 1,40 + SetZoomY = 1,40 + SetOpacity = 1,0 + SetColorRed = 1,248 + SetColorGreen = 1,248 + SetColorBlue = 1,128 + SetColorAlpha = 1,255 + MoveOpacity = 1,1,255 + MoveX = 1,13,-40 + MoveY = 1,13,-116,EaseOut + MoveZoomX = 5,9,0 + MoveZoomY = 5,9,0 + MoveOpacity = 5,9,0 + MoveColorGreen = 5,9,96,EaseOut + MoveColorBlue = 5,9,32,EaseOut + SetVisible = 14,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 2,8 + SetY = 2,-7 + SetZ = 2,5 + SetZoomX = 2,40 + SetZoomY = 2,40 + SetOpacity = 2,0 + SetColorRed = 2,248 + SetColorGreen = 2,248 + SetColorBlue = 2,128 + SetColorAlpha = 2,255 + MoveOpacity = 2,1,255 + MoveX = 2,13,-1 + MoveY = 2,13,-94,EaseOut + MoveZoomX = 6,9,0 + MoveZoomY = 6,9,0 + MoveOpacity = 6,9,0 + MoveColorGreen = 6,9,96,EaseOut + MoveColorBlue = 6,9,32,EaseOut + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 1,7 + SetY = 1,-6 + SetZ = 1,5 + SetZoomX = 1,40 + SetZoomY = 1,40 + SetOpacity = 1,0 + SetColorRed = 1,248 + SetColorGreen = 1,248 + SetColorBlue = 1,128 + SetColorAlpha = 1,255 + MoveOpacity = 1,1,255 + MoveX = 1,13,50 + MoveY = 1,13,-106,EaseOut + MoveZoomX = 5,9,0 + MoveZoomY = 5,9,0 + MoveOpacity = 5,9,0 + MoveColorGreen = 5,9,96,EaseOut + MoveColorBlue = 5,9,32,EaseOut + SetVisible = 14,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 2,25 + SetY = 2,-4 + SetZ = 2,5 + SetZoomX = 2,40 + SetZoomY = 2,40 + SetOpacity = 2,0 + SetColorRed = 2,248 + SetColorGreen = 2,248 + SetColorBlue = 2,128 + SetColorAlpha = 2,255 + MoveOpacity = 2,1,255 + MoveX = 2,13,78 + MoveY = 2,13,-28,EaseOut + MoveZoomX = 6,9,0 + MoveZoomY = 6,9,0 + MoveOpacity = 6,9,0 + MoveColorGreen = 6,9,96,EaseOut + MoveColorBlue = 6,9,32,EaseOut + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 0,18 + SetY = 0,-9 + SetZ = 0,5 + SetZoomX = 0,40 + SetZoomY = 0,40 + SetOpacity = 0,0 + SetColorRed = 0,248 + SetColorGreen = 0,248 + SetColorBlue = 0,128 + SetColorAlpha = 0,255 + MoveOpacity = 0,1,255 + MoveX = 0,13,117 + MoveY = 0,13,-77,EaseOut + MoveZoomX = 4,9,0 + MoveZoomY = 4,9,0 + MoveOpacity = 4,9,0 + MoveColorGreen = 4,9,96,EaseOut + MoveColorBlue = 4,9,32,EaseOut + SetVisible = 13,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 2,-3 + SetY = 2,-5 + SetZ = 2,5 + SetZoomX = 2,40 + SetZoomY = 2,40 + SetOpacity = 2,0 + SetColorRed = 2,248 + SetColorGreen = 2,248 + SetColorBlue = 2,128 + SetColorAlpha = 2,255 + MoveOpacity = 2,1,255 + MoveX = 2,13,-112 + MoveY = 2,13,-26,EaseOut + MoveZoomX = 6,9,0 + MoveZoomY = 6,9,0 + MoveOpacity = 6,9,0 + MoveColorGreen = 6,9,96,EaseOut + MoveColorBlue = 6,9,32,EaseOut + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 0,21 + SetY = 0,4 + SetZ = 0,5 + SetZoomX = 0,40 + SetZoomY = 0,40 + SetOpacity = 0,0 + SetColorRed = 0,248 + SetColorGreen = 0,248 + SetColorBlue = 0,128 + SetColorAlpha = 0,255 + MoveOpacity = 0,1,255 + MoveX = 0,13,93 + MoveY = 0,13,40,EaseIn + MoveZoomX = 4,9,0 + MoveZoomY = 4,9,0 + MoveOpacity = 4,9,0 + MoveColorGreen = 4,9,96,EaseOut + MoveColorBlue = 4,9,32,EaseOut + SetVisible = 13,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 2,-7 + SetY = 2,4 + SetZ = 2,5 + SetZoomX = 2,40 + SetZoomY = 2,40 + SetOpacity = 2,0 + SetColorRed = 2,248 + SetColorGreen = 2,248 + SetColorBlue = 2,128 + SetColorAlpha = 2,255 + MoveOpacity = 2,1,255 + MoveX = 2,13,-63 + MoveY = 2,13,43,EaseIn + MoveZoomX = 6,9,0 + MoveZoomY = 6,9,0 + MoveOpacity = 6,9,0 + MoveColorGreen = 6,9,96,EaseOut + MoveColorBlue = 6,9,32,EaseOut + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 1,-1 + SetY = 1,3 + SetZ = 1,5 + SetZoomX = 1,40 + SetZoomY = 1,40 + SetOpacity = 1,0 + SetColorRed = 1,248 + SetColorGreen = 1,248 + SetColorBlue = 1,128 + SetColorAlpha = 1,255 + MoveOpacity = 1,1,255 + MoveX = 1,13,47 + MoveY = 1,13,58,EaseIn + MoveZoomX = 5,9,0 + MoveZoomY = 5,9,0 + MoveOpacity = 5,9,0 + MoveColorGreen = 5,9,96,EaseOut + MoveColorBlue = 5,9,32,EaseOut + SetVisible = 14,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 0,10 + SetY = 0,-4 + SetZ = 0,5 + SetZoomX = 0,40 + SetZoomY = 0,40 + SetOpacity = 0,0 + SetColorRed = 0,248 + SetColorGreen = 0,248 + SetColorBlue = 0,128 + SetColorAlpha = 0,255 + MoveOpacity = 0,1,255 + MoveX = 0,13,66 + MoveY = 0,13,11,EaseIn + MoveZoomX = 4,9,0 + MoveZoomY = 4,9,0 + MoveOpacity = 4,9,0 + MoveColorGreen = 4,9,96,EaseOut + MoveColorBlue = 4,9,32,EaseOut + SetVisible = 13,false + + Graphic = Normal/Scratch spark + Focus = Target + SetX = 2,4 + SetY = 2,-2 + SetZ = 2,5 + SetZoomX = 2,40 + SetZoomY = 2,40 + SetOpacity = 2,0 + SetColorRed = 2,248 + SetColorGreen = 2,248 + SetColorBlue = 2,128 + SetColorAlpha = 2,255 + MoveOpacity = 2,1,255 + MoveX = 2,13,8 + MoveY = 2,13,80,EaseIn + MoveZoomX = 6,9,0 + MoveZoomY = 6,9,0 + MoveOpacity = 6,9,0 + MoveColorGreen = 6,9,96,EaseOut + MoveColorBlue = 6,9,32,EaseOut + + Play = 0,Normal/Scratch diff --git a/PBS/Animations/Normal/Tackle.txt b/PBS/Animations/Normal/Tackle.txt index cbf20ffeb..d69447b50 100644 --- a/PBS/Animations/Normal/Tackle.txt +++ b/PBS/Animations/Normal/Tackle.txt @@ -190,3 +190,4 @@ Name = Essentials MoveColorGreen = 9,9,96,EaseOut MoveColorBlue = 9,9,32,EaseOut + Play = 4,Normal/Tackle diff --git a/PBS/Animations/Normal/Tail Whip.txt b/PBS/Animations/Normal/Tail Whip.txt new file mode 100644 index 000000000..fccf6fa2b --- /dev/null +++ b/PBS/Animations/Normal/Tail Whip.txt @@ -0,0 +1,24 @@ +# See the documentation on the wiki to learn how to edit this file. +#------------------------------- +[Move,TAILWHIP] +Name = Essentials +NoTarget = true + + MoveX = 0,2,32,EaseOut + MoveY = 0,2,16,EaseIn + MoveX = 2,2,0,EaseIn + MoveY = 2,2,24,EaseOut + MoveX = 4,2,-32,EaseOut + MoveY = 4,2,16,EaseIn + MoveX = 6,2,0,EaseIn + MoveY = 6,2,0,EaseOut + MoveX = 10,2,32,EaseOut + MoveY = 10,2,16,EaseIn + MoveX = 12,2,0,EaseIn + MoveY = 12,2,24,EaseOut + MoveX = 14,2,-32,EaseOut + MoveY = 14,2,16,EaseIn + MoveX = 16,2,0,EaseIn + MoveY = 16,2,0,EaseOut + + Play = 0,Normal/Tail Whip