Sleeping Leonhart Posted May 22, 2008 Share Posted May 22, 2008 (edited) Passive SkillDescrizioneQuesto script fa parte di una compilation di script che rilascierò di volta in volta.Lo script permette di avere delle skill passive, cioè che si attivano da sole ed affettano determinate statistiche. AutoreThe Sleeping Leonhart Script#============================================================================== # ** Passive Skill #------------------------------------------------------------------------------ # Autore: The Sleeping Leonhart # Versione: 1.1 # Data di rilascio: 26/05/2008 #------------------------------------------------------------------------------ # Descrizione: # Lo script permette di avere delle skill passive, cioè delle abilità # che si attivano non appena imparate e che incrementano/decrementano # le statistiche dei personaggi, la loro difesa elementale e la loro # difesa degli status alterati. #------------------------------------------------------------------------------ # Istruzioni: # E consigliabile mettere le skill con consumo di Mp pari a 0 # e settarle su Non Usabile per avere un effetto "Migliore". # Per personalizzare lo script andate nella sezione Configurazione. #============================================================================== #============================================================================== # Configurazione #============================================================================== module Passive_Skill #========================================================================= # Stat_Skill: Definisce le skill che incrementano le statistiche. #------------------------------------------------------------------------- # Sintassi: # Stat_Skill = {Skill_ID=>{stat=>[n,tipo],...},...} # Parametri: # Skill_ID: Id della skill nel database # Stat: La statistica modificata, deve essere uno dei seguenti valori: # "hp","mp","str","int","agi","dex","atk","pdef","mdef","eva" # n: Il numero che incrementa la statistica # tipo: Se 1 n viene considerato come un numero se 2 come percentuale #========================================================================= Stat_Skill = { 1=>{"hp"=>[50,1]}, #Nell'esempio la Skill 1 incrementa gli hp di 50 10=>{"hp"=>[15,2]} #Nell'esempio la Skill 10 incrementa gli hp del 15% } #========================================================================= # Element_Skill: Definisce le skill che incrementano la difesa elementale. #------------------------------------------------------------------------- # Sintassi: # Element_Skill = {Skill_id=>[elemento,n],....} # Parametri: # Skill_ID: Id della skill nel database # Elemetno: L'Id dell'elemento nel database # n: Il numero che incrementa la % di difesa #========================================================================= Element_Skill = { 7=>[1,-50] #Nell'esempio la Skill 7 riduce i danni da fuoco del 50% } #========================================================================= # State_Skill: Definisce le skill che incrementano la difesa dagli status. #------------------------------------------------------------------------- # Sintassi: # State_Skill = {Skill_id=>status,....} # Parametri: # Skill_ID: Id della skill nel database # Status: L'Id dello status nel database #========================================================================= State_Skill = { 3=>3 #Nell'esempio la Skill 3 protegge da Veleno } #========================================================================= # Extra_Skill: Definisce le skill che incrementano altri parametri. #------------------------------------------------------------------------- # Sintassi: # Stat_Skill = {Skill_ID=>{stat=>[n,tipo],...},...} # Parametri: # Skill_ID: Id della skill nel database # Stat: La statistica modificata, deve essere uno dei seguenti valori: # "exp","gold" # n: Il numero che incrementa il parametro #========================================================================= Extra_Skill = { 10=>{"exp"=>100,"gold"=>100} #Nell'esempio la Skill 10 aumenta del 100% #l'esperienza e l'oro ottenuti } end $tsl_script = [] if $tsl_script == nil $tsl_script.push("Passive Skill") class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Setup # actor_id : actor ID #-------------------------------------------------------------------------- alias tslpskill_gameactor_setup setup def setup(actor_id) @atk_plus = 0 @pdef_plus = 0 @mdef_plus = 0 @eva_plus = 0 tslpskill_gameactor_setup(actor_id) end #-------------------------------------------------------------------------- # * Get Element Revision Value # element_id : element ID #-------------------------------------------------------------------------- alias tslpskill_gameactor_element_rate element_rate def element_rate(element_id) result = tslpskill_gameactor_element_rate(element_id) pskill = Passive_Skill::Element_Skill for i in pskill.keys if pskill[i][0] == element_id and skill_learn?(i) result += result*pskill[i][1]/100 end end return result end #-------------------------------------------------------------------------- # * Determine State Guard # state_id : state ID #-------------------------------------------------------------------------- alias tslpskill_gameactor_state_guard? state_guard? def state_guard?(state_id) pskill = Passive_Skill::State_Skill for i in pskill.keys if pskill[i] == state_id and skill_learn?(i) return true else return tslpskill_gameactor_state_guard?(state_id) end end end #-------------------------------------------------------------------------- # * Get Basic Attack Power #-------------------------------------------------------------------------- alias tslpskill_gameactor_base_atk base_atk def base_atk return tslpskill_gameactor_base_atk + @atk_plus end #-------------------------------------------------------------------------- # * Get Basic Physical Defense #-------------------------------------------------------------------------- alias tslpskill_gameactor_base_pdef base_pdef def base_pdef return tslpskill_gameactor_base_pdef + @pdef_plus end #-------------------------------------------------------------------------- # * Get Basic Magic Defense #-------------------------------------------------------------------------- alias tslpskill_gameactor_base_mdef base_mdef def base_mdef return tslpskill_gameactor_base_mdef + @mdef_plus end #-------------------------------------------------------------------------- # * Get Basic Evasion Correction #-------------------------------------------------------------------------- alias tslpskill_gameactor_base_eva base_eva def base_eva return tslpskill_gameactor_base_eva + @eva_plus end #-------------------------------------------------------------------------- # * Learn Skill # skill_id : skill ID #-------------------------------------------------------------------------- alias tslpskill_gameactor_learn_skill learn_skill if $tsl_script.include?("FFVIII MagicSystem") def learn_skill(skill_id, n=1) add_passive_effect(skill_id) tslpskill_gameactor_learn_skill(skill_id, n) end else def learn_skill(skill_id) add_passive_effect(skill_id) tslpskill_gameactor_learn_skill(skill_id) end end #-------------------------------------------------------------------------- # * Add Passive Effect # skill_id : skill ID #-------------------------------------------------------------------------- def add_passive_effect(skill_id) if Passive_Skill::Stat_Skill.include?(skill_id) and not skill_learn?(skill_id) skill = Passive_Skill::Stat_Skill[skill_id] if skill.include?("hp") @maxhp_plus += skill["hp"][0] if skill["hp"][1] == 1 @maxhp_plus += (base_maxhp * skill["hp"][0])/100 if skill["hp"][1] == 2 self.hp += @maxhp_plus end if skill.include?("mp") @maxsp_plus += skill["mp"][0] if skill["mp"][1] == 1 @maxsp_plus += (base_maxsp * skill["mp"][0])/100 if skill["mp"][1] == 2 self.sp += @maxsp_plus end if skill.include?("str") @str_plus += skill["str"][0] if skill["str"][1] == 1 @str_plus += (base_str * skill["str"][0])/100 if skill["str"][1] == 2 end if skill.include?("agi") @agi_plus += skill["agi"][0] if skill["agi"][1] == 1 @agi_plus += (base_agi * skill["agi"][0])/100 if skill["agi"][1] == 2 end if skill.include?("dex") @dex_plus += skill["dex"][0] if skill["dex"][1] == 1 @dex_plus += (base_dexr * skill["dex"][0])/100 if skill["dex"][1] == 2 end if skill.include?("atk") @atk_plus += skill["atk"][0] if skill["atk"][1] == 1 @atk_plus += (base_atk * skill["atk"][0])/100 if skill["atk"][1] == 2 end if skill.include?("pdef") @pdef_plus += skill["pdef"][0] if skill["pdef"][1] == 1 @pdef_plus += (base_pdef * skill["pdef"][0])/100 if skill["pdef"][1] == 2 end if skill.include?("mdef") @mdef_plus += skill["mdef"][0] if skill["mdef"][1] == 1 @mdef_plus += (base_mdef * skill["mdef"][0])/100 if skill["mdef"][1] == 2 end if skill.include?("eva") @eva_plus += skill["eva"][0] if skill["eva"][1] == 1 @eva_plus += (base_eva * skill["eva"][0])/100 if skill["eva"][1] == 2 end end end #-------------------------------------------------------------------------- # * Forget Skill # skill_id : skill ID #-------------------------------------------------------------------------- alias tslpskill_gameactor_forget_skill forget_skill if $tsl_script.include?("FFVIII MagicSystem") def forget_skill(skill_id, n=1) remove_passive_effect(skill_id) tslpskill_gameactor_forget_skill(skill_id, n) end else def forget_skill(skill_id) remove_passive_effect(skill_id) tslpskill_gameactor_forget_skill(skill_id) end end #-------------------------------------------------------------------------- # * Remove Passive Effect # skill_id : skill ID #-------------------------------------------------------------------------- def remove_passive_effect(skill_id) if Passive_Skill::Stat_Skill.include?(skill_id) and skill_learn?(skill_id) skill = Passive_Skill::Stat_Skill[skill_id] if skill.include?("hp") @maxhp_plus -= skill["hp"][0] if skill["hp"][1] == 1 @maxhp_plus -= (base_maxhp * skill["hp"][0])/100 if skill["hp"][1] == 2 self.hp -= @maxhp_plus end if skill.include?("mp") @maxsp_plus -= skill["mp"][0] if skill["mp"][1] == 1 @maxsp_plus -= (base_maxsp * skill["mp"][0])/100 if skill["mp"][1] == 2 self.sp -= @maxsp_plus end if skill.include?("str") @str_plus -= skill["str"][0] if skill["str"][1] == 1 @str_plus -= (base_str * skill["str"][0])/100 if skill["str"][1] == 2 end if skill.include?("agi") @agi_plus -= skill["agi"][0] if skill["agi"][1] == 1 @agi_plus -= (base_agi * skill["agi"][0])/100 if skill["agi"][1] == 2 end if skill.include?("dex") @dex_plus -= skill["dex"][0] if skill["dex"][1] == 1 @dex_plus -= (base_dexr * skill["dex"][0])/100 if skill["dex"][1] == 2 end if skill.include?("atk") @atk_plus -= skill["atk"][0] if skill["atk"][1] == 1 @atk_plus -= (base_atk * skill["atk"][0])/100 if skill["atk"][1] == 2 end if skill.include?("pdef") @pdef_plus -= skill["pdef"][0] if skill["pdef"][1] == 1 @pdef_plus -= (base_pdef * skill["pdef"][0])/100 if skill["pdef"][1] == 2 end if skill.include?("mdef") @mdef_plus -= skill["mdef"][0] if skill["mdef"][0] == 1 @mdef_plus -= (base_mdef * skill["mdef"][0])/100 if skill["mdef"][1] == 2 end if skill.include?("eva") @eva_plus -= skill["eva"][0] if skill["eva"][1] == 1 @eva_plus -= (base_eva * skill["eva"][0])/100 if skill["eva"][1] == 2 end end end end class Scene_Battle alias tslpskill_scenebattle_start_phase5 start_phase5 def start_phase5 tslpskill_scenebattle_start_phase5 exp = 0 gold = 0 e_multi = 0 g_multi = 0 for i in 0...$game_party.actors.size actor = $game_party.actors[i] for i in actor.skills if Passive_Skill::Extra_Skill.include?(i) if Passive_Skill::Extra_Skill[i].include?("exp") e_multi += Passive_Skill::Extra_Skill[i]["exp"] end if Passive_Skill::Extra_Skill[i].include?("gold") g_multi += Passive_Skill::Extra_Skill[i]["gold"] end end end end # Loop for enemy in $game_troop.enemies # If enemy is not hidden unless enemy.hidden # Add EXP and amount of gold obtained exp += enemy.exp gold += enemy.gold end end exp_plus = exp*e_multi/100 # Obtaining EXP for i in 0...$game_party.actors.size actor = $game_party.actors[i] if actor.cant_get_exp? == false last_level = actor.level actor.exp += exp_plus if actor.level > last_level @status_window.level_up(i) end end end gold_plus = gold*g_multi/100 # Obtaining gold $game_party.gain_gold(gold_plus) # Make battle result window e = exp+exp_plus g = gold+gold_plus #@result_window = Window_BattleResult.new(e, g, treasures) # Set wait count @phase5_wait_count = 100 end end Istruzioni per l'usoAll'interno. Consiglio di creare delle skill inutilizzabili e che non consumino Mp. Bugs e Conflitti NotiN/A Altri DettagliLo script l'ho fatto a scuola e non l'ho potuto testare, comunque credo che funzioni. Edited May 28, 2008 by Sleeping Leonhart http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
Zagros Posted May 23, 2008 Share Posted May 23, 2008 tipo le abilita di final fantasy 9 giusto? Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted May 24, 2008 Author Share Posted May 24, 2008 (edited) Si una specie, sono abilità che si auto attivano senza bisogno di usarle.Le abilità per il momento possono modificare le statistiche, la difesa elementale e la difesa dagli status alterati. Se avete suggerimenti sono ben accetti. EDIT:Aggiornato alla 1.1, ora ci sono anche dei bonus per Exp e Gold ;) Edited May 28, 2008 by Sleeping Leonhart http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
alexxx0987 Posted June 23, 2008 Share Posted June 23, 2008 (edited) Si, bello, mi piace. E' utilissimo, solo ti vojo kiedere una cosa.. Nn c'è un modo x rendere le magie invisibile? cioè, una vlt ke ha appreso x esempio atk +1, questa viene visualizzata nell'elenco delle skill apprese.. NN c'è un modo x evitarlo?? Edited June 23, 2008 by alexxx0987 Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted June 26, 2008 Author Share Posted June 26, 2008 Dovrei modificare la finestra che visualizza le skill, se non hai altri script te la posso fare anche subito se vuoi, altrimenti dimmi gli script che hai e provo a vedere. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
alexxx0987 Posted June 29, 2008 Share Posted June 29, 2008 No, nn ho altri script, puoi fare direttamente. Comunque se è un disturbo x te non fa nnt, ok?? Solo se nn ti è d'impiccio... Grazie.... Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted June 30, 2008 Author Share Posted June 30, 2008 Aggiungi questo Script/Patch sotto le abilita passive: #============================================================================== # ** Window_Skill #------------------------------------------------------------------------------ # This window displays usable skills on the skill and battle screens. #============================================================================== class Window_Skill < Window_Selectable #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end passive = [] for i in Passive_Skill::Stat_Skill.keys passive.push(i) end for i in Passive_Skill::Element_Skill.keys passive.push(i) end for i in Passive_Skill::State_Skill.keys passive.push(i) end for i in Passive_Skill::Extra_Skill.keys passive.push(i) end @data = [] for i in 0...@actor.skills.size skill = $data_skills[@actor.skills[i]] if skill != nil and not passive.include?(skill.id) @data.push(skill) end end # If item count is not 0, make a bit map and draw all items @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end end http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
alexxx0987 Posted July 1, 2008 Share Posted July 1, 2008 Bhè si, solo ke così nemmeno le skill normali e le magie si visualizzano +.. Io volevo ke sl le skill passive nn si visualizzassero.. Cmq se nn si può nn fa nnt. Grazie cmq Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted July 1, 2008 Author Share Posted July 1, 2008 Come neanche le skill normali si visualizzano????Ora provo la patch e ti dico ( nn l'ho testata l'ho fatta e basta ) http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
alexxx0987 Posted July 2, 2008 Share Posted July 2, 2008 oook. Poi dimmi se t si visualizzano o è un problema mio... Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted July 2, 2008 Author Share Posted July 2, 2008 A me funziona bene.... Non so forse hai impostato le abilità normali anche come passive, oppure bo, hai detto che non hai altri script, non so che dirti. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
Valentino Posted October 11, 2009 Share Posted October 11, 2009 Scusate se ritiro fuori questo vecchio topic... Ma volevo chiedere se c'è un modo per rendere compatibile lo script con lo Skill learning system alla ff9. Targhette Rpg2s:http://img14.imageshack.us/img14/5421/contestsecondo.png Partecipante al Rpg2s.net Game Contest #3http://www.rpg2s.net/images/gc3/gc3_firma.pngGioco in Sviluppo: DREAMS http://img16.imageshack.us/img16/2121/dreamstitle2.png SKY's CRY!http://www.rpg2s.net...showtopic=12557 Lista di script creati da me: Support System FF9 Multiscope System Advanced Armor System Protection System Trance System FF2 Development System Scene Vittoria Animato Aperion System Elemosina System Valentino's Scene Shop Item Plus System Panorama Acceleration System Conversione da VX a XP, Vehicle System Sentinel System Scene Zoolab Valentino's Random System Oggetti Riutilizzabili Break Pictures Limit Gameover Animato Valentino's Gun Mode Valentino's Ally System Link to comment Share on other sites More sharing options...
MasterSion Posted October 12, 2009 Share Posted October 12, 2009 Perchè? Per quanto mi riguarda ( non ho provato affondo) ma funziona perfettamente http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
Valentino Posted October 12, 2009 Share Posted October 12, 2009 Sì di suo non da errori. Però apprendendo una skill l'effetto dato nell'impostazione non viene eseguito. I parametri rimangono invariati. Targhette Rpg2s:http://img14.imageshack.us/img14/5421/contestsecondo.png Partecipante al Rpg2s.net Game Contest #3http://www.rpg2s.net/images/gc3/gc3_firma.pngGioco in Sviluppo: DREAMS http://img16.imageshack.us/img16/2121/dreamstitle2.png SKY's CRY!http://www.rpg2s.net...showtopic=12557 Lista di script creati da me: Support System FF9 Multiscope System Advanced Armor System Protection System Trance System FF2 Development System Scene Vittoria Animato Aperion System Elemosina System Valentino's Scene Shop Item Plus System Panorama Acceleration System Conversione da VX a XP, Vehicle System Sentinel System Scene Zoolab Valentino's Random System Oggetti Riutilizzabili Break Pictures Limit Gameover Animato Valentino's Gun Mode Valentino's Ally System Link to comment Share on other sites More sharing options...
MasterSion Posted October 12, 2009 Share Posted October 12, 2009 Perchè io ho impostato le passive skill solo su l'equip... Tradotto se hai equipaggiato scudo di bronzo allora hp +15%.Altrimenti se le imapari sono troppo forti perchè si accumulano =).Comunque mi dispiace ma non ti posso aiutare, non sono ancora capace di fare ste cose con l'rgss. http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now