Jump to content
Rpg²S Forum

Sieghart

Utenti
  • Posts

    483
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Sieghart

  1. Vero è che Judah rimarrà non rimarrà a lungo nel gruppo... :mellow:

    SPOILER ALERT!!! XD comunque, mica tutti gli animus devono servire per risolvere enigmi, qualcuno può avere anche qualche caratteristica particolare,un bonus di qualsiasi tipo per tenerli in squadra, chessò

  2. quando crei un oggetto, guarda tra gli effetti, c'è l'effetto "chiama evento comune", utilizzando questo oggetto quindi chiameremo l'evento comune che andremo a crearci.

    chiamalo ad esempio" diario" e scrivi tutto quello che dovrebbe contenere questo diario. per renderlo più credibile fai un mostra picture di una pagina di diario e metti lo sfondo trasparente al messaggio.

  3. a me l'evento funziona senza mettere alcun apostrofo... ma quando vi esce la schermata, le lettere sono in giapponese e poi sfogliate fino a quelle occidentali, o vi escono direttamente i caratteri normali? Perchè a me usciva la pagina con le lettere giappo, allora ho piazzato un # alla riga 76 dello script window_nameinput in modo da visualizzare solo i caratteri normali e poi è andato tutto liscio.

  4. Non capisco una cosa... il protagonista progredisce e incrementa il suo grado di "perfezione", ma questi suoi progressi si manifestano anche sulla cara e vecchia terra? Così come le invocazioni di queste creature perfette, potrà essere effettuata anche sulla terra o solo nel mondo della perfezione?

    Magari sulla terra è una persona comune...

  5. Non penso si posse fare nella maniera convenzionale, puoi fare in qualche maniera alternativa, cambiando i pg in modo che venga visto lo status di chi ti serve... ricorda che SceneManager.call (Scene_Status) richiama il menù status, quindi puoi fare fase 1 parli con un pg, fase 2 togli dal party il protagonista e lo sostituisci con questo fuori dal party fase 3 call script e fase 4 tutto torna normale. Oppure puoi creare un oggetto nell'inventario che fa la stessa cosa... boh magari qualcuno che ne sa di più ti illumina

  6. sinceramente, è interessante l'introduzione dei TP, ma è alquanto limitata e va assolutamente migliorata. Io personalmente non li uso nel mio progetto, preferisco i cari vecchi mp per tutto, ma se proprio vuoi una buona personalizzazione e una gestione completa dei TP devi usare uno script, come ad esempio il TP manager di yanfly.

  7. effettivamente l'ho provato, e richiamato il menù di craft tramite call script SceneManager.call(Scene_Craft) mi fa combinare solo gli item e non ad esempio item e weapon (le armi e le armature compaiono nella lista di oggetti, ma in grigio e non selezionabili), inoltre se passi al prodotto finito senza che hai inserito alcun ingrediente crasha senza pietà, e crasha pure se la pozione invece di metterla in posizione 1 la metti in posizione 3 ad esempio. Evitalo!

    Prova ad eventi come suggerisce l'antipatico

  8. se poi proprio vuoi lo script...

    =begin
    
    #===============================================================================
    
     Title: Effect: Add Self State
    
     Author: Tsukihime
    
     Date: Apr 20, 2013
    
    --------------------------------------------------------------------------------
    
     ** Change log
    
     Apr 20, 2013
    
       - initial release
    
    --------------------------------------------------------------------------------  
    
     ** Terms of Use
    
     * Free to use in commercial/non-commercial projects
    
     * No real support. The script is provided as-is
    
     * Will do bug fixes, but no compatibility patches
    
     * Features may be requested but no guarantees, especially if it is non-trivial
    
     * Credits to Tsukihime in your project
    
     * Preserve this header
    
    --------------------------------------------------------------------------------
    
     ** Description
    
     
    
     This effect adds a state to the user of a skill/item
    
    
    
    --------------------------------------------------------------------------------
    
     ** Required
    
     
    
     Effects Manager
    
     (http://himeworks.wordpress.com/2012/10/05/effects-manager/)
    
    --------------------------------------------------------------------------------
    
     ** Installation
    
     
    
     Place this script below Effect Manager and above Main
    
     
    
    --------------------------------------------------------------------------------
    
     ** Usage
    
     
    
     Tag items or skills with
    
     
    
       <eff: add_self_state stateID probability>
    
       
    
     Where `stateID` is the ID of the state to apply
    
     `probability` is the chance that it will be added, as a float
    
     
    
     For example, 
    
       0 is 0%
    
       0.5 is 50%
    
       1 is 100%
    
     
    
    #===============================================================================
    
    =end
    
    $imported = {} if $imported.nil?
    
    $imported["TH_AddSelfState"] = true
    
    #===============================================================================
    
    # ** Configuration
    
    #===============================================================================
    
    module TH
    
      module Add_Self_State
    
    #===============================================================================
    
    # ** Rest of Script
    
    #===============================================================================
    
        Effect_Manager.register_effect(:add_self_state, 2.6)
    
      end
    
    end
    
    
    
    module RPG
    
      class UsableItem < BaseItem
    
        def add_effect_add_self_state(code, data_id, args)
    
          data_id = args[0].to_i
    
          value = args[1].to_f
    
          add_effect(code, data_id, value)
    
        end 
    
      end
    
    end
    
    
    
    class Game_Battler < Game_BattlerBase
    
      
    
      def item_effect_add_self_state(user, item, effect)
    
        state_id = effect.data_id
    
        prob = effect.value1
    
        
    
        if rand < prob
    
          user.add_state(state_id)
    
        end
    
      end
    
    end
    

    richiede effect manager (il link sta nella descrizione dello script) ed è facile da utilizzare, decidi lo stato da infliggere a colui che usa la skill e anche la probabilità.

    Però però, quando crei una skill ti insegno un trucchetto. nella formula del danno, se scrivi a.add_state(n); a.atk x - b.def y e al posto di n metti il numero dello stato, colui che attacca ottiene quello stato alterato. Quindi se puoi risparmiati lo script ^^

  9. proprio random non saprei, ma puoi creare un evento ad anizio automatico che controlla una variabile impostata a caso tra 0 e 5, poi crei 6 eventi monete e ognuno si attiva con un dato valore della variabile, impostandolo tra le condizioni. In questo modo il gioco sceglierà un valore a caso tra 0 e 5 e comparirà la moneta che hai impostato con quel dato valore... non so se mi spiego Q_Q

  10. class Game_Actor < Game_Battler
      alias heal_on_level_up level_up
      #--------------------------------------------------------------------------
      # * Level Up
      #--------------------------------------------------------------------------
      def level_up
    	heal_on_level_up
    	recover_all
      end
    end
    

    questo recupera anche gli status alterati, altrimenti

    class Game_Actor < Game_Battler
      alias heal_on_level_up level_up
      #--------------------------------------------------------------------------
      # * Level Up
      #--------------------------------------------------------------------------
      def level_up
    	heal_on_level_up
    	@hp = mhp
    	@mp = mmp
      end
    end
    

    solo hp e mp, mettilo sotto materials e dovresti stare apposto. fammi sapere XD

  11. Ci sono alcuni script che fanno quello che chiedi

    =begin
    
    #==============================================================================
    
     ** Large Choices
    
     Author: Tsukihime
    
     Date: Apr 10, 2013
    
    ------------------------------------------------------------------------------
    
     ** Change log
    
     Apr 10, 2013
    
       - added option to disable automatic show combining
    
     Mar 26, 2013
    
       - fixed bug where cancel choice was not properly updated
    
     Jan 12, 2013
    
       - fixed bug where the first set of nested options were numbered incorrectly
    
     Dec 7, 2012
    
       - implemented proper branch canceling
    
     Dec 6, 2012
    
       - Initial release
    
    ------------------------------------------------------------------------------   
    
     ** Terms of Use
    
     * Free to use in commercial/non-commercial projects
    
     * No real support. The script is provided as-is
    
     * Will do bug fixes, but no compatibility patches
    
     * Features may be requested but no guarantees, especially if it is non-trivial
    
     * Preserve this header
    
    ------------------------------------------------------------------------------
    
     ** Description
    
     
    
     This script combines groups of "show choice" options together as one large
    
     command. This allows you to create more than 4 choices by simply creating
    
     several "show choice" commands.
    
    ------------------------------------------------------------------------------
    
     ** Usage
    
     
    
     Add a show choice command.
    
     If you want more choices, add another one, and fill it out as usual.
    
     
    
     Note that you should only specify one cancel choice (if you specify more than
    
     one, then the last one is taken).
    
     
    
     For "branch" canceling, note that *all* cancel branches are executed.
    
     You should only have a cancel branch on the last set of choices
    
     
    
     You can disable automatic choice combining by enabling the "Manual Combine"
    
     option, which will require you to make this script call before the first
    
     show choice command
    
     
    
        combine_choices
    
        
    
     In order to combine choices together
    
    #==============================================================================
    
    =end
    
    $imported = {} if $imported.nil?
    
    $imported["TH_LargeChoices"] = true
    
    #==============================================================================
    
    # ** Configuration
    
    #==============================================================================
    
    module TH
    
      module Large_Choices
    
        
    
        # Turning this option on will require you to manually specify that
    
        # a sequence of Show Choice options should be combined
    
        Manual_Combine = false
    
        
    
    #==============================================================================
    
    # ** Rest of the script
    
    #==============================================================================     
    
        Code_Filter = [402, 403, 404]
    
        Regex = /<large choices>/i
    
      end
    
    end
    
    
    
    class Game_Temp
    
      
    
      # temp solution to get this working
    
      attr_accessor :branch_choice
    
      
    
      def branch_choice
    
        @branch_choice || 5
    
      end
    
    end
    
    
    
    class Game_Interpreter
    
      
    
      #-----------------------------------------------------------------------------
    
      # Clean up
    
      #-----------------------------------------------------------------------------
    
      alias :th_large_choices_clear :clear
    
      def clear
    
        th_large_choices_clear
    
        @first_choice_cmd = nil
    
        @choice_search = 0
    
        @combine_choices = false
    
      end
    
      
    
      #-----------------------------------------------------------------------------
    
      # Prepare for more choices
    
      #-----------------------------------------------------------------------------
    
      alias :th_large_choices_setup_choices :setup_choices
    
      def setup_choices(params)
    
        # start with our original choices
    
        th_large_choices_setup_choices(params)
    
        
    
        return if TH::Large_Choices::Manual_Combine && !@combine_choices
    
    
    
        # store our "first" choice in the sequence
    
        @first_choice_cmd = @list[@index]
    
        
    
        # reset branch choice
    
        $game_temp.branch_choice = @first_choice_cmd.parameters[1]
    
        
    
        # Start searching for more choices
    
        @num_choices = $game_message.choices.size
    
        @choice_search = @index + 1
    
        search_more_choices
    
      end
    
      
    
      def combine_choices
    
        @combine_choices = true
    
      end
    
      
    
      #-----------------------------------------------------------------------------
    
      # New. Check whether the next command (after all branches) is another choice
    
      # command. If so, merge it with the first choice command.
    
      #-----------------------------------------------------------------------------
    
      def search_more_choices
    
        skip_choice_branches
    
        next_cmd = @list[@choice_search]
    
        
    
        # Next command isn't a "show choice" so we're done
    
        return if next_cmd.code != 102
    
        
    
        @choice_search += 1
    
        # Otherwise, push the choices into the first choice command to merge
    
        # the commands.
    
        @first_choice_cmd.parameters[0].concat(next_cmd.parameters[0])
    
        
    
        # Update all cases to reflect merged choices
    
        update_show_choices(next_cmd.parameters)
    
        update_cancel_choice(next_cmd.parameters)
    
        update_choice_numbers
    
        
    
        # delete the command to effectively merge the branches
    
        @list.delete(next_cmd)
    
        
    
        # Now search for more
    
        search_more_choices
    
      end
    
    
    
      #-----------------------------------------------------------------------------
    
      # New. Update the options for the first "show choice" command
    
      #-----------------------------------------------------------------------------
    
      def update_show_choices(params)
    
        params[0].each {|s| $game_message.choices.push(s) }
    
      end
    
      
    
      #-----------------------------------------------------------------------------
    
      # New. If cancel specified, update it to reflect merged choice numbers
    
      # The last one is taken if multiple cancel choices are specified
    
      #-----------------------------------------------------------------------------
    
      def update_cancel_choice(params)
    
        
    
        # disallow, just ignore
    
        return if params[1] == 0    
    
        
    
        # branch on cancel
    
        return update_branch_choice if params[1] == 5
    
        
    
        # num_choices is not one-based
    
        cancel_choice = params[1] + (@num_choices)
    
        # update cancel choice, as well as the first choice command
    
        $game_message.choice_cancel_type = cancel_choice
    
        @first_choice_cmd.parameters[1] = cancel_choice
    
      end
    
      
    
      #-----------------------------------------------------------------------------
    
      # New. Set the initial choice command to "branch cancel"
    
      #-----------------------------------------------------------------------------
    
      def update_branch_choice
    
        branch_choice = $game_message.choices.size + 1
    
        $game_message.choice_cancel_type = branch_choice
    
        $game_temp.branch_choice = branch_choice
    
        @first_choice_cmd.parameters[1] = branch_choice
    
      end
    
      
    
      def command_403
    
        command_skip if @branch[@indent] != $game_temp.branch_choice - 1
    
      end
    
      
    
      #-----------------------------------------------------------------------------
    
      # New. For each branch, update it to reflect the merged choice numbers.
    
      #-----------------------------------------------------------------------------
    
      def update_choice_numbers
    
        
    
        # Begin searching immediately after cmd 102 (show choice)
    
        i = @choice_search
    
        
    
        # Rough search for "When" commands. The search must skip nested commands
    
        while TH::Large_Choices::Code_Filter.include?(@list[i].code) || @list[i].indent != @indent
    
          if @list[i].code == 402 && @list[i].indent == @indent
    
            @list[i].parameters[0] = @num_choices 
    
            @num_choices += 1
    
          end
    
          i += 1
    
        end
    
      end
    
      
    
      #-----------------------------------------------------------------------------
    
      # New. Returns the next command after our choice branches
    
      #-----------------------------------------------------------------------------
    
      def skip_choice_branches
    
        # start search at the next command
    
        # skip all choice branch-related commands and any branches
    
        while TH::Large_Choices::Code_Filter.include?(@list[@choice_search].code) || @list[@choice_search].indent != @indent
    
          @choice_search += 1
    
        end
    
        return @choice_search
    
      end
    
    end
    

    praticamente metti 2 o più mostra scelta di fila e lo script te li fonde, fammi sapere :cool:

  12. beh io ti propongo uno script, poi fai le tue valutazioni... pensavo a questo qua

    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    #  ▼ Actor Inventory
    #  Author: Kread-EX
    #  Version 1.11
    #  Release date: 11/02/2012
    #
    #  Big thanks to Seiryuki.
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    
    #------------------------------------------------------------------------------
    #  ▼ UPDATES
    #------------------------------------------------------------------------------
    # # 13/04/2013. Fixed compat. with YF Convert Damage and Buff/State Manager.
    # # 16/01/2012. Fixed compat. with Fomar's Equipment Skills.
    # # 01/04/2012. Fixed compat. with Ace Passive States
    # # 01/04/2012. Fixed compat. with various YF scripts.
    # # 26/03/2012. Added class conditions for items.
    # # 12/02/2012. Fixed critical bug.
    #------------------------------------------------------------------------------
    #  ▼ TERMS OF USAGE
    #------------------------------------------------------------------------------
    # #  You are free to adapt this work to suit your needs.
    # #  You can use this work for commercial purposes if you like it.
    # #  Credit is appreciated.
    # #
    # # For support:
    # # grimoirecastle.wordpress.com
    # # rpgmakerweb.com
    #------------------------------------------------------------------------------
    #  ▼ INTRODUCTION
    #------------------------------------------------------------------------------
    # # Consumable items become equippable and they are only available in battle once
    # # equipped akin to the Suikoden series. It offers strategic options as the
    # # player has to choose between stats (accessories) or items.
    #------------------------------------------------------------------------------
    #  ▼ INSTRUCTIONS
    #------------------------------------------------------------------------------
    # # Requires (yes, I said REQUIRES) Yanfly's Ace Equip Engine. After that, it's
    # # pretty plug and play, just select the slot type in the config module. By
    # # default, it's 4 (same as accessories) but do whatever you want.
    # #
    # # <class_locks: x, x>
    # # This item notetag allows you to lock items to certain classes.
    #------------------------------------------------------------------------------
    #  ▼ COMPATIBILITY
    #------------------------------------------------------------------------------
    # # Obviously enough, needs to be placed below Ace Equip Engine since it's needed.
    # # Ace Battle Engine on the other hand is optional.
    # # Numerous overwrites make this script incompatible with battle scripts that
    # # changes how items behave in battle.
    # #
    # # List of aliases and overwrites:
    # #
    # # DataManager
    # # load_database (alias)
    # # load_actinv_notetags (new method)
    # #
    # # RPG::Item
    # # etype_id (new method)
    # # params (new method)
    # #
    # # Game_Temp
    # # item_equip_index (new attr method)
    # #
    # # Game_Battler
    # # consume_item (alias)
    # # consume_equip_item (new method)
    # #
    # # Game_Actor
    # # equippable? (overwrite)
    # # sealed_etypes (overwrite)
    # # fixed_etypes (overwrite)
    # #
    # # Game_Party
    # # has_item? (alias)
    # #
    # # Window_EquipItem
    # # include? (overwrite)
    # #
    # # Window_ActorItem (new class)
    # #
    # # Scene_Battle
    # # create_item_window (overwrite)
    # # command_item (overwrite)
    # # on_item_ok (alias)
    # # on_actor_cancel (alias)
    #------------------------------------------------------------------------------
    
    # Quits if Ace Equip Engine isn't found.
    
    if $imported.nil? || $imported['YEA-AceEquipEngine'].nil?
    	
    msgbox('You need YF Ace Equip Engine in order to use Actor Inventory. Loading aborted.')
    
    else
    	
    $imported['KRX-ActorInventory'] = true
    
    #puts 'Load: Actor Inventory v1.11 by Kread-EX'
    
    module KRX
    
      ITEMS_ETYPE_ID = 4
      
      module REGEXP
        ITEM_CLASS_LOCKS = /<class_locks:[ ]*(\d+(?:\s*,\s*\d+)*)>/i
      end
    end
    
    #===========================================================================
    # ■ DataManager
    #===========================================================================
    
    module DataManager  
    	#--------------------------------------------------------------------------
    	# ● Loads the database
    	#--------------------------------------------------------------------------
    	class << self
    		alias_method(:krx_actinv_dm_load_database, :load_database)
    	end
    	def self.load_database
    		krx_actinv_dm_load_database
    		load_actinv_notetags
    	end  
    	#--------------------------------------------------------------------------
    	# ● Loads the note tags
    	#--------------------------------------------------------------------------
    	def self.load_actinv_notetags
    		groups = [$data_items]
    		for group in groups
    			for obj in group
    				next if obj.nil?
    				obj.load_actinv_notetags
    			end
    		end
    		#puts "Read: Actor Inventory Notetags"
    	end
    end
    
    #===========================================================================
    # ■ RPG::Item
    #===========================================================================
    
    class RPG::Item < RPG::UsableItem
      #--------------------------------------------------------------------------
      # ● Public instance variables
      #--------------------------------------------------------------------------
      attr_reader   :c_locks
    	#--------------------------------------------------------------------------
    	# ● Loads the note tags
    	#--------------------------------------------------------------------------
    	def load_actinv_notetags
    		@note.split(/[\r\n]+/).each do |line|
    			case line
    			when KRX::REGEXP::ITEM_CLASS_LOCKS
            @c_locks = []
    				$1.scan(/\d+/).each {|i| @c_locks.push(i.to_i)}
    			end
    		end
    	end
      #--------------------------------------------------------------------------
      # ● Set the etype to the same as accessories
      #--------------------------------------------------------------------------
      def etype_id
        KRX::ITEMS_ETYPE_ID
      end
      #--------------------------------------------------------------------------
      # ● Set parameter gains to 0
      #--------------------------------------------------------------------------
      def params
        [0] * 8
      end
    end
    
    #===========================================================================
    # ■ Game_Temp
    #===========================================================================
    
    class Game_Temp
      attr_accessor  :item_equip_index
    end
    
    #===========================================================================
    # ■ Game_Battler
    #===========================================================================
    
    class Game_Battler < Game_BattlerBase
      #--------------------------------------------------------------------------
      # ● Uses up an item
      #--------------------------------------------------------------------------
      alias_method(:krx_actinv_gb_ci, :consume_item)
      def consume_item(item)
        if SceneManager.scene.is_a?(Scene_Battle)
          consume_equip_item(item)
          return
        end
        krx_actinv_gb_ci(item)
      end
      #--------------------------------------------------------------------------
      # ● Uses up an equipped item
      #--------------------------------------------------------------------------
      def consume_equip_item(item)
        unless !is_a?(Game_Actor)
          @equips[$game_temp.item_equip_index] = Game_BaseItem.new
        end
      end
    end
    
    #===========================================================================
    # ■ Game_Actor
    #===========================================================================
    
    class Game_Actor < Game_Battler
      #--------------------------------------------------------------------------
      # ● Determine if an item can be equipped
      #--------------------------------------------------------------------------
      def equippable?(item)
        if item.is_a?(RPG::Item)
          return false if item.c_locks != nil && !item.c_locks.include?(class_id)
          return false if item.itype_id == 2
          return false unless item.battle_ok?
          return true
        end
        return false if item.nil?
        return false if equip_type_sealed?(item.etype_id)
        return equip_wtype_ok?(item.wtype_id) if item.is_a?(RPG::Weapon)
        return equip_atype_ok?(item.atype_id) if item.is_a?(RPG::Armor)
        return false
      end
      #--------------------------------------------------------------------------
      # new method: sealed_etypes
      #--------------------------------------------------------------------------
      def sealed_etypes
        array = []
        array |= self.actor.sealed_equip_type
        array |= self.class.sealed_equip_type
        for equip in equips
          next if equip.nil? || equip.is_a?(RPG::Item)
          array |= equip.sealed_equip_type
        end
        for state in states
          next if state.nil?
          array |= state.sealed_equip_type
        end
        return array
      end
      #--------------------------------------------------------------------------
      # new method: fixed_etypes
      #--------------------------------------------------------------------------
      def fixed_etypes
        array = []
        array |= self.actor.fixed_equip_type
        array |= self.class.fixed_equip_type
        for equip in equips
          next if equip.nil? || equip.is_a?(RPG::Item)
          array |= equip.fixed_equip_type
        end
        for state in states
          next if state.nil?
          array |= state.fixed_equip_type
        end
        return array
      end
    end
    
    #===========================================================================
    # ■ Game_Party
    #===========================================================================
    
    class Game_Party < Game_Unit
      #--------------------------------------------------------------------------
      # ● Determine if the party possess an item
      #--------------------------------------------------------------------------
      alias_method(:krx_actinv_gp_has_item?, :has_item?)
      def has_item?(item, include_equip = false)
        return true if SceneManager.scene.is_a?(Scene_Battle)
        return krx_actinv_gp_has_item?(item, include_equip)
      end
    end
    
    #===========================================================================
    # ■ Window_EquipItem
    #===========================================================================
    
    class Window_EquipItem < Window_ItemList
      #--------------------------------------------------------------------------
      # ● Determine if an item goes into the list
      #--------------------------------------------------------------------------
      def include?(item)
        if item.nil? && !@actor.nil?
          etype_id = @actor.equip_slots[@slot_id]
          return YEA::EQUIP::TYPES[etype_id][1]
        end
        return true if item.nil?
        return false if @slot_id < 0
        return false if item.etype_id != @actor.equip_slots[@slot_id]
        return @actor.equippable?(item)
      end
    end
    
    #==============================================================================
    # ■ Window_ActorItem
    #==============================================================================
    
    class Window_ActorItem < Window_EquipSlot
      #--------------------------------------------------------------------------
      # ● Determine if a slot can be selected
      #--------------------------------------------------------------------------
      def enable?(index)
        item = @actor.equips[index]
        item.is_a?(RPG::Item) && item.battle_ok?
      end
      #--------------------------------------------------------------------------
      # ● Makes the window appear
      #--------------------------------------------------------------------------
      def show
        @help_window.show
        super
      end
      #--------------------------------------------------------------------------
      # ● Makes the window disappear
      #--------------------------------------------------------------------------
      def hide
        @help_window.hide unless @help_window.nil?
        super
      end
    end
    
    #==============================================================================
    # ■ Scene_Battle
    #==============================================================================
    
    class Scene_Battle < Scene_Base
      #--------------------------------------------------------------------------
      # ● Constructs the item window
      #--------------------------------------------------------------------------
      def create_item_window
        wx = 0
        wy = @help_window.height
        ww = Graphics.width / 2 + 48
        @item_window = Window_ActorItem.new(wx, wy, ww)
        @item_window.height -= @status_window.height
        @item_window.hide
        @item_window.help_window = @help_window
        @item_window.set_handler(:ok,     method(:on_item_ok))
        @item_window.set_handler(:cancel, method(:on_item_cancel))
      end
      #--------------------------------------------------------------------------
      # ● Selects an item
      #--------------------------------------------------------------------------
      def command_item
        @item_window.actor = BattleManager.actor
        @item_window.refresh
        @item_window.show.activate.select(0)
      end
      #--------------------------------------------------------------------------
      # ● Validates the item selection
      #--------------------------------------------------------------------------
      alias_method(:krx_actinv_sb_oio, :on_item_ok)
      def on_item_ok
        $game_temp.item_equip_index = @item_window.index
        krx_actinv_sb_oio
      end
      #--------------------------------------------------------------------------
      # ● Cancels the actor selection
      #--------------------------------------------------------------------------
      alias_method(:krx_actinv_sb_oac, :on_actor_cancel)
      def on_actor_cancel
        krx_actinv_sb_oac
        @status_window.show
      end
    end
    
    # YEA compatibility
    
    #===========================================================================
    # ■ RPG::Item
    #===========================================================================
    
    class RPG::Item < RPG::UsableItem
      # Lunatic Parameters
      def custom_parameters
        if @custom_parameters.nil?
          @custom_parameters = {
          0 => [], 1 => [], 2 => [], 3 => [], 4 => [], 5 => [], 6 => [], 7 => [] }
        end
        @custom_parameters
      end
      # Passive states
      def passive_states; []; end
      # Skill Restrictions
      def warmup_rate; 1; end
      # Skill Cost Manager
      def hp_cost_rate; 1; end
      def gold_cost_rate; 1; end
      def tp_cost_rate; 1; end
      def cooldown_rate; 1; end
      # Element Reflect
      def element_reflect; []; end
      # Element Absorb
      def element_absorb; []; end
    end
    
    end # YEA compatibility
    
    # Buff/State Manager compatibility
    if $imported["YEA-Buff&StateManager"]
      class RPG::UsableItem < RPG::BaseItem
        alias_method(:krx_actinv_bsm, :load_notetags_bsm)
        def load_notetags_bsm
          super
          krx_actinv_bsm
        end
      end
    end # End of Buff/State Manager compatibility
    
    # Convert Damage compatibility
    if $imported["YEA-ConvertDamage"]
      class RPG::UsableItem < RPG::BaseItem
        alias_method(:krx_actinv_convertdmg, :load_notetags_convertdmg)
        def load_notetags_convertdmg
          super
          krx_actinv_convertdmg
        end
      end
    end # End of Buff/State Manager compatibility
    
    # Fomar's Equipment Skills compatibility
    if defined?(Equipment_Skills)
      
    class Window_EquipSlot < Window_Selectable
      def update
        eqskills_update
        return if SceneManager.scene.is_a?(Scene_Battle)
        @status_window.refresh(self.item) if self.active == true
      end
    end
    
    end # Fomar's Equipment Skills compatibility
    

    praticamente, c'è un inventario per tutti i pg, ma questi possono usare solo quelli che tu gli consegni per la battaglia (come si vede in questa immagine) http://grimoirecastle.files.wordpress.com/2012/02/actinv02.jpg

  13. Hai ragione quegli stati aumentano la difesa! Mi faccio perdonareXD

    #==============================================================================
    # ** Victor Engine - Element Strenghten
    #------------------------------------------------------------------------------
    # Author : Victor Sant
    #
    # Version History:
    #  v 1.00 - 2012.07.03 > First relase
    #  v 1.01 - 2013.02.13 > Fixed issue with item effects
    #------------------------------------------------------------------------------
    #  This script allows to setup a trait that change the power of actions based
    # on their elements. You can make the fire rod increase the power of fire based 
    # spells.
    #------------------------------------------------------------------------------
    # Compatibility
    #   Requires the script 'Victor Engine - Basic Module' v 1.35 or higher
    #   If used with 'Victor Engine - Animated Battle' place this bellow it.
    #   If used with 'Victor Engine - Element Set' place this bellow it.
    #
    # * Alias methods (Default)
    #   class Game_Battler < Game_BattlerBase
    #     def item_value_recover_hp(user, item, effect)
    #     def item_value_recover_mp(user, item, effect)
    #     def item_value_gain_tp(user, item, effect)
    #     def item_element_rate(user, item)
    #
    #------------------------------------------------------------------------------
    # Instructions:
    #  To instal the script, open you script editor and paste this script on
    #  a new section bellow the Materials section. This script must also
    #  be bellow the script 'Victor Engine - Basic'
    #
    #------------------------------------------------------------------------------
    # Actors, Classes, Enemies, Weapons, Armors and States note tags:
    #   Tags to be used on Actors, Classes, Enemies, Weapons, Armors and States
    #   note boxes.
    #
    #  <element strenghten x: +y%>
    #  <element strenghten x: -y%>
    #   Setup the element and a percent value of change in power
    #     x : ID of the element
    #     y : amount of change in element power
    # 
    #==============================================================================
    
    #==============================================================================
    # ** Victor Engine
    #------------------------------------------------------------------------------
    #   Setting module for the Victor Engine
    #==============================================================================
    
    module Victor_Engine
      #--------------------------------------------------------------------------
      # * Set how multiple element streghten will be calculated
      #    Choose here how the elemental streghten will be calculated when handling
      #    multiples values
      #    :highest  : use the highest value (default behavior)
      #    :addition : sum of all values
      #    :average  : average of all values
      #    :multiply : multiply all values
      #--------------------------------------------------------------------------
      VE_RESIST_ADDITION_TYPE = :highest
      #--------------------------------------------------------------------------
      # * required
      #   This method checks for the existance of the basic module and other
      #   VE scripts required for this script to work, don't edit this
      #--------------------------------------------------------------------------
      def self.required(name, req, version, type = nil)
        if !$imported[:ve_basic_module]
          msg = "The script '%s' requires the script\n"
          msg += "'VE - Basic Module' v%s or higher above it to work properly\n"
          msg += "Go to http://victorscripts.wordpress.com/ to download this script."
          msgbox(sprintf(msg, self.script_name(name), version))
          exit
        else
          self.required_script(name, req, version, type)
        end
      end
      #--------------------------------------------------------------------------
      # * script_name
      #   Get the script name base on the imported value
      #--------------------------------------------------------------------------
      def self.script_name(name, ext = "VE")
        name = name.to_s.gsub("_", " ").upcase.split
        name.collect! {|char| char == ext ? "#{char} -" : char.capitalize }
        name.join(" ")
      end
    end
    
    $imported ||= {}
    $imported[:ve_element_strenghten] = 1.01
    Victor_Engine.required(:ve_element_strenghten, :ve_basic_module, 1.35, :above)
    
    #==============================================================================
    # ** Game_Battler
    #------------------------------------------------------------------------------
    #  This class deals with battlers. It's used as a superclass of the Game_Actor
    # and Game_Enemy classes.
    #==============================================================================
    
    class Game_Battler < Game_BattlerBase
      #--------------------------------------------------------------------------
      # * Alias method: item_effect_recover_hp
      #--------------------------------------------------------------------------
      alias :item_value_recover_hp_ve_action_streghten :item_value_recover_hp
      def item_value_recover_hp(user, item, effect)
        value = item_value_recover_hp_ve_action_streghten(user, item, effect)
        value * user.element_strenghten(user.element_set(item))
      end
      #--------------------------------------------------------------------------
      # * Alias method: item_effect_recover_mp
      #--------------------------------------------------------------------------
      alias :item_value_recover_mp_ve_action_streghten :item_value_recover_mp
      def item_value_recover_mp(user, item, effect)
        value = item_value_recover_mp_ve_action_streghten(user, item, effect)
        value * user.element_strenghten(user.element_set(item))
      end
      #--------------------------------------------------------------------------
      # * Alias method: item_effect_recover_tp
      #--------------------------------------------------------------------------
      alias :item_value_recover_tp_ve_action_streghten :item_value_recover_tp
      def item_value_recover_tp(user, item, effect)
        value = item_value_recover_tp_ve_action_streghten(user, item, effect)
        value * user.element_strenghten(user.element_set(item))
      end
      #--------------------------------------------------------------------------
      # * Alias method: item_element_rate
      #--------------------------------------------------------------------------
      alias :item_element_rate_ve_element_strenghten :item_element_rate
      def item_element_rate(user, item)
        result = item_element_rate_ve_element_strenghten(user, item)
        result * user.element_strenghten(user.element_set(item))
      end
      #--------------------------------------------------------------------------
      # * New method: element_strenghten
      #--------------------------------------------------------------------------
      def element_strenghten(elements)
        case VE_RESIST_ADDITION_TYPE
        when :addition then addition_element_strenghten(elements)
        when :average  then average_element_strenghten(elements)
        when :multiply then multiply_element_strenghten(elements)
        else highest_element_strenghten(elements)
        end
      end
      #--------------------------------------------------------------------------
      # * New method: highest_element_strenghten
      #--------------------------------------------------------------------------
      def highest_element_strenghten(elements)
        result = elements.inject([]) {|r, i| r += get_element_streghten(i) }
        result.inject([1.0]) {|r, i| r.push(i + 1.0) }.max
      end
      #--------------------------------------------------------------------------
      # * New method: addition_element_strenghten
      #--------------------------------------------------------------------------
      def addition_element_strenghten(elements)
        result = elements.inject([]) {|r, i| r += get_element_streghten(i) }
        result.inject([1.0]) {|r, i| r.push(i) }.sum
      end
      #--------------------------------------------------------------------------
      # * New method: average_element_strenghten
      #--------------------------------------------------------------------------
      def average_element_strenghten(elements)
        result = elements.inject([]) {|r, i| r += get_element_streghten(i) }
        result.inject([]) {|r, i| r.push(i) }.average + 1.0
      end
      #--------------------------------------------------------------------------
      # * New method: multiply_element_strenghten
      #--------------------------------------------------------------------------
      def multiply_element_strenghten(elements)
       result = elements.inject([]) {|r, i| r += get_element_streghten(i) }
       result.inject(1.0) {|r, i| r *= i + 1.0 }
      end
      #--------------------------------------------------------------------------
      # * New method: get_element_streghten
      #--------------------------------------------------------------------------
      def get_element_streghten(id)
        regexp = /<ELEMENT STRENGHTEN #{id}: ([+-]?\d+)%?>/i
        list   = get_all_notes.scan(regexp).collect {|i| i.first.to_i / 100.0 }
      end
    end
    
  14. scusate se azzardo, ma non si potrebbe far applicare uno stato al possessore dell'arma in questione? Si fa in modo che se si equipaggia questo scettro, al pg viene applicato uno stato simile a forza del fuoco, che non si rimuove a fine battaglia e che non ha scadenze in fatto di turni... che ne pensate?

×
×
  • Create New...