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. =]
|
|
|
|
|
|
|
3 Pages
1 2 3 >
|
 |
Replies
(1 - 19)
|
|
Aug 8 2008, 04:02 AM
|

If I see one more Face Maker avatar...

Group: Revolutionary
Posts: 599
Type: Developer
RM Skill: Intermediate

|
Nice job. BTW, Tankentai SBS script wasn't created by Kylock. It was created by the guy from this site ( http://rpgex.sakura.ne.jp/home/ ). I think his name is Sozai. Kylock and I only translated it.
This post has been edited by mbub: Aug 8 2008, 04:06 AM
|
|
|
|
|
|
|
|
|
Aug 8 2008, 10:24 AM
|

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

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

|
QUOTE (mbub @ Aug 8 2008, 04:24 AM)  Nice job. BTW, Tankentai SBS script wasn't created by Kylock. It was created by the guy from this site ( http://rpgex.sakura.ne.jp/home/ ). I think his name is Sozai. Kylock and I only translated it. Ah I see. Well I should still add your name and kylock's for translating it. Part of the reason why I was able to do this was because of your translation. By any chance, do you know the guy's name? I don't want to rip off his script by not giving proper credit. @Everyone else: Thanks for the comments. I'm open for suggestions to improve on it. =] I also think this is still compatible with the Tanketai SBS. Although there's no point using it if you already have the cut in feature. XD
__________________________
My RMXP Project:  Farewell RRR. =]
|
|
|
|
|
|
|
|
|
Aug 8 2008, 05:31 PM
|

If I see one more Face Maker avatar...

Group: Revolutionary
Posts: 599
Type: Developer
RM Skill: Intermediate

|
QUOTE (jens009 @ Aug 8 2008, 10:46 AM)  Ah I see. Well I should still add your name and kylock's for translating it. Part of the reason why I was able to do this was because of your translation. By any chance, do you know the guy's name? I don't want to rip off his script by not giving proper credit. I haven't been able to find out what the creator's name is for sure, but I do wish I did. I think a link to his website should be enough, I think.
|
|
|
|
|
|
|
|
|
Aug 9 2008, 06:33 AM
|

Level 1

Group: Member
Posts: 5
Type: Artist
RM Skill: Beginner

|
Wow.....!!! It's looks a lot more better than kylock cut in skill !? Keep it up, man !!! ====== To : Kylock ====== No offense, dude You did a great job too ! ====================== I'll put your name on the credits !
|
|
|
|
|
|
|
|
|
Aug 9 2008, 09:41 PM
|

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

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

|
QUOTE (link245 @ Aug 9 2008, 10:01 PM)  One thing i did notice is that if I use any skill it would still say "special" in the info window. I think its a bug. Oh yeah.. I thought it'd be nice to say special over there. XD I forgot to add an if statement for that. But for now, you can just delete the that text.
__________________________
My RMXP Project:  Farewell RRR. =]
|
|
|
|
|
|
|
|
|
Aug 11 2008, 02:58 PM
|

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

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

|
QUOTE Edit: If I may make a suggestion. Maybe you should put it so that it only says "special" when you actually use the attack. I told you, I forgot to add another if statement for that. But there's a quick fix for it. change CODE 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 to CODE def execute_action_skill skill = @active_battler.action.skill # Call Skill @help_window = Window_Help.new @help_window.set_text(skill.name) 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 text = "Special!" @message_window.add_instant_text(text) wait_pic end jens009_add_cutin_execute_action_skill # Call Original Method @help_window.dispose end # End of Method Edit Noticed that I just moved the code below the if statement. Like I said, the code is optional, you can delete it if you want to.
__________________________
My RMXP Project:  Farewell RRR. =]
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|