Accueil du SiteAccueil du Site  AccueilAccueil  Dernières imagesDernières images  RechercherRechercher  ConnexionConnexion  S'enregistrerS'enregistrer  



Le deal à ne pas rater :
Pokémon EV06 : où acheter le Bundle Lot 6 Boosters Mascarade ...
Voir le deal

Partagez
 

 EXACT Extention

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Choco-sama
Ancien staffeux
Ancien staffeux
Choco-sama

Masculin
Messages postés : 3012
Date d'inscription : 19/10/2009
Jauge LPC :
EXACT Extention 891527140058 / 10058 / 100EXACT Extention 8915271400

EXACT Extention Game-d10
EXACT Extention Mappeu10
EXACT Extention Projet16
EXACT Extention Projet10
EXACT Extention Membre15
EXACT Extention Promot10
EXACT Extention Padago10
EXACT Extention Riche_10
EXACT Extention Travai10
EXACT Extention Mythe_10


EXACT Extention Empty
MessageSujet: EXACT Extention   EXACT Extention EmptyMar 30 Juil 2013 - 14:56

EXACT Extention

Auteur: Zetu

Introduction:

Dans la nouvelle VXAce, les commandes du Window_ActorCommand utilise les compétences de la base de données, d'attaque et de garde. Mais que faire si vous voulez d'autres compétences nécessaires dans les commandes? (Comme "Steal", "Fuyez", "Scan", ect.) Dans ce scénario, une compétence que vous souhaitez peut maintenant être une commande.


Caractéristiques:

* Placer les compétences dans la fenêtre de commande de l'acteur (Si acteur a compétence et si le commutateur est sur ​​[option])
* Indiquez l'emplacement où vous souhaitez que les commandes soient placés.


Code:
                            #======================#
                            #  Z-Systems by: Zetu  #
#===========================#======================#===========================#
#          *  *  *  Z04 Executable Actions Extention v1.03  *  *  *          #
#=#==========================================================================#=#
  #  Add regular expression NOCONDITIONAL into any skill to make it appear  #
  #  in the Window_ActorCommand, instead of Window_SkillList.  All commands  #
  #  will be placed where :exact is inside the CMDS array, unless you place  #
  #  :skillid, <skill.id> where you wish for it to be instead.              #
  #==========================================================================#
module Z04
   CMDS = [
      :attack,
      :exact,
      :skill,
      :guard,
      :skillid, 5,
      :item
   ]
  NOCONDITION = /<exact>/i
  CONDITIONAL = /<exact[:]*\s*(\d+)>/i
#========#======================#====#================================#========#
#--------#                      #----# DO NOT EDIT PAST THIS POINT!!! #--------#
#--------# End of Customization #----# Editing will cause death by    #--------#
#--------#                      #----# brain asplosions.              #--------#
#========#======================#====#================================#========#
end

class Window_ActorCommand < Window_Command
   attr_reader :skillsincmd
   def make_command_list
      return unless @actor
      index=0
      while index<Z04::CMDS.size
         case Z04::CMDS[index]
         when :attack;  add_attack_command
         when :skill;  add_skill_commands
         when :guard;  add_guard_command
         when :item;    add_item_command
         when :skillid; add_skill_command_by_id(Z04::CMDS[index+1]); index +=1
         when :exact;  add_noninclusive_skill_commands
         end
         index+=1
      end
   end
   
   def add_noninclusive_skill_commands
      for skill in @actor.skills
         add_skill_exact(skill) unless Z04::CMDS.include?(skill.id)
      end
   end
   
   def add_skill_command_by_id(id)
      add_skill_exact($data_skills[id])
   end
 
   def add_skill_exact(skill)
      return unless skill.command_condition_met?
      add_command(skill.name, :exactskill, @actor.skill_conditions_met?(skill),
        skill.id)
   end
   
end

class Scene_Battle < Scene_Base
   
   def skill_exact
      @skill = $data_skills[@actor_command_window.current_ext]
      BattleManager.actor.input.set_skill(@skill.id)
      BattleManager.actor.last_skill.object = @skill
      if !@skill.need_selection?
         next_command
      elsif @skill.for_opponent?
         select_enemy_selection
      else
         select_actor_selection
      end
   end
   
   alias z04cacw create_actor_command_window unless $@
   def create_actor_command_window
      z04cacw
      @actor_command_window.set_handler(:exactskill, method(:skill_exact))
   end
   
end

class Window_BattleSkill < Window_SkillList
   def include?(item)
      (item && item.stype_id == @stype_id) and not item.command?
   end
end

class RPG::Skill < RPG::UsableItem
   def command?
      self.note.scan(Z04::NOCONDITION){return true}
      self.note.scan(Z04::CONDITIONAL){return true}
    return false
   end
   
   def command_condition_met?
      self.note.scan(Z04::CONDITIONAL){return false unless $game_switches[$1.to_i]}
      return command?
   end
   
end


Mises à jour:

* Correction de bugs
* Modifiée pour utiliser Regexp
N'affiche plus les compétences de commandement à la tête de compétences
Revenir en haut Aller en bas
 
EXACT Extention
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Le Palais Créatif :: ~ PARTAGE ~ :: Scripts et plugins :: RPG Maker VXAce :: Système-
Sauter vers: