Jens009 "Cut in" Skill Animation, Show Picture when Skill is activated |
|
|
|
|
Aug 7 2008, 10:12 PM
|

L Did you know? Death gods... only eat apples

Group: +Gold Member
Posts: 2,976
Type: Scripter
RM Skill: Skilled

|
Cut In Skill Animation Version 1.1 Author Jens009 Release Date: August 7, 2008 UPDATE: August 8, 2008. Verison 1.1 released Exclusive Script at RPG RPG RevolutionIntroductionSo I was at the request forum once again. I came across link's topic about Cut in from the RPG Tanketai Battle System(found here http://rpgex.sakura.ne.jp/home/ ). Now the problem was, link didn't want the whole script but rather just the "cut in" that shows a picture when a skill is activated. So I took the time to read through the script ( What a pain it was because it was Japanese translated by mbub and kylock) and finally figured it out. It wasn't easy taking this one small feature out of such a massive script. But hey, here it is. Here's a Sample Screenshot: Features- Set starting x, y and ending x,y - Add Sound Effects - Set priorities Version 1.1 - No need to set up cutin_wait - Bug fix for bad value range for duration (This error happens because the picture gets disposed while the wait frame is still going) ScriptCODE #============================================================ # Jens009's Cut-In Animation # Version 1.1 # - base from Tanketai SBS http://rpgex.sakura.ne.jp/home/ # Log: # Verison 1.1 # - Removed Wait Frames. # Changed Waiting command to a loop that waits for a cut_in flag # # Special Credits to: Kylock and Mbub # 1.0 Release Date: August 7, 2008 # 1.1 Release Date: August 8, 2008 # # Description: Shows a Battle Cut-In when certain skills are activated # Features: # Set Starting Point(x,y) and Ending point (x,y) # Enable Sound Effects # # How to use: # Step 1: # # First, go to module JENS009_ANIMATION # You have to define your animation here and add the necessary information in # each definition. # The template for the list is: # ANIMATION_NAME = [Start x, Start y, End x, End y, Time, Priority, # File name, Sound, Sound file name] # Start x - Starting X of Picture When Shown # Start y - Starting Y of picture when Shown # Ending x - Ending X of Picture when Shown # Ending x - Ending Y of Picture when Shown # Time- # of Frames before Picture is removed # Priority- true/false, True is above everything, false is below windows # File Name- Picture File Name found in Graphics/Pictures # Sound- true/false, When true, play sound file name. When false, don't play # anything. # Sound File Name- File Name of Sound effect. Only place something here if s # sound is true # Step 2: # # Press Ctrl F and find SkillCheck # 1. Copy and paste these lines: # when 1 # return @spriteset.call_picture(JENS009_ANIMATION::TEST) # 2.Change the 1 to the skill id of your choice # 3.and Change TEST to the name of the animation you want to play from # JENS009_ANIMATION module # # You're all set #=========================================================================
module JENS009_ANIMATION # Template #NAME = [Start x, Start y, End x, End y, Time, High Priority, File Name, #Play sound, Sound File name] TEST = [0, -15, 0, -100, 80, false, "sky-cut", true, "Absorb1"] TEST_TWO= [0, -15, 0, -100, 50, false, "rutee-cutin", false] end
#======================================== # Game_Temp Edit # Add attr_accessor :cut_in # Cut In flag. #========================================= class Game_Temp attr_accessor :cut_in alias jens009_initialize_cut_in initialize def initialize @cut_in = false jens009_initialize_cut_in end end
class Scene_Battle < Scene_Base #===================================== # Scene_Battle Edit #==================================== #==================================== # Define cutin_skill_check # Description: Checks the skill id of activated skill # if the skill id is present, play the cut in #------------------------------------ # SKILL CHECK #==================================== def cutin_skill_check(skill_id) case skill_id when 1 return @spriteset.call_picture(JENS009_ANIMATION::TEST) when 2 return @spriteset.call_picture(JENS009_ANIMATION::TEST_TWO) end end #==================================== # Define cutin_wait(skill_id) # Description: waits for x amount of frames depending on the value #------------------------------------- # CUTIN_WAIT #=====================================
#================================================= #================================================= # Define Wait For Picture Animation # Continuous loop until cut in flag is false #================================================== def wait_pic while $game_temp.cut_in == true update_basic break if $game_temp.cut_in == false end end
# Start Scene_Battle Method Edits alias jens009_add_cutin_execute_action_skill execute_action_skill #================================================ # define execute_action_skill #========================================== def execute_action_skill skill = @active_battler.action.skill # Call Skill @help_window = Window_Help.new @help_window.set_text(skill.name) text = "Special!" @message_window.add_instant_text(text) cutin_skill_check(skill.id) #Find Skill id #wait_pic(cutin_wait(skill.id)) # Wait Until Cut in is finished. if $game_temp.cut_in == true wait_pic end jens009_add_cutin_execute_action_skill # Call Original Method @help_window.dispose end # End of Method Edit #================================================
end
#================================================= # Spriteset_Battle edit #================================================ class Spriteset_Battle #================================================= # Start method Edit #================================================= alias jens009_create_pictures create_pictures #================================================== # Initialize Values #=================================================== def create_pictures @picture_time = 0 jens009_create_pictures end
#================================================= # Start Adding new methods #================================================== def call_picture(cutin) @picture = Sprite.new # Picture Starting X and Y pic_x = cutin[0] pic_y = cutin[1] # Picture Ending X and Y pic_end_x = cutin[2] pic_end_y = cutin[3] @picture_time = cutin[4] # Picture Moving Rate by Time @moving_pic_x = (pic_end_x - pic_x)/ @picture_time @moving_pic_y = (pic_end_y - pic_y)/ @picture_time # Picture x and y increase by time plus_x = (pic_end_x - pic_x)% @picture_time plus_y = (pic_end_y - pic_y)% @picture_time # Get Picture @picture.bitmap = Cache.picture(cutin[6]) @picture.x = pic_x + plus_x @picture.y = pic_y + plus_y # Picture's z (priority) @picture.z = 1 # If High Priority, Show picture above everything else @picture.z = 1000 if cutin[5] @picture.visible = true # If Sound is true if cutin[7] == true # Play Sound Effect Audio.se_play("Audio/SE/" + cutin[8]) $game_temp.cut_in = true end end #========================== # update Method edit #========================= alias jens009_update_picture update def update jens009_update_picture update_cut_in if @picture_time > 0 end #======================== # Add new update method #====================== def update_cut_in # Decrease Time @picture_time -= 1 # Move Picture @picture.x += @moving_pic_x @picture.y += @moving_pic_y # If time = 0, dispose of picture if @picture_time == 0 @picture.dispose $game_temp.cut_in = false end end #===================== # End Method Edits #==================== end #=================== # End Class Edit #================ CODE #============================================================ # Jens009's Cut-In Animation # Version 1.0 # - base from Tanketai SBS http://rpgex.sakura.ne.jp/home/ # Special Credits to: Kylock and Mbub # Release Date: August 7, 2008 # Description: Shows a Battle Cut-In when certain skills are activated # Features: # Set Starting Point(x,y) and Ending point (x,y) # Enable Sound Effects # # How to use: # Step 1: # # First, go to module JENS009_ANIMATION # You have to define your animation here and add the necessary information in # each definition. # The template for the list is: # ANIMATION_NAME = [Start x, Start y, End x, End y, Time, Priority, # File name, Sound, Sound file name] # Start x - Starting X of Picture When Shown # Start y - Starting Y of picture when Shown # Ending x - Ending X of Picture when Shown # Ending x - Ending Y of Picture when Shown # Time- # of Frames before Picture is removed # Priority- true/false, True is above everything, false is below windows # File Name- Picture File Name found in Graphics/Pictures # Sound- true/false, When true, play sound file name. When false, don't play # anything. # Sound File Name- File Name of Sound effect. Only place something here if s # sound is true # Step 2: # # Press Ctrl F and find SkillCheck # 1. Copy and paste these lines: # when 1 # return @spriteset.call_picture(JENS009_ANIMATION::TEST) # 2.Change the 1 to the skill id of your choice # 3.and Change TEST to the name of the animation you want to play from # JENS009_ANIMATION module # # Step 3: # # Press Ctrl F and find CUTIN_WAIT # 1. Copy and Paste these lines: # when 1 # return JENS009_ANIMATION::TEST[4] # 2. Change 1 to skill id of your choice # 3. change TEST to animation name of your choice # IMPORTANT: Don't change the number 4 # # You're all set. #=========================================================================
module JENS009_ANIMATION # Template #NAME = [Start x, Start y, End x, End y, Time, High Priority, File Name, #Play sound, Sound File name] TEST = [0, -15, 0, -100, 80, false, "sky-cut", true, "Absorb1"] TEST_TWO= [0, -15, 0, -100, 50, false, "rutee-cutin", false] end
class Scene_Battle < Scene_Base #===================================== # Scene_Battle Edit #==================================== #==================================== # Define cutin_skill_check # Description: Checks the skill id of activated skill # if the skill id is present, play the cut in #------------------------------------ # SKILL CHECK #==================================== def cutin_skill_check(skill_id) case skill_id when 1 return @spriteset.call_picture(JENS009_ANIMATION::TEST) when 2 return @spriteset.call_picture(JENS009_ANIMATION::TEST_TWO) end end #==================================== # Define cutin_wait(skill_id) # Description: waits for x amount of frames depending on the value #------------------------------------- # CUTIN_WAIT #===================================== def cutin_wait(skill_id) case skill_id when 1 return JENS009_ANIMATION::TEST[4] when 2 return JENS009_ANIMATION::TEST_TWO[4] end end #================================================= #=================================================
# Start Scene_Battle Method Edits alias jens009_add_cutin_execute_action_skill execute_action_skill #================================================ # define execute_action_skill #========================================== def execute_action_skill skill = @active_battler.action.skill # Call Skill @help_window = Window_Help.new @help_window.set_text(skill.name) text = "Special!" @message_window.add_instant_text(text) cutin_skill_check(skill.id) #Find Skill id wait(cutin_wait(skill.id)) # Wait Until Cut in is finished. jens009_add_cutin_execute_action_skill # Call Original Method @help_window.dispose end # End of Method Edit #================================================
end
#================================================= # Spriteset_Battle edit #================================================ class Spriteset_Battle #================================================= # Start method Edit #================================================= alias jens009_create_pictures create_pictures #================================================== # Initialize Values #=================================================== def create_pictures @picture_time = 0 jens009_create_pictures end
#================================================= # Start Adding new methods #================================================== def call_picture(cutin) @picture = Sprite.new # Picture Starting X and Y pic_x = cutin[0] pic_y = cutin[1] # Picture Ending X and Y pic_end_x = cutin[2] pic_end_y = cutin[3] @picture_time = cutin[4] # Picture Moving Rate by Time @moving_pic_x = (pic_end_x - pic_x)/ @picture_time @moving_pic_y = (pic_end_y - pic_y)/ @picture_time # Picture x and y increase by time plus_x = (pic_end_x - pic_x)% @picture_time plus_y = (pic_end_y - pic_y)% @picture_time # Get Picture @picture.bitmap = Cache.picture(cutin[6]) @picture.x = pic_x + plus_x @picture.y = pic_y + plus_y # Picture's z (priority) @picture.z = 1 # If High Priority, Show picture above everything else @picture.z = 1000 if cutin[5] @picture.visible = true # If Sound is true if cutin[7] == true # Play Sound Effect Audio.se_play("Audio/SE/" + cutin[8]) end end #========================== # update Method edit #========================= alias jens009_update_picture update def update jens009_update_picture update_cut_in if @picture_time > 0 end #======================== # Add new update method #====================== def update_cut_in # Decrease Time @picture_time -= 1 # Move Picture @picture.x += @moving_pic_x @picture.y += @moving_pic_y # If time = 0, dispose of picture if @picture_time == 0 @picture.dispose end end #===================== # End Method Edits #==================== end #=================== # End Class Edit #================ CustomizationRefer to the script for instructions CompatibilityShould be compatible for all battle systems. ScreenshotJens009 uses Dual Attack!!! DEMOVersion 1.0 http://files.filefront.com/Cut+In+script2z...;/fileinfo.htmlInstallationPaste below materials follow instructions FAQThere's a bug! -Post it up I have a suggestion! -Post it up Terms and ConditionsRRR Exclusive Not for commercial use unless I'm contacted Give Credits CreditsJens009- Reverse Scripting, Translation, and Implementation http://rpgex.sakura.ne.jp/home/ - Script Basis Mbub - Script Translation Help Kylock- Translation Help
__________________________
My RMXP Project:  Farewell RRR. =]
|
|
|
|
|
|
|
|
 |
Replies
|
|
Nov 29 2008, 07:57 PM
|

Level 8

Group: Revolutionary
Posts: 127
Type: Event Designer
RM Skill: Skilled

|
Just want to point out one thing. I noticed that this is not compatible with the SBS Tankentai. I see that this script utilizes battle message function (the "special" text that appears during cut in animation) while SBS tankentai disable battle message function.
I had to erase Line 127-130 & Line 137 to make it work with it.
EDIT:oh, one more thing. Is there a way to add delay between the cut-in animation and the skill activation? I mean, let the cut-in image scroll finished, before the skill sequence begins? Because based on my experience, the picture blocked almost half of the battle screen and covered the skill sequence animation.
__________________________
 PeaceOut, ChrisKay
|
|
|
|
|
|
|
Posts in this topic
jens009 Jens009 "Cut in" Skill Animation Aug 7 2008, 10:12 PM Ghost Prototype This is very interesting. I might consider using t... Aug 7 2008, 11:52 PM Kaiterra Hey, that's pretty neat. Aug 8 2008, 01:47 AM GunZz Can you tell me how big must be the picture ? Aug 8 2008, 03:00 AM mbub Nice job.
BTW, Tankentai SBS script wasn't... Aug 8 2008, 04:02 AM jens009 QUOTE (mbub @ Aug 8 2008, 04:24 AM) Nice ... Aug 8 2008, 10:24 AM  mbub QUOTE (jens009 @ Aug 8 2008, 10:46 AM) Ah... Aug 8 2008, 05:31 PM Fade A very handy script. I can use this to show some ... Aug 8 2008, 05:32 AM jens009 @mbub: First post is updated. Credits were given w... Aug 8 2008, 06:25 PM link245 Thanks jens009 looks like you came through for me ... Aug 8 2008, 10:31 PM jens009 @Link:
The new version is up and it's much be... Aug 8 2008, 11:36 PM de_lhemots Wow.....!!!
It's looks a lot more ... Aug 9 2008, 06:33 AM link245 Thanks for the update bro it made things a lot sim... Aug 9 2008, 09:23 AM GunZz Uhh Hello can you tell me about the size of the pi... Aug 9 2008, 01:39 PM jens009 QUOTE (GunZz @ Aug 9 2008, 02:01 PM) Uhh... Aug 9 2008, 01:42 PM link245 One thing i did notice is that if I use any skill ... Aug 9 2008, 09:39 PM jens009 QUOTE (link245 @ Aug 9 2008, 10:01 PM) On... Aug 9 2008, 09:41 PM link245 Oh sorry i didn't know it was intentional. I t... Aug 9 2008, 09:58 PM jens009 QUOTE Edit: If I may make a suggestion. Maybe you ... Aug 11 2008, 02:58 PM jens009 QUOTE Just want to point out one thing.
I noticed ... Nov 30 2008, 05:47 PM chriskay Hmm. that's weird
In my case, the skill seque... Dec 1 2008, 04:18 AM jens009 Nothing is wrong with the module. So the problem e... Dec 1 2008, 11:09 PM TalesOf_Fantasy can the picture shake after it shows in the screen... Jan 31 2009, 12:38 AM silvershadic I get this error
Script 'Window Base' lin... Mar 13 2009, 04:40 PM rpgmakermaster The download link doesn't work can you put it ... Jun 12 2009, 03:25 PM rgangsta Perfect for my Bankai skill! Sweet! Jun 12 2009, 04:16 PM rpgmakermaster rgangsta how could you download it i cant Jun 12 2009, 06:18 PM rgangsta I can't download. Jun 13 2009, 08:11 AM jens009 QUOTE (TalesOf_Fantasy @ Jan 31 2009, 01... Jun 19 2009, 04:42 PM Senpuu Hi! I'm using this with claimh's RPG T... Mar 7 2010, 08:47 PM jens009 QUOTE (Senpuu @ Mar 7 2010, 08:47 PM) Hi... Mar 11 2010, 08:44 PM Senpuu Oh I see! I'll check the script then. Thx ... Mar 14 2010, 12:40 PM fei Script 'Sideview 2 (3.3d) ' line 909: RGSS... Apr 9 2010, 09:51 AM Kread-EX If you had bothered to read the posts above yours,... Apr 9 2010, 11:30 AM manat31790 Please tell me how do I pause the image at End x/y... May 4 2010, 10:36 PM  jens009 QUOTE (manat31790 @ May 4 2010, 11:36 PM)... May 8 2010, 07:37 PM   Alt_Jack I'm trying to understand how cut-ins work (ter... May 16 2010, 05:48 PM ASCIIgod Dload site dead. can you post another? or just ans... Jul 3 2010, 03:50 AM jens009 QUOTE (ASCIIgod @ Jul 3 2010, 04:50 AM) D... Jul 4 2010, 01:35 AM Tsunar Ive got a few questions
how exactly does this wor... Jul 4 2010, 12:59 PM jens009 QUOTE (Tsunar @ Jul 4 2010, 01:59 PM) Ive... Jul 6 2010, 02:40 PM  ASCIIgod QUOTE (jens009 @ Jul 7 2010, 07:40 AM) QU... Jul 8 2010, 12:36 AM   Shu QUOTE hey pal you havent answered mine..... just a... Jul 8 2010, 12:42 AM Tsunar 3 questions?
Is it possible to select what skills... Jul 5 2010, 05:52 PM LordHeinrich [Show/Hide] Didn't see that it was already ans... Jul 8 2010, 12:48 AM ASCIIgod QUOTE (LordHeinrich @ Jul 8 2010, 05:48 P... Jul 8 2010, 04:10 AM asforever link 4 demo is not working Jul 14 2011, 03:57 PM
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|