Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

  • Chatbox

    You don't have permission to chat.
    Load More
Ally

System Mod Independent Player Actor

Recommended Posts

Nome Script: Independent Player Actor
Versione: 1.4
Autore/i: mikb89

Informazioni:
Questo script nasce da una richiesta di , fatta in questo topic.
Pensato per giochi tipo Pokémon, questo script consente di avere un 'leader' (visibile come primo personaggio nel caterpillar e come nome team in battaglia: "Il gruppo di X ha ottenuto punti exp...") che non è parte del gruppo vero e proprio.

Features:
L'unica impostazione presente nello script è il numero di una variabile.
Cambiandone poi il valore potrete:

  • disattivare lo script se questo è minore di 1;
  • selezionare l'eroe leader dal database impostando la variabile al suo ID;
  • attivare e disattivare lo script quindi semplicemente moltiplicando la variabile per -1.


Istruzioni:
Inserire lo script sotto Materials/Materiali/Modules/Moduli (a seconda della traduzione che avete) ma sopra Main.

Script

 


# Independent Player Actor v. 1.4# VX Ace version# by mikb89# Dettagli:#  Questo script ti lascia avere un leader che non è nel gruppo.# Configurazioni:module INDIEPLA  PLAYER_ACTOR_ID_VARIABLE = 1    # Una Variable conterrà l'ID dell'eroe che farà da leader.    # Impostando la variabile come <1, lo script si disattiverà. In questo modo puoi    #  moltiplicare il valore per -1 e attivare/disattivare senza perdere    #  l'ID dell'eroe selezionato!    # NOTA! Una volta cambiato il valore della variabile, devi eseguire un chiama script    #  con:    # $game_player.refresh    #  per fare aggiornare la grafica. Usando la schermata di Debug, questo codice sarà automaticamente    #  eseguito, così da rendere semplice il testing.end# Altro:#  Ispirato dall'Exclude Player in party di SowS, richiesto da Emi nel#   forum rpgmkr.net.#Codename: indiepla($imported ||= {})[:mikb89_indiepla] = true# Licenza:# - Puoi chiedermi di includere il supporto per altri script, a patto che usino#   il $imported[script] = true;# - Puoi modificare e anche ripostare i miei script, dopo una mia risposta. Per#   ripostarli, comunque, devi aver fatto pesanti modifiche o porting, non puoi#   fare un post con lo script così com'è;# - Puoi usare i miei script per fare quel che vuoi, da giochi gratis a liberi#   a commerciali. Apprezzerei comunque essere messo al corrente di quello che#   stai creando;# - Devi creditarmi, se usi questo script o parte di esso.class Game_Player < Game_Character  alias_method(:actor_b4_indiepla, :actor) unless method_defined?(:actor_b4_indiepla)#class Game_Player#def actor() <- aliased  def actor    if $game_variables[iNDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1      actor_b4_indiepla    else      $game_actors[$game_variables[iNDIEPLA::PLAYER_ACTOR_ID_VARIABLE]]    end  endendclass Game_Follower < Game_Character  alias_method(:actor_b4_indiepla, :actor) unless method_defined?(:actor_b4_indiepla)#class Game_Follower#def actor() <- aliased  def actor    if $game_variables[iNDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1      actor_b4_indiepla    else      $game_party.battle_members[@member_index - 1]    end  endendclass Game_Party < Game_Unit  alias_method(:max_bm_b4_indiepla, :max_battle_members) unless method_defined?(:max_bm_b4_indiepla)#class Game_Party#def max_battle_members() <- aliased  def max_battle_members    return max_bm_b4_indiepla + (($game_variables[iNDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1) ? 0 : 1)  end  alias_method(:leader_b4_indiepla, :leader) unless method_defined?(:leader_b4_indiepla)#class Game_Party#def leader() <- aliased  def leader    if $game_variables[iNDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1      leader_b4_indiepla    else      $game_actors[$game_variables[iNDIEPLA::PLAYER_ACTOR_ID_VARIABLE]]    end  endendclass Scene_Debug < Scene_MenuBase  alias_method(:terminate_b4_indiepla, :terminate) unless method_defined?(:terminate_b4_indiepla)#class Scene_Debug#def terminate() <- aliased  def terminate    $game_player.refresh    terminate_b4_indiepla  endend

 


Demo:
Demo multilingua v 1.4
Mediafire, zip di 1.32MB

Incompatibilità:
Se non aggiungete nessuno al party, anche se il leader è impostato, non potrete comunque accedere ai vari menu Oggetti, Skill, Equip, Status.

Note dell'autore:
per aver richiesto lo script;
SowS per l'idea originale.

Pareri in evidenza:

Funziona alla grande :D

Condividi questo messaggio


Link di questo messaggio
Condividi su altri siti

Crea un account o accedi per lasciare un commento

You need to be a member in order to leave a comment

Crea un account

Iscriviti per un nuovo account nella nostra comunità. È facile!

Registra un nuovo account

Accedi

Sei già registrato? Accedi qui.

Accedi Ora

  • Contenuti simili

    • Da Ally
      Nome Script: H.U.T.O. MMO System por Tomoaky
      Versione:
      Autore/i: Tomoaky, hikimoki
       
      Informazioni:
      Un sistema completo per creare un progetto in pieno stile MMO, dove il movimento è con il mouse e la battaglia è in gruppo.
      Che cosa contiene?
       
      Features:
      - Mini-mappa con caratteristiche realistiche della mappa.
      - Sistema di Battaglia con la partecipazione attiva del party.
      - Sistema di full-pixel: Camminata, Attacco, Abilità, e altre cose che devono essere ancora scoperte nella demo
      - Sistema di tempo con orari diurni e serali giusto.
      - Tempo di sistema. (Climi)
       
      (La demo è ancora in fase di test, quindi verranno aggiunte altre features con il progredire dei test)
       
      Screenshots:

       
      Istruzioni:
      Istruzioni e script, all'interno della demo.
       
      Demo:
      http://hikimoki.sakura.ne.jp/zip/hutommo_ace.zip
    • Da Ally
      Nome Script: Permanent Switches & Variables
      Versione: 1.2
      Autore/i: mikb89
       
      Informazioni:
      Con questo script potrete far sì che i valori di determinate switch e variabili vengano memorizzati in modo da restare tali in nuova partita e caricamento.
      Utile per esempio se si vuole aggiungere un Nuovo gioco +, cambiando una switch appena finito il gioco, oppure un sistema di punteggio alto tramite variabile o magari per memorizzare delle opzioni.
       
      Features:
      Si possono utilizzare sia singoli elementi che range multipli rapidamente.
      È possibile scegliere un nominativo personalizzato per i dati.
       
      Istruzioni:
      Creare una nuova voce sopra Main ed inserire lo script.
      Nel caso di incompatibilità, provare a spostarla più in alto.
       
      Script
       
      Incompatibilità:
      N/A
    • Da Ally
      Nome Script: ReMapped Keys
      Versione: 1.0
      Autore/i: mikb89
       
      Informazioni:
      Con questo script potrete riassegnare i tasti standard. Se ad esempio voleste usare Invio sia per interagire che per correre, basta rimappare il tasto Shift (:A) con quello di Invio (:C). Giusto un esempio.
      Lo script è comunque stato inizialmente creato per un cabinato che supportava solo determinati tasti: combinando questo script con uno di tastiera estesa è stato possibile far funzionare il gioco.
       
      Istruzioni:
      Creare una nuova voce sopra Main ed inserire lo script.
      Nel caso di incompatibilità, provare a spostarla più in alto.
       
      Script
       
      Incompatibilità:
      Ricordatevi di usare uno script per la tastiera estesa separato se le vostre intenzioni sono quelle di usare tasti non standard.
       
      Note dell'autore:
      Script creato per una richiesta di syntonia;
      Ringrazio per il suo script di tastiera estesa che ho usato come esempio.
    • Da Ally
      Nome Script: Keyboard Input
      Versione: 3.0
      Autore/i: Keroro
       
      Informazioni:
      Porting per VX-ACE dello script YEM Keyboard Script per VX.
      Rimpiazza lo Scene_Name facendo inserire direttamente da tastiera.
      TODO: Gestire la punteggiatura
       
      Istruzioni:
      Creare una nuova tab sotto Materials e incollare lo script.
      Oltre a modificare lo Scene_Name modifica la classe Input consentendo,
      al programmatore volenteroso di utilizzare tutti le lettere e i numeri tramite sintassi:
       
      if Input.press(:VK_A)
      #se premo la lettera a
      end
      if Input.press(:NUM5) or Input.press(:PAD5)
      #se premo il numero 5 sulla tastiera o sul numpad
      end
       
      Script:
       
       
      #===============================================================================# Keyboard Input - Porting to VX-ACE# By Keroro - [email protected]# Version 3.0# Last Date Updated. 2012.03.17#===============================================================================## OriginalWij and Yanfly Collaboration - Keyboard Input# Last Date Updated: 2010.06.12# Level: Normal## This is a utility script that provides the functionality to return inputs# from the keyboard as well as free up more keys to be used in the Input module.# This script will also replace Scene_Name and allow for direct keyboard input# to type in an actor's name as well as fix the maximum characters shown from# the default base script.##===============================================================================$imported = {} if $imported == nil$imported["KeyboardInput"] = trueclass << Input #-------------------------------------------------------------------------- # Aliases (Mods - Linked to Module) - Created by OriginalWij #-------------------------------------------------------------------------- alias ow_dt_i_press press? unless $@ alias ow_dt_i_trigger trigger? unless $@ alias ow_dt_i_repeat repeat? unless $@ alias ow_dt_i_update update unless $@endmodule Input #-------------------------------------------------------------------------- # constants - Created by OriginalWij and Yanfly and Keroro #-------------------------------------------------------------------------- VALUES = {} VALUES[:VK_A] = 65; VALUES[:VK_B] = 66; VALUES[:VK_C] = 67; VALUES[:VK_D] = 68; VALUES[:VK_E] = 69; VALUES[:VK_F] = 70; VALUES[:VK_G] = 71; VALUES[:VK_H] = 72; VALUES[:VK_I] = 73; VALUES[:VK_J] = 74; VALUES[:VK_K] = 75; VALUES[:VK_L] = 76 VALUES[:VK_M] = 77; VALUES[:VK_N] = 78; VALUES[:VK_O] = 79; VALUES[:VK_P] = 80; VALUES[:VK_Q] = 81; VALUES[:VK_R] = 82; VALUES[:VK_S] = 83; VALUES[:VK_T] = 84; VALUES[:VK_U] = 85; VALUES[:VK_V] = 86; VALUES[:VK_W] = 87; VALUES[:VK_X] = 88 VALUES[:VK_Y] = 89; VALUES[:VK_Z] = 90; LETTERS = [:VK_A,:VK_B,:VK_C,:VK_D,:VK_E,:VK_F,:VK_G,:VK_H,:VK_I,:VK_J, :VK_K,:VK_L,:VK_M,:VK_N,:VK_O,:VK_P,:VK_Q,:VK_R,:VK_S,:VK_T, :VK_U,:VK_V,:VK_W,:VK_X,:VK_Y,:VK_Z] VALUES[:NUM0] = 48; VALUES[:NUM1] = 49; VALUES[:NUM2] = 50; VALUES[:NUM3] = 51; VALUES[:NUM4] = 52; VALUES[:NUM5] = 53; VALUES[:NUM6] = 54; VALUES[:NUM7] = 55; VALUES[:NUM8] = 56; VALUES[:NUM9] = 57; VALUES[:PAD0] = 96; VALUES[:PAD1] = 97; VALUES[:PAD2] = 98; VALUES[:PAD3] = 99; VALUES[:PAD4] = 100; VALUES[:PAD5] = 101; VALUES[:PAD6] = 102; VALUES[:PAD7] = 103; VALUES[:PAD8] = 104; VALUES[:PAD9] = 105; NUMBERS = [:NUM0,:NUM1,:NUM2,:NUM3,:NUM4,:NUM5,:NUM6,:NUM7,:NUM8,:NUM9] NUMPAD = [:PAD0,:PAD1,:PAD2,:PAD3,:PAD4,:PAD5,:PAD6,:PAD7,:PAD8,:PAD9] VALUES[:ENTER] = 13; VALUES[:SPACE] = 32; VALUES[:ESC] = 27; VALUES[:BACK] = 8; VALUES[:PGUP] = 33; VALUES[:PGDN] = 34; VALUES[:CAPS] = 20;#TODO: aggiungere tags per punteggiatura #-------------------------------------------------------------------------- # initial module settings - Created by OriginalWij and Yanfly #-------------------------------------------------------------------------- GetKeyState = Win32API.new("user32", "GetAsyncKeyState", "i", "i") GetCapState = Win32API.new("user32", "GetKeyState", "i", "i") KeyRepeatCounter = {} module_function #-------------------------------------------------------------------------- # alias method: update - Created by OriginalWij and Keroro #-------------------------------------------------------------------------- def update ow_dt_i_update for key in KeyRepeatCounter.keys if (GetKeyState.call(VALUES[key]).abs & 0x8000 == 0x8000) KeyRepeatCounter[key] += 1 else KeyRepeatCounter.delete(key) end end end #-------------------------------------------------------------------------- # alias method: press? - Created by OriginalWij and Keroro #-------------------------------------------------------------------------- def press?(key) return ow_dt_i_press(key) if !VALUES.has_key?(key) return true unless KeyRepeatCounter[key].nil? return key_pressed?(key) end #-------------------------------------------------------------------------- # alias method: trigger? - Created by OriginalWij and Keroro #-------------------------------------------------------------------------- def trigger?(key) return ow_dt_i_trigger(key) if !VALUES.has_key?(key) count = KeyRepeatCounter[key] return ((count == 0) or (count.nil? ? key_pressed?(key) : false)) end #-------------------------------------------------------------------------- # alias method: repeat? - Created by OriginalWij and Keroro #-------------------------------------------------------------------------- def repeat?(key) return ow_dt_i_trigger(key) if !VALUES.has_key?(key) count = KeyRepeatCounter[key] return true if count == 0 if count.nil? return key_pressed?(key) else return (count >= 23 and (count - 23) % 6 == 0) end end #-------------------------------------------------------------------------- # new method: key_pressed? - Created by OriginalWij and Keroro #-------------------------------------------------------------------------- def key_pressed?(key) if (GetKeyState.call(VALUES[key]).abs & 0x8000 == 0x8000) KeyRepeatCounter[key] = 0 return true end return false end #-------------------------------------------------------------------------- # new method: typing? - Created by Yanfly and Keroro #-------------------------------------------------------------------------- def typing? return true if repeat?(:SPACE) for key in LETTERS return true if repeat?(key) end for key in NUMBERS return true if repeat?(key) end return false end #-------------------------------------------------------------------------- # new method: key_type - Created by Yanfly and Keroro #-------------------------------------------------------------------------- def key_type return " " if repeat?(:SPACE) for key in LETTERS next unless repeat?(key) return upcase? ? key.to_s[3].upcase : key.to_s[3].downcase end for key in NUMBERS return key.to_s[3] if repeat?(key) end for key in NUMPADS return key.to_s[3] if repeat?(key) end return "" end #-------------------------------------------------------------------------- # new method: upcase? - Created by Yanfly #-------------------------------------------------------------------------- def upcase? return !press?(:SHIFT) if GetCapState.call(VALUES[:CAPS]) == 1 return true if press?(:SHIFT) return false endend #Input#===============================================================================# Window_NameEdit#===============================================================================class Window_NameEdit < Window_Base #-------------------------------------------------------------------------- # overwrite method: initialize #-------------------------------------------------------------------------- def initialize(actor, max_char) dw = Graphics.width - 176 dy = (Graphics.height - 128) / 2 if $game_message.visible difference = Graphics.height - 128 case $game_message.position when 0; dy += 64 when 1; dy += 0 when 2; dy -= 64 end end super(88, dy, dw, 128) @actor = actor @name = actor.name @max_char = max_char name_array = @name.split(//)[0...@max_char] @name = "" for i in 0...name_array.size @name += name_array[i] end @default_name = @name @index = name_array.size self.active = false refresh end #-------------------------------------------------------------------------- # overwrite method: item_rect #-------------------------------------------------------------------------- def item_rect(index) if index == @max_char rect = Rect.new(0, 0, 0, 0) else rect = Rect.new(0, 0, 0, 0) rect.x = 112 + index * 12 rect.y = 36 rect.width = 24 rect.height = line_height end return rect endend # Window_NameEdit#===============================================================================# Scene_Base#===============================================================================class Scene_Base #-------------------------------------------------------------------------- # new method: name_entry #-------------------------------------------------------------------------- def name_entry(actor_id, max_char) @name_actor_id = actor_id @name_entry_max = max_char start_name_entry end_name_entry end #-------------------------------------------------------------------------- # new method: start_name_entry #-------------------------------------------------------------------------- def start_name_entry Graphics.freeze actor = $game_actors[@name_actor_id] @edit_window = Window_NameEdit.new(actor, @name_entry_max) Graphics.transition(10) loop do update_name_entry if Input.repeat?(:BACK) and @edit_window.index > 0 Sound.play_cancel @edit_window.back elsif Input.typing? and @edit_window.index != @edit_window.max_char Sound.play_cursor @edit_window.add(Input.key_type) elsif Input.trigger?(:ENTER) Sound.play_ok actor.name = @edit_window.name break elsif Input.trigger?(:ESC) Sound.play_cancel break end end end #-------------------------------------------------------------------------- # new method: update_name_entry #-------------------------------------------------------------------------- def update_name_entry Graphics.update Input.update if SceneManager.scene.is_a?(Scene_Map) $game_map.update @spriteset.update elsif SceneManager.scene.is_a?(Scene_Battle) Graphics.update Input.update $game_system.update $game_troop.update @spriteset.update @message_window.update end @edit_window.update end #-------------------------------------------------------------------------- # end_name_entry #-------------------------------------------------------------------------- def end_name_entry @edit_window.dispose @edit_window = nil @name_actor_id = nil @name_entry_max = nil endend # Scene_Base#===============================================================================# Game_Interpreter#===============================================================================class Game_Interpreter #-------------------------------------------------------------------------- # overwrite method: command_303 (Name Input Processing) #-------------------------------------------------------------------------- def command_303 if $data_actors[@params[0]] != nil SceneManager.scene.name_entry(@params[0], @params[1]) end @index += 1 return false endend # Game_Interpreter Incompatibilità:Nessuna incompatibilità
       
      Note dell'Autore:
      In modalità finestra il mouse compare e scompare, a schermo intero invece resta nascosto.
    • Da Ally
      Nome Script: RVDATA2 Compressor
      Versione: Jet
      Autore/i: N/D

      Informazioni:
      Lo script permette di diminuire il peso di compressione dei file =)

      Istruzioni:
      Inserite lo script sotto Material.
      Istruzioni all'interno dello script.

      Script:


      #=============================================================================== # RVDATA2 Compression # By Jet10985 (Jet) #=============================================================================== # This script will compress .rvdata2 files in your data directory, to save space. # This script also compresses new save files. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Object: load_data, save_data # DataManager: load_game, save_game, load_header #=============================================================================== =begin This script will compress .rvdata2 everytime the game is started in TEST MODE. This is to make sure the files are of the latest version. -------------------------------------------------------------------------------- Before releasing your game, or releasing updates, you should run the game in test mode to update the compressed files. Before compiling your game, you should remove (DO NOT DELETE) the regular .rvdata2 files. -------------------------------------------------------------------------------- This script does not compress Scripts.rvdata2, do not remove it when you release your game. -------------------------------------------------------------------------------- This script will also compress save files, which means if you remove this script and then attempt to load a save game that was made while this script was active, it won't work. =end if $TEST   array = Dir.entries("Data")   array.each {|a|     next if [".", ".."].include?(a)     next unless !a.include?(".crvdata2") && !a.include?("Scripts.rvdata2")     if File.directory?("Data/#{a}")       Dir.entries("Data/#{a}").each {|v|         next if [".", ".."].include?(v)         array.push("#{a}/#{v}")       }       next     end     t = Zlib::Deflate.deflate(Marshal.dump(load_data("Data/#{a}")), 9)     save_data(t, "Data/#{a.gsub(".rvdata2", "")}.crvdata2")   } end class Object   alias jet1828_load_data load_data   def load_data(string)     return $RGSS_SCRIPTS if string.include?("Scripts")     string.gsub!(".rvdata2", ".crvdata2")     f = Zlib::Inflate.inflate(jet1828_load_data(string))     return Marshal.load(f)   end     alias jet1838_save_data save_data   def save_data(var, file)     f = Zlib::Deflate.deflate(Marshal.dump(var), 9)     jet1838_save_data(f, "#{file.gsub(".rvdata", "")}.crvdata")   end end module JetSaveMarshal     def self.dump(object, io)     Marshal.dump(Zlib::Deflate.deflate(Marshal.dump(object), 9), io)   end     def self.load(io)     return Marshal.load(Zlib::Inflate.inflate(Marshal.load(io)))   end end class << DataManager     alias jet2846_save_game save_game   def save_game(*args, &block)     old_marshal = Object.const_get(:Marshal)     DataManager.const_set(:Marshal, JetSaveMarshal)     ret = jet2846_save_game(*args, &block)     DataManager.const_set(:Marshal, old_marshal)     return ret   end     alias jet2846_load_game load_game   def load_game(*args, &block)     old_marshal = Object.const_get(:Marshal)     DataManager.const_set(:Marshal, JetSaveMarshal)     ret = jet2846_load_game(*args, &block)     DataManager.const_set(:Marshal, old_marshal)     return ret   end     alias jet2846_load_header load_header   def load_header(*args, &block)     old_marshal = Object.const_get(:Marshal)     DataManager.const_set(:Marshal, JetSaveMarshal)     ret = jet2846_load_header(*args, &block)     DataManager.const_set(:Marshal, old_marshal)     return ret   end end
×