Here it is, the little brother of the XP Commands Manager script! This scripting tool deals with general commands such as Menu, Party and Actor commands. It helps modifying these commands without having to worry about their index in the window. NEW: Version 1.5 supports commands substitution based on actor's class ID. Search for
Lettuce's Stat Points Distribution - Requested by Sesune
Notes
An important note: This script overrides the following methods: > Window_PartyCommand initialize > Window_ActorCommand initialize setup > Scene_Menu create_command_window update_command_selection update_actor_selection > Scene_Battle update_party_command_selection update_actor_command_selection This script will be incompatible with any other scripts modifying these methods unless they are based on the Custom Commands script methods.
BE SURE TO PLACE THIS SCRIPT ABOVE EVERY CUSTOM SCRIPTS!
Dargor wrote:
IMPORTANT: I'M NOT TAKING REQUESTS ANYMORE Please, don't ask for another requests. Thank you for your comprehension.
I have it installed and everything, and I was able to add in a custom battle command for actor 2 just under the 'Attack' option (following the scripting demo you provided). Let's say I want to remove that command once it is used, is it possible to do so by calling a common event with some scripting in it, or what exactly would I need to do? And then if I wanted the command to re-appear for the next battle, how should I go about that? I'm figuring I can set a switch with the common event that will auto-run another common event to turn the switch off, and then the command will reappear, but I need to know the syntax I'd need to use, everything I've tried using doesn't work. (I don't script with Ruby much if you couldn't tell. =p)
Anyway, thanks in advance.
EDIT: Never mind, I figured it out through lots of trial and error.
Last edited by Kafei on Tue May 13, 2008 6:03 am, edited 1 time in total.
I'm now taking Custom Battle Commands and Menu Commands requests. When asking for a command, please follow this form:
Name: (name of the command) Type: (menu/battle/both?) Description: (short description) Index: (optional, specify the commands position in the window) Related Scripts: (if another script is needed, specify the name/version/author)
I am sorry if this isn't the exact format you wanted, but I was a bit confused over the name portion. Did you want my name, or did you want me to name the custom menu? Anyways, here is my request. I have been trying to get it myself for the past couple of hours, but I can't figure out how to modify your script easily.
Name: Bestiary Type: Menu Description: Bestiary Index:
#============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs the menu screen processing. #==============================================================================
class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cmcbestiary_menu_create_command_window create_command_window alias dargor_vx_cmcbestiary_menu_update_command_selection update_command_selection #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window commands = $game_system.menu_commands index = commands.index(Vocab::save) $game_system.add_menu_command(index, Vocab::Bestiary) if $game_system.menu_party_changer dargor_vx_cmcbestiary_menu_create_command_window end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection dargor_vx_cmcbestiary_menu_update_command_selection command = @command_window.selection if Input.trigger?(Input::C) Sound.play_decision case @command_window.selection when Vocab::Bestiary $scene = Scene_Bestiary.new(true) end end end end #============================================================================== # ** Scene_Bestiary #------------------------------------------------------------------------------ # This class performs the bestiary screen processing. #==============================================================================
class Scene_Bestiary < Scene_Base #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cmcbestiary_update_list_selection update_list_selection #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(from_menu=false) @from_menu = from_menu end #-------------------------------------------------------------------------- # * Update List Selection #-------------------------------------------------------------------------- def update_list_selection if Input.trigger?(Input::B) Sound.play_cancel if @from_menu index = $game_system.menu_commands.index(Vocab::Bestiary) $scene = Scene_Menu.new(index) else $scene = Scene_Map.new end return end dargor_vx_cmcbestiary_update_list_selection end end
Expand to see the code.
By the way, "Name" is the name of the command that will appear in the window. I'm sure you don't want Game_System (Menu Command) to appear in the command window
Name: Prayer Type: (battle) Description: Well in the jap version it would heal your party members by some ammount... not 100% sure how this ammount was done lol..
other info: if you could is there a way to make it so it chooses from 4-5 different skills? I sorta want to make a couple skills get used with it... like random amounts of healing or just nothing at all... like so if I have 3 skills that heal and 2 that just say your prayers have gone unanswered... I would like it to choose randomly which ones to use that way its not as if it always heals the same...
Index: under attack or 3rd position Related Scripts: none that I know of
_________________ ----------------------------------------------------- I tinker with scripts to learn
# Command name Vocab::Prayer = 'Prayer' Vocab::PrayerFail = "%s's prayer has not been heared..."
# Prayer COmmand Customization Module module CBC_Prayer # Actors with the Prayer command Actors = [1,2] # Random Skills casted Skills = [33,34,35] # Success Rate # SYNTAX: Actor_ID => Rate (percent) Success_Rate = { 1 => 75, 2 => 60, } # ID of the uneffective skill # This skill will NEVER be casted. Uneffective_Skill = 93 end
#============================================================================== # ** Game_Actor #------------------------------------------------------------------------------ # This class handles actors. It's used within the Game_Actors class # ($game_actors) and referenced by the Game_Party class ($game_party). #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cbcprayer_actor_setup setup #-------------------------------------------------------------------------- # * Setup # actor_id : actor ID #-------------------------------------------------------------------------- def setup(actor_id) dargor_vx_cbcprayer_actor_setup(actor_id) # Add battle commands if CBC_Prayer::Actors.include?(@actor_id) # Add 'Prayer' command add_command(2, Vocab::Prayer) end end end
#============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cbcprayer_update_actor_command_selection update_actor_command_selection alias dargor_vx_cbcprayer_execute_action_skill execute_action_skill #-------------------------------------------------------------------------- # * Update Actor Command Selection #-------------------------------------------------------------------------- def update_actor_command_selection dargor_vx_cbcprayer_update_actor_command_selection if Input.trigger?(Input::C) case @actor_command_window.selection when Vocab::Prayer # Prayer Command Sound.play_decision # Prepare to cast Newclear success_rate = rand(100) if success_rate < CBC_Prayer::Success_Rate[@active_battler.id] skill_id = CBC_Prayer::Skills[rand(CBC_Prayer::Skills.size)] else skill_id = CBC_Prayer::Uneffective_Skill end @active_battler.last_skill_id = skill_id @active_battler.action.set_skill(skill_id) # Force the action to be executed @active_battler.action.forcing = true # Switch to next actor next_actor end end end #-------------------------------------------------------------------------- # * Execute Battle Action: Skill #-------------------------------------------------------------------------- def execute_action_skill skill = @active_battler.action.skill if skill.id == CBC_Prayer::Uneffective_Skill text = sprintf(Vocab::PrayerFail, @active_battler.name) @message_window.add_instant_text(text) wait(60) return else dargor_vx_cbcprayer_execute_action_skill end end end
Expand to see the code.
I added a little customization module. You can randomize prayer skills, set the success rate depending on the actor, choose which actor has the Prayer command and more!
so I put this below the command script and add it to party members XD hmm... oh yea is there a way to make it so they have to have a certain (item in inventory) or equiped equipment? Item would be easier but I was actually wandering is it possible to set it based on class? either way works but actually the item/equipment way would work better for me I think
thanks XD I figured since Atemu asked for ff4 skills that I would recommend something about prayer XD
I love that prayer has not been heard haha... what I was originally going to do was set the 2 different skills with failure messages but this works better haha
hmm ok that might not be right lol hmm ok I seem to have screwed up and made themattack skills
So you're using Tankentai's CBS... I don't guaranty compatibility with this CBS because this one overrides a lot of methods... I've designed this script for the Default Battle System.
Name: Darkside Type: Battle Description: An attack that has increased power and hits all enemies but uses up a percentage of the users HP Index: um...in the battle window above Guard Related Scripts:
What's with the FFIV requests? I'd rather see this:
Name: Devour Type: Battle Description: Eats the enemy when their HP is low enough and depending on the enemy the character either regains HP, MP or loses HP, MP or is even inflicted with a negative stat! Related Scripts: I don't think there is a Devour script yet :(
Name: Upgrade Stats Type: Menu Description:I'm trying to get a seperate menu command so that I can use Lettuce's Stat Distribustion Script. Related Script:This One:http://hbgames.org/forums/index.php?topic=46347.0
Thanks for making this when you get the chance. Main reason I need this, I suck at scripting...
#============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs the menu screen processing. #==============================================================================
class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cmcstatsup_menu_create_command_window create_command_window alias dargor_vx_cmcstatsup_menu_update_command_selection update_command_selection #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window commands = $game_system.menu_commands index = commands.index(Vocab::save) $game_system.add_menu_command(index, Vocab::StatsUpgrade) if $game_system.menu_party_changer dargor_vx_cmcstatsup_menu_create_command_window end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection dargor_vx_cmcstatsup_menu_update_command_selection command = @command_window.selection if Input.trigger?(Input::C) Sound.play_decision case @command_window.selection when Vocab::StatsUpgrade $scene = Scene_Stat_Dist.new(0) end end end end
# Darkside Command name Vocab::Darkside = 'Darkside'
# Darkside Command Customization Module module CBC_Darkside # HP cost in percent based on the actor's maxhp HP_Cost = 10 # Skill to be casted Skill = 80 # Actors with the Darkside command Actors = [1,2] end
#============================================================================== # ** Game_Actor #------------------------------------------------------------------------------ # This class handles actors. It's used within the Game_Actors class # ($game_actors) and referenced by the Game_Party class ($game_party). #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cbcdarkside_actor_setup setup #-------------------------------------------------------------------------- # * Setup # actor_id : actor ID #-------------------------------------------------------------------------- def setup(actor_id) dargor_vx_cbcdarkside_actor_setup(actor_id) # Add battle commands if CBC_Darkside::Actors.include?(@actor_id) # Add 'Darkside' command index = @commands.index(Vocab::guard) add_command(index, Vocab::Darkside) end end end
#============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cbcdarkside_update_actor_command_selection update_actor_command_selection alias dargor_vx_cbcdarkside_execute_action_skill execute_action_skill #-------------------------------------------------------------------------- # * Execute Battle Action: Skill #-------------------------------------------------------------------------- def execute_action_skill skill = @active_battler.action.skill # If using Darkside if skill.id == CBC_Darkside::Skill text = @active_battler.name + skill.message1 @message_window.add_instant_text(text) unless skill.message2.empty? wait(10) @message_window.add_instant_text(skill.message2) end targets = @active_battler.action.make_targets display_animation(targets, skill.animation_id) hp_damage = CBC_Darkside::HP_Cost * (@active_battler.maxhp / 100) @active_battler.hp -= hp_damage $game_temp.common_event_id = skill.common_event_id text = sprintf(Vocab::ActorDamage, @active_battler.name, hp_damage) @message_window.add_instant_text(text) for target in targets target.skill_effect(@active_battler, skill) display_action_effects(target, skill) end else dargor_vx_cbcdarkside_execute_action_skill end end #-------------------------------------------------------------------------- # * Update Actor Command Selection #-------------------------------------------------------------------------- def update_actor_command_selection dargor_vx_cbcdarkside_update_actor_command_selection if Input.trigger?(Input::C) case @actor_command_window.selection when Vocab::Darkside # Darkside Command Sound.play_decision # Prepare to cast Darkside skill skill_id = CBC_Darkside::Skill @active_battler.last_skill_id = skill_id @active_battler.action.set_skill(skill_id) # Force the action to be executed @active_battler.action.forcing = true # Switch to next actor next_actor end end end end
# Darkside Command name Vocab::Devour = 'Devour' Vocab::DevourSuccess = '%s devoured %s!' Vocab::DevourFail = '%s failed to devour %s.'
# Darkside Command Customization Module module CBC_Devour # Percentage of HP the enemy must have HP_Rate = 10 # Animation ID Animation_ID = 49 # Actors with the Devour command Actors = [1] # HP Gain # SYNTAX: Enemy_ID => HP_Gain HP_Gain = { 1 => 100, 2 => -25 } # MP Gain # SYNTAX: Enemy_ID => MP_Gain MP_Gain = { 1 => -5, 2 => 25 } # Stats Plus # SYNTAX: Enemy_ID => State_ID State_Plus = { 1 => 2, 2 => 8 } end
#============================================================================== # ** Game_Actor #------------------------------------------------------------------------------ # This class handles actors. It's used within the Game_Actors class # ($game_actors) and referenced by the Game_Party class ($game_party). #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cbcdevour_actor_setup setup #-------------------------------------------------------------------------- # * Setup # actor_id : actor ID #-------------------------------------------------------------------------- def setup(actor_id) dargor_vx_cbcdevour_actor_setup(actor_id) # Add battle commands if CBC_Devour::Actors.include?(@actor_id) # Add 'Devour' command add_command(0, Vocab::Devour) end end end
#============================================================================== # ** Game_BattleAction #------------------------------------------------------------------------------ # This class handles battle actions. This class is used within the # Game_Battler class. #==============================================================================
class Game_BattleAction #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- alias dargor_vx_cbcdevour_action_clear clear #-------------------------------------------------------------------------- # * Clear #-------------------------------------------------------------------------- def clear dargor_vx_cbcdevour_action_clear @devour = false end #-------------------------------------------------------------------------- # * Set Normal Attack #-------------------------------------------------------------------------- def set_devour @kind = 0 @basic = 0 @devour = true end #-------------------------------------------------------------------------- # * Normal Attack Determination #-------------------------------------------------------------------------- def devour? return (@kind == 0 and @basic == 0 and @devour) end end
#============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias dargor_vx_cbcdevour_battle_execute_action_attack execute_action_attack alias dargor_vx_cbcdevour_update_actor_command_selection update_actor_command_selection #-------------------------------------------------------------------------- # * Execute Battle Action: Attack #-------------------------------------------------------------------------- def execute_action_attack if @active_battler.action.devour? actor_name = @active_battler.name targets = @active_battler.action.make_targets for target in targets enemy_name = target.name if target.hp <= ((target.maxhp / 100) * CBC_Devour::HP_Rate) display_animation(targets, CBC_Devour::Animation_ID) text = sprintf(Vocab::DevourSuccess, actor_name, enemy_name) @message_window.add_instant_text(text) wait(40) apply_devour_hp_change(target) apply_devour_mp_change(target) apply_devour_state_change(target) target.add_state(1) target.perform_collapse else text = sprintf(Vocab::DevourFail, actor_name, enemy_name) @message_window.add_instant_text(text) wait(40) end end else dargor_vx_cbcdevour_battle_execute_action_attack end end #-------------------------------------------------------------------------- # * Apply Devour HP Change #-------------------------------------------------------------------------- def apply_devour_hp_change(target) return if CBC_Devour::HP_Gain[target.enemy_id].nil? hp_gain = CBC_Devour::HP_Gain[target.enemy_id] name = @active_battler.name @active_battler.hp += hp_gain if CBC_Devour::HP_Gain[target.enemy_id] > 0 text = sprintf(Vocab::ActorRecovery, name, Vocab::hp, hp_gain) elsif CBC_Devour::HP_Gain[target.enemy_id] < 0 hp_gain = hp_gain.abs text = sprintf(Vocab::ActorDamage, name, hp_gain) end @message_window.add_instant_text(text) wait(40) end #-------------------------------------------------------------------------- # * Apply Devour MP Change #-------------------------------------------------------------------------- def apply_devour_mp_change(target) return if CBC_Devour::MP_Gain[target.enemy_id].nil? mp_gain = CBC_Devour::MP_Gain[target.enemy_id] name = @active_battler.name @active_battler.mp += mp_gain if CBC_Devour::MP_Gain[target.enemy_id] > 0 text = sprintf(Vocab::ActorRecovery, name, Vocab::mp, mp_gain) elsif CBC_Devour::MP_Gain[target.enemy_id] < 0 mp_gain = mp_gain.abs text = sprintf(Vocab::ActorDamage, name, mp_gain) end @message_window.add_instant_text(text) wait(40) end #-------------------------------------------------------------------------- # * Apply Devour State Change #-------------------------------------------------------------------------- def apply_devour_state_change(target) return if CBC_Devour::State_Plus[target.enemy_id].nil? state = $data_states[CBC_Devour::State_Plus[target.enemy_id]] return if state.message1.empty? @active_battler.add_state(state.id) @active_battler.added_states.push(state.id) text = @active_battler.name + state.message1 @message_window.add_instant_text(text) wait(40) end #-------------------------------------------------------------------------- # * Update Actor Command Selection #-------------------------------------------------------------------------- def update_actor_command_selection dargor_vx_cbcdevour_update_actor_command_selection if Input.trigger?(Input::C) case @actor_command_window.selection when Vocab::Devour # Devour Command Sound.play_decision # Prepare the Devour command @active_battler.action.set_devour # Start enemy selection start_target_enemy_selection end end end end
Hi there, I was wondering if you could make a battle script for me. It might be a bit much to ask for, especially the second part, which if it's too complex, can be omitted.
Name: Scan/Sketch Type: Battle Description: This goes hand-in-hand with the Beastiary. Basically, when an actor uses a skill from the skills menu, let's say scan, it'll add the enemy into the Beastiary book instead of just from encountering them in battle and automatically adding them from encountering them, and if possible reveal the monsters Remaining Hp/Mp, weaknesses, and perhaps a little "thought" or message which could be set in the script and could show up in the beastiary as well. (If you've ever played Super Mario RPG, it's sorta of like Mallow's Psychopath skill)
Edit: Oh, I have one more question/request! Sorry if this is pushing it. . . But for your Skill Draw Script, is there any way to have only selected actors have limited skill usage? I seems that if you use it long enough your other team members will run out of skills to use, since it's limited to 99 uses. So basically I'm just asking if theres away to have the Skill Draw Script effect only selected actors, but everybody have unlimited Skill Usage instead of the max of 99 uses like they would normally have on the default battle skill system? And is there away to keep learned skills on the actor unlimited but the skills drawn limited by the number drawn?
Sorry again if it's too much/ confusing . . .
Last edited by Reliez on Fri May 30, 2008 3:29 am, edited 1 time in total.
umm actually for Reliez request would it not be better to ask if he can read the "Thought" from the monsters note information? that way you do not have to change the script for that information and if you want it changed just update it through the notes on the monsters info
_________________ ----------------------------------------------------- I tinker with scripts to learn
umm actually for Reliez request would it not be better to ask if he can read the "Thought" from the monsters note information? that way you do not have to change the script for that information and if you want it changed just update it through the notes on the monsters info
Actually, that would seem a lot better and more manageable to do.
Users browsing this forum: Exabot [Bot] and 3 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum