Secuter96 Posted March 25, 2017 Share Posted March 25, 2017 (edited) Confronto EquipaggiamentiDescrizioneAvete presente la finestra degli equipaggiamenti con quelle quattro opzioni che non dicevano nulla? Mi ero stufato di vederle e volevo avere un confronto un po' più completo fra i miei oggetti! Con questo script ora è possibile, seleziona automaticamente fra tutti i parametri e bonus presenti quelli che cambiano e li mostra nella finestra ofrendo un raffronto completo fra l'arma/armatura selezionata al momento e quella equipaggiata.Quali parametri vengono mostrati? Tutti quelli che si possono impostare da RPG Maker, attacco, difesa, vita, elementi, tutti i tipi di resistenze, abilità aggiunte, tipo di equipaggiamenti sbloccati o bloccati e molto altro!Unica cosa a cui stare attenti e non fare nomi troppo lunghi...Lo spazio a disposizione non è tantissimo quindi per ciò che è rappresentato da un nome ci sono dei limiti, ad esempio astenersi da chiamare un'abilità 'Super Attacco Furioso dell' Belias l' Iracondo' perchè non ci starà di certo! Potete farlo ma almeno non mettete che la sblocca un'arma xDLimite alla lunghezza per gli stati : 11 caratteri, 14 senza icona.Limite per gli altri termini : 23 caratteri, 26 senza icona. AutoreSecuter IstruzioniNello script si possono configurare :- nomi dei parametri- icone degli elementi- posizione/dimensione delle finestre- on/off le icone per stati/abilità Bug NotiSe si confrontano oggetti che hanno un effetto sull'equipaggiamento, es. abilitano&disabilitano la doppia arma o un un tipo di armaturaRisolto utilizzando due personaggi temporanei. Script $imported = {} if $imported.nil? $imported["Secuter-ConfrontoItem"] = true #============================================================================== # ** Confronto Equipaggiamenti ** #------------------------------------------------------------------------------ # Autore: Secuter #============================================================================== # Stufi delle poche opzioni mostrate nella finestra degli equipaggiamenti? # Ora con questo script è possibile visualizzare tutti i parametri differenti # fra l'equipaggiamento selezionato e quello indossato. #------------------------------------------------------------------------------ # Funzioni dello script #------------------------------------------------------------------------------ # - modificata Scene_Equip, funzione 'Equipaggia', per offrire una più # vasta gamma di opzioni di confronto # - un paio di parametri per cambiare la posizione delle finestre # - ShowIcons per mostrare o meno anche le icone nei bonus # - EleIcon per selezionare le icone degli stati #============================================================================== # Come vengono mostrati i bonus? # per tutti colore Verde se migliore di quello attuale o Rosso se peggiore #------------------------------------------------------------------------------ # Parametri Numerici : NOME 150->200 # Parametri Percentuali : NOME 60%->50% # Elemento Attacco : Attacco +/- [ICONA_ELEMENTO] # Altri Parametri : +/- NOME_PARAMETRO #------------------------------------------------------------------------------ # Elementi rappresentati dall' Icona # Stati/Abilità/Debuff da Icona + Nome # Tutto il resto solo dal Nome #============================================================================== # ** CONFIGURAZIONE SCRIPT ** #------------------------------------------------------------------------------ module Default #-------------------------------------------------------------------------- # Allineamento delle finestre #-------------------------------------------------------------------------- # true -> a destra la finestra che confronta le statistiche e a sinistra # quella con gli equipaggiamenti. # false -> il contrario RightAlign = true #-------------------------------------------------------------------------- # true -> espande l'altezza della finestra delle statistiche, 12 righe # false -> 6 righe ExpandHeight = true #-------------------------------------------------------------------------- # Imposta se mostrare anche le icone per stati e abilità #-------------------------------------------------------------------------- ShowIcons = true #-------------------------------------------------------------------------- end module Vocab # Nomi dei parametri mostrati #-------------------------------------------------------------------------- Xparams = ["Mira", "Evasione", "Critici", "Eva. Crit.", "Eva Magica", "Rifletti", "Contrattacco", "Rigen. PV", "Rigen. MP", "Rigen. TP"] Sparams = ["Aggro", "Guardia", "Cure", "Oggetti", "Costo MP", "Carica PT", "Danno Fisico", "Danno Magico", "Danno Trapp.", "Esperienza"] Speed = "Velocità" AtkTime = "Attacchi" StateResist = "Immune" DualWield = "Doppia Arma" ActionPlus = "Doppio Turno" AtkEle = "Ele. Attacco" # Slot bloccato/sbloccato SlotFixed = ["Blocca", "Libera"] # Abilità speciali SpecialFlag = ["Battaglia automatica", "Difendi sempre", "Proteggi alleati", "Conserva PT"] # Abilità di gruppo PartyAbility = ["Dimezza incontri", "Evita incontri casuali", "Evita imboscate", "Effetto sorpresa", "Raddoppia Monete", "Raddoppia Esperienza"] #-------------------------------------------------------------------------- # Associa ogni elemento ad una icona, ID_ELE => ID_ICONA # Invece che un numero id_icona può essere una stringa, che verrà eseguita # come un metodo, per avere stati con icone variabili. #-------------------------------------------------------------------------- EleIcon = {3=>96, 4=>97, 5=>98, 6=>99, 7=>100, 8=>101, 9=>112, 10=>103, 11=>2, 1=>116, 2=>"$game_system.event_element_icon"} end #============================================================================== # ** INIZIO DEL CODICE ** #============================================================================== #============================================================================== # ** Scene_Equip * #------------------------------------------------------------------------------ # Aggiunge metodi di confronto fra gli oggetti. #============================================================================== class Scene_Equip < Scene_MenuBase #-------------------------------------------------------------------------- # * Create Status Window, RightAlign -> sposta a destra #-------------------------------------------------------------------------- def create_status_window @status_window = Window_EquipStatus.new((Default::RightAlign ? true : 0), @help_window.height) @status_window.viewport = @viewport @status_window.actor = @actor end #-------------------------------------------------------------------------- # * Create Command Window, RightAlign -> sposta a sinistra #-------------------------------------------------------------------------- def create_command_window wx = Default::RightAlign ? 0 : @status_window.width wy = @help_window.height ww = Graphics.width - @status_window.width @command_window = Window_EquipCommand.new(wx, wy, ww) @command_window.viewport = @viewport @command_window.help_window = @help_window @command_window.set_handler(:equip, method(:command_equip)) @command_window.set_handler(:optimize, method(:command_optimize)) @command_window.set_handler(:clear, method(:command_clear)) @command_window.set_handler(:cancel, method(:return_scene)) @command_window.set_handler(:pagedown, method(:next_actor)) @command_window.set_handler(:pageup, method(:prev_actor)) end #-------------------------------------------------------------------------- # * Create Slot Window, RightAlign -> sposta a sinistra #-------------------------------------------------------------------------- def create_slot_window wx = Default::RightAlign ? 0 : @status_window.width wy = @command_window.y + @command_window.height ww = Graphics.width - @status_window.width @slot_window = Window_EquipSlot.new(wx, wy, ww) @slot_window.viewport = @viewport @slot_window.help_window = @help_window @slot_window.status_window = @status_window @slot_window.actor = @actor @slot_window.set_handler(:ok, method(:on_slot_ok)) @slot_window.set_handler(:cancel, method(:on_slot_cancel)) end #-------------------------------------------------------------------------- # * Override create_item_window, ExpandHeight -> riduce ampiezza finestra, # RightAlign -> sposta a sinistra #-------------------------------------------------------------------------- def create_item_window wx = (Default::RightAlign or !Default::ExpandHeight) ? 0 : @status_window.width wy = @slot_window.y + @slot_window.height ww = Default::ExpandHeight ? @command_window.width : Graphics.width wh = Graphics.height - wy @item_window = Window_EquipItem.new(wx, wy, ww, wh) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.status_window = @status_window @item_window.actor = @actor @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @slot_window.item_window = @item_window @status_window.item_window = @item_window end end #============================================================================== # ** Window_EquipItem * #============================================================================== class Window_EquipItem < Window_ItemList #-------------------------------------------------------------------------- # * Imposta il numero di colonne #-------------------------------------------------------------------------- def col_max return (Default::ExpandHeight ? 1 : 2) end #-------------------------------------------------------------------------- # * Alias Update Help, un secondo temp_actor per confrontare i parametri # quando cambiano le condizioni per gli item equipaggiabili #-------------------------------------------------------------------------- alias update_help_comp update_help def update_help update_help_comp if @actor && @status_window temp_actor2 = Marshal.load(Marshal.dump(@actor)) temp_actor2.set_dual_wield = @actor.dual_wield? temp_actor2.permit_all_equip temp_actor2.force_change_equip(@slot_id, item) @status_window.set_temp_actor2(temp_actor2) end end end #============================================================================== # ** Window_EquipSlot * #============================================================================== class Window_EquipSlot alias update_help_comp update_help def update_help update_help_comp @status_window.set_temp_actor(nil) if @status_window end end #============================================================================== # ** Window_EquipStatus * #============================================================================== class Window_EquipStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization, x -> allinea a destra/sinistra #-------------------------------------------------------------------------- alias initialize_comp initialize def initialize(x, y) x = Graphics.width - window_width if x == true initialize_comp(x, y) end #-------------------------------------------------------------------------- # * Override per occupare tutta l'altezza #-------------------------------------------------------------------------- alias window_height_comp window_height def window_height (Default::ExpandHeight ? Graphics.height - fitting_height(2) : window_height_comp) end #-------------------------------------------------------------------------- # * Set Item Window, per poter ricavare l'oggetto confrontato #-------------------------------------------------------------------------- def item_window=(item_window) @item_window = item_window update end #-------------------------------------------------------------------------- # * Genera un nuovo attore temporaneo, usato per tutto eccetto le condizioni # degli equip che usano quello vecchio #-------------------------------------------------------------------------- def set_temp_actor2(temp_actor) return if @temp_actor2 == temp_actor @temp_actor2 = temp_actor refresh end #-------------------------------------------------------------------------- # * Override Refresh, lancia tutti i nuovi metodi #-------------------------------------------------------------------------- def refresh contents.clear @free_line = 13 @used_rows = 1 draw_actor_name(@actor, 4, 0) if @actor return if @temp_actor.nil? or @temp_actor2.nil? items = make_alterated_params_list [(@free_line-@used_rows),items.size].min.times {|i| draw_item(0, line_height * (@used_rows + i), items[i]) } draw_attack_type(0, line_height * (items.size + @used_rows)) if @actor draw_added_skills(0, line_height * (items.size + @used_rows)) if items.size + @used_rows < @free_line draw_on_off_params(0, line_height * (items.size + @used_rows)) if items.size + @used_rows < @free_line draw_dual_wield(0, line_height * (items.size + @used_rows)) if @actor draw_equip_condition(0, line_height * (items.size + @used_rows)) if items.size + @used_rows < @free_line draw_standard_value(0, line_height * (items.size + @used_rows)) if items.size + @used_rows <= 1 end #-------------------------------------------------------------------------- # * Resituisce l' array con tutti i Parametri influenzati # 0 -> param # 1 -> xparam # 2 -> sparam # 3 -> resitenze elementali # 4 -> [velocità, numero attacchi, azioni aggiuntive] # 5 -> resistenza debuff # 6 -> resistenza stati # 7 -> immunità stati # 8 -> stato aggiunto con attacco #-------------------------------------------------------------------------- def make_alterated_params_list get_params + get_xparams + get_sparams + get_ele_resist + get_debuff_resist + get_state_resist + get_state_immune + get_add_state + get_others end def get_params (0..7).inject([]) {|r,i| @actor.param(i) != @temp_actor2.param(i) ? r + [Param.new(Vocab.param(i), 0, i)] : r } end def get_xparams (0..9).inject([]) {|r,i| @actor.xparam(i) != @temp_actor2.xparam(i) ? r + [Param.new(Vocab::Xparams[i], 1, i)] : r } end def get_sparams (0..9).inject([]) {|r,i| @actor.sparam(i) != @temp_actor2.sparam(i) ? r + [Param.new(Vocab::Sparams[i], 2, i)] : r } end def get_ele_resist Vocab::EleIcon.inject([]) {|r,(k,i)| (@actor.element_rate(k) != @temp_actor2.element_rate(k) and (!i.is_a?(String) or eval(i) > 0)) ? r + [Param.new("", 3, k, i)] : r } end def get_debuff_resist (0..8).inject([]) {|r,k| @actor.debuff_rate(k) != @temp_actor2.debuff_rate(k) ? r + [Param.new(Vocab.param(k), 5, k, "@actor.buff_icon_index(-1,#{k})")] : r } end def get_state_resist (0..$data_states.size-1).inject([]) {|r,k| @actor.state_rate(k) != @temp_actor2.state_rate(k) ? r + [Param.new($data_states[k].name, 6, k, $data_states[k].icon_index)] : r } end def get_state_immune (0..$data_states.size-1).inject([]) {|r,k| @actor.state_resist?(k) != @temp_actor2.state_resist?(k) ? r + [Param.new(Vocab::StateResist, 7, k)] : r } end def get_add_state (0..$data_states.size-1).inject([]) {|r,k| @actor.atk_states_rate(k) != @temp_actor2.atk_states_rate(k) ? r + [Param.new(["+",$data_states[k].name], 8, k, $data_states[k].icon_index)] : r } end def get_others others = [] others others.push(Param.new(Vocab::Speed, 4, 0)) if @actor.atk_speed != @temp_actor2.atk_speed others.push(Param.new(Vocab::AtkTime, 4, 1)) if @actor.atk_times_add != @temp_actor2.atk_times_add others.push(Param.new(Vocab::ActionPlus, 4, 2)) if @actor.action_plus_set != @temp_actor2.action_plus_set others end #-------------------------------------------------------------------------- # * Draw Item, max width 186 #-------------------------------------------------------------------------- def draw_item(x, y, param) draw_param_name(x + 4, y, param) if param.type == 7 #immune a stato draw_state_name(x + 94, y, param) if @actor elsif param.type == 9 #stato applicato con l' attacco draw_effect_name(x + 94, y, param) if @actor else draw_current_param(x + 94, y, param) if @actor draw_right_arrow(x + 130, y) draw_new_param(x + 150, y, param) if @temp_actor2 end end #-------------------------------------------------------------------------- # * Disegna gli elementi dell'attacco aggiunti/tolti disegnando l'icona #-------------------------------------------------------------------------- def draw_attack_type(x, y) # +/- ICONA ele = [] if @actor.atk_elements != @temp_actor2.atk_elements @actor.atk_elements.each do |i| #conta gli elementi aggiunti ele.push([i, false]) if i != 1 and not @temp_actor2.atk_elements.include?(i) end @temp_actor2.atk_elements.each do |i| #conta gli elementi tolti ele.push([i, true]) if i != 1 and not @actor.atk_elements.include?(i) end for i in 0..ele.size-1 change_color(system_color) draw_text(x + 4, y + line_height * i, 96, line_height, Vocab::AtkEle) change_color(param_change_color(ele[i][1] ? 1 : -1)) draw_text(x + 126, y + line_height * i, 16, line_height, ele[i][1] ? "+" : "-", 2) draw_icon(Vocab::EleIcon[ele[i][0].is_a?(String) ? eval(ele[i][0]) : ele[i][0]], x + 150, y + line_height * i) end @used_rows += ele.size end end #-------------------------------------------------------------------------- # * Disegna se abilita la doppia arma, usa sempre @temp_actor #-------------------------------------------------------------------------- def draw_dual_wield(x, y) if @actor.dual_wield? != @temp_actor.dual_wield? change_color(param_change_color(@temp_actor.dual_wield? ? 1 : -1)) draw_text(x + 4, y, 16, line_height, @temp_actor.dual_wield? ? "+" : "-") change_color(normal_color) draw_text(x + 20, y, 180, line_height, Vocab::DualWield) @used_rows += 1 end end #-------------------------------------------------------------------------- # * Disegna le abilità e i tipi di abilità sbloccate #-------------------------------------------------------------------------- def draw_added_skills(x, y) # +/- ICONA ABILITA' #disegna i tipi di abilità if @actor.added_skill_types != @temp_actor2.added_skill_types skills = [] @actor.added_skill_types.each do |i| #conta gli elementi aggiunti skills.push([i, false]) if not @temp_actor2.added_skill_types.include?(i) end @temp_actor2.added_skill_types.each do |i| #conta gli elementi tolti skills.push([i, true]) if not @actor.added_skill_types.include?(i) end if skills != [] for i in 0..skills.size-1 change_color(param_change_color(skills[i][1] ? 1 : -1)) draw_text(x + 4, y + line_height * i, 16, line_height, skills[i][1] ? "+" : "-") change_color(normal_color) draw_text(x + 20, y + line_height * i, 160, line_height, $data_system.skill_types[skills[i][0]]) end @used_rows += skills.size end end #disegna le abilità if @actor.added_skills != @temp_actor2.added_skills skills = [] @actor.added_skills.each do |i| #conta gli elementi aggiunti skills.push([i, false]) if not @temp_actor2.added_skills.include?(i) end @temp_actor2.added_skills.each do |i| #conta gli elementi tolti skills.push([i, true]) if not @actor.added_skills.include?(i) end if skills != [] for i in 0..skills.size-1 change_color(param_change_color(skills[i][1] ? 1 : -1)) draw_text(x + 4, y + line_height * i, 16, line_height, skills[i][1] ? "+" : "-") change_color(normal_color) draw_icon($data_skills[skills[i][0]].icon_index, x + 20, y + line_height * i) if Default::ShowIcons draw_text(x + (Default::ShowIcons ? 44 : 20), y + line_height * i, (Default::ShowIcons ? 140 : 160), line_height, $data_skills[skills[i][0]].name) end @used_rows += skills.size end end end #-------------------------------------------------------------------------- # * Disegna i parametri che hanno solo stato di vero o falso # 0 -> Tipo skill bloccate # 1 -> Skill bloccate # 2 -> Stati Speciali # 3 -> Abilità Gruppo # 4 -> Armi Equipaggiabili # 5 -> Armature Equipaggiabili # 6 -> Slot bloccati # 7 -> Slot disbilitati #-------------------------------------------------------------------------- def draw_on_off_params(x, y) items = get_skill_type_bloccate + get_skill_bloccate + get_special_state + get_party_ability if items != [] for i in 0..items.size-1 show_icon = items[i][0]==1 and Default::ShowIcons change_color(param_change_color(items[i][2] ? 1 : -1)) draw_text(x + 4, y + line_height * i, (show_icon ? 8 : 16), line_height, items[i][2] ? "+" : "-") change_color(normal_color) case items[i][0] when 0 text = $data_system.skill_types[items[i][1]] when 1 draw_icon($data_skills[items[i][1]].icon_index, x + 12, y + line_height * i) text = $data_skills[items[i][1]].name when 2 text = Vocab::SpecialFlag[items[i][1]] when 3 text = Vocab::PartyAbility[items[i][1]] end draw_text(x + (show_icon ? 36 : 20), y + line_height * i, (show_icon ? 148 : 160), line_height, text) end @used_rows += items.size end end def get_skill_type_bloccate (0..$data_system.skill_types.size-1).inject([]) {|r,k| @actor.skill_type_sealed?(k) != @temp_actor2.skill_type_sealed?(k) ? r + [[0, k, !@temp_actor2.skill_type_sealed?(k)]] : r } end def get_skill_bloccate (0..$data_skills.size-1).inject([]) {|r,k| @actor.skill_sealed?(k) != @temp_actor2.skill_sealed?(k) ? r + [[1, k, !@temp_actor2.skill_sealed?(k)]] : r } end def get_special_state (0..3).inject([]) {|r,k| @actor.special_flag(k) != @temp_actor2.special_flag(k) ? r + [[2, k, @temp_actor2.special_flag(k)]] : r } end def get_party_ability (0..5).inject([]) {|r,k| @actor.party_ability(k) != @temp_actor2.party_ability(k) ? r + [[3, k, @temp_actor2.party_ability(k)]] : r } end #-------------------------------------------------------------------------- # * Drae Condizioni Equipaggiamenti, unico metodo che usa @temp_actor direttamente # 0 -> Tipo Arma equipaggiabile # 1 -> Tipo Armatura equipaggiabile # 2 -> Slot bloccato # 3 -> Slot inutilizzabile #-------------------------------------------------------------------------- def draw_equip_condition(x, y) items = get_weapon_type + get_armor_type + get_slot_fixed + get_slot_bloccati if items != [] for i in 0..items.size-1 change_color(param_change_color(items[i][2] ^ (items[i][0]==2) ? 1 : -1)) case items[i][0] when 0 text = items[i][2] ? "+" : "-" when 1 text = items[i][2] ? "+" : "-" when 2 text = items[i][2] ? Vocab::SlotFixed[0] : Vocab::SlotFixed[1] when 3 text = items[i][2] ? "+" : "-" end draw_text(x + 4, y + line_height * i, (items[i][0]==2 ? 40 : 16), line_height, text) change_color(normal_color) case items[i][0] when 0 text = $data_system.weapon_types[items[i][1]] when 1 text = $data_system.armor_types[items[i][1]] when 2 text = $data_system.terms.etypes[items[i][1]] when 3 text = $data_system.terms.etypes[items[i][1]] end draw_text(x + (items[i][0]==2 ? 44 : 20), y + line_height * i, (items[i][0]==2 ? 140 : 160), line_height, text, 0) end @used_rows += items.size end end def get_weapon_type (0..$data_system.weapon_types.size-1).inject([]) {|r,k| @actor.equip_wtype_ok?(k) != @temp_actor.equip_wtype_ok?(k) ? r + [[0, k, @temp_actor.equip_wtype_ok?(k)]] : r } end def get_armor_type (0..$data_system.weapon_types.size-1).inject([]) {|r,k| @actor.equip_atype_ok?(k) != @temp_actor.equip_atype_ok?(k) ? r + [[1, k, @temp_actor.equip_atype_ok?(k)]] : r } end def get_slot_fixed (0..$data_system.terms.etypes.size-1).inject([]) {|r,k| @actor.equip_type_fixed?(k) != @temp_actor.equip_type_fixed?(k) ? r + [[2, k, @temp_actor.equip_type_fixed?(k)]] : r } end def get_slot_bloccati (0..$data_system.terms.etypes.size-1).inject([]) {|r,k| @actor.equip_type_sealed?(k) != @temp_actor.equip_type_sealed?(k) ? r + [[3, k, @temp_actor.equip_type_sealed?(k)]] : r } end #-------------------------------------------------------------------------- # * Override Draw Param Name, se icona la disegna spostata di 24 #-------------------------------------------------------------------------- def draw_param_name(x, y, param) change_color(system_color) if not param.icon #solo nome draw_text(x, y, 90, line_height, param.name) elsif param.name.is_a?(Array) #testo prima e dopo icona draw_text(x - 4, y, 8, line_height, param.name[0]) draw_icon(param.icon.is_a?(String) ? eval(param.icon) : param.icon, x + 2, y) if Default::ShowIcons draw_text(x + (Default::ShowIcons ? 26 : 4), y, (Default::ShowIcons ? 68 : 86), line_height, param.name[1]) elsif param.name != "" #icona e testo draw_icon(param.icon.is_a?(String) ? eval(param.icon) : param.icon, x - 4, y) if Default::ShowIcons draw_text(x + (Default::ShowIcons ? 20 : 0), y, (Default::ShowIcons ? 74 : 90), line_height, param.name) else #solo icona draw_icon(param.icon.is_a?(String) ? eval(param.icon) : param.icon, x + 24, y) end end #-------------------------------------------------------------------------- # * Draw State Name, disegna icona e nome dello stato #-------------------------------------------------------------------------- def draw_state_name(x, y, param) # Immune ICONA STATO change_color(normal_color) state = $data_states[param.id] draw_icon(state.icon_index, x - 24, y) if Default::ShowIcons draw_text(x, y, 100, line_height, state.name) end #-------------------------------------------------------------------------- # * Override Draw Current Param #-------------------------------------------------------------------------- def draw_current_param(x, y, param) change_color(normal_color) case param.type when 0 text = @actor.param(param.id) when 1 text = sprintf("%d%", @actor.xparam(param.id)*100) when 2 text = sprintf("%d%", @actor.sparam(param.id)*100) when 3 text = sprintf("%d%", @actor.element_rate(param.id)*100) when 4 case param.id when 0 text = sprintf("%d%", @actor.atk_speed) when 1 text = sprintf("x%d", 1 + @actor.atk_times_add) when 2 text = sprintf("%d%", 1 + @actor.action_plus_set) end when 5 text = sprintf("%d%", @actor.debuff_rate(param.id)*100) when 6 text = sprintf("%d%", @actor.state_rate(param.id)*100) when 8 text = sprintf("%d%", @actor.atk_states_rate(param.id)*100) end draw_text(x, y, 36, line_height, text, 1) end #-------------------------------------------------------------------------- # * Override Draw New Param #-------------------------------------------------------------------------- def draw_new_param(x, y, param) new = 0 value = 0 #parametri attuali case param.type when 0 value = @actor.param(param.id) when 1 value = @actor.xparam(param.id) when 2 value = @actor.sparam(param.id) when 3 value = @actor.element_rate(param.id) when 4 case param.id when 0 value = @actor.atk_speed when 1 value = 1 + @actor.atk_times_add when 2 value = @actor.action_plus_set end when 5 value = @actor.debuff_rate(param.id) when 6 value = @actor.state_rate(param.id) when 8 value = @actor.atk_states_rate(param.id) end #nuovi parametri case param.type when 0 new = @temp_actor2.param(param.id) when 1 new = @temp_actor2.xparam(param.id) when 2 new = @temp_actor2.sparam(param.id) when 3 new = @temp_actor2.element_rate(param.id) when 4 case param.id when 0 new = @temp_actor2.atk_speed when 1 new = 1 + @temp_actor2.atk_times_add when 2 new = @temp_actor2.action_plus_set end when 5 new = @temp_actor2.debuff_rate(param.id) when 6 new = @temp_actor2.state_rate(param.id) when 8 new = @temp_actor2.atk_states_rate(param.id) end #cambia il segno per le stat migliori se basse (le resistenze) color = new - value color *= -1 if (param.type == 2 and [4,6,7,8].include?(param.id)) or [3,5,6].include?(param.type) change_color(param_change_color(color)) #formatta le percentuali new = sprintf("%d%", new*100) if [1,2,3,5,6,8].include?(param.type) if param.type == 4 case param.id when 0 new = sprintf("%d%", new) when 1 new = sprintf("x%d", new) when 2 new = sprintf("%d%", new) end end draw_text(x, y, 36, line_height, new, 1) end #-------------------------------------------------------------------------- # * Disegna un valore di default se tutte le statistiche sono uguali # Attacco per armi e Difesa per armature #-------------------------------------------------------------------------- def draw_standard_value(x, y) draw_item(x, y, Param.new(Vocab.param(2), 0, 2)) if @item_window.item.is_a?(RPG::Weapon) draw_item(x, y, Param.new(Vocab.param(3), 0, 3)) if @item_window.item.is_a?(RPG::Armor) end end #---------------------------------------------------------------------------- # ** Class Param ** #---------------------------------------------------------------------------- # Nuova classe per memorizzare i parametri modificati. #---------------------------------------------------------------------------- class Param attr_reader :name attr_reader :type attr_reader :id attr_reader :icon def initialize(name = "", type = 0, id = 0, icon = false) @name = name @type = type @id = id @icon = icon end end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Consente tutti gli equipaggiamenti, usato per il confronto #-------------------------------------------------------------------------- def permit_all_equip @permit_all_equip = true end #-------------------------------------------------------------------------- # * Modifica il tipo di slot, usato per il confronto #-------------------------------------------------------------------------- def set_dual_wield=(value) @dual_wield = value end #-------------------------------------------------------------------------- # * Alias Weapon Type #-------------------------------------------------------------------------- alias equip_wtype_ok_comp? equip_wtype_ok? def equip_wtype_ok?(wtype_id) equip_wtype_ok_comp?(wtype_id) or @permit_all_equip end #-------------------------------------------------------------------------- # * Alias Armor Type #-------------------------------------------------------------------------- alias equip_atype_ok_comp? equip_atype_ok? def equip_atype_ok?(atype_id) equip_atype_ok_comp?(atype_id) or @permit_all_equip end #-------------------------------------------------------------------------- # * Alias Equip non equipaggiabili #-------------------------------------------------------------------------- alias equip_type_sealed_comp? equip_type_sealed? def equip_type_sealed?(etype_id) equip_type_sealed_comp?(etype_id) and @permit_all_equip.nil? end #-------------------------------------------------------------------------- # * Alias Slot Type, doppia arma #-------------------------------------------------------------------------- alias dual_wield_comp? dual_wield? def dual_wield? @dual_wield.nil? ? dual_wield_comp? : @dual_wield end end Esempiohttp://i.imgur.com/hDeCdVf.gif Edited March 29, 2017 by Secuter96 Link to comment Share on other sites More sharing options...
Guardian of Irael Posted March 25, 2017 Share Posted March 25, 2017 Altro ottimo scriptino che dà giustizia al confronto tra stat, che è sempre una cosa utilissima... sempre a perdermi tra mille foglietti lì dove non c'è ;____ ;Tutto non è entrato, ma vedo che si è fatto il possibile, bel lavoro (pure gif animate)! XD^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Secuter96 Posted March 26, 2017 Author Share Posted March 26, 2017 (edited) Ho aggiunto anche tutti i parametri mancanti, adesso mostra anche abilit' immunit' ed effetti vari. PS. mi scrive i caratteri sbagliati, avro fatto qualche combinazione con i tasti xd, lo strano [ che solo qui sul forum. Edited March 26, 2017 by Secuter96 Link to comment Share on other sites More sharing options...
Guardian of Irael Posted March 26, 2017 Share Posted March 26, 2017 Se non è Dax che sta giocando col codice (lo sta facendo in questo periodo! XD) potrebbe essere che hai messo la tastiera non in IT, ma in qualche altra lingua, controlla su schermo l'icona.Bene per l'aggiunta comunque! :3 (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Secuter96 Posted March 26, 2017 Author Share Posted March 26, 2017 (edited) Era impostato inglese stati uniti, adesso devo sistemare tutti gli accenti nel post xD Script aggiornato e bug risolto, adesso anche se togliendo un equipaggiamento vengono ne disequipaggiati altri nel confronto verrà contato solo il primo. Edited March 27, 2017 by Secuter96 Link to comment Share on other sites More sharing options...
Vai Jack 8 Posted September 14, 2017 Share Posted September 14, 2017 (edited) Salve, innanzitutto complimenti per lo script perché era esattamente ciò che cercavo :v Avrei una piccola richiesta: sarebbe molto complesso renderlo compatibile con Ace Equip System di Yanfly? Spero di no :D Edited September 14, 2017 by Vai Jack 8 http://www.rpg2s.net/forum/uploads/monthly_01_2014/post-6-0-39588100-1390575633.png <---- Vincitore del Primo Music Contest di RPG2s Risultati pochi ma decenti. Link to comment Share on other sites More sharing options...
Grawel Posted January 5, 2018 Share Posted January 5, 2018 È uno script veramente stupendo!! Purtroppo xo ( per me) è incompatibile con Ace Equip System di Yanfly.Visto che te l'ha chiesto anche Vai Jack 8 chiedo anche io se fosse possibile renderlo compatibile :) 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