Jump to content
Rpg²S Forum

Valentino

Utenti
  • Posts

    463
  • Joined

  • Last visited

Posts posted by Valentino

  1. Ok allora io ho preparato il tutto, solo che mi sono accorto di una cosa XD ho messo che il comando "proteggi" sostituisce quello di difesa personale. Vuoi che lo mantenga?

     

    EDIT: Ho creato una versione che aggiunge semplicemente il comando e rende ancora di più lo script personalizzabile, adesso carico la demo e ti mando un MP! Spero di aver centrato tutte le tue richieste :D

  2. Ahhhh! Ok, perchè io per adesso ho fatto un sistema che permette di scegliere chi difendere e poi l'eroe continua a difenderlo automaticamente, ma comunque combattendo. Non dovrebbe essere troppo difficile sistemarlo come hai detto tu. Mi metto al lavoro! In serata dovrei riuscire credo.

     

     

    Un'unica cosa, vuoi quindi che alla selezione del comando di protezione si scelga un personaggio e poi non si possa più cambiare (per la durata della battaglia), oppure che si debba scegliere ogni volta a ogni turno chi proteggere?

  3. Allora se ho capito bene questo dovrebbe funzionare:

     

    Vai nella sezione script e sopra main inserisci una nuova pagina e incollaci all'interno questo:

     

    class Interpreter

    def command_321

    # Get actor

    actor = $game_actors[@parameters[0]]

    # Change class

    if actor != nil

    actor.class_id = @parameters[1]

    for i in 1..actor.level

    for j in $data_classes[actor.class_id].learnings

    if j.level == i

    actor.learn_skill(j.skill_id)

    end

    end

    end

    end

    # Continue

    return true

    end

    end

     

     

     

     

    Fatto questo, ora il comando cambia classe farà anche imparare le abilità della nuova classe se il livello del personaggio è uguale o superiore a quello richiesto.

     

    Non sono sicuro che funzioni al 100% però credo di sì, testandolo non ho trovato problemi.

     

    Se ti serve altro chiedimi pure. (tipo chessò una scena che permette di cambiare classeai personaggi per rendere tutto più semplice... Anche solo per provare XD voglio cimentarmici :biggrin: ) :rovatfl:

  4. Allora fammi capire... Tu vuoi che cambiando classe, il personaggio dimentichi le skill apprese e apprenda quelle della classe nuova fino al lv a cui è arrivato, per poi apprendere quelle della nuova classe con il level up?

    Dovresti dare dei dettagli maggiori così non si capisce benissimo. :rovatfl: Spiegati meglio poi magari posso vedere di crearti qualcosa io ma non ti assicuro la riuscita! XD

  5. Advanced Armor System

    Descrizione

     

    Questo script aggiunge delle funzionalità alle armature quali il prevenire un colpo critico oppure l'assorbire un elemento al posto di ridurne semplicemente l'effetto.

     

    Autore

    Avon Valentino (Io)

     

    Allegati

     

     

    #Advanced Armor System creato da Valentino Avon
    #Se usate questo script, creditatemi :)
    ARMATURE_PREVIENI_CRITICO = [33]
    #ID delle armature che non permettono il subire un colpo critico.
    ARMATURA_ASSORBE_ELEMENTO = [34,35]
    #ID delle armature che al posto di difendere da un elemento lo assorbono.
    #Il danno sarà assorbito per metà.
    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    # This class handles the actor. It's used within the Game_Actors class
    # ($game_actors) and refers to the Game_Party class ($game_party).
    #==============================================================================
    class Game_Actor < Game_Battler
    	#--------------------------------------------------------------------------
    	# * Public Instance Variables
    	#--------------------------------------------------------------------------
    	attr_reader :name # name
    	attr_reader :character_name # character file name
    	attr_reader :character_hue # character hue
    	attr_reader :class_id # class ID
    	attr_reader :weapon_id # weapon ID
    	attr_reader :armor1_id # shield ID
    	attr_reader :armor2_id # helmet ID
    	attr_reader :armor3_id # body armor ID
    	attr_reader :armor4_id # accessory ID
    	attr_reader :level # level
    	attr_reader :exp # EXP
    	attr_reader :skills # skills
    	attr_accessor :assorbe
    	attr_accessor :dimezza
    	#--------------------------------------------------------------------------
    	# * Object Initialization
    	# actor_id : actor ID
    	#--------------------------------------------------------------------------
    	def initialize(actor_id)
    		super()
    		setup(actor_id)
    		@assorbe = false
    		@dimezza = false
    	end
    	def previeni_critico?
    		for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
    			armor = $data_armors[i]
    			if armor != nil
    				if ARMATURE_PREVIENI_CRITICO.include?(armor.id)
    					return true
    				end
    			end
    		end
    		return false
    	end
    	#--------------------------------------------------------------------------
    	# * Setup
    	# actor_id : actor ID
    	#--------------------------------------------------------------------------
    	def setup(actor_id)
    		actor = $data_actors[actor_id]
    		@actor_id = actor_id
    		@name = actor.name
    		@character_name = actor.character_name
    		@character_hue = actor.character_hue
    		@battler_name = actor.battler_name
    		@battler_hue = actor.battler_hue
    		@class_id = actor.class_id
    		@weapon_id = actor.weapon_id
    		@armor1_id = actor.armor1_id
    		@armor2_id = actor.armor2_id
    		@armor3_id = actor.armor3_id
    		@armor4_id = actor.armor4_id
    		@level = actor.initial_level
    		@exp_list = Array.new(101)
    		make_exp_list
    		@exp = @exp_list[@level]
    		@skills = []
    		@hp = maxhp
    		@sp = maxsp
    		@states = []
    		@states_turn = {}
    		@maxhp_plus = 0
    		@maxsp_plus = 0
    		@str_plus = 0
    		@dex_plus = 0
    		@agi_plus = 0
    		@int_plus = 0
    		# Learn skill
    		for i in 1..@level
    			for j in $data_classes[@class_id].learnings
    				if j.level == i
    					learn_skill(j.skill_id)
    				end
    			end
    		end
    		# Update auto state
    		update_auto_state(nil, $data_armors[@armor1_id])
    		update_auto_state(nil, $data_armors[@armor2_id])
    		update_auto_state(nil, $data_armors[@armor3_id])
    		update_auto_state(nil, $data_armors[@armor4_id])
    	end
    	#--------------------------------------------------------------------------
    	# * Get Element Revision Value
    	# element_id : element ID
    	#--------------------------------------------------------------------------
    	def element_rate(element_id)
    		# Get values corresponding to element effectiveness
    		table = [0,200,150,100,50,0,-100]
    		result = table[$data_classes[@class_id].element_ranks[element_id]]
    		# If this element is protected by armor, then it's reduced by half
    		for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
    			armor = $data_armors[i]
    			if armor != nil and armor.guard_element_set.include?(element_id) and ARMATURA_ASSORBE_ELEMENTO.include?(armor.id)
    				self.assorbe = true
    				#result /= -2
    			end
    		end
    		for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
    			armor = $data_armors[i]
    			if armor != nil and armor.guard_element_set.include?(element_id)
    				self.dimezza = true unless self.assorbe
    				#result /= 2
    			end
    		end
    		# If this element is protected by states, then it's reduced by half
    		for i in @states
    			if $data_states[i].guard_element_set.include?(element_id)
    				result /= 2
    			end
    		end
    		# End Method
    		return result
    	end
    end
    #==============================================================================
    # ** Game_Battler (part 3)
    #------------------------------------------------------------------------------
    # This class deals with battlers. It's used as a superclass for the Game_Actor
    # and Game_Enemy classes.
    #==============================================================================
    class Game_Battler
    	#--------------------------------------------------------------------------
    	# * Applying Normal Attack Effects
    	# attacker : battler
    	#--------------------------------------------------------------------------
    	def attack_effect(attacker)
    		# Clear critical flag
    		self.critical = false
    		# First hit detection
    		hit_result = (rand(100) < attacker.hit)
    		# If hit occurs
    		if hit_result == true
    			# Calculate basic damage
    			atk = [attacker.atk - self.pdef / 2, 0].max
    			self.damage = atk * (20 + attacker.str) / 20
    			# Element correction
    			self.damage *= elements_correct(attacker.element_set)
    			#assorbe/dimezza
    			self.damage /= 100
    			if self.dimezza and self.is_a?(Game_Actor)
    				self.damage /= 2
    				self.dimezza = false
    			end
    			if self.assorbe and self.is_a?(Game_Actor)
    				self.damage /= -2
    				self.assorbe = false
    			end
    			# If damage value is strictly positive
    			if self.damage > 0
    				#-------------------- Previene Critico
    				if attacker.is_a?(Game_Enemy)
    					if self.previeni_critico? == false
    						self.critical = rand(100) < 4 * atk_critcal / self.agi
    					end
    				end
    				if attacker.is_a?(Game_Actor)
    					self.critical = rand(100) < 4 * atk_critcal / self.agi
    				end
    				self.damage *= 2 if self.critical and attacker.is_a?(Game_Actor)
    				if self.critical and attacker.is_a?(Game_Enemy)
    					if self.previeni_critico? == false
    						self.damage *= 2
    					end
    				end
    				#----------------------- Previene Critico
    				# Guard correction
    				if self.guarding?
    					self.damage /= 2
    				end
    			end
    			# Dispersion
    			if self.damage.abs > 0
    				amp = [self.damage.abs * 15 / 100, 1].max
    				self.damage += rand(amp+1) + rand(amp+1) - amp
    			end
    			# Second hit detection
    			eva = 8 * self.agi / attacker.dex + self.eva
    			hit = self.damage < 0 ? 100 : 100 - eva
    			hit = self.cant_evade? ? 100 : hit
    			hit_result = (rand(100) < hit)
    		end
    		# If hit occurs
    		if hit_result == true
    			# State Removed by Shock
    			remove_states_shock
    			# Substract damage from HP
    			self.hp -= self.damage
    			# State change
    			@state_changed = false
    			states_plus(attacker.plus_state_set)
    			states_minus(attacker.minus_state_set)
    			# When missing
    		else
    			# Set damage to "Miss"
    			self.damage = "Miss"
    			# Clear critical flag
    			self.critical = false
    		end
    		# End Method
    		return true
    	end
    	#--------------------------------------------------------------------------
    	# * Apply Skill Effects
    	# user : the one using skills (battler)
    	# skill : skill
    	#--------------------------------------------------------------------------
    	def skill_effect(user, skill)
    		# Clear critical flag
    		self.critical = false
    		# If skill scope is for ally with 1 or more HP, and your own HP = 0,
    		# or skill scope is for ally with 0, and your own HP = 1 or more
    		if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
    			((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
    			# End Method
    			return false
    		end
    		# Clear effective flag
    		effective = false
    		# Set effective flag if common ID is effective
    		effective |= skill.common_event_id > 0
    		# First hit detection
    		hit = skill.hit
    		if skill.atk_f > 0
    			hit *= user.hit / 100
    		end
    		hit_result = (rand(100) < hit)
    		# Set effective flag if skill is uncertain
    		effective |= hit < 100
    		# If hit occurs
    		if hit_result == true
    			# Calculate power
    			power = skill.power + user.atk * skill.atk_f / 100
    			if power > 0
    				power -= self.pdef * skill.pdef_f / 200
    				power -= self.mdef * skill.mdef_f / 200
    				power = [power, 0].max
    			end
    			# Calculate rate
    			rate = 20
    			rate += (user.str * skill.str_f / 100)
    			rate += (user.dex * skill.dex_f / 100)
    			rate += (user.agi * skill.agi_f / 100)
    			rate += (user.int * skill.int_f / 100)
    			# Calculate basic damage
    			self.damage = power * rate / 20
    			# Element correction
    			self.damage *= elements_correct(skill.element_set)
    			#----assorbe/dimezza
    			if self.is_a?(Game_Actor)
    				if self.dimezza
    					self.damage /= 2
    					self.dimezza = false
    				end
    				if self.assorbe
    					self.damage /= -2
    					self.assorbe = false
    				end
    			end
    			#----assorbe/dimezza
    			self.damage /= 100
    			# If damage value is strictly positive
    			if self.damage > 0
    				# Guard correction
    				if self.guarding?
    					self.damage /= 2
    				end
    			end
    			# Dispersion
    			if skill.variance > 0 and self.damage.abs > 0
    				amp = [self.damage.abs * skill.variance / 100, 1].max
    				self.damage += rand(amp+1) + rand(amp+1) - amp
    			end
    			# Second hit detection
    			eva = 8 * self.agi / user.dex + self.eva
    			hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
    			hit = self.cant_evade? ? 100 : hit
    			hit_result = (rand(100) < hit)
    			# Set effective flag if skill is uncertain
    			effective |= hit < 100
    		end
    		# If hit occurs
    		if hit_result == true
    			# If physical attack has power other than 0
    			if skill.power != 0 and skill.atk_f > 0
    				# State Removed by Shock
    				remove_states_shock
    				# Set to effective flag
    				effective = true
    			end
    			# Substract damage from HP
    			last_hp = self.hp
    			self.hp -= self.damage
    			effective |= self.hp != last_hp
    			# State change
    			@state_changed = false
    			effective |= states_plus(skill.plus_state_set)
    			effective |= states_minus(skill.minus_state_set)
    			# If power is 0
    			if skill.power == 0
    				# Set damage to an empty string
    				self.damage = ""
    				# If state is unchanged
    				unless @state_changed
    					# Set damage to "Miss"
    					self.damage = "Miss"
    				end
    			end
    			# If miss occurs
    		else
    			# Set damage to "Miss"
    			self.damage = "Miss"
    		end
    		# If not in battle
    		unless $game_temp.in_battle
    			# Set damage to nil
    			self.damage = nil
    		end
    		# End Method
    		return effective
    	end
    end
    

     

     

     

    Demo Link

    http://www.mediafire.com/?sgttwasxut4gilh

    Script Link

    http://www.mediafire.com/?2r83p7zq8orreai


    Istruzioni per l'uso

     

    Sono tutte inserite all'interno dello script... Ma non dovrebbe essere una difficile configurazione. Se usate questo script creditatemi! :wink:

     

    Bugs e Conflitti Noti


    Potrebbe andare in conflitto con dei battle system diversi dal default ma non dovrebbe essere difficile renderlo compatibile.

     

    Altri Dettagli


    Script semplice ma magari può essere utile a qualcuno...

  6. Multiscope Sistem


    Descrizione

    Script che permette di cambiare i target delle magie all'interno della battaglia (come i vecchi FF). Ad esempio passare da un nemico a tutti i nemici e viceversa oppure da un alleato a tutti e viceversa.

    Solo le magie contrassegnate come multiscope avranno questa caratteristica. Il danno o la guarigione verranno dimezzati se bersaglieranno tutti i nemici/alleati.

    Per le magie di status invece ce un apposito sistema che permette lo stesso il multiscope per queste magie, ma a un costo di punti magia raddoppiato. Una descrizione completa è contenuta nello script.




    Autore

    Avon Valentino (Io)




    Allegati

    Demo Link


    http://www.mediafire.com/?5uqpbtgy7ntijyk


    Script Link


    http://www.mediafire.com/?c4444vc81y7shsw

    Script:

    #-------------------------------MULTISCOPE SYSTEM----------------------------###----------------------------------SPIEGAZIONE-------------------------------###Questo script permette il cambio di target durante la battaglia come ad esempio#passare da un nemico a tutti i nemici o viceversa. Stessa cosa per gli alleati.#L'id delle skill che hanno questa caratteristica vanno inseriti nell'insieme#sottostante : SKILL_MULTISCOPE.#È importante che le skill inserite abbiano come target iniziale un solo#obbiettivo (One enemy, One ally, One Ally hp = 0)#Il danno o la guarigione ricevuta saranno dimezzati se applicati a tutti i target.#Il tasto da premere per variare target di default è Y (S sulla tastiera)#Per cambiare tasto da premere, cambiare l'input in SWITCH  (la Y di default)#Per controllare a quale tasto corrisponde, premere F1 durante il test del gioco#e andare su Keyboard dove si trovano i corrispondenti tasti che riceve il gioco.#Esempio   S: Y  è uguale a dire che premere sulla tastiera il tasto S equivale#a dare un input Y al sistema.#Se si vuole creare una magia che cambia solamente lo status del target, e che #possa cambiare tra uno e tutti i target inserirlo in STATUS_MULTISCOPE#La magia colpirà tutti i bersagli ma comporterà un consumo doppo di SP.###---------------------------------SPIEGAZIONE--------------------------------###----------------------------------CREDITI-----------------------------------#             Se usate questo script per favore creditatemi ;)##                    Script creato da Valentino Avon.##----------------------------------CREDITI-----------------------------------  #--------------------------------CONFIGURAZIONE------------------------------ SKILL_MULTISCOPE = [1,2,7]# abilità che hanno la possibilità di cambio target.  STATUS_MULTISCOPE = [33,54]#Abilità che cambiano solamente lo stato del target.#In questo caso, lo selezionare tutti i nemici/alleati comporta un consumo#doppio di Punti Magia. (SP)  ICONA_MULTISCOPE = "M_S"#icona che verrà visualizzata su una magia se sarà possibile il multiscope.#da inserire in Graphics/Icons#Se non si vuole avere icona semplicemente inserire:#ICONA_MULTISCOPE = nil SWITCH = (Input::Y) #Tasto per cambiare da tutti a un nemico. #--------------------------------CONFIGURAZIONE------------------------------  class Game_Battler  attr_accessor :multiscope  def initialize    @battler_name = ""    @battler_hue = 0    @hp = 0    @sp = 0    @states = []    @states_turn = {}    @maxhp_plus = 0    @maxsp_plus = 0    @str_plus = 0    @dex_plus = 0    @agi_plus = 0    @int_plus = 0    @hidden = false    @immortal = false    @damage_pop = false    @damage = nil    @critical = false    @animation_id = 0    @animation_hit = false    @white_flash = false    @blink = false    @current_action = Game_BattleAction.new    @multiscope = false  end   def skill_effect(user, skill)    # Clear critical flag    self.critical = false    # If skill scope is for ally with 1 or more HP, and your own HP = 0,    # or skill scope is for ally with 0, and your own HP = 1 or more    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)      # End Method      return false    end    # Clear effective flag    effective = false    # Set effective flag if common ID is effective    effective |= skill.common_event_id > 0    # First hit detection    hit = skill.hit    if skill.atk_f > 0      hit *= user.hit / 100    end    hit_result = (rand(100) < hit)    # Set effective flag if skill is uncertain    effective |= hit < 100    # If hit occurs    if hit_result == true      # Calculate power      power = skill.power + user.atk * skill.atk_f / 100      if power > 0        power -= self.pdef * skill.pdef_f / 200        power -= self.mdef * skill.mdef_f / 200        power = [power, 0].max      end      # Calculate rate      rate = 20      rate += (user.str * skill.str_f / 100)      rate += (user.dex * skill.dex_f / 100)      rate += (user.agi * skill.agi_f / 100)      rate += (user.int * skill.int_f / 100)      # Calculate basic damage      self.damage = power * rate / 20      # Element correction      self.damage *= elements_correct(skill.element_set)      self.damage /= 100      # If damage value is strictly positive      if self.damage > 0        # Guard correction        if self.guarding?          self.damage /= 2        end      end      # Dispersion      if skill.variance > 0 and self.damage.abs > 0        amp = [self.damage.abs * skill.variance / 100, 1].max        self.damage += rand(amp+1) + rand(amp+1) - amp      end      # Second hit detection      eva = 8 * self.agi / user.dex + self.eva      hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100      hit = self.cant_evade? ? 100 : hit      hit_result = (rand(100) < hit)      # Set effective flag if skill is uncertain      effective |= hit < 100    end    # If hit occurs    if hit_result == true      # If physical attack has power other than 0      if skill.power != 0 and skill.atk_f > 0        # State Removed by Shock        remove_states_shock        # Set to effective flag        effective = true      end      # Substract damage from HP       last_hp = self.hp      self.hp -= self.damage      effective |= self.hp != last_hp      # State change      @state_changed = false      effective |= states_plus(skill.plus_state_set)      effective |= states_minus(skill.minus_state_set)      # If power is 0      if user.multiscope       unless @state_changed      self.damage /= 2    end    end      if skill.power == 0        # Set damage to an empty string        self.damage = ""        # If state is unchanged        unless @state_changed          # Set damage to "Miss"          self.damage = "Mancato!"        end      end    # If miss occurs    else      # Set damage to "Miss"      self.damage = "Mancato!"    end    # If not in battle    unless $game_temp.in_battle      # Set damage to nil      self.damage = nil    end    # End Method    return effective  endend     class Scene_Battle  def main    $premuto = false    # Initialize each kind of temporary battle data    $game_temp.in_battle = true    $game_temp.battle_turn = 0    $game_temp.battle_event_flags.clear    $game_temp.battle_abort = false    $game_temp.battle_main_phase = false    $game_temp.battleback_name = $game_map.battleback_name    $game_temp.forcing_battler = nil    # Initialize battle event interpreter    $game_system.battle_interpreter.setup(nil, 0)    # Prepare troop    @troop_id = $game_temp.battle_troop_id    $game_troop.setup(@troop_id)    # Make actor command window    s1 = $data_system.words.attack    s2 = $data_system.words.skill    s3 = $data_system.words.guard    s4 = $data_system.words.item    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])    @actor_command_window.y = 160    @actor_command_window.back_opacity = 160    @actor_command_window.active = false    @actor_command_window.visible = false    # Make other windows    @party_command_window = Window_PartyCommand.new    @help_window = Window_Help.new    @help_window.back_opacity = 160    @help_window.visible = false    @scope_window = Window_Help.new    @scope_window.back_opacity = 160    @scope_window.y = 0    @scope_window.visible = false    @status_window = Window_BattleStatus.new    @message_window = Window_Message.new    # Make sprite set    @spriteset = Spriteset_Battle.new    # Initialize wait count    @wait_count = 0    # Execute transition    if $data_system.battle_transition == ""      Graphics.transition(20)    else      Graphics.transition(40, "Graphics/Transitions/" +        $data_system.battle_transition)    end    # Start pre-battle phase    start_phase1    # Main loop    loop do      # Update game screen      Graphics.update      # Update input information      Input.update      # Frame update      update      # Abort loop if screen is changed      if $scene != self        break      end    end    # Refresh map    $game_map.refresh    # Prepare for transition    Graphics.freeze    # Dispose of windows    @actor_command_window.dispose    @party_command_window.dispose    @help_window.dispose    @scope_window.dispose    @status_window.dispose    @message_window.dispose    if @skill_window != nil      @skill_window.dispose    end    if @item_window != nil      @item_window.dispose    end    if @result_window != nil      @result_window.dispose    end    # Dispose of sprite set    @spriteset.dispose    # If switching to title screen    if $scene.is_a?(Scene_Title)      # Fade out screen      Graphics.transition      Graphics.freeze    end    # If switching from battle test to any screen other than game over screen    if $BTEST and not $scene.is_a?(Scene_Gameover)      $scene = nil    end  end    def phase3_prior_actor    # Loop    begin      # Actor blink effect OFF      if @active_battler != nil        @active_battler.blink = false      end      # If first actor      if @actor_index == 0        # Start party command phase        start_phase2        return      end      # Return to actor index      @actor_index -= 1      @active_battler = $game_party.actors[@actor_index]      @active_battler.blink = true    # Once more if actor refuses command input  end until @active_battler.inputable?  @active_battler.multiscope = false      if @active_battler.is_a?(Game_Actor)      # Branch by effect scope      if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)      if @skill.scope == 2  # all enemies        if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2      @skill.scope = 1     end  endendif SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)     if @skill.scope == 4          if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2        @skill.scope = 3       end      end    end  end     # Set up actor command window    phase3_setup_command_window  end    #------------------------------------   def phase3_next_actor    # Loop    begin      # Actor blink effect OFF      if @active_battler != nil        @active_battler.blink = false      end      # If last actor      if @actor_index == $game_party.actors.size-1        # Start main phase        start_phase4        return      end      # Advance actor index      @actor_index += 1      @active_battler = $game_party.actors[@actor_index]      @active_battler.blink = true    # Once more if actor refuses command input  end until @active_battler.inputable?          @active_battler.multiscope = false          $premuto = false    # Set up actor command window    phase3_setup_command_window  end  #--------------------------------   def update    # If battle event is running    if $game_system.battle_interpreter.running?      # Update interpreter      $game_system.battle_interpreter.update      # If a battler which is forcing actions doesn't exist      if $game_temp.forcing_battler == nil        # If battle event has finished running        unless $game_system.battle_interpreter.running?          # Rerun battle event set up if battle continues          unless judge            setup_battle_event          end        end        # If not after battle phase        if @phase != 5          # Refresh status window          @status_window.refresh        end      end    end    # Update system (timer) and screen    $game_system.update    $game_screen.update    # If timer has reached 0    if $game_system.timer_working and $game_system.timer == 0      # Abort battle      $game_temp.battle_abort = true    end    # Update windows    @help_window.update    @party_command_window.update    @actor_command_window.update    @scope_window.update    @status_window.update    @message_window.update    # Update sprite set    @spriteset.update    # If transition is processing    if $game_temp.transition_processing      # Clear transition processing flag      $game_temp.transition_processing = false      # Execute transition      if $game_temp.transition_name == ""        Graphics.transition(20)      else        Graphics.transition(40, "Graphics/Transitions/" +          $game_temp.transition_name)      end    end    # If message window is showing    if $game_temp.message_window_showing      return    end    # If effect is showing    if @spriteset.effect?      return    end    # If game over    if $game_temp.gameover      # Switch to game over screen      $scene = Scene_Gameover.new      return    end    # If returning to title screen    if $game_temp.to_title      # Switch to title screen      $scene = Scene_Title.new      return    end    # If battle is aborted    if $game_temp.battle_abort      # Return to BGM used before battle started      $game_system.bgm_play($game_temp.map_bgm)      # Battle ends      battle_end(1)      return    end    # If waiting    if @wait_count > 0      # Decrease wait count      @wait_count -= 1      return    end    # If battler forcing an action doesn't exist,    # and battle event is running    if $game_temp.forcing_battler == nil and       $game_system.battle_interpreter.running?      return    end    # Branch according to phase    case @phase    when 1  # pre-battle phase      update_phase1    when 2  # party command phase      update_phase2    when 3  # actor command phase      update_phase3    when 4  # main phase      update_phase4    when 5  # after battle phase      update_phase5    end  end #--------------------------------   def update_phase3    # If enemy arrow is enabled    if @enemy_arrow != nil      update_phase3_enemy_select_plus if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)      update_phase3_enemy_select unless SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)    # If actor arrow is enabled    elsif @actor_arrow != nil      update_phase3_actor_select_plus if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)      update_phase3_actor_select  unless SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)    # If skill window is enabled    elsif @skill_window != nil      update_phase3_skill_select    # If item window is enabled    elsif @item_window != nil      update_phase3_item_select    # If actor command window is enabled    elsif @actor_command_window.active      update_phase3_basic_command    end  end   #---------------------------------------    def update_phase3_enemy_select_plus    # Update enemy arrow    @enemy_arrow.update    # If B button was pressed    if Input.trigger?(Input::B)      $premuto = false       @active_battler.multiscope = false       @scope_window.visible = false      @scope_window.set_text("",1)      if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)       if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2      if @skill.scope == 2        @skill.scope = 1      end    end    end    @scope_window.visible = false      @help_window.visible = false      # Play cancel SE      $game_system.se_play($data_system.cancel_se)      # End enemy selection      end_enemy_select      return    end if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)if  @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2if Input.trigger?(SWITCH)if $premuto == false #if @skill.scope == 1  @active_battler.multiscope = true $premuto = true  @enemy_arrow.visible = false$game_system.se_play($data_system.decision_se)#@skill.scope = 2 @help_window.visible = false@scope_window.set_text("Tutti i nemici. (Danno Dimezzato).", 1) if SKILL_MULTISCOPE.include?(@skill.id)@scope_window.set_text("Tutti i nemici. (Consumo MP raddoppiato).", 1) if STATUS_MULTISCOPE.include?(@skill.id)else#elsif #@skill.scope == 2   $premuto = false @active_battler.multiscope = false  @enemy_arrow.visible = true  @help_window.visible = true  #@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)$game_system.se_play($data_system.decision_se)#@skill.scope = 1@scope_window.set_text("", 1)@scope_window.visible = falseendendendend    # If C button was pressed    if Input.trigger?(Input::C)      # Play decision SE      $game_system.se_play($data_system.decision_se)      # Set action      @active_battler.current_action.target_index = @enemy_arrow.index      $premuto = false      # End enemy selection      @scope_window.visible = false      end_enemy_select      # If skill window is showing      if @skill_window != nil        # End skill selection        end_skill_select      end      # If item window is showing      if @item_window != nil        # End item selection        end_item_select      end      # Go to command input for next actor      phase3_next_actor    end  end #---------------------------------------     def update_phase3_actor_select_plus    # Update actor arrow    @actor_arrow.update    # If B button was pressed    if Input.trigger?(Input::B)      # Play cancel SE      $premuto = false       @active_battler.multiscope = false            @scope_window.set_text("",1)      @scope_window.visible = false      $game_system.se_play($data_system.cancel_se)       if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)         if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2      if @skill.scope == 4        @skill.scope = 3      end    end    end    @scope_window.visible = false      # End actor selection      end_actor_select      return    end  if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)  if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2if Input.trigger?(SWITCH)if $premuto == false#if @skill.scope == 3 @active_battler.multiscope = true $premuto = true  @actor_arrow.visible = false  @help_window.visible = false$game_system.se_play($data_system.decision_se)#@skill.scope = 4@scope_window.set_text("Tutti gli alleati. (Effetto Dimezzato).", 1) if SKILL_MULTISCOPE.include?(@skill.id)@scope_window.set_text("Tutti gli alleati. (Consumo MP raddoppiato).", 1) if STATUS_MULTISCOPE.include?(@skill.id)else # elsif @skill.scope == 4   $premuto = false @active_battler.multiscope = false  @actor_arrow.visible = true  @help_window.visible = true  #@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)$game_system.se_play($data_system.decision_se)#@skill.scope = 3@scope_window.set_text("", 1)@scope_window.visible = falseendendendend     # If C button was pressed    if Input.trigger?(Input::C)      # Play decision SE      $premuto = false      $game_system.se_play($data_system.decision_se)      # Set action      @active_battler.current_action.target_index = @actor_arrow.index      # End actor selection      @scope_window.visible = false      end_actor_select      # If skill window is showing      if @skill_window != nil        # End skill selection        end_skill_select      end      # If item window is showing      if @item_window != nil        # End item selection        end_item_select      end      # Go to command input for next actor      phase3_next_actor     end  end   #------------------------------------  def set_target_battlers(scope)    # If battler performing action is enemy    if @active_battler.is_a?(Game_Enemy)      # Branch by effect scope      case scope      when 1  # single enemy        index = @active_battler.current_action.target_index        @target_battlers.push($game_party.smooth_target_actor(index))      when 2  # all enemies        for actor in $game_party.actors          if actor.exist?            @target_battlers.push(actor)          end        end      when 3  # single ally        index = @active_battler.current_action.target_index        @target_battlers.push($game_troop.smooth_target_enemy(index))      when 4  # all allies        for enemy in $game_troop.enemies          if enemy.exist?            @target_battlers.push(enemy)          end        end      when 5  # single ally (HP 0)         index = @active_battler.current_action.target_index        enemy = $game_troop.enemies[index]        if enemy != nil and enemy.hp0?          @target_battlers.push(enemy)        end      when 6  # all allies (HP 0)         for enemy in $game_troop.enemies          if enemy != nil and enemy.hp0?            @target_battlers.push(enemy)          end        end      when 7  # user        @target_battlers.push(@active_battler)      end    end    # If battler performing action is actor    if @active_battler.is_a?(Game_Actor)      # Branch by effect scope      case scope      when 1  # single enemy        index = @active_battler.current_action.target_index        @target_battlers.push($game_troop.smooth_target_enemy(index))      when 2  # all enemies        if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)        if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2      @skill.scope = 1     end    end        for enemy in $game_troop.enemies          if enemy.exist?            @target_battlers.push(enemy)          end        end      when 3  # single ally        index = @active_battler.current_action.target_index        @target_battlers.push($game_party.smooth_target_actor(index))      when 4  # all allies        if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id)          if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2        @skill.scope = 3       end      end        for actor in $game_party.actors          if actor.exist?            @target_battlers.push(actor)          end        end      when 5  # single ally (HP 0)         index = @active_battler.current_action.target_index        actor = $game_party.actors[index]        if actor != nil and actor.hp0?          @target_battlers.push(actor)        end      when 6  # all allies (HP 0)         for actor in $game_party.actors          if actor != nil and actor.hp0?            @target_battlers.push(actor)          end        end      when 7  # user        @target_battlers.push(@active_battler)      end    end  end    def make_skill_action_result    # Get skill    @skill = $data_skills[@active_battler.current_action.skill_id]    # If not a forcing action    unless @active_battler.current_action.forcing      # If unable to use due to SP running out      unless @active_battler.skill_can_use?(@skill.id)        # Clear battler being forced into action        $game_temp.forcing_battler = nil        # Shift to step 1        @phase4_step = 1        return      end    end    # Use up SP     if STATUS_MULTISCOPE.include?(@skill.id) or SKILL_MULTISCOPE.include?(@skill.id)       if @active_battler.multiscope        @skill.scope = 2 if @skill.scope == 1       @skill.scope = 4 if @skill.scope == 3     else       @skill.scope = 1 if @skill.scope == 2       @skill.scope = 3 if @skill.scope == 4     end   end    if STATUS_MULTISCOPE.include?(@skill.id)      if @skill.scope == 2 or @skill.scope == 4    @active_battler.sp -= @skill.sp_cost*2   else    @active_battler.sp -= @skill.sp_cost    end    end    # Refresh status window    @status_window.refresh    # Show skill name on help window    @help_window.set_text(@skill.name, 1)    # Set animation ID    @animation1_id = @skill.animation1_id    @animation2_id = @skill.animation2_id    # Set command event ID    @common_event_id = @skill.common_event_id    # Set target battlers    set_target_battlers(@skill.scope)    # Apply skill effect    for target in @target_battlers      target.skill_effect(@active_battler, @skill)    end  endend   #==============================================================================# ** Arrow_Actor#------------------------------------------------------------------------------#  This arrow cursor is used to choose an actor. This class inherits from the#  Arrow_Base class.#============================================================================== class Arrow_Actor < Arrow_Base  #--------------------------------------------------------------------------  # * Get Actor Indicated by Cursor  #--------------------------------------------------------------------------  def actor    return $game_party.actors[@index]  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    super    unless $premuto    # Cursor right    if Input.repeat?(Input::RIGHT)      $game_system.se_play($data_system.cursor_se)      @index += 1      @index %= $game_party.actors.size    end    # Cursor left    if Input.repeat?(Input::LEFT)      $game_system.se_play($data_system.cursor_se)      @index += $game_party.actors.size - 1      @index %= $game_party.actors.size    end    # Set sprite coordinates    if self.actor != nil      self.x = self.actor.screen_x      self.y = self.actor.screen_y    end  end  end  #--------------------------------------------------------------------------  # * Help Text Update  #--------------------------------------------------------------------------  def update_help    # Display actor status in help window    @help_window.set_actor(self.actor) unless $premuto  endend  #==============================================================================# ** Arrow_Enemy#------------------------------------------------------------------------------#  This arrow cursor is used to choose enemies. This class inherits from the #  Arrow_Base class.#============================================================================== class Arrow_Enemy < Arrow_Base  #--------------------------------------------------------------------------  # * Get Enemy Indicated by Cursor  #--------------------------------------------------------------------------  def enemy    return $game_troop.enemies[@index]  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    super    unless $premuto    # Skip if indicating a nonexistant enemy    $game_troop.enemies.size.times do      break if self.enemy.exist?      @index += 1      @index %= $game_troop.enemies.size    end    # Cursor right    if Input.repeat?(Input::RIGHT)      $game_system.se_play($data_system.cursor_se)      $game_troop.enemies.size.times do        @index += 1        @index %= $game_troop.enemies.size        break if self.enemy.exist?      end    end    # Cursor left    if Input.repeat?(Input::LEFT)      $game_system.se_play($data_system.cursor_se)      $game_troop.enemies.size.times do        @index += $game_troop.enemies.size - 1        @index %= $game_troop.enemies.size        break if self.enemy.exist?      end    end    # Set sprite coordinates    if self.enemy != nil      self.x = self.enemy.screen_x      self.y = self.enemy.screen_y    end  end  end  #--------------------------------------------------------------------------  # * Help Text Update  #--------------------------------------------------------------------------  def update_help    # Display enemy name and state in the help window    @help_window.set_enemy(self.enemy) unless $premuto  endend  #==============================================================================# ** Window_Skill#------------------------------------------------------------------------------#  This window displays usable skills on the skill and battle screens.#============================================================================== class Window_Skill < Window_Selectable  #--------------------------------------------------------------------------  # * Object Initialization  #     actor : actor  #--------------------------------------------------------------------------  def initialize(actor)    super(0, 128, 640, 352)    @actor = actor    @column_max = 2    refresh    self.index = 0    # If in battle, move window to center of screen    # and make it semi-transparent    if $game_temp.in_battle      self.y = 64      self.height = 256      self.back_opacity = 160    end  end  #--------------------------------------------------------------------------  # * Acquiring Skill  #--------------------------------------------------------------------------  def skill    return @data[self.index]  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    if self.contents != nil      self.contents.dispose      self.contents = nil    end    @data = []    for i in 0...@actor.skills.size      skill = $data_skills[@actor.skills[i]]      if skill != nil        @data.push(skill)      end    end    # If item count is not 0, make a bit map and draw all items    @item_max = @data.size    if @item_max > 0      self.contents = Bitmap.new(width - 32, row_max * 32)      for i in 0...@item_max        draw_item(i)      end    end  end  #--------------------------------------------------------------------------  # * Draw Item  #     index : item number  #--------------------------------------------------------------------------  def draw_item(index)    skill = @data[index]    if @actor.skill_can_use?(skill.id)      self.contents.font.color = normal_color    else      self.contents.font.color = disabled_color    end    x = 4 + index % 2 * (288 + 32)    y = index / 2 * 32    rect = Rect.new(x, y, self.width / @column_max - 32, 32)    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))    bitmap = RPG::Cache.icon(skill.icon_name)    opacity = self.contents.font.color == normal_color ? 255 : 128    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)    self.contents.draw_text(x + 190, y, 48, 32, skill.sp_cost.to_s, 2) unless ICONA_MULTISCOPE == nil    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2) if ICONA_MULTISCOPE == nil     if SKILL_MULTISCOPE.include?(skill.id) or STATUS_MULTISCOPE.include?(skill.id)     bitmap = Bitmap.new("Graphics/Icons/"+ICONA_MULTISCOPE) unless ICONA_MULTISCOPE == nil    bmp_rect = Rect.new(0, 0, bitmap.width, bitmap.height) unless ICONA_MULTISCOPE == nil    self.contents.blt(x + 240, y, bitmap, bmp_rect) unless ICONA_MULTISCOPE == nil  end  end  #--------------------------------------------------------------------------  # * Help Text Update  #--------------------------------------------------------------------------  def update_help    @help_window.set_text(self.skill == nil ? "" : self.skill.description)  endend



    Istruzioni per l'uso

    Le istruzioni sono all'interno dello script. Per configurarlo è presente la configurazione nello script.

    Se usate questo script, per favore creditatemi!
    :wink:




    Bugs e Conflitti Noti

    N\A




    Altri Dettagli

    Se volete modificare qualcosa o adattare il systema a un battle system chiedetemi pure, cercherò di aiutarvi!
    :biggrin:

  7. Il primo problema è dato sicuramente dall'advance collapse system o qualcosa del genere, ci dovrebbe essere un insieme di Enemy ID che indicano quali nemici muoiono "lampeggiando" (per i boss)

     

    per il secondo problema non saprei dovrei vedere personalmente. :)

  8. Semplice... Basta che vai nella Window_Selectable e scambi i contenuti all'interno delle if tra Input.repeat?(Input::UP) e

    Input.repeat?(Input::LEFT) e tra Input.repeat?(Input::DOWN) e Input.repeat?(Input::RIGHT)

     

    Se poi vuoi farlo solo per il menu basta che copi il tutto due volte e aggiungi sopra i comandi che devono funzionare solo nel menu un if $scene = Scene_Menu.new

    e poi per gli altri comandi mettere un else

     

    se non sono stato abbastanza chiaro dimmelo che te la faccio io!

  9. Vai nello Scene_Menu nel def main e aggiungi

     

    @background = Sprite.new

    @background.bitmap = RPG::Cache.picture($sfondomenu)

    @background.x = 0

    @background.y = 0

    @background.z = -9999

     

     

    e poi vai alla fine del def main e aggiungi

    @background.bitmap.dispose

     

     

    ora in questa maniera abbiamo fatto si che il menu avrà come sfondo un immagine che avrà il nome dato alla variabile $sfondomenu

    ora tutto quello che devi fare è dare tramite evento (call script) il nome alla variabile ogni volta che vorrai cambiare lo sfondo.

    Gli sfondi vanno messi nella cartella pictures

    esempi di cambio sfondo sono:

     

    $sfondomenu = "grotta"

    $sfondomenu = "foresta"

     

     

    e così via....

     

    Dovrebbe funzionare! :biggrin:

  10. Si bon ho cambiato i tasti perchè alla fine lo avrei messo così, comunque mi pare sia quello che ho fatto.

    Comunque adesso l'ho messo così:

     

    if Input.trigger?(Input::Y)

    # Play cancel SE

    $game_system.se_play($data_system.decision_se)

    if @skill.scope == 2

    @skill.scope = 1

    end_select_all_enemies

    start_enemy_select

    elsif @skill.scope == 1

    end_enemy_select

    start_select_all_enemies

    @skill.scope = 2

    end

    return

    end

     

    il risultato è sempre quello :Ok:

×
×
  • Create New...