Aventurier Lv.16
Age : 40 Inscrit le : 03/09/2009 Messages : 1503
| Sujet: [VX] Habilités avancées pour héros Jeu 8 Juil 2010 - 14:21 | |
| Auteur du script: cozziekuns A mettre dans vos crédits Description Bon à l'origine les actors ne pouvaient augmenter les coups critiques, améliorer la défense etc... Maintenant grâce à ce script vous avez en effet de nouvelles options qui peuvent se révéler indispensable Les voici en détailConcentration: Donne un bonus d'exactitude supplémentaire à l'acteur. Halve MP: Réduit la consommation des MP par 2, ne s'accumule pas avec la fonction de l'armure. Immunity: Immunité à tous les états, bons ou mauvais. Monkey Grip: Permet à l'acteur d'équiper une protection(un bouclier) indépendamment de si leur arme est manchote ou à deux mains. Spellbound: Les états resteront en deux fois plus longtemps. Razzle Dazzle: Nom agréable pour Auto-Regen. Unscarred: Quand l'acteur est en pleine santé pleine, l'attaque est augmentée. Adrenaline: Quand l'acteur est en santé critique, la vitesse est augmentée. Burdened Soul: Quand l'acteur est en santé critique, il est abasourdi et tous les HP des membres et les MP sont entièrement récupérés. Vigilance: Quand l'acteur est sur la santé critique, la défense est augmentée. Blood Prince: Les compétences prennent l'HP au lieu des MP. Le script A placer en dessus de Main comme d'hab. - Spoiler:
- Code:
-
#=============================================================================== # # Added Actor Options # Last Date Updated: 6/24/2010 # # Before, there were only six actor options that you could choose from, and they # were a bit dull. The only ones that most people actually used were two swords # style and critical bonus, and even then they were used quite sparingly. I find # that actor options add a lot of variety into the game, so I took it up as my # job to create the best actor options I (and Square Enix, as most of them are # ripped of FFTA2) could think of. # # Note: The best way to use these skills would be with Modern Algebra's Editable # actor options, or with that equipment skill that allowed equipment to have # actor options (whoever wrote that script, contact me so I can credit you # and your script) # # Concentration: Gives the actor an added accuracy bonus. # Halve MP: Halves the MP for all skills. Does not stack with the armour option. # Immunity: Grants immunity to all states, good or bad. # Monkey Grip: Allows the actor to equip a shield regardless of whether their # weapon is one-handed or two-handed. # Spellbound: States will stay in effect for two times as long. # Razzle Dazzle: Nice name for Auto-Regen. # Unscarred: When the actor is on full health, attack is increased. # Adrenaline: When the actor is on critical health, speed is increased. # Burdened Soul: When the actor is on critical health, he is knocked out and all # other party members are fully recovered, # Vigilance: When the actor is on critical health, defense is increased. # Blood Prince: Skills take up HP instead of MP. # #=============================================================================== # Updates # ----------------------------------------------------------------------------- # o 06/24/10 Started script. #=============================================================================== # What's to come? # ----------------------------------------------------------------------------- # o Nothing! Suggest something. #=============================================================================== # Instructions # ----------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below ? Materials but above ? Main. Remember to save. # # To change the modules, follow the correct syntax. For example, if I wanted # Ulrika (who has the actor ID of 2) to have the ability IMMUNITY, I would # scroll down to the line with immunity and place her ID in the brackets. Or, # essentially: # # IMMUNITY = [2] #===============================================================================
$imported = {} if $imported == nil $imported["CozAddedActorOptions"] = true
module COZZIEKUNS module AAO # Syntax: Option = [Actor ID's] CONCENTRAITON = [1] HALVE_MP = [] IMMUNITY = [] MONKEY_GRIP = [] SPELLBOUND = [] RAZZLE_DAZZLE = [] UNSCARRED = [] ADRENAILINE = [] BURDENED_SOUL = [] VIGILANCE = [] BLOOD_PRINCE = [] CONCENTRATION_VARIABLE = 5 RAZZLE_DAZZLE_WAIT = 90 RAZZLE_DAZZLE_MESSAGE = "'s HP was restored by a bit!" UNSCARRED_VARIABLE = 150 ADRENAILINE_VARIABLE = 150 BURDENED_SOUL_WAIT = 90 BURDENED_SOUL_MESSAGE = "'s soul was released!" CRITICAL_HP_VARIABLE = 15 VIGILANCE_VARIABLE = 150 end end
#============================================================================== # ** Game_Battler #------------------------------------------------------------------------------ # This class deals with battlers. It's used as a superclass of the Game_Actor # and Game_Enemy classes. #==============================================================================
class Game_Battler #-------------------------------------------------------------------------- # * Get [Spellbound] option #-------------------------------------------------------------------------- def spellbound return false end #-------------------------------------------------------------------------- # * Get [Burdened Soul] option #-------------------------------------------------------------------------- def burdened_soul return false end #-------------------------------------------------------------------------- # * Get [Blood Prince] option #-------------------------------------------------------------------------- def blood_prince return false end #-------------------------------------------------------------------------- # * Determine Usable Skills # skill : skill #-------------------------------------------------------------------------- def skill_can_use?(skill) return false unless skill.is_a?(RPG::Skill) return false unless movable? return false if silent? and skill.spi_f > 0 if blood_prince return false if calc_mp_cost(skill) > hp end return false if calc_mp_cost(skill) > mp if $game_temp.in_battle return skill.battle_ok? else return skill.menu_ok? end end #-------------------------------------------------------------------------- # * Natural Removal of States (called up each turn) #-------------------------------------------------------------------------- def remove_states_auto clear_action_results for i in @state_turns.keys.clone if @state_turns[i] > 0 if spellbound @state_turns[i] -= 0.5 else @state_turns[i] -= 1 end elsif rand(100) < $data_states[i].auto_release_prob remove_state(i) @removed_states.push(i) end end end 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 #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :razzle_dazzle_message attr_accessor :burdened_soul_message #-------------------------------------------------------------------------- # * Setup # actor_id : actor ID #-------------------------------------------------------------------------- alias coz_aao_ga_setup setup def setup(actor_id) coz_aao_ga_setup(actor_id) @concentration = COZZIEKUNS::AAO::CONCENTRAITON @halve_mp = COZZIEKUNS::AAO::HALVE_MP @immunity = COZZIEKUNS::AAO::IMMUNITY @monkey_grip = COZZIEKUNS::AAO::MONKEY_GRIP @spellbound = COZZIEKUNS::AAO::SPELLBOUND @razzle_dazzle = COZZIEKUNS::AAO::RAZZLE_DAZZLE @unscarred = COZZIEKUNS::AAO::UNSCARRED @adrenailine = COZZIEKUNS::AAO::ADRENAILINE @burdened_soul = COZZIEKUNS::AAO::BURDENED_SOUL @vigilance = COZZIEKUNS::AAO::VIGILANCE @blood_prince = COZZIEKUNS::AAO::BLOOD_PRINCE @critical_hp = 0 end #-------------------------------------------------------------------------- # * Get Added State Success Rate # state_id : state ID #-------------------------------------------------------------------------- alias coz_aao_ga_state_probability state_probability def state_probability(state_id) n = coz_aao_ga_state_probability(state_id) return 0 if @immunity.include?(id) return n end #-------------------------------------------------------------------------- # * Get [Spellbound] option #-------------------------------------------------------------------------- def spellbound return @spellbound.include?(id) end #-------------------------------------------------------------------------- # * Check for [Critical HP] #-------------------------------------------------------------------------- def critical_hp? @critical_hp = self.maxhp @critical_hp *= COZZIEKUNS::AAO::CRITICAL_HP_VARIABLE @critical_hp /= 100 return self.hp <= @critical_hp end #-------------------------------------------------------------------------- # * Check for [Burdened Soul] option #-------------------------------------------------------------------------- def burdened_soul return true if @burdened_soul.include?(id) return false end #-------------------------------------------------------------------------- # * Perform Burdened Soul (called at end of turn) #-------------------------------------------------------------------------- def do_burdened_soul if @burdened_soul.include?(id) and not dead? if critical_hp? for i in 0...$game_party.members.size $game_party.members[i].hp += 9999 end self.hp = 0 @burdened_soul_message = "#{self.name}" + COZZIEKUNS::AAO::BURDENED_SOUL_MESSAGE end end end #-------------------------------------------------------------------------- # * Get [Blood Prince] option #-------------------------------------------------------------------------- def blood_prince return @blood_prince.include?(id) end #-------------------------------------------------------------------------- # * Get Basic Attack #-------------------------------------------------------------------------- alias coz_aao_ga_base_atk base_atk def base_atk n = coz_aao_ga_base_atk if @unscarred.include?(id) if self.hp = self.maxhp n *= COZZIEKUNS::AAO::UNSCARRED_VARIABLE n /= 100 end end return n end #-------------------------------------------------------------------------- # * Get Basic Defense #-------------------------------------------------------------------------- alias coz_aao_ga_base_def base_def def base_def n = coz_aao_ga_base_def if @vigilance if critical_hp? n *= COZZIEKUNS::AAO::VIGILANCE_VARIABLE n /= 100 end end return n end #-------------------------------------------------------------------------- # * Get Basic Agility #-------------------------------------------------------------------------- alias coz_aao_ga_base_agi base_agi def base_agi n = coz_aao_ga_base_agi if @adrenailine.include?(id) n *= COZZIEKUNS::AAO::ADRENAILINE_VARIABLE n /= 100 end return n end #-------------------------------------------------------------------------- # * Get Hit Rate #-------------------------------------------------------------------------- alias coz_aao_ga_hit hit def hit n = coz_aao_ga_hit if @concentration.include?(id) n += COZZIEKUNS::AAO::CONCENTRATION_VARIABLE end return n end #-------------------------------------------------------------------------- # * Get [Auto HP Recovery] #-------------------------------------------------------------------------- alias coz_aao_ga_auto_hp_recover auto_hp_recover def auto_hp_recover return true if @razzle_dazzle.include?(id) coz_aao_ga_auto_hp_recover end #-------------------------------------------------------------------------- # * Get [Half MP cost] #-------------------------------------------------------------------------- alias coz_aao_ga_half_mp_cost half_mp_cost def half_mp_cost return true if @halve_mp.include?(id) coz_aao_ga_half_mp_cost end #-------------------------------------------------------------------------- # * Perform Automatic Recovery (called at end of turn) #-------------------------------------------------------------------------- alias coz_aao_ga_do_auto_recovery do_auto_recovery def do_auto_recovery coz_aao_ga_do_auto_recovery @razzle_dazzle_message = "#{self.name}" + COZZIEKUNS::AAO::RAZZLE_DAZZLE_MESSAGE end #-------------------------------------------------------------------------- # * Change Equipment (designate object) # equip_type : Equip region (0..4) # item : Weapon or armor (nil is used to unequip) # test : Test flag (for battle test or temporary equipment) #-------------------------------------------------------------------------- def change_equip(equip_type, item, test = false) last_item = equips[equip_type] unless test return if $game_party.item_number(item) == 0 if item != nil $game_party.gain_item(last_item, 1) $game_party.lose_item(item, 1) end item_id = item == nil ? 0 : item.id case equip_type when 0 # Weapon @weapon_id = item_id unless two_hands_legal? # If two hands is not allowed unless @monkey_grip.include?(id) change_equip(1, nil, test) # Unequip from other hand end end when 1 # Shield @armor1_id = item_id unless two_hands_legal? # If two hands is not allowed unless @monkey_grip.include?(id) change_equip(0, nil, test) # Unequip from other hand end end when 2 # Head @armor2_id = item_id when 3 # Body @armor3_id = item_id when 4 # Accessory @armor4_id = item_id end end end
#============================================================================== # ** Game_Party #------------------------------------------------------------------------------ # This class handles the party. It includes information on amount of gold # and items. The instance of this class is referenced by $game_party. #==============================================================================
class Game_Party < Game_Unit #-------------------------------------------------------------------------- # * Remove Battle States (called when battle ends) #-------------------------------------------------------------------------- def do_burdened_soul for actor in members actor.do_burdened_soul end end end
#============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * End Turn #-------------------------------------------------------------------------- def turn_end $game_troop.turn_ending = true $game_party.slip_damage_effect $game_troop.slip_damage_effect $game_party.do_auto_recovery for i in 0...$game_party.members.size if $game_party.members[i].auto_hp_recover and $game_party.members[i].dead? == false Sound.play_recovery $game_troop.screen.flash_color @message_window.replace_instant_text($game_party.members[i].razzle_dazzle_message) wait(COZZIEKUNS::AAO::RAZZLE_DAZZLE_WAIT) end end for i in 0...$game_party.members.size if $game_party.members[i].critical_hp? and $game_party.members[i].dead? == false if $game_party.members[i].burdened_soul Sound.play_actor_collapse $game_troop.screen.start_shake(5, 5, 10) @message_window.replace_instant_text($game_party.members[i].burdened_soul_message) wait(COZZIEKUNS::AAO::BURDENED_SOUL_WAIT) end end end $game_party.do_burdened_soul $game_troop.preemptive = false $game_troop.surprise = false process_battle_event $game_troop.turn_ending = false start_party_command_selection end #-------------------------------------------------------------------------- # * Execute Battle Action: Skill #-------------------------------------------------------------------------- def execute_action_skill skill = @active_battler.action.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) if @active_battler.blood_prince @active_battler.hp -= @active_battler.calc_mp_cost(skill) else @active_battler.mp -= @active_battler.calc_mp_cost(skill) end $game_temp.common_event_id = skill.common_event_id for target in targets target.skill_effect(@active_battler, skill) display_action_effects(target, skill) end end end
#============================================================================== # ** Scene_Skill #------------------------------------------------------------------------------ # This class performs the skill screen processing. #==============================================================================
class Scene_Skill < Scene_Base #-------------------------------------------------------------------------- # * Use Skill (apply effects to non-ally targets) #-------------------------------------------------------------------------- def use_skill_nontarget Sound.play_use_skill if @actor.blood_prince @actor.hp -= @actor.calc_mp_cost(@skill) else @actor.mp -= @actor.calc_mp_cost(@skill) end @status_window.refresh @skill_window.refresh @target_window.refresh if $game_party.all_dead? $scene = Scene_Gameover.new elsif @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id $scene = Scene_Map.new end end end Comment marche le scriptJuste après les instructions vous avez: - Spoiler:
module COZZIEKUNS module AAO # Syntax: Option = [Actor ID's] CONCENTRAITON = [1] HALVE_MP = [] IMMUNITY = [] MONKEY_GRIP = [] SPELLBOUND = [] RAZZLE_DAZZLE = [] UNSCARRED = [] ADRENAILINE = [] BURDENED_SOUL = [] VIGILANCE = [] BLOOD_PRINCE = []
Si je veux que mon Actor n°2 possède l'option Adrenaline, je fais comme ceci: - Spoiler:
ADRENAILINE = [2]
Adrenaline est l'option que je veux que mon actor numéro 2 dans ma BDD possède [2] C'est l'ID de mon actor dans la BDD. Voilà. |
|
Mage Lv.11
Age : 27 Inscrit le : 02/03/2009 Messages : 513
| Sujet: Re: [VX] Habilités avancées pour héros Jeu 8 Juil 2010 - 14:39 | |
| Intéréssent mais est-ce qu'on peux changer les compétences en fonction des lvls ? et aussi est-ce que le joueur le voit dans le menu ou autre ?
sinon merci du partage |
|
Aventurier Lv.16
Age : 40 Inscrit le : 03/09/2009 Messages : 1503
| Sujet: Re: [VX] Habilités avancées pour héros Jeu 8 Juil 2010 - 14:55 | |
| Hum je ne pense pas, car pour les options de base c'est pas possible de le faire il faudra modifier le script ou encore un script compatible pour modifier les options apprise, il me semble en avoir déjà vu un, mais je me rappelle plus de l'endroit si je trouve une solution à ça, je mettrai un lien vers ce script. =) |
|
| Sujet: Re: [VX] Habilités avancées pour héros | |
| |
|