Jump to content

AD-Blocker detected, please disable your ad-blocker when surfing in makerando.com - There is no invasive Ad.

 

Search the Community

Showing results for tags 'BS/Battlers Addon'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Comunità
    • Cancello di Ingresso
    • Bacheca
    • Colisseum
  • DevTeam
    • CyberTeam
  • Games and Sheets RPG Maker
    • Resa Grafica
    • Concept e Bozze
    • Progetti
    • Demo and Release
    • Il Making Oltreoceano
  • Assistenza e Supporto
    • Biblioteca
    • BrainStorming
    • Chiedi Aiuto alla Comunity
    • RPG Maker Scripting
    • PlugIn e AddOn RPG Maker
    • Musica e Suoni
    • Risorse Grafiche RPG Maker
    • Mak - Resources
  • Beyond Making
    • Altri Tool

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 33 results

  1. Salve, non sono riuscito a trovare uno script che possa creare una sorta di sistema pokémon-team party, dove si utilizza un certo character senza che però questo appaia in battaglia, mentre nella battle scene appaiano altri eroi o mostri che non possono essere utilizzati nell'overworld. C'è un qualche script che permetta di rendere 'inattivo' il personaggio principale (fisso, non scambiabile) del party rendendolo utilizzabile solo nell'overworld? Volendo mi accontenterei di un sistema interno senza scripting, purché non sia troppo legnoso (come ad esempio togliere il leader prima della battaglia). Il tutto, se possibile, sostenibile con gli script di follow come Caterpillar o Enhanced Squad Movement. Grazie mille!
  2. Nome Script: KZM - Limit Versione: 1.0 Autore: Descrizione: Questo script aggiunge la barra del limit e le abilità usate con questa barra in stile FFVII. Istruzioni: Installare sotto "▼ Materials" e sopra "▼ Main", dopodiché nel database creare un nuovo tipo di tecniche, chiamato limit e per ogni tecnica inserita in quel tipo, mettere il seguente tag nelle note dell'abilità: <limit> per farla riconoscere dallo script e permetterne l'uso solo a barra completamente carica. Screenshot: Devo ancora farne uno decente. Script: Pastebin [guarda] o [scarica] Bug e Conflitti Noti: Nessuno Note dell'autore: Condividetelo, usatelo nei vostri progetti free o commerciali, l'importante è creditare l'autore.
  3. Nome Script: Crystal Engine - Mimic Versione: N/D Autore/i: Crystal Noel Informazioni: Questo script fornisce due abilità da utilizzare in battaglia. Uno degli effetti copia semplicemente l'effetto e lo utilizza sul nemico. L'altra mossa è quella di mimare l'abilità fino alla fine della battaglia. Features: - Imparare temporaneamente (sostituisce l'abilità mimica fino alla fine della battaglia) - Copia Azione (Copia l'azione del bersaglio) Istruzioni: Script e istruzioni all'interno della demo. Nel note tag dei nemici, impostate in questo modo a seconda delle vostre esigenze: <mimic> Imposta la capacità di copiare l'ultima azione del bersaglio <borrow move> Imposta la capacità di prendere in prestito l'ultima abilità del bersaglio per il resto della battaglia Utilizzate questa opzione se desiderate che i nemici siano in grado di prendere in 'prestito' anche le abilità: class RPG::Enemy < RPG::BaseItem def actions set = [] set += @actions ids = [] set.each {|action| ids.push(action.skill_id)} $data_skills.each do |skill| next if skill.nil? action = RPG::Enemy::Action.new action.skill_id = skill.id set.push(action) unless ids.include?(skill.id) end set endend Demo:http://crystalnoel42.wordpress.com/2013/06/10/crystal-engine-mimic/
  4. Nome Script: Actor Battler Graphics Versione: 1.05 Autore/i: Victor Sant Informazioni: Bisogna avere lo script "Victor's Engine - Basic Module" installato per far funzionare gli script di Victor. http://victorscripts.wordpress.com/rpg-maker-vx-ace/basic-scripts/basic-module/ Istruzioni: Lo script va inserito sotto la sezione "Materials" e sotto lo script *NECESSARIO* "Victor's Engine - Basic Module" LE ISTRUZIONI SONO ALL'INTERNO DELLO SCRIPT Script: #==============================================================================# ** Victor Engine - Actors Battlers#------------------------------------------------------------------------------# Author : Victor Sant## Version History:# v 1.00 - 2011.12.19 > First relase# v 1.01 - 2011.12.30 > Faster Regular Expressions# v 1.02 - 2012.01.15 > Compatibility with Target Arrow# v 1.03 - 2012.01.28 > Compatibility with Animated Battle# v 1.04 - 2012.03.11 > Added position distance settings# v 1.05 - 2012.03.17 > Fixed battle test glitch#------------------------------------------------------------------------------# This script adds visible battler graphics for the party actors actors# during combat. With the visible battlers, new options will be available# like setting actor's battlers positions and attack animations.#------------------------------------------------------------------------------# Compatibility# Requires the script 'Victor Engine - Basic Module' v 1.11 or higher# If used with 'Victor Engine | Animated Battle' paste this one bellow it.# # * Overwrite methods (Default)# class Spriteset_Battle# def create_actors# def update_actors## class Scene_Battle < Scene_Base# def show_attack_animation(targets)## * Alias methods (Default)# class << DataManager# def setup_new_game# def create_game_objects# def make_save_contents# def extract_save_contents(contents)## class Game_Actor < Game_Battler# def setup(actor_id)## * Alias methods (Basic Module)# class Game_Interpreter# def comment_call##------------------------------------------------------------------------------# Instructions:# To instal the script, open you script editor and paste this script on# a new section on bellow the Materials section. This script must also# be bellow the script 'Victor Engine - Basic'##------------------------------------------------------------------------------# Comment calls note tags:# Tags to be used in events comment box, works like a script call.# # <battler name id: x># This tag allows to change the actor battler graphic.# id : actor ID# x : battler graphic filename## <battler hue id: x># This tag allows to change the actor battler graphic.# id : actor ID# x : battler graphic hue (0-360)## <battler position i: x, y># This tag allows to change the battler position during combat.# only valid if VE_BATTLE_FORMATION = :custom# i : position index# x : new coorditante X# y : new coorditante X##------------------------------------------------------------------------------# Actors note tags:# Tags to be used on the Actors note box in the database## <battler name: x># This tag allows to set the initial battler graphic filename for the actor.# x : battler graphic filename## <battler hue: x># This tag allows to set the initial battler graphic hur for the actor.# x : battler graphic hue (0-360)##------------------------------------------------------------------------------# Enemies note tags:# Tags to be used on the Enemies note box in the database## <attack animation: x># This tag allows to set the normal attack animation for the enemy# x : animation ID# #==============================================================================#==============================================================================# ** Victor Engine#------------------------------------------------------------------------------# Setting module for the Victor Engine#==============================================================================module Victor_Engine #-------------------------------------------------------------------------- # * Set the battle formation # Choose here how the actors battlers will be placed on the combat. # :front : horizontal placement # :side : vertical placement # :iso : isometric placement # :custom : custom placement #-------------------------------------------------------------------------- VE_BATTLE_FORMATION = :front #-------------------------------------------------------------------------- # * Set battler centralization # When true, battlers are centralized automatically. # Not valid if VE_BATTLE_FORMATION = :custom #-------------------------------------------------------------------------- VE_BATTLE_CENTRALIZE = true #-------------------------------------------------------------------------- # * Set battlers custom positions # Only if VE_BATTLE_FORMATION = :custom, allows to set the position of # all party actors, don't forget to add values for all positions # available if using a party bigger than the default. #-------------------------------------------------------------------------- VE_CUSTOM_POSITION = { # Position 1 => {x: 460, y: 180}, # Position for the first actor. 2 => {x: 480, y: 210}, # Position for the second actor. 3 => {x: 500, y: 240}, # Position for the thrid actor. 4 => {x: 520, y: 270}, # Position for the fourth actor. } # Don't remove #-------------------------------------------------------------------------- # * Actors battlers position adjust # Used to adjust the position of all actors battlers. #-------------------------------------------------------------------------- VE_POSITION_ADJUST = {x: 0, y: 0} #-------------------------------------------------------------------------- # * Actors battlers position adjust # Used to adjust the position of all actors battlers. #-------------------------------------------------------------------------- VE_DISTANCE_ADJUST = {x: 48, y: 32} #-------------------------------------------------------------------------- # * 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 scriptn" msg += "'VE - Basic Module' v%s or higher above it to work properlyn" 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, don't edit this #-------------------------------------------------------------------------- def self.script_name(name, ext = "VE") name = name.to_s.gsub("_", " ").upcase.split name.collect! {|char| char == ext ? "#{char} -" : char.capitalize } name.join(" ") endend$imported ||= {}$imported[:ve_actor_battlers] = 1.04Victor_Engine.required(:ve_actor_battlers, :ve_basic_module, 1.11, :above)#==============================================================================# ** DataManager#------------------------------------------------------------------------------# This module handles the game and database objects used in game.# Almost all global variables are initialized on this module#==============================================================================class << DataManager #-------------------------------------------------------------------------- # * Alias method: setup_new_game #-------------------------------------------------------------------------- alias :setup_new_game_ve_actor_battlers :setup_new_game def setup_new_game setup_new_game_ve_actor_battlers $game_custom_positions = VE_CUSTOM_POSITION.dup end #-------------------------------------------------------------------------- # * Alias method: setup_battle_test #-------------------------------------------------------------------------- alias :setup_battle_test_ve_actor_battlers :setup_battle_test def setup_battle_test setup_battle_test_ve_actor_battlers $game_custom_positions = VE_CUSTOM_POSITION.dup end #-------------------------------------------------------------------------- # * Alias method: create_game_objects #-------------------------------------------------------------------------- alias :create_game_objects_ve_actor_battlers :create_game_objects def create_game_objects create_game_objects_ve_actor_battlers $game_custom_positions = {} end #-------------------------------------------------------------------------- # * Alias method: make_save_contents #-------------------------------------------------------------------------- alias :make_save_contents_ve_actor_battlers :make_save_contents def make_save_contents contents = make_save_contents_ve_actor_battlers contents[:formations_ve] = $game_custom_positions contents end #-------------------------------------------------------------------------- # * Alias method: extract_save_contents #-------------------------------------------------------------------------- alias :extract_save_contents_ve_actor_battlers :extract_save_contents def extract_save_contents(contents) extract_save_contents_ve_actor_battlers(contents) $game_custom_positions = contents[:formations_ve] endend#==============================================================================# ** Game_Actor#------------------------------------------------------------------------------# This class handles actors. It's used within the Game_Actors class# ($game_actors) and referenced by the Game_Party class ($game_party).#==============================================================================class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :screen_x # Coordenada X na tela attr_accessor :screen_y # Coordenada Y na tela #-------------------------------------------------------------------------- # * Alias method: setup #-------------------------------------------------------------------------- alias :setup_ve_actor_battlers :setup def setup(actor_id) setup_ve_actor_battlers(actor_id) @battler_name = actor_battler_name @battler_hue = actor_battler_hue end #-------------------------------------------------------------------------- # * Overwrite method: use_sprite? #-------------------------------------------------------------------------- def use_sprite? return true end #-------------------------------------------------------------------------- # * Overwrite method: screen_z #-------------------------------------------------------------------------- def screen_z return 100 end #-------------------------------------------------------------------------- # * New method: actor_battler_name #-------------------------------------------------------------------------- def actor_battler_name actor.note =~ /<BATTLER NAME: ([^><]*)>/i ? $1.to_s : "" end #-------------------------------------------------------------------------- # * New method: actor_battler_hue #-------------------------------------------------------------------------- def actor_battler_hue actor.note =~ /<BATTLER HUE: (d+)>/i ? $1.to_i : 0 end #-------------------------------------------------------------------------- # * New method: battler_name #-------------------------------------------------------------------------- def battler_name=(name) @battler_name = name if name.is_a?(String) end #-------------------------------------------------------------------------- # * New method: battler_hue #-------------------------------------------------------------------------- def battler_hue=(hue) @battler_hue = hue if hue.numeric? end #-------------------------------------------------------------------------- # * New method: screen_x #-------------------------------------------------------------------------- def screen_x setup_x end #-------------------------------------------------------------------------- # * New method: screen_y #-------------------------------------------------------------------------- def screen_y setup_y end #-------------------------------------------------------------------------- # * New method: setup_x #-------------------------------------------------------------------------- def setup_x case VE_BATTLE_FORMATION when :front then position = get_frontal_x when :side then position = get_sideview_x when :iso then position = get_isometric_x when :custom then position = $game_custom_positions[index + 1][:x] end position + VE_POSITION_ADJUST[:x] end #-------------------------------------------------------------------------- # * New method: setup_y #-------------------------------------------------------------------------- def setup_y case VE_BATTLE_FORMATION when :front then position = get_frontal_y when :side then position = get_sideview_y when :iso then position = get_isometric_y when :custom then position = $game_custom_positions[index + 1][:y] end position + VE_POSITION_ADJUST[:y] end #-------------------------------------------------------------------------- # * New method: get_frontal_x #-------------------------------------------------------------------------- def get_frontal_x if VE_BATTLE_CENTRALIZE size = $game_party.battle_members.size position = (index + 1) * Graphics.width / (size + 1) else size = $game_party.max_battle_members position = index * Graphics.width / size + 64 end position end #-------------------------------------------------------------------------- # * New method: get_frontal_y #-------------------------------------------------------------------------- def get_frontal_y Graphics.height - 16 end #-------------------------------------------------------------------------- # * New method: get_sideview_x #-------------------------------------------------------------------------- def get_sideview_x if VE_BATTLE_CENTRALIZE size = $game_party.max_battle_members x = dist[:x] / 8 position = -index * (index * x - x * size) + Graphics.width - 160 else position = index * dist[:x] + Graphics.width - 192 end position end #-------------------------------------------------------------------------- # * New method: get_sideview_y #-------------------------------------------------------------------------- def get_sideview_y if VE_BATTLE_CENTRALIZE size = $game_party.battle_members.size height = Graphics.height position = (index - size) * dist[:y] + size * dist[:y] / 2 + height - 160 else position = index * dist[:y] + Graphics.height - 192 end position end #-------------------------------------------------------------------------- # * New method: get_isometric_x #-------------------------------------------------------------------------- def get_isometric_x if VE_BATTLE_CENTRALIZE position = -index * (index * dist[:x] - 32) + Graphics.width - 160 else position = index * dist[:x] + Graphics.width - 192 end position end #-------------------------------------------------------------------------- # * New method: get_isometric_y #-------------------------------------------------------------------------- def get_isometric_y if VE_BATTLE_CENTRALIZE position = index * (dist[:y] - index * 6) + Graphics.height - 160 else position = Graphics.height - 96 - index * dist[:y] end position end #-------------------------------------------------------------------------- # * New method: dist #-------------------------------------------------------------------------- def dist VE_DISTANCE_ADJUST endend#==============================================================================# ** Game_Enemy#------------------------------------------------------------------------------# This class handles enemy characters. It's used within the Game_Troop class# ($game_troop).#==============================================================================class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * New method: atk_animation_id1 #-------------------------------------------------------------------------- def atk_animation_id1 enemy.note =~ /<ATTACK ANIM(?:ATION): (d+)>/i ? $1.to_i : 1 end #-------------------------------------------------------------------------- # * New method: atk_animation_id2 #-------------------------------------------------------------------------- def atk_animation_id2 return 0 endend#==============================================================================# ** Game_Interpreter#------------------------------------------------------------------------------# An interpreter for executing event commands. This class is used within the# Game_Map, Game_Troop, and Game_Event classes.#==============================================================================class Game_Interpreter #-------------------------------------------------------------------------- # * Alias method: comment_call #-------------------------------------------------------------------------- alias :comment_call_ve_actor_battlers :comment_call def comment_call change_battler_name change_battler_hue change_position comment_call_ve_actor_battlers end #-------------------------------------------------------------------------- # * New method: change_battler_name #-------------------------------------------------------------------------- def change_battler_name note.scan(/<BATTLER NAME (d+): ([^><]*)>/i) do |id, name| $game_actors[id.to_i].battler_name = name end end #-------------------------------------------------------------------------- # * New method: change_battler_hue #-------------------------------------------------------------------------- def change_battler_hue note.scan(/<BATTLER HUE (d+): (d+)>/i) do |id, hue| $game_actors[id.to_i].battler_hue = hue end end #-------------------------------------------------------------------------- # * New method: change_position #-------------------------------------------------------------------------- def change_position regexp = /<BATTLER POSITION (d+): (d+) *, *(d+)>/i note.scan(regexp) do |i, x, y| $game_custom_positions[i.to_i][:x] = x.to_i $game_custom_positions[i.to_i][:y] = y.to_i end endend#==============================================================================# ** Spriteset_Battle#------------------------------------------------------------------------------# This class brings together battle screen sprites. It's used within the# Scene_Battle class.#==============================================================================class Spriteset_Battle #-------------------------------------------------------------------------- # * Overwrite method: create_actors #-------------------------------------------------------------------------- def create_actors @actor_sprites = $game_party.battle_members.reverse.collect do |actor| Sprite_Battler.new(@viewport1, actor) end @actors_party = $game_party.battle_members.dup end #-------------------------------------------------------------------------- # * Overwrite method: update_actors #-------------------------------------------------------------------------- def update_actors update_party if $game_party.battle_members != @actors_party @actor_sprites.each {|sprite| sprite.update } end #-------------------------------------------------------------------------- # * New method: update_party #-------------------------------------------------------------------------- def update_party @actor_sprites.each_index do |i| next if $game_party.battle_members.include?(@actor_sprites[i].battler) @actor_sprites[i].dispose @actor_sprites[i] = nil end $game_party.battle_members.collect do |actor| next if @actors_party.include?(actor) @actor_sprites.push(Sprite_Battler.new(@viewport1, actor)) end @actor_sprites.compact! @actors_party = $game_party.battle_members.dup $game_party.battle_members.each do |actor| old_position = [actor.screen_x, actor.screen_y] actor.setup_position if old_position != [actor.screen_x, actor.screen_y] sprite(actor).start_effect(:appear) end end endend#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------# This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Overwrite method: show_attack_animation #-------------------------------------------------------------------------- def show_attack_animation(targets) show_normal_animation(targets, @subject.atk_animation_id1, false) show_normal_animation(targets, @subject.atk_animation_id2, true) endend
  5. Nome Script: Equipment Requirements Versione: 1.2 Autore/i: Fomar0153 Informazioni: Consente di definire i requisiti per Armi e Armature, ed è possibile utilizzare sia il loro livello o una delle loro statistiche. Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: =beginEquipment Requirementsby Fomar0153Version 1.2----------------------Notes----------------------Adds a level requirement to equipment.----------------------Instructions----------------------Notetag the weapons/armors like so:<levelreq x><mhpreq x><mmpreq x><atkreq x><defreq x><matreq x><mdfreq x><agireq x><lukreq x><switchreq x><wepreq x><armreq x>----------------------Change Log----------------------1.0 -> 1.1 Added stat requirements Changed script name from Equipment Level Requirements to just Equipment Requirements1.1 -> 1.2 Added switch and other equipment requirements----------------------Known bugs----------------------None=endclass Game_BattlerBase #-------------------------------------------------------------------------- # ● If set to true then it compares the requirement with the actor's base # stat rather than their current. #-------------------------------------------------------------------------- EQUIPREQ_USE_BASE_STAT = true #-------------------------------------------------------------------------- # ● Check the requirements #-------------------------------------------------------------------------- alias level_equippable? equippable? def equippable?(item) return false unless item.is_a?(RPG::EquipItem) return false if @level < item.levelreq return false if reqstat(0) < item.mhpreq return false if reqstat(1) < item.mmpreq return false if reqstat(2) < item.atkreq return false if reqstat(3) < item.defreq return false if reqstat(4) < item.matreq return false if reqstat(5) < item.mdfreq return false if reqstat(6) < item.agireq return false if reqstat(7) < item.lukreq if item.switchreq > 0 return false unless $game_switches[item.switchreq] end if item.wepreq > 0 e = [] for equip in @equips if equip.is_weapon? e.push(equip.object.id) end end return false unless e.include?(item.wepreq) unless equip.object.nil? end if item.armreq > 0 e = [] for equip in @equips if equip.is_armor? e.push(equip.object.id) unless equip.object.nil? end end return false unless e.include?(item.armreq) end return level_equippable?(item) end #-------------------------------------------------------------------------- # ● New Method #-------------------------------------------------------------------------- def reqstat(id) if EQUIPREQ_USE_BASE_STAT return param_base(id) else return param(id) end endendmodule RPG #-------------------------------------------------------------------------- # ● Equip Item is inherited by both Weapon and Armor #-------------------------------------------------------------------------- class EquipItem def levelreq if self.note =~ /<levelreq (.*)>/i return $1.to_i else return 0 end end def mhpreq if self.note =~ /<mhpreq (.*)>/i return $1.to_i else return 0 end end def mmpreq if self.note =~ /<mmpreq (.*)>/i return $1.to_i else return 0 end end def atkreq if self.note =~ /<atkreq (.*)>/i return $1.to_i else return 0 end end def defreq if self.note =~ /<defreq (.*)>/i return $1.to_i else return 0 end end def matreq if self.note =~ /<matreq (.*)>/i return $1.to_i else return 0 end end def mdfreq if self.note =~ /<mdfreq (.*)>/i return $1.to_i else return 0 end end def agireq if self.note =~ /<agireq (.*)>/i return $1.to_i else return 0 end end def lukreq if self.note =~ /<lukreq (.*)>/i return $1.to_i else return 0 end end def switchreq if self.note =~ /<switchreq (.*)>/i return $1.to_i else return 0 end end def wepreq if self.note =~ /<wepreq (.*)>/i return $1.to_i else return 0 end end def armreq if self.note =~ /<armreq (.*)>/i return $1.to_i else return 0 end end endend
  6. Nome Script: Dynamic Class Changer Versione: 1.1 Autore/i: ???nOBodY??? Informazioni: Lo script permette di cambiare Classe ai propri personaggi =) Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: #=============================================================================== # Dynamic Class Changer v1.1 (RGSS3) # by ???nOBodY??? # Last Updated: 12/12/2011 # # Version 1.1 # #=============================================================================== # # Update History: # - Version 1.1 - Actors' noteboxes implemented /w notetag support # - Version 1.0 - Initial release; RGSS2 => RGSS3 # #=============================================================================== # # This snippet allows an actor's class name to be changed according to who is # using the class. For example, the default setup below changes "Magician" to # "Wizard" for males, and "Witch" for females, for the first four party members. # This can be used in a variety of ways, from gender-based to Zodiac-sign-based, # to even having every class be named something unique for every character in the # game! Slightly modified for RMVX Ace. # # New to RMVXA's v1.1, is the ability to use the new editor's built-in noteboxes # for actors: # # <class name: ID New Name> # # Ex. # # <class name: 3 Wizard> # <class name: 4 Priest> # <class name: 5 » Super Hero! «> # #=============================================================================== # Credits: # # -???nOBodY??? (aka sUBzeR_0) # -Special Thanks to Victor Sant #=============================================================================== # # Overwrites: # - Window_Base: draw_actor_class # #=============================================================================== $imported = {} if $imported == nil $imported["DynamicClassChanger"] = true module SUBZERO_MODULE #only include the class ids you wish to have their names changed INITIAL_CLASS_NAMES = { # actor id => [ [class id,name],[class id,name],[class id,name] ] 0 => 0, # DO NOT REMOVE 1 => [ [3,"Wizard"],[4,"Priest"] ], 2 => [ [3,"Witch"],[4,"Cleric"], ], 3 => [ [3,"Wizard"],[4,"Priest"] ], 4 => [ [3,"Witch"],[4,"Cleric"] ], 5 => [ ], 6 => [ ], 7 => [ ], 8 => [ ], } # <class name: ID New Name> CLASS_NAME = /<CLASS[ _]*NAME:?[ ]*(d+)[ ]*(.*)>/i end #=============================================================================== # CUSTOMIZATION END. FURTHER EDITTING IS DONE AT YOUR OWN RISK. YOU HAVE BEEN WARNED. #=============================================================================== #=============================================================================== # Window_Base #=============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # * Draw Class # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_class(actor, x, y, width = 112) change_color(normal_color) #sUBzeR_0 Patch text = actor.class.name i = 0 until i == SUBZERO_MODULE::INITIAL_CLASS_NAMES[actor.id].size if SUBZERO_MODULE::INITIAL_CLASS_NAMES[actor.id][i].include?(actor.class.id) text = SUBZERO_MODULE::INITIAL_CLASS_NAMES[actor.id][i][1] break end i += 1 end note = $data_actors[actor.id].note note.scan(SUBZERO_MODULE::CLASS_NAME).each do |id, name| text = name if actor.class_id == id.to_i end draw_text(x, y, width, line_height, text) #sUBzeR_0 Patch end end #class Window_Base < Window
  7. Nome Script: Auto Battle when Idle Versione: 1.2 Autore/i: mitchi.exe Informazioni: Il titolo dice tutto ù_ù Se non si ha tempo di stare dietro a una battaglia, la si può impostare ocme automatica =) Screenshot: Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: #===========================================================================01= # MITCHI Auto Battle when Idle [VXA] #------------------------------------------------------------------------------ # Script version: 1.2 # By: //mitchi.exe # Converted on: Dec. 8, 2011 # (This is my first completed VX and VXA script!) #------------------------------------------------------------------------------ # Description: # This script will make all actors in the party to auto attack when the player # is not doing anything (idling) during a party or actor command selection # after the specified amount of frames or by pressing a certain button. This # is very useful when you suddenly have to do something else IRL and you don't # want to waste game play time! This is also beneficial when you're sleepy # or lazy... or somethin'... #------------------------------------------------------------------------------ # Features: # ~The party attacks automatically if player is idle or by a key press # ~Can set a specific amount of frames before the auto battle starts # ~Can be disabled by a switch #------------------------------------------------------------------------------ # Instructions: # Change the value of MAB_IDLE_FRAMES below to the amount you want: # MAB_IDLE_FRAMES = n # Party will automatically attack after 'n' frames. (usu. 60 frames = 1 sec.) MAB_IDLE_FRAMES = 300 # Change the value of DISABLE_IDLE_SWITCH below to a switch you want: # DISABLE_IDLE_SWITCH = n # If the switch 'n' is turned ON, the script's features WILL NOT WORK. DISABLE_IDLE_SWITCH = 85 # You can also enter auto mode by pressing a button. # IDLE_AUTO_KEY = button # where 'button' can be (:A,:X,:Y,:Z,:L,:R) IDLE_AUTO_KEY = :L #------------------------------------------------------------------------------ # Compatibility: # -Only supports UP, DOWN, OKAY(C), and CANCEL( keys for idling # -This will not work on battle systems that alters turns like the ATB and TBS #===========================================================================42= # Special Thanks: # -IMP1 for the frame count and seconds info # -Yanfly for helping me fix an error for the conversion # -SortaCool for originally requesting the script # -Peva for the manual key press suggestion # # Changelog: # v1.2 - Script converted to VXA # v1.1 - auto.battle -> make.action to prevent screwing up # each actor's default auto-battle setting (VX) #============================================================================== ##### START OF CODE ##### puts "MITCHI Auto Battle when Idle loaded" class Scene_Battle < Scene_Base alias idle_auto_start start alias idle_auto_update update alias idle_auto_turn_end turn_end def start idle_auto_start @idle_counter = 0 end def idle_auto_key_trigger? if (Input.trigger?(:DOWN) or Input.trigger?(:UP)) return true elsif (Input.trigger?(:C) or Input.trigger?(:) return true end return false end def idle_manual_key_press? if (Input.trigger?(IDLE_AUTO_KEY)) return true end return false end def update idle_auto_update if !$game_switches[DISABLE_IDLE_SWITCH] if @party_command_window.active or @actor_command_window.active @idle_counter = 0 if idle_auto_key_trigger? @idle_counter += 1 @idle_counter = MAB_IDLE_FRAMES if idle_manual_key_press? if @idle_counter == (MAB_IDLE_FRAMES) puts "Auto Battle Idle mode enabled!" for i in 0..$game_party.members.size-1 actor_set_auto = $game_party.members[i].id $game_actors[actor_set_auto].make_auto_battle_actions end Sound.play_ok @party_command_window.deactivate if @party_command_window.active @actor_command_window.deactivate if @actor_command_window.active turn_start end end end end def turn_end @idle_counter = 0 idle_auto_turn_end end end ##### END OF CODE ##### #============================================================================== # _ _ _ _____ ____ _ _ _ # | / | | | |_ _| | __| | |_| | | | # | ' | | | | | | |__ | _ | | | # |_|_|_| |_| |_| |____| |_| |_| |_| # "Yay for my first completed VXA script!" #============================================================================== Incompatibilità: N/D
  8. Nome Script: Animated Battlers Versione: 1.2 Autore/i: Fomar0153 Informazioni: Questo script aggiunge la possibilità di avere battlers animati nelle battaglie. Screenshots: Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: =begin Animated Battlers Script by Fomar0153 Version 1.2 ---------------------- Notes ---------------------- Includes Side View Battlers Compatable with my Customisable ATB/Stamina Based Battle System Script Make sure this goes above my Customisable ATB/Stamina Based Battle System Script ---------------------- Instructions ---------------------- Edit variables in Animated_Battlers to suit your needs. You will need to import battlers for the party to use they should be named like this: name_battler e.g. Ralph_battler or you can name them through note tagging ---------------------- Change Log ---------------------- 1.0 -> 1.1 Added Notetag support for default battlers <battler name> and you can edit it through the game e.g. $game_actors[1].battler_name = "Fomar0153" Added support for individual battler setup Added support for different length animations Added support for individual skill and item animations Added notetag support to further define when skills are close and long range. <close> <range> 1.1 -> 1.2 Fixed a bug were pose overrode setpose animation lengths Fixed screen_x related bug that sometimes caused positioning errors. ---------------------- Known bugs ---------------------- None =end module Animated_Battlers # Setup Generics # RPG VXA Caps at 60 FPS at best FRAMES_PER_SECOND = 4 # How long it takes for someone to move into position MOVEMENT_SECONDS = 1 # HP level before whoozy pose (percentage) LOW_HEALTH_POSE = 50 # Set up Actor Positions X_START = 400 X_OFFSET = 0 Y_START = 0 Y_OFFSET = 60 BATTLERS = {} BATTLERS['DEFAULT'] = {} # How many frames there are in an animation # Note FRAMES must be set to the maximum BATTLERS['DEFAULT']['FRAMES'] = 4 BATTLERS['DEFAULT']['VFRAMES'] = 14 # Setup default battlers' standard rows BATTLERS['DEFAULT']['POSE_IDLE'] = 0 BATTLERS['DEFAULT'][0] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_DEFEND'] = 1 BATTLERS['DEFAULT'][1] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_WHOOZY'] = 2 BATTLERS['DEFAULT'][2] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_STRUCK'] = 3 BATTLERS['DEFAULT'][3] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_ATTACK'] = 4 BATTLERS['DEFAULT'][4] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_ITEM'] = [] BATTLERS['DEFAULT']['POSE_ITEM'][0] = 5 BATTLERS['DEFAULT'][5] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_SKILL'] = [] BATTLERS['DEFAULT']['POSE_SKILL'][0] = 6 BATTLERS['DEFAULT'][6] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_MAGIC'] = 7 BATTLERS['DEFAULT'][7] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_ADVANCE'] = 8 BATTLERS['DEFAULT'][8] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_RETREAT'] = 9 BATTLERS['DEFAULT'][9] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_VICTORY'] = 10 BATTLERS['DEFAULT'][10] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_ENTER'] = 11 BATTLERS['DEFAULT'][11] = BATTLERS['DEFAULT']['FRAMES'] BATTLERS['DEFAULT']['POSE_DEAD'] = 12 BATTLERS['DEFAULT'][12] = BATTLERS['DEFAULT']['FRAMES'] # When doing the victory pose loop back to frame # 0 for the first frame # (FRAMES - 1) to not loop BATTLERS['DEFAULT']['VICTORY_LOOP'] = 1 # I reccomend adding your non-conformist battlers here # copy the big block above starting from: # BATTLERS['DEFAULT'] = {} # all the way to BATTLERS['DEFAULT']['VICTORY_LOOP'] = 1 # and then change DEFAULT to the name of the battler. def self.get_pose(battler_name, pose, id = nil) if BATTLERS[battler_name] == nil b = BATTLERS['DEFAULT'] else b = BATTLERS[battler_name] end if pose == "POSE_ITEM" or pose == "POSE_SKILL" if id.nil? or b[pose][id].nil? return b[pose][0] else return b[pose][id] end elsif !b[pose].nil? return b[pose] else return b['POSE_IDLE'] end end end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● New attr_accessor #-------------------------------------------------------------------------- attr_accessor :battler_name #-------------------------------------------------------------------------- # ● Aliases setup #-------------------------------------------------------------------------- alias ab_setup setup def setup(actor_id) ab_setup(actor_id) if actor.note =~ /<battler (.*)>/i @battler_name = $1 else @battler_name = actor.name + "_battler" end end #-------------------------------------------------------------------------- # ● Rewrites use_sprite? #-------------------------------------------------------------------------- def use_sprite? return true end #-------------------------------------------------------------------------- # ● New Method screen_x #-------------------------------------------------------------------------- def screen_x return Animated_Battlers::X_START + self.index * Animated_Battlers::X_OFFSET end #-------------------------------------------------------------------------- # ● New Method screen_y #-------------------------------------------------------------------------- def screen_y return Animated_Battlers::Y_START + self.index * Animated_Battlers::Y_OFFSET end #-------------------------------------------------------------------------- # ● New Method screen_z #-------------------------------------------------------------------------- def screen_z return 100 end end class Spriteset_Battle #-------------------------------------------------------------------------- # ● Rewrites create_actors #-------------------------------------------------------------------------- def create_actors @actor_sprites = $game_party.battle_members.reverse.collect do |actor| Sprite_Battler.new(@viewport1, actor) end end end class Sprite_Battler < Sprite_Base #-------------------------------------------------------------------------- # ● Aliases initialize #-------------------------------------------------------------------------- alias ab_initialize initialize def initialize(viewport, battler = nil) ab_initialize(viewport, battler) @frame = 0 @mframe = 0 @pose = 0 @set_pose = Animated_Battlers.get_pose(@battler.battler_name,"POSE_ENTER") end #-------------------------------------------------------------------------- # ● Rewrote update_src_rect #-------------------------------------------------------------------------- def update_src_rect sx = (@frame / (60 / Animated_Battlers::FRAMES_PER_SECOND)) * @cw if @set_pose >= 0 sy = @set_pose * bitmap.height / (Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES")) else sy = @pose * bitmap.height / (Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES")) end self.src_rect.set(sx, sy, @cw, @ch) end #-------------------------------------------------------------------------- # ● Destroyed update_collapse #-------------------------------------------------------------------------- def update_collapse return end #-------------------------------------------------------------------------- # ● Aliases start_effect #-------------------------------------------------------------------------- alias ab_start_effect start_effect def start_effect(effect_type) return if effect_type = :collapse ab_start_effect end #-------------------------------------------------------------------------- # ● Rewrote update_position #-------------------------------------------------------------------------- def update_position if @battler.actor? self.x = @battler.screen_x self.ox = 0 self.y = @battler.screen_y + bitmap.height if @battler.moving > 0 self.x += (@mframe * (@battler.target_x - @battler.target_width - self.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt=':grah1' /> / (60 * Animated_Battlers::MOVEMENT_SECONDS)) self.y += @mframe * (@battler.target_y - self.y + (bitmap.height * (Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES") - 1)/Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES"))) / (60 * Animated_Battlers::MOVEMENT_SECONDS) end else self.x = @battler.screen_x self.y = @battler.screen_y + (bitmap.height * (Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES") - 1)) / Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES") if @battler.moving > 0 self.x += (@mframe * (@battler.target_x - self.x + @battler.bitmap_width / Animated_Battlers.get_pose(@battler.battler_name, "FRAMES")) / (60 * Animated_Battlers::MOVEMENT_SECONDS)) self.y += @mframe * (@battler.target_y + @battler.target_height - @battler.screen_y) / (60 * Animated_Battlers::MOVEMENT_SECONDS) end end self.z = @battler.screen_z end #-------------------------------------------------------------------------- # ● New Method update_pose #-------------------------------------------------------------------------- def update_pose if @battler.set_pose >= 0 @set_pose = @battler.set_pose @frame = 0 @battler.set_pose = -1 end return if @set_pose > 0 or @battler.moving > 0 if @battler.dead? @pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_DEAD") return end if $game_troop.all_dead? @pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_VICTORY") return end if battler.guard? @pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_DEFEND") return end if battler.hp <= (battler.mhp * Animated_Battlers::LOW_HEALTH_POSE / 100) @pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_WHOOZY") return end @pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_IDLE") end #-------------------------------------------------------------------------- # ● Rewrote update #-------------------------------------------------------------------------- def update super @frame += 1 if @battler.moving == 1 and @mframe == 0 @set_pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_ADVANCE") end if @battler.moving == 3 and @mframe == (60 * Animated_Battlers::MOVEMENT_SECONDS) @set_pose = Animated_Battlers.get_pose(@battler.battler_name, "POSE_RETREAT") end @mframe += 1 if @set_pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_ADVANCE") @mframe -= 1 if @set_pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_RETREAT") if (@mframe == 0 or @mframe == (60 * Animated_Battlers::MOVEMENT_SECONDS)) and @battler.moving? @set_pose = -1 @battler.moving = (@battler.moving + 1) % 4 end if @frame >= (Animated_Battlers.get_pose(@battler.battler_name, @set_pose) * (60 / Animated_Battlers::FRAMES_PER_SECOND)) and @set_pose > 0 if @pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_VICTORY") @frame = (Animated_Battlers.get_pose(@battler.battler_name, "VICTORY_LOOP") * (60 / Animated_Battlers::FRAMES_PER_SECOND)) else @frame = 0 end @set_pose = -1 unless (@set_pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_ADVANCE") or @set_pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_RETREAT")) end if @frame >= (Animated_Battlers.get_pose(@battler.battler_name, @pose) * (60 / Animated_Battlers::FRAMES_PER_SECOND)) if @pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_VICTORY") @frame = (Animated_Battlers.get_pose(@battler.battler_name, "VICTORY_LOOP") * (60 / Animated_Battlers::FRAMES_PER_SECOND)) else @frame = 0 end @set_pose = -1 unless (@set_pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_ADVANCE") or @set_pose == Animated_Battlers.get_pose(@battler.battler_name, "POSE_RETREAT")) end last_pose = @pose update_pose if last_pose != @pose @frame = 0 end if @battler @use_sprite = @battler.use_sprite? if @use_sprite update_bitmap update_origin update_position update_src_rect end setup_new_effect setup_new_animation update_effect else self.bitmap = nil @effect_type = nil end end #-------------------------------------------------------------------------- # ● New Method moving? #-------------------------------------------------------------------------- def moving? return !(@mframe == 0 or @mframe == 60 * Animated_Battlers::MOVEMENT_SECONDS) end #-------------------------------------------------------------------------- # ● Rewrote update_bitmap #-------------------------------------------------------------------------- def update_bitmap new_bitmap = Cache.battler(@battler.battler_name, @battler.battler_hue) if bitmap != new_bitmap self.bitmap = new_bitmap @cw = bitmap.width / Animated_Battlers.get_pose(@battler.battler_name, "FRAMES") @ch = bitmap.height / Animated_Battlers.get_pose(@battler.battler_name, "VFRAMES") init_visibility @battler.bitmap_height = bitmap.height @battler.bitmap_width = bitmap.width end end #-------------------------------------------------------------------------- # ● Rewrote effect? #-------------------------------------------------------------------------- def effect? return (@effect_type != nil or moving?) end end class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # ● New attr_accessors #-------------------------------------------------------------------------- attr_accessor :target_x attr_accessor :target_y attr_accessor :target_width attr_accessor :target_height attr_accessor :moving attr_accessor :set_pose attr_accessor :bitmap_height attr_accessor :bitmap_width #-------------------------------------------------------------------------- # ● Aliases initialize #-------------------------------------------------------------------------- alias ab_initialize initialize def initialize ab_initialize @target_x = 0 @target_y = 0 @target_width = 0 @target_height = 0 @moving = 0 @set_pose = -1 @bitmap_height = 0 @bitmap_width = 0 end #-------------------------------------------------------------------------- # ● New Method move_to #-------------------------------------------------------------------------- def move_to(target) @target_x = target.screen_x @target_y = target.screen_y @target_width = target.bitmap_width / Animated_Battlers.get_pose(target.battler_name, "FRAMES") @target_height = target.bitmap_height / Animated_Battlers.get_pose(target.battler_name, "VFRAMES") @moving = 1 end #-------------------------------------------------------------------------- # ● New Method moving? #-------------------------------------------------------------------------- def moving? return (@moving == 1 or @moving == 3) end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● Rewrote use_item #-------------------------------------------------------------------------- def use_item item = @subject.current_action.item @log_window.display_use_item(@subject, item) @subject.use_item(item) refresh_status targets = @subject.current_action.make_targets.compact targets.each {|target| item.repeats.times { invoke_item(target, item) } } end #-------------------------------------------------------------------------- # ● Rewrote invoke_item #-------------------------------------------------------------------------- def invoke_item(target, item) if rand < target.item_cnt(@subject, item) invoke_counter_attack(target, item) elsif rand < target.item_mrf(@subject, item) invoke_magic_reflection(target, item) else if item.is_a?(RPG::Item) @subject.set_pose = Animated_Battlers.get_pose(@subject.battler_name, "POSE_ITEM", item.id) show_animation([target], item.animation_id) apply_item_effects(apply_substitute(target, item), item) elsif item.is_a?(RPG::Skill) if item.id == @subject.attack_skill_id @subject.move_to(target) update_for_wait while @subject.moving? @subject.set_pose = Animated_Battlers.get_pose(@subject.battler_name, "POSE_ATTACK") target.set_pose = Animated_Battlers.get_pose(target.battler_name, "POSE_STRUCK") show_animation([target], item.animation_id) apply_item_effects(apply_substitute(target, item), item) @subject.moving = 3 update_for_wait while @subject.moving? elsif item.id == @subject.guard_skill_id show_animation([target], item.animation_id) apply_item_effects(apply_substitute(target, item), item) elsif (item.magical? or item.note.include?("<range>")) and not item.note.include?("<close>") @subject.set_pose = Animated_Battlers.get_pose(@subject.battler_name, "POSE_MAGIC",item.id) target.set_pose = Animated_Battlers.get_pose(target.battler_name, "POSE_STRUCK") if item.for_opponent? show_animation([target], item.animation_id) apply_item_effects(apply_substitute(target, item), item) else if item.for_opponent? @subject.move_to(target) update_for_wait while @subject.moving? @subject.set_pose = Animated_Battlers.get_pose(@subject.battler_name, "POSE_SKILL", item.id) target.set_pose = Animated_Battlers.get_pose(target.battler_name, "POSE_STRUCK") show_animation([target], item.animation_id) apply_item_effects(apply_substitute(target, item), item) @subject.moving = 3 update_for_wait while @subject.moving? else @subject.set_pose = Animated_Battlers.get_pose(@subject.battler_name, "POSE_SKILL", item.id) show_animation([target], item.animation_id) apply_item_effects(apply_substitute(target, item), item) end end end end @subject.last_target_index = target.index end end
  9. Nome Script: ATB/Stamina Battle System Standard Versione: 1.1 Autore/i: Fomar0153 Informazioni: Script che aggiunge la barra ATB al sistema di battaglia di default di RMVX Ace. Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: =begin Customisable ATB/Stamina Based Battle System Script by Fomar0153 Version 1.1 ---------------------- Notes ---------------------- No requirements Customises the battle system to be similar to ATB or Stamina based battle systems. ---------------------- Instructions ---------------------- Edit variables in CBS to suit your needs. The guard status should be set to 2~2 turns. ---------------------- Change Log ---------------------- 1.0 -> 1.1 Restored turn functionality and a glitch related to message windows ---------------------- Known bugs ---------------------- None =end module CBS MAX_STAMINA = 1000 RESET_STAMINA = true SAMINA_GAUGE_NAME = "ATB" ESCAPE_COST = 500 # If reset stamina is set to true then all characters # will start with a random amount of stamina capped at # the percentage you set. # If reset stamina is set to false then this just # affects enemies. STAMINA_START_PERCENT = 20 # Default skill cost # If you want to customise skill costs do it like this # SKILL_COST[skill_id] = cost SKILL_COST = [] SKILL_COST[0] = 1000 # Attack SKILL_COST[1] = 1000 # Guard SKILL_COST[2] = 500 ITEM_COST = 1000 #-------------------------------------------------------------------------- # ● New Method stamina_gain #-------------------------------------------------------------------------- def self.stamina_gain(battler) return 2 + [0, battler.agi / 10].max end #-------------------------------------------------------------------------- # ● New Method stamina_start #-------------------------------------------------------------------------- def self.stamina_start(battler) battler.stamina = rand(MAX_STAMINA * STAMINA_START_PERCENT / 100) end end class Game_BattlerBase #-------------------------------------------------------------------------- # ● New attr_accessor #-------------------------------------------------------------------------- attr_accessor :stamina #-------------------------------------------------------------------------- # ● Aliases initialize #-------------------------------------------------------------------------- alias cbs_initialize initialize def initialize cbs_initialize @stamina = 0 end #-------------------------------------------------------------------------- # ● New Method stamina_rate #-------------------------------------------------------------------------- def stamina_rate @stamina.to_f / CBS::MAX_STAMINA end #-------------------------------------------------------------------------- # ● New Method stamina_rate #-------------------------------------------------------------------------- def stamina_gain return if not movable? @stamina = [CBS].min end end #-------------------------------------------------------------------------- # ● New Class Window_PartyHorzCommand #-------------------------------------------------------------------------- class Window_PartyHorzCommand < Window_HorzCommand #-------------------------------------------------------------------------- # ● New Method initialize #-------------------------------------------------------------------------- def initialize super(0, 0) self.openness = 0 deactivate end #-------------------------------------------------------------------------- # ● New Method window_width #-------------------------------------------------------------------------- def window_width return Graphics.width end #-------------------------------------------------------------------------- # ● New Method visible_line_number #-------------------------------------------------------------------------- def visible_line_number return 1 end #-------------------------------------------------------------------------- # ● New Method make_command_list #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::fight, :fight) add_command(Vocab::escape, :escape, BattleManager.can_escape?) end #-------------------------------------------------------------------------- # ● New Method setup #-------------------------------------------------------------------------- def setup clear_command_list make_command_list refresh select(0) activate open end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● Rewrote update #-------------------------------------------------------------------------- def update super if BattleManager.in_turn? and !inputting? process_stamina process_event process_action end BattleManager.judge_win_loss end #-------------------------------------------------------------------------- # ● New Method inputting? #-------------------------------------------------------------------------- def inputting? return @actor_command_window.active || @skill_window.active || @item_window.active || @actor_window.active || @enemy_window.active end #-------------------------------------------------------------------------- # ● New Method process_stamina #-------------------------------------------------------------------------- def process_stamina @actor_command_window.close return if @subject all_battle_members.each do |battler| battler.stamina_gain end @status_window.refresh if @status_window.close? @status_window.open end if BattleManager.escaping? $game_party.battle_members.each do |battler| if battler.stamina < CBS::MAX_STAMINA $game_troop.members.each do |enemy| if enemy.stamina == CBS::MAX_STAMINA enemy.make_actions @subject = enemy end end return end end unless BattleManager.process_escape $game_party.battle_members.each do |actor| actor.stamina -= CBS::ESCAPE_COST end end end all_battle_members.each do |battler| if battler.stamina == CBS::MAX_STAMINA battler.make_actions @subject = battler if @subject.inputable? and battler.is_a?(Game_Actor) @actor_command_window.setup(@subject) BattleManager.set_actor(battler) end return end end end #-------------------------------------------------------------------------- # ● Rewrote create_info_viewport #-------------------------------------------------------------------------- def create_info_viewport @info_viewport = Viewport.new @info_viewport.rect.y = Graphics.height - @status_window.height - 48 @info_viewport.rect.height = @status_window.height + 48 @info_viewport.z = 100 @info_viewport.ox = 0 @status_window.viewport = @info_viewport end #-------------------------------------------------------------------------- # ● Rewrote create_party_command_window #-------------------------------------------------------------------------- def create_party_command_window @party_command_window = Window_PartyHorzCommand.new @party_command_window.viewport = @info_viewport @party_command_window.set_handler(:fight, method(:command_fight)) @party_command_window.set_handler(:escape, method(:command_escape)) @party_command_window.unselect end #-------------------------------------------------------------------------- # ● Rewrote create_status_window #-------------------------------------------------------------------------- def create_status_window @status_window = Window_BattleStatus.new end #-------------------------------------------------------------------------- # ● Rewrote create_actor_command_window #-------------------------------------------------------------------------- def create_actor_command_window @actor_command_window = Window_ActorCommand.new @actor_command_window.viewport = @info_viewport @actor_command_window.set_handler(:attack, method(:command_attack)) @actor_command_window.set_handler(:skill, method(:command_skill)) @actor_command_window.set_handler(:guard, method(:command_guard)) @actor_command_window.set_handler(:item, method(:command_item)) @actor_command_window.set_handler(:cancel, method(:prior_command)) @actor_command_window.x = Graphics.width - 128 @actor_command_window.y = 48 end #-------------------------------------------------------------------------- # ● Destroyed update_info_viewport #-------------------------------------------------------------------------- def update_info_viewport # no thank you end #-------------------------------------------------------------------------- # ● Rewrote start_party_command_selection #-------------------------------------------------------------------------- def start_party_command_selection unless scene_changing? refresh_status @status_window.unselect @status_window.open if BattleManager.input_start @actor_command_window.close @party_command_window.setup else @party_command_window.deactivate turn_start end end end #-------------------------------------------------------------------------- # ● Rewrote start_actor_command_selection #-------------------------------------------------------------------------- def start_actor_command_selection @party_command_window.close BattleManager.set_escaping(false) turn_start end #-------------------------------------------------------------------------- # ● Rewrote prior_command #-------------------------------------------------------------------------- def prior_command start_party_command_selection end #-------------------------------------------------------------------------- # ● Rewrote process_action #-------------------------------------------------------------------------- def process_action return if scene_changing? if !@subject || [email protected]_action @subject = BattleManager.next_subject end if Input.trigger?(: and (@subject == nil) start_party_command_selection end return unless @subject if @subject.current_action @subject.current_action.prepare if @subject.current_action.valid? @status_window.open execute_action end @subject.remove_current_action refresh_status @log_window.display_auto_affected_status(@subject) @log_window.wait_and_clear end process_action_end unless @subject.current_action end #-------------------------------------------------------------------------- # ● Aliases use_item #-------------------------------------------------------------------------- alias cbs_use_item use_item def use_item cbs_use_item @subject.on_turn_end end #-------------------------------------------------------------------------- # ● Rewrote turn_end #-------------------------------------------------------------------------- def turn_end all_battle_members.each do |battler| battler.on_turn_end refresh_status @log_window.display_auto_affected_status(battler) @log_window.wait_and_clear end BattleManager.turn_end process_event start_party_command_selection end #-------------------------------------------------------------------------- # ● Rewrote command_fight #-------------------------------------------------------------------------- def command_fight BattleManager.next_command start_actor_command_selection end #-------------------------------------------------------------------------- # ● Rewrote command_escape #-------------------------------------------------------------------------- def command_escape @party_command_window.close BattleManager.set_escaping(true) turn_start end #-------------------------------------------------------------------------- # ● Destroyed next_command #-------------------------------------------------------------------------- def next_command # no thank you end end class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # ● Rewrote initialize #-------------------------------------------------------------------------- def initialize super(0, 48, Graphics.width, window_height) refresh self.openness = 0 end #-------------------------------------------------------------------------- # ● Rewrote window_width #-------------------------------------------------------------------------- def window_width Graphics.width - 128 end #-------------------------------------------------------------------------- # ● Rewrote refresh #-------------------------------------------------------------------------- def refresh contents.clear draw_all_items end #-------------------------------------------------------------------------- # ● Rewrote draw_item #-------------------------------------------------------------------------- def draw_item(index) actor = $game_party.battle_members[index] draw_basic_area(basic_area_rect(index), actor) draw_gauge_area(gauge_area_rect(index), actor) end #-------------------------------------------------------------------------- # ● Rewrote basic_area_rect #-------------------------------------------------------------------------- def basic_area_rect(index) rect = item_rect_for_text(index) rect.width -= gauge_area_width + 10 rect end #-------------------------------------------------------------------------- # ● Rewrote gauge_area_rect #-------------------------------------------------------------------------- def gauge_area_rect(index) rect = item_rect_for_text(index) rect.x += rect.width - gauge_area_width #- 128 #### rect.width = gauge_area_width rect end #-------------------------------------------------------------------------- # ● Rewrote gauge_area_width #-------------------------------------------------------------------------- def gauge_area_width return 220 + 128 end #-------------------------------------------------------------------------- # ● Rewrote draw_gauge_area_with_tp #-------------------------------------------------------------------------- def draw_gauge_area_with_tp(rect, actor) draw_actor_hp(actor, rect.x + 0, rect.y, 72) draw_actor_mp(actor, rect.x + 82, rect.y, 64) draw_actor_tp(actor, rect.x + 156, rect.y, 64) draw_actor_stamina(actor, rect.x + 240, rect.y, 108) end #-------------------------------------------------------------------------- # ● Rewrote draw_gauge_area_without_tp #-------------------------------------------------------------------------- def draw_gauge_area_without_tp(rect, actor) draw_actor_hp(actor, rect.x + 0, rect.y, 134) draw_actor_mp(actor, rect.x + 144, rect.y, 76) # draw_actor_stamina(actor, rect.x + 240, rect.y, 108) end #-------------------------------------------------------------------------- # ● New Method draw_actor_stamina #-------------------------------------------------------------------------- def draw_actor_stamina(actor, x, y, width = 124) draw_gauge(x, y, width, actor.stamina_rate, stamina_gauge_color2, stamina_gauge_color) change_color(system_color) draw_text(x, y, 30, line_height, CBS::SAMINA_GAUGE_NAME) end #-------------------------------------------------------------------------- # ● New Colour Definitions #-------------------------------------------------------------------------- def stamina_gauge_color; text_color(31); end; def stamina_gauge_color2; text_color(32); end; end class Window_BattleSkill < Window_SkillList #-------------------------------------------------------------------------- # ● Rewrote initialize #-------------------------------------------------------------------------- def initialize(help_window, info_viewport) y = help_window.height super(0, y, Graphics.width, info_viewport.rect.y - y + 48) self.visible = false @help_window = help_window @info_viewport = info_viewport end end class Window_BattleActor < Window_BattleStatus #-------------------------------------------------------------------------- # ● Rewrote initialize #-------------------------------------------------------------------------- def initialize(info_viewport) super() self.y = info_viewport.rect.y + 48 self.visible = false self.openness = 255 @info_viewport = info_viewport end end class Window_BattleEnemy < Window_Selectable # ● Rewrote initialize #-------------------------------------------------------------------------- def initialize(info_viewport) super(0, info_viewport.rect.y + 48, window_width, fitting_height(4)) refresh self.visible = false @info_viewport = info_viewport end end class Window_BattleItem < Window_ItemList #-------------------------------------------------------------------------- # ● Rewrote initialize #-------------------------------------------------------------------------- def initialize(help_window, info_viewport) y = help_window.height super(0, y, Graphics.width, info_viewport.rect.y - y + 48) self.visible = false @help_window = help_window @info_viewport = info_viewport end end module BattleManager #-------------------------------------------------------------------------- # ● Rewrote setup #-------------------------------------------------------------------------- def self.setup(troop_id, can_escape = true, can_lose = false) init_members $game_troop.setup(troop_id) @can_escape = can_escape @can_lose = can_lose make_escape_ratio @escaping = false @turn_counter = 0 @actions_per_turn = $game_party.members.size + $game_troop.members.size ($game_party.members + $game_troop.members).each do |battler| if battler.is_a?(Game_Enemy) or CBS::RESET_STAMINA CBS.stamina_start(battler) end end end #-------------------------------------------------------------------------- # ● New Method set_escaping #-------------------------------------------------------------------------- def self.set_escaping(escaping) @escaping = escaping end #-------------------------------------------------------------------------- # ● New Method escaping? #-------------------------------------------------------------------------- def self.escaping? return @escaping end #-------------------------------------------------------------------------- # ● Rewrote turn_start #-------------------------------------------------------------------------- def self.turn_start @phase = :turn clear_actor $game_troop.increase_turn end #-------------------------------------------------------------------------- # ● New Method set_actor #-------------------------------------------------------------------------- def self.set_actor(actor) @actor_index = actor.index end #-------------------------------------------------------------------------- # ● New Increase action counter #-------------------------------------------------------------------------- def self.add_action @turn_counter += 1 if @turn_counter == @actions_per_turn $game_troop.increase_turn @turn_counter = 0 end end end class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # ● Rewrote on_turn_end #-------------------------------------------------------------------------- def on_turn_end @result.clear regenerate_all update_state_turns update_buff_turns remove_states_auto(2) if self.actor? @stamina -= input.stamina_cost else @stamina -= @actions[0].stamina_cost end BattleManager.add_action end end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● Rewrote input #-------------------------------------------------------------------------- def input if @actions[@action_input_index] == nil @actions[@action_input_index] = Game_Action.new(self) end return @actions[@action_input_index] end end class Game_Action #-------------------------------------------------------------------------- # ● New Method stamina_cost #-------------------------------------------------------------------------- def stamina_cost if @item.is_skill? return CBS::SKILL_COST[item.id] if CBS::SKILL_COST[item.id] return CBS::SKILL_COST[0] end return CBS::ITEM_COST if @item.is_item? return CBS::MAX_STAMINA end end Demo: http://www.cobbtocs.co.uk/fomar0153/demos/CBS%20Demo.zip
  10. Nome Script: Animazione Nemici Versione: N/D Autore/i: Rhyme Informazioni: Script che anima la grafica dei nemici. La velocità dell'animazione e le dimensioni degli sprite sono regolabili. Si tratta di un semplice script, quindi non aspettatevi molto (non è un sistema di battaglia laterale). Istruzioni: Inserite lo script sotto Material. Script: #============================================================================== # ■ Animated Enemy Sprites # Merry Christmas and happy holidays! #============================================================================== # Notebox Tag: # Enemy: !Flip #============================================================================== # Spritesheet Data for referencing # # 0. Idle # 1. Defend # 2. Weak # 3. Damaged # 4. Attack # 5. Item # 6. Skill # 7. Magic # 8. Advance (n/a) # 9. Retreat (n/a) # 10. Victory (n/a) # 11. Enter # 12. Dead # 13. Credits and/or etc (n/a) #============================================================================== # ~rhyme #============================================================================== module Animated_Enemy_Sprites Delay = 8 FrameSize = [4, 14] DefaultBlink = false end #============================================================================== # ■ Game_Battler #============================================================================== class Game_Battler < Game_BattlerBase attr_accessor :pose #-------------------------------------------------------------------------- # ● Flip #-------------------------------------------------------------------------- def flip_sprite return false end #-------------------------------------------------------------------------- # ● Reset Pose #-------------------------------------------------------------------------- def reset_pose @pose = 0 @pose = 2 if @hp < mhp / 4 if @states != nil @pose = 2 if @states.size > 0 end @pose = 1 if guard? @pose = 12 if dead? end #-------------------------------------------------------------------------- # ● Use Item #-------------------------------------------------------------------------- alias use_item_ani use_item def use_item(item) if item.is_a?(RPG::Item) @pose = 4 else if item.is_a?(RPG::Skill) if item.id == attack_skill_id @pose = 4 elsif item.physical? @pose = 6 elsif item.magical? @pose = 7 end end end use_item_ani(item) end #-------------------------------------------------------------------------- # ● Perform Damage #-------------------------------------------------------------------------- alias perform_map_damage_effect_ani perform_map_damage_effect def perform_map_damage_effect perform_map_damage_effect_ani @pose = 3 unless @guarding end #-------------------------------------------------------------------------- # ● Upon Damage #-------------------------------------------------------------------------- alias on_damage_ani on_damage def on_damage(value) @pose = 3 unless @guarding on_damage_ani(value) end end #============================================================================== # ■ Game_Enemy #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● Flip #-------------------------------------------------------------------------- def flip_sprite return true if Scan::string($data_enemies[@enemy_id].note, "!Flip") return super end end #============================================================================== # ■ Sprite_Battler #============================================================================== class Sprite_Battler < Sprite_Base attr_accessor :battler #-------------------------------------------------------------------------- # ● Initialize #-------------------------------------------------------------------------- def initialize(viewport, battler = nil) super(viewport) @battler = battler @battler_visible = false @effect_type = nil @effect_duration = 0 @spritesheet = true @pose = 11 @counter = 0 @delay = Animated_Enemy_Sprites::Delay @frame_size = Animated_Enemy_Sprites::FrameSize end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super if @battler @battler.reset_pose if @battler.pose == nil self.mirror = @battler.flip_sprite @use_sprite = @battler.use_sprite? if @spritesheet update_pose if @pose != 11 end if Graphics.frame_count % @delay == 0 @counter += 1 if @counter >= @frame_size[0] @counter = 0 if @pose == 11 update_pose else @battler.reset_pose end end end if @use_sprite update_bitmap update_origin update_position end setup_new_effect setup_new_animation update_effect else @effect_type = nil end self.opacity = 255 self.visible = true end #-------------------------------------------------------------------------- # ● Update bitmap #-------------------------------------------------------------------------- def update_bitmap if @spritesheet @spritesheet_bitmap = Cache.battler(@battler.battler_name + "-spritesheet", @battler.battler_hue) ss_size = [@spritesheet_bitmap.width, @spritesheet_bitmap.height] new_bitmap = Bitmap.new(ss_size[0] / @frame_size[0], ss_size[1] / @frame_size[1]) cx = @counter * (ss_size[0] / @frame_size[0]) cy = @pose * (ss_size[1] / @frame_size[1]) crop_rect = Rect.new(cx, cy, ss_size[0], ss_size[1]) new_bitmap.blt(0, 0, @spritesheet_bitmap, crop_rect) else new_bitmap = Cache.battler(@battler.battler_name, @battler.battler_hue) end if bitmap != new_bitmap self.bitmap = new_bitmap init_visibility end end #-------------------------------------------------------------------------- # ● Update Pose #-------------------------------------------------------------------------- def update_pose oldpose = @pose newpose = @battler.pose if newpose != oldpose @counter = 0 @pose = newpose end end #-------------------------------------------------------------------------- # ● Blink #-------------------------------------------------------------------------- def update_blink self.opacity = (@effect_duration % 10 < 5) ? 255 : 0 if Animated_Enemy_Sprites::DefaultBlink end end #============================================================================ # ▼ Scan #============================================================================ module Scan #-------------------------------------------------------------------------- # ● Scan.string(object, string) #-------------------------------------------------------------------------- def self.string(object, string) if object[/#{Regexp.quote string}/] return true end return false end end Demo: http://rpgmaker.net/users/Rhyme/locker/animate.zip
  11. Nome Script: Pop-Ups Battaglia Versione: N/D Autore/i: Jet Informazioni: Come si può vedere dallo screen, lo script aggiunge dei pop-ups quando si colpisce un mostro, si recuperano HP etc... Istruzioni: Inserite lo script sotto Material. Potete tradurre i testi cambiare il font modificando le righe in questione all'interno dello script. Script: #=============================================================================== # Battle Pop-Ups # By Jet10985 (Jet) #=============================================================================== # This script will create and show pop-ups for multiple battle events such as # hp/mp/tp loss and being inflicted with states. # This script has: 25 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: level_up, gain_exp # Game_Battler: add_state # Sprite_Battler: initialize, update, dispose, start_new_effect #=============================================================================== module Jet module BattlePopUps # This is the name of the font you want to use for pop-ups. POPUP_FONT = "Verdana" # The text and color shown when a character is knocked out (dies). KNOCKOUT_TEXT = "Knockout" KNOCKOUT_COLOR = Color.new(255, 167, 0) # The text and color shown when a character takes damage. # The actual damage is appended to the end. HURT_TEXT = "Damage +" HURT_COLOR = Color.new(255, 0, 0) HURT_TEXT_MP = "Mana -" HURT_COLOR_MP = Color.new(225, 30, 255) HURT_TEXT_TP = "TP -" HURT_COLOR_TP = Color.new(225, 30, 35) # The text and color shown when a character heals health. # The actual health is appended to the end. HEAL_TEXT = "Heal +" HEAL_COLOR = Color.new(0, 255, 0) HEAL_TEXT_MP = "Mana +" HEAL_COLOR_MP = Color.new(35, 200, 255) HEAL_TEXT_TP = "TP +" HEAL_COLOR_TP = Color.new(35, 35, 255) # The text and color shown when a character gains exp. # The actual exp is appended to the end. EXP_PLUS_TEXT = "EXP +" EXP_PLUS_COLOR = Color.new(167, 167, 0) # The text and color shown when an attack is critical. CRITICAL_TEXT = "Critical" CRITICAL_COLOR = Color.new(255, 106, 43) # The text and color shown when an attack misses. MISSED_TEXT = "Miss" MISS_COLOR = Color.new(45, 78, 99) # The text and color shown when an attack is evaded. EVADED_TEXT = "Evaded" EVADE_COLOR = Color.new(156, 187, 255) # The text, color, and animation shown when a character levels up. # For no animation, use 0. LEVEL_TEXT = "Level Up" LEVEL_COLOR = Color.new(167, 255, 52) # These are the colors used for displaying when a state is added. # It follows this format: state_id => Color.new(r, g, STATE_ADDED_COLORS = { 2 => Color.new(128, 0, 255), 3 => Color.new(128, 0, 255), 4 => Color.new(128, 0, 255) } # This is the default state added color. STATE_ADDED_COLORS.default = Color.new(128, 0, 255) end end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== ($imported ||= {})[:jet] ||= {} $imported[:jet][:BattlePopUps] = true class Game_Actor alias jet4921_level_up level_up def level_up(*args, &block) jet4921_level_up(*args, &block) unless self.exp >= next_level_exp and next_level_exp > 0 make_popup(Jet::BattlePopUps::LEVEL_TEXT, Jet::BattlePopUps::LEVEL_COLOR) end end alias jet1029_gain_exp gain_exp def gain_exp(exp) make_popup(Jet::BattlePopUps::EXP_PLUS_TEXT + exp.to_s, Jet::BattlePopUps::EXP_PLUS_COLOR) jet1029_gain_exp(exp) end end class Game_Battler alias jet8573_add_state add_state def add_state(sid) before = state?(sid) jet8573_add_state(sid) return if before == state?(sid) if sid == death_state_id make_popup(Jet::BattlePopUps::KNOCKOUT_TEXT, Jet::BattlePopUps::KNOCKOUT_COLOR) else make_popup("+#{$data_states[sid].name}", Jet::BattlePopUps::STATE_ADDED_COLORS[sid]) end end def make_popup(text, color) return unless SceneManager.scene_is?(Scene_Battle) f = self.battle_sprite; return if f.nil? f.popups.unshift(Sprite_JetPopup.new(text.to_s, color, f)) if !f.nil? end def battle_sprite return nil unless SceneManager.scene_is?(Scene_Battle) SceneManager.scene.spriteset.battler_sprites.each {|a| return a if a.battler == self } return nil end end class Scene_Battle attr_reader :spriteset end class Sprite_JetPopup < Sprite_Base def initialize(text, color, obj) super(nil) @text = text @color = color @character = obj self.visible = false @y_prog = 0 form_self end def form_self samp = Bitmap.new(1, 1) self.bitmap = Bitmap.new(samp.text_size(@text).width, 24) self.bitmap.font.color = @color self.bitmap.font.name = Jet::BattlePopUps::POPUP_FONT self.bitmap.draw_text(0, 0, self.bitmap.width, 24, @text) self.x = @character.x - (self.bitmap.width / 2) self.x += (@character.src_rect.width / 2) if @character.battler.actor? self.y = @character.battler.enemy? ? @character.y : (@character.y + @character.src_rect.height) self.y += @character.src_rect.height if @character.battler.actor? samp.dispose end def update super self.x = @character.x - (self.bitmap.width / 2) if $imported[:jet][:AnimatedBattlers] self.x += (@character.src_rect.width / 2) if @character.battler.actor? end self.y = @character.y - 16 - @y_prog if $imported[:jet][:AnimatedBattlers] self.y += @character.src_rect.height if @character.battler.actor? end @y_prog += 1 self.opacity -= 2.125 if self.opacity <= 0 self.dispose end end end class Sprite_Battler attr_accessor :popups alias jet4758_initialize initialize def initialize(*args, &block) @popups = [] @updating_sprites = [] @popup_wait = 0 jet4758_initialize(*args, &block) end alias jet7467_update update def update(*args, &block) jet7467_update(*args, &block) if @popup_wait == 0 if [email protected]? @updating_sprites.push(@popups.pop) @popup_wait = 30 end else @popup_wait -= 1 end @updating_sprites.each {|a| a.visible = true if !a.visible a.update @updating_sprites.delete(a) if a.disposed? } end alias jet5483_dispose dispose def dispose(*args, &block) (@updating_sprites + @popups).each {|a| a.dispose } jet5483_dispose(*args, &block) end alias jet3745_setup_new_effect setup_new_effect def setup_new_effect(*args, &block) jet3745_setup_new_effect(*args, &block) do_sprite_popups end def make_popup(text, color) @popups.unshift(Sprite_JetPopup.new(text.to_s, color, self)) end def do_sprite_popups return if @battler.nil? if @battler_struct.nil? @battler_struct = Struct.new(:hp, :mp, :tp).new(0, 0, 0) @battler_struct.hp = @battler.hp @battler_struct.mp = @battler.mp @battler_struct.tp = @battler.tp end check_success_popup check_hp_popup check_mp_popup check_tp_popup end def check_success_popup if @battler.result.success if @battler.result.critical make_popup(Jet::BattlePopUps::CRITICAL_TEXT, Jet::BattlePopUps::CRITICAL_COLOR) elsif @battler.result.missed make_popup(Jet::BattlePopUps::MISSED_TEXT, Jet::BattlePopUps::MISS_COLOR) elsif @battler.result.evaded make_popup(Jet::BattlePopUps::EVADED_TEXT, Jet::BattlePopUps::EVADE_COLOR) end @battler.result.clear_hit_flags end end def check_hp_popup if @battler_struct.hp != @battler.hp f = @battler_struct.hp - @battler.hp if f > 0 make_popup(Jet::BattlePopUps::HURT_TEXT + f.to_s, Jet::BattlePopUps::HURT_COLOR) elsif f < 0 make_popup(Jet::BattlePopUps::HEAL_TEXT + f.abs.to_s, Jet::BattlePopUps::HEAL_COLOR) end @battler_struct.hp = @battler.hp end end def check_mp_popup if @battler_struct.mp != @battler.mp f = @battler_struct.mp - @battler.mp if f > 0 make_popup(Jet::BattlePopUps::HURT_TEXT_MP + f.to_s, Jet::BattlePopUps::HURT_COLOR_MP) elsif f < 0 make_popup(Jet::BattlePopUps::HEAL_TEXT_MP + f.abs.to_s, Jet::BattlePopUps::HEAL_COLOR_MP) end @battler_struct.mp = @battler.mp end end def check_tp_popup if @battler_struct.tp != @battler.tp f = (@battler_struct.tp - @battler.tp).round if f > 0 make_popup(Jet::BattlePopUps::HURT_TEXT_TP + f.to_s, Jet::BattlePopUps::HURT_COLOR_TP) elsif f < 0 make_popup(Jet::BattlePopUps::HEAL_TEXT_TP + f.abs.to_s, Jet::BattlePopUps::HEAL_COLOR_TP) end @battler_struct.tp = @battler.tp end end end
  12. Nome Script:Tankentai Realistic Shadow Versione: 0.2 Autore/i: wltr3565 Informazioni: Questo script, offre la possibilità di inserire sotto i PG un'ombra realistica che segue il movimento dello sprite di battaglia. E' un effetto molto bello che consiglio di inserire a chi usa il sistema di battaglia di Enu. Istruzioni: Inserite lo script sopra Main. Script: =begin ================================================================================ wltr3565's Tankentai Realistic Shadow v0.2 VX ================================================================================ This script is a mere eye candy, simply to make Tankentai's battler shadows true to the battlers' original sprites. But I'm very sure this is not perfect yet. This version, v0.1, is open to public to be tested for more improvements. Alas, this script is not perfect. I lack the experience to straightly configure bitmap drawing. I cannot make sprites slanted as in photoshop. This is the best that I can do in RGSS2. Please do give feedbacks for further improvements, especially bugs. Do free to use it for your own purpose. Just credit me, and watch out for bugs. ================================================================================ Features: - Easy to install; Just insert this below Tankentai. - Make shadows realistic, true to their real form. ================================================================================ Notes: - Realistic shadows means making the process heavier than simple shadows. It's not recommended yet for low-end PCs. - The shadows may be misplaced. You can configure the positions by adjusting the shadows' position in SBS Battler Configuration. - Don't ask about this script's compatibility between Kaduki Tankentai, Default Tankentai, etc. THIS IS OBVIOUSLY COMPATIBLE FOR ALL VERSIONS OF TANKENTAI!!! Except you have a script that do something with shadows. - It is recommeded to use detailed sprites (Not chibi style e.g. Kaduki's) with this script. - For now it only shades greatly for northern (from screen) source of light. - This is for RMVX version of Tankentai, and thus, for RMVX only. ================================================================================ =end module WLTR SHADE_PERSPECTIVE = 0.4 # Simply the shadow's vertical zoom, for perspective. end class Sprite_Battler < Sprite_Base def make_shadow @[member='Shadow'].dispose if @[member='Shadow'] != nil @battler_hue = @battler.battler_hue @[member='Shadow'] = Sprite.new(viewport) @[member='Shadow'].z = self.z - 4 @[member='Shadow'].visible = false # バトラーに当てられた影グラフィックを用意 @[member='Shadow'].bitmap = self.bitmap @[member='Shadow'].src_rect = self.src_rect @[member='Shadow']_height = @[member='Shadow'].bitmap.height # 影位置の微調整用インスタンス @[member='Shadow']_plus_x = @battler.shadow_plus[0] - @width / 2 @[member='Shadow']_plus_y = @battler.shadow_plus[1] # 更新 @[member='Shadow'].zoom_x = self.zoom_x @[member='Shadow'].zoom_y = WLTR::SHADE_PERSPECTIVE * self.zoom_y @[member='Shadow'].tone.set(-255, -255, -255) @[member='Shadow'].visible = false if @battler.shadow == "" update_shadow end def update_shadow @[member='Shadow'].opacity = 108 * self.opacity / 255 @[member='Shadow'].angle = 180 - self.angle @[member='Shadow'].src_rect = self.src_rect @[member='Shadow'].mirror = true @[member='Shadow'].ox = @width - self.ox @[member='Shadow'].oy = self.oy @[member='Shadow'].visible = false if @battler.shadow == "" @[member='Shadow'].zoom_x = self.zoom_x @[member='Shadow'].zoom_y = WLTR::SHADE_PERSPECTIVE * self.zoom_y @[member='Shadow'].x = @battler.position_x @[member='Shadow'].y = @battler.position_y + @[member='Shadow']_plus_y - (@jump_plus * 2) @[member='Shadow'].z = @battler.position_z - 4 end alias shadow_battler_anime battler_anime def battler_anime shadow_battler_anime return if @[member='Shadow'] == nil @[member='Shadow'].bitmap = self.bitmap @[member='Shadow'].src_rect = self.src_rect end end #=============================================================================== # # END OF SCRIPT # #===============================================================================
  13. Nome Script: MMO_Skill level by use Versione: 1.01 Autore/i: Kentaro Informazioni: Bella lì. Scommetto che tutti voi conoscete, che dico, avete realizzato PER ANNI giochi con questo script di Tomoaky: http://hikimoki.saku....jp/zip/mmo.zip Praticamente, crea una sorta di gioco in stile Ragnarok online (ma...offline; chiaro no?) Bene. Ho realizzato una piccola snippet per questo sistema che permette di impostare un livello per ciascuna skill, modificandone alcuni parametri; ogni volta che usi la skill, aumenti i punti exp di +1; quando raggiungi la quantità stabilita (puoi creare una curva di exp) la skill aumenta il proprio livello e modifica i parametri secondo le impostazioni: # skill#ID; [dmg, mp, atk_f, spi_f, exp, curve, maxlv] when 33; return [ 9, 2, 0, 3, 3, 3, 10] # Heal when 67; return [ 4, 1, 2, 1, 4, 2, 6] # ThunderEs. la skill con ID#67, per livello, aumenta il proprio danno di 4, il consumo mp di 1, atk_f di 2, spi_f di 1, exp necessaria per aumentare livello è di base 4 ed aumenta di 2 (curve) per livello, fino ad un livello max di 6. Istruzioni: Istruzioni nello script. Si, le ho scritte in inglese. No, non ve lo traduco: imparatevelo, che vi fa bene. X-D Cheerio, Ken http://pastebin.com/NUYq8J6e Script: #============================================================================== # MMO_Skill level by use [v1.01] # by Kentaro, 2013 # credits: 시옷전사(SiotWarrior) # License: Creative Commons BY-NC #============================================================================== # Snippet for Tomoaky's MMO v.(09/10/24) [url="http://hikimoki.sakura.ne.jp/"]http://hikimoki.sakura.ne.jp/[/url] #------------------------------------------------------------------------------ # This is a snippet for Tomoaky's MMO. # Each skill can gain level after x times you use it; for each level, damage and # mp cost, atk_f and spi_f, will increase. # # Plug&play: put it below Tomo's MMO. Setup Constants. # Under self.skill_perlevel, you set up the skills you want to levelup. Skill # gains 1 exp each time you use it: if you set 6 exp needed, you'll levelup # the skill the 7th time you use it. #============================================================================== #------------------------------------------------------------------------------ # * KEN::SkillLvl #------------------------------------------------------------------------------ module KEN module SkillLvl #-------------------------------------------------------------------------- # Constants #-------------------------------------------------------------------------- SKILL_LVL_ON = true # use skill levels? true/false LVLUP_TXT = "Skill %s has reached level %d!" # text when skill lvup LVLUP_CLR = Color.new(180, 130, 255) # levelup text colour NOLVL_SKILL_TEXT = "" # if skill has no levelgain, instead of level number # this text appears... NOLVL_SKILL_COL = Color.new(48, 48, 48, 128) # ...with this colour #-------------------------------------------------------------------------- # ● self.skill_perlevel(skill_id) # ex. skill#67 (Thunder) will level up the 5th time its used (it has exp to # levelup = 4), mp cost +1/lv; damage +4/lv; atk_f +2/lv; spi_f +1/lv. # Each time the skill levels up, the exp needed will rise by 2 (curve): # to lv 1 = exp needed 3 # to lv 2 = exp needed 5 # to lv 3 = exp needed 7 etc. # Then, setup the max level the skill can reach. Ex. skill#67 maxlv is 6. #-------------------------------------------------------------------------- def self.skill_perlevel(skill_id) case skill_id # skill#ID; [dmg, mp, atk_f, spi_f, exp, curve, maxlv] when 33; return [ 9, 2, 0, 3, 3, 3, 10] # Heal when 67; return [ 4, 1, 2, 1, 4, 2, 6] # Thunder else # default: skill gain level but nothing changes return [0, 0, 0, 0, 0, 0, 0] end end end end #----------------------------------------------------------------------------- # * RPG::Skill #----------------------------------------------------------------------------- module RPG class Skill < UsableItem def base_damage if @base_damage > 0 return [[@base_damage + ((skill_level) * (KEN::SkillLvl.skill_perlevel(@id)[0])), 9999].min, 0].max elsif @base_damage < 0 return [[@base_damage - ((skill_level) * (KEN::SkillLvl.skill_perlevel(@id)[0])), -9999].max, 0].min else return @base_damage end end def mp_cost return [[@mp_cost + ((skill_level) * (KEN::SkillLvl.skill_perlevel(@id)[1])), 9999].min, 0].max end # remember: max atk_f/spi_f is 200 def atk_f return [[@atk_f + ((skill_level) * (KEN::SkillLvl.skill_perlevel(@id)[2])), 200].min, 0].max end def spi_f return [[@[member=Spiderman 2099]_f + ((skill_level) * (KEN::SkillLvl.skill_perlevel(@id)[3])), 200].min, 0].max end #-- def skill_level @skill_level = 0 if @skill_level == nil return @skill_level end def skill_max_level return (KEN::SkillLvl.skill_perlevel(@id)[6]) end def change_skill_level(skill_lvl) if skill_lvl > (KEN::SkillLvl.skill_perlevel(@id)[6]) @skill_level = (KEN::SkillLvl.skill_perlevel(@id)[6]) else @skill_level = [skill_lvl, 0].max end end def raise_skill_level @skill_level = 0 if @skill_level == nil change_skill_level(@skill_level + 1) $game_temp.shortwin_refresh = true $game_temp.skillwin_refresh = true text = sprintf(KEN::SkillLvl::LVLUP_TXT, @name, @skill_level) $game_temp.add_message(text, KEN::SkillLvl::LVLUP_CLR) end #-- def skill_exp @skill_exp = 0 if @skill_exp == nil return @skill_exp end def change_skill_exp(skill_exp) @skill_exp = 0 if @skill_exp == nil base_exp = (KEN::SkillLvl.skill_perlevel(@id)[4]) curve_exp = ((KEN::SkillLvl.skill_perlevel(@id)[5]) * (skill_level)) exp_needed = base_exp + curve_exp if @skill_exp != exp_needed @skill_exp = [skill_exp, 0].max else raise_skill_level @skill_exp = 0 end end def raise_skill_exp @skill_exp = 0 if @skill_exp == nil change_skill_exp(@skill_exp + 1) end end end #----------------------------------------------------------------------------- # * Class Game_Character #----------------------------------------------------------------------------- class Game_Character alias ken_skill_event skill_event def skill_event(target) ken_skill_event(target) @target_obj.raise_skill_exp if KEN::SkillLvl::SKILL_LVL_ON end end #----------------------------------------------------------------------------- # * class Sprite_SkillWindow #----------------------------------------------------------------------------- class Sprite_SkillWindow < Sprite_Window def refresh @data = [] for skill in @actor.skills @data.push(skill) end @item_max = @data.size line = line_num # 表示行数 line_max = line_num_max # 全行数 @index_line = [line_max - line, 0].max if @index_line + line > line_max self.bitmap.clear_rect(0, 12, self.width, self.height - 16) rect = Rect.new(0, 16, 192, 24) for i in 0...line self.bitmap.blt(0, i * 24 + 16, @bitmap, rect) end self.bitmap.blt(0, 12, @bitmap, rect.set(0, 12, 192, 4)) return if @item_max == 0 # 表示するアイテムがなければ終了 for i in 0...line * 7 break if i == @item_max - @index_line * 7 icon_index = @data[@index_line * 7 + i].icon_index rect.set(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) self.bitmap.blt(i % 7 * 24 + 12, i / 7 * 24 + 16, @bitmap_icon, rect) #ken --------------------------------------------------------------- begin sl = @data[@index_line * 7 + i].skill_level sml = @data[@index_line * 7 + i].skill_max_level self.bitmap.font.size = 12 if sl == sml self.bitmap.font.color = Color.new(255, 0, 0) else self.bitmap.font.color = Color.new(220, 220, 220) end if sl == 0 and sml == 0 sl = KEN::SkillLvl::NOLVL_SKILL_TEXT self.bitmap.font.color = KEN::SkillLvl::NOLVL_SKILL_COL end self.bitmap.draw_text(i % 7 * 24 + 12, i / 7 * 24 + 16, 24, 12, sl.to_s, 2) #ken ----------------------------------------------------------------- end end refresh_scroll(line, line_max) # スクロールバーの描画 $game_temp.skillwin_refresh = false # 再描画フラグを倒す end end #----------------------------------------------------------------------------- # * class Sprite_ShortWindow #----------------------------------------------------------------------------- class Sprite_ShortWindow < Sprite_Window # overwritten method def refresh rect = Rect.new(12, 16, 120, 24) self.bitmap.clear_rect(rect) self.bitmap.blt(rect.x, rect.y, @bitmap, rect) rect.set(0, 0, 24, 24) self.bitmap.font.size = 12 for i in 0...5 obj = get_icon_obj(i) next if obj == nil if $game_variables[44 + i * 2] == 4 # オブジェクトがスキルの場合 # se obj è una skill n = obj.skill_level #ken flag = true else # オブジェクトがアイテム(武器、防具含む)の場合 n = $game_party.item_number(obj) flag = n > 0 end rect.set(obj.icon_index % 16 * 24, obj.icon_index / 16 * 24, 24, 24) self.bitmap.blt(i * 24 + 12, 16, @bitmap_icon, rect, flag ? 255 : 128) self.bitmap.draw_text(i * 24 + 12, 28, 24, 12, n.to_s, 2) if flag end $game_temp.shortwin_refresh = false # 再描画フラグを倒す end end #------------------------------------------------------------------------------ # * class Scene_File #------------------------------------------------------------------------------ class Scene_File < Scene_Base # alias method alias ken_write_save_data write_save_data def write_save_data(file) ken_write_save_data(file) Marshal.dump($data_skills, file) end # alias method alias ken_read_save_data read_save_data def read_save_data(file) ken_read_save_data(file) $data_skills = Marshal.load(file) end end
  14. Nome Script: Mostra facce in battaglia Versione: ? Autore/i: Moogle Warrior, traduzione in italiano da me, Yoshi91. Informazioni: Questo Add-On modifica la classe Window_BattleStatus in modo da non far apparire più il nome nella finestra status della battaglia, ma fa apparire il primissimo pano dell'eroe (mezza faccia). Carino Add-On. Features: Oltre alla principale nessuna. Screenshots: Istruzioni: Creare una nuova voce sopra Main e sotto Materials ed inserire lo script. Le istruzioni sono all'interno dello script. Script: #============================================================================== # Mostra faccia in battaglia # Creato da Moogle Warrior, tradotto in italiano da Yoshi91 # ------------------------------------------------------------------------------ # Questo script aggiunge una faccia nella finestra status in battaglia. # Modifica la classe Window_BattleStatus. # # E' semplice nell'uso. Creare una nuova cartella in Graphics, chiamata Facce # Battaglia. Qui inserirci le immagini che comprendono un primissimo piano # (mezza faccia) di ogni eroe. Rinominarle nell'ID dell'eroe che riguarda. # Queste immagini devono essere grandi 83x24 px. Ricordatevi anche degli zeri nel nome. # Per Newbie: L'ID è lo slot in cui l'Eroe è contenuto. #============================================================================== # NON MODIFICARE LE RIGHE SEGUENTI SE NON SAI CIO' CHE FAI!! #============================================================================== class Window_BattleStatus def draw_item(index) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color actor = $game_party.members[index] draw_actor_bface(actor.id, 0, rect.y) draw_actor_state(actor, 70, rect.y-1, 48)#84 draw_actor_state(actor, 70, rect.y-1, 48)#84 draw_actor_hp(actor, 174, rect.y, 120) draw_actor_mp(actor, 310, rect.y, 70) end def draw_actor_bface(id, x, y) bitmap = Cache.bface(id) self.contents.blt(x, y, bitmap, bitmap.rect) end end module Cache def self.id_to_name(id) if id < 10 filename = "00" + id.to_s elsif id < 100 filename = "0" + id.to_s end return filename end def self.bface(id) filename = id_to_name(id) load_bitmap("Graphics/Facce Battaglia/", filename) end end Demo: N/A Incompatibilità: Può darsi che sia compatibile con ogni Battle System. Funziona al 100% con Takentai, anche con ATB. Note dell'autore: Le mie creditazioni non sono obbligatorie, ma ben accettate. Moogle Warrior, se volete anche me (Yoshi91) per la traduzione in italiano.
  15. Nome Script: Bonus Equip Versione: N/D Autore/i: BigEd781 Informazioni: Lo script attraverso il campo Note di un'arma o un'armatura, da la possibilità all'avanzamento di livello di incrementare l'attacco, la difesa, etc... Istruzioni: Inserite lo script sotto Material. Per utilizzare lo script, andate nelle Note, e scrivete questo: [c][stat mod]stat,num[/c] "stat" = E' l'attributo che andremo a incrementare/diminuire. Sono "hp", "mp", "atk", "def", "spi", o "agi", ovviamente senza apici. "num" = Il numero di quanto si deve incrementare/diminuire. Mettiamo caso che con un'arma/armatura specifica si possono aumentare/diminuire le stat...scriveremo nelle Note di queste: [c][stat mod]atk,2[/c] Mettiamo anche caso però che queste hanno più possibilità: [stat mod]hp,10 [stat mod]atk,2 [stat mod]def,4 [stat mod]agi,-3Gli HP aumenteranno di 10, come aumenterà l'attacco di 2 etc, ma l'agilità invece diminuirà ^^ Utile se si vuole comunque variare un pò il settaggio di gioco =) Script: # # # Equipment Stat mods # # by BigEd781 # #==============================================================================# module RPG class BaseItem def get_stat_bonuses bonuses = {} note.each { |line| line.downcase! line.gsub!(' ', '') if line.include?("[statmod]") pair = line.gsub("[statmod]", '').split(',') bonuses[pair[0]] = pair[1].to_i end } return bonuses end end end class Game_Actor < Game_Battler alias :eds_old_level_up :level_up def level_up eds_old_level_up equips.compact.each { |equip| apply_equip_stat_bonus(equip) } end def apply_equip_stat_bonus(equip) equip.get_stat_bonuses.each_pair { |key , value| case key when "hp" : self.maxhp += value when "mp" : self.maxmp += value when "atk" : self.atk += value when "def" : self.def += value when "spi" : self.spi += value when "agi" : self.agi += value end } end end
  16. Nome Script: Attivazione Skill per Tankentai Versione: 1.3 Autore/i: CrimsonSeas Informazioni: Questo script è ispirato all'overdrive di Tidus in FFX. Dovrebbe funzionare con altri script di Overdrive ^^ Istruzioni: Istruzioni all'interno della demo. Ricordatevi di copiare il necessario, quali immagini etc, per il corretto funzionamento dello script. F.A.Q: D: Come si attivano le Skill? R: Leggi le istruzioni D: Ci sono restrizioni per creare immagini personalizzate? R: Si. L'immagine deve essere perfettamente simmetrica, e la larghezza non deve superare i 420px. L'altezza delle barre deve essere inferiore a 24, e le icone devono essere 24x23px. D: Si possono creare altri tipi di attivazione? R: Si. D: Lo script mi da errore/Ho ottenuto un bug R: Indicaci gli script in uso e postaci l'errore in modo che possiamo verificare ed eventualmente risolvere. E' possibile che non sia proprio compatibile con tutti gli script. Demo: http://www.mediafire.com/?mayhdyimfj0 Note dell'Autore: Per un uso commerciale dello script, si deve contattare l'autore.
  17. Nome Script: Protezione Skill Versione: 1.2.3 Autore/i: Kal Informazioni: Con questo script è possibile creare una protezione da una Skill, come succede in FF. E' progettato per il sistema di battaglia di default (per ora) ma dovrebbe funzionare con altri sistemi di battaglia. Istruzioni: Inserite lo script sopra Main. Istruzioni all'interno dello script. Script: # Protect Skill v 1.2.3 # by Kal # # ===== How to use ===== # # Make a state that has the magic word in it's note box. When that state # is inflicted on an ally, the person who inflicted the state (by casting # a spell that adds the state, for example) will receive all the damage # that is done to the ally. # # ===== What battle system is this for? ===== # # The script was designed for the default battle system but it's also works # with Tankentai (and ATB). However, there is no animation support for # Tankentai at the moment (i.e. protector jumping in front of protectee) and # the damage numbers need to be fixed. # # ===== Version history ===== # # 1.0 - Finished script # # 1.1 - Added message text configuration in the config module. # - Status effect will be removed immediately after the protector dies # - Fixed a bug where a dead protector would still protect under certain # circumstances. # - Fixed a bug where the protect message got drawn when it shouldn't. # # 1.2 - Added ability to increase/decrease the amount of damage a protector # takes when protecting. # # 1.2.1 - Fixed using items on protector bug with Tankentai + ATB. # # 1.2.2 - Fixed a bug where you could not cast the state again after a battle. # # 1.2.3 - Fixed a bug with Tankentai + ATB where the protect state would not # be removed when the protector died. module ProtectConfig MAGIC_WORD = "Protect" # Add this word in the "Note" box for any status in order to enable protect # for that status. PROTECT_PHYSICAL = true PROTECT_SKILLS = true # Set these to true/false to enable/disable protection from physical damage # and protection from skills damage. PROTECT_LIMIT = 1 # This is the number of allies one character can protect at the same time. DAMAGE_EFFECT = 100 # This is a percentage of damage the protector will take when protecting # an ally. For example, if this value is set to 50, the protector will take # half damage when protecting an ally. MP_DAMAGE_EFFECT = false # Should DAMAGE_EFFECT apply to MP damage? MESSAGE = lambda do |context| eval "protector.name + ' protected ' + target.name + '!'", context # Edit this line to change the message that is displayed when an actor # protects an ally. protector.name is the protector's name and # target.name is the protected ally's name. Any text you want to add # needs to be in single quote strings, as above. # Note: not working for Tankentai at the moment. end end class RPG::State attr_accessor :skill_user def protect? set_protect if @protect.nil? @protect end def set_protect if @note.downcase =~ /#{ProtectConfig::MAGIC_WORD.downcase}/ @protect = true else @protect = false end end end class Scene_Battle unless $@ alias :kal_old_display_action_effects :display_action_effects alias :kal_old_process_action :process_action end # NOTE: not being called at all with Tankentai and ATB. Fix? def display_action_effects(target, obj = nil) # If this is a physical attack (obj == nil) and PROTECT_PHYSICAL is false if !ProtectConfig::PROTECT_PHYSICAL and obj.nil? kal_old_display_action_effects(target, obj) # call original method and return return # If this is a skills attack and PROTECT_SKILLS is false elsif !ProtectConfig::PROTECT_SKILLS and obj kal_old_display_action_effects(target, obj) # call original method and return return end if target.protect? protector = target.states.find { |state| state.protect? }.skill_user protector.display_protect = true unless protector.dead? if protector != @active_battler and protector.display_protect protector.display_protect = false if protector.dead? text = ProtectConfig::MESSAGE.call(binding) @message_window.add_instant_text(text) wait(30) kal_old_display_action_effects(protector) return end end kal_old_display_action_effects(target, obj) end # Check if any protector is dead after an action has been processed. # If dead remove the state. def process_action kal_old_process_action $game_party.members.each do |member| member.states.each do |state| if state.protect? if state.skill_user.dead? state.skill_user.protected_allies = 0 member.remove_state(state.id) @status_window.refresh end end end end end end class Game_Battler attr_accessor :protected_allies, :display_protect, :protecting unless $@ alias :kal_old_initialize :initialize alias :kal_old_make_attack_damage_value :make_attack_damage_value alias :kal_old_add_state :add_state alias :kal_old_skill_effect :skill_effect alias :kal_old_make_obj_damage_value :make_obj_damage_value end def initialize @protected_allies = 0 @display_protect = true @protecting = false kal_old_initialize end def make_attack_damage_value(attacker, effect = nil) kal_old_make_attack_damage_value(attacker) if ProtectConfig::PROTECT_PHYSICAL states.each do |state| if state.protect? and !state.skill_user.dead? @hp_damage = 0 state.skill_user.protecting = true state.skill_user.attack_effect(attacker) end end if @protecting @hp_damage *= (ProtectConfig::DAMAGE_EFFECT / 100) @protecting = false end end end def make_obj_damage_value(user, obj) kal_old_make_obj_damage_value(user, obj) if ProtectConfig::PROTECT_SKILLS and !$game_party.members.include?(user) states.each do |state| if state.protect? and !state.skill_user.dead? @hp_damage = 0 @mp_damage = 0 state.skill_user.protecting = true state.skill_user.skill_effect(user, obj) end end if @protecting @hp_damage *= (ProtectConfig::DAMAGE_EFFECT / 100) @mp_damage *= (ProtectConfig::DAMAGE_EFFECT / 100) if ProtectConfig::MP_DAMAGE_EFFECT @protecting = false end end end def add_state(state_id) state = $data_states[state_id] if state.protect? state.skill_user = @skill_user @skill_user.protected_allies += 1 end kal_old_add_state(state_id) end def skill_effect(user, skill) @skill_user = user kal_old_skill_effect(user, skill) end def protect? states.any? {|state| state.protect?} end end class Game_Actor alias :kal_old_state_resist? :state_resist? unless $@ def state_resist?(state_id) # Prevent castng protect on self if @skill_user == self and $data_states[state_id].protect? return true # Prevent casting protect on a char that is already protected elsif protect? and $data_states[state_id].protect? return true # Prevent casting protect if the protect limit is reached elsif @skill_user.protected_allies >= ProtectConfig::PROTECT_LIMIT return true end kal_old_state_resist?(state_id) end end class Game_Party alias :kal_old_remove_states_battle :remove_states_battle unless $@ def remove_states_battle kal_old_remove_states_battle members.each do |actor| actor.protected_allies = 0 end end end
  18. Nome Script: Battaglia Continua Versione: 1.1 Autore/i: FenixFyreX Informazioni: Script a parer mio utilissimo che da la possibilità di far apparire altri nemici dopo la sconfitta di questi. La funziona, per chi non la conoscesse, è presente anche in FFVI. Istruzioni: Inserite lo script sotto Material. Per far apparire un secondo mostro subito dopo la sconfitta del primo, inserite questo call script prima della battaglia: extend_troop(id, id2, id3......)Dove id, id2, id3...... sono gli ID dei gruppi di mostri settati nel Database. Script: class Scene_Battle < Scene_Base def judge_win_loss if $game_temp.in_battle if $game_party.all_dead? process_defeat return true elsif $game_troop.all_dead? and !$troop_ext.extend process_victory return true elsif $game_troop.all_dead? and $troop_ext.extend $game_troop.setup_extension if $troop_ext.display_emerged for name in $game_troop.enemy_names text = sprintf(Vocab::Emerge, name) $game_message.texts.push(text) end end @spriteset.dispose_enemies @spriteset.create_enemies else return false end else return true end end end class Troop_Extensions attr_reader :progression, :extend, :current_troop, :display_emerged def initialize @progression = [] @extend = false @current_troop = nil @display_emerged = true end def setup_extension(prog) @progression = prog.to_a @extend = true @current_troop = nil end def get_next_troop if !@extend return nil end id = @progression.shift if @progression.size == 0 @extend = false end @current_troop = id return $data_troops[id] end def emerge(tf=true) @display_emerged = tf end end $troop_ext = Troop_Extensions.new class Game_Troop < Game_Unit def setup_extension troop = $troop_ext.get_next_troop for member in troop.members next if $data_enemies[member.enemy_id] == nil enemy = Game_Enemy.new(@enemies.size, member.enemy_id) enemy.hidden = member.hidden enemy.immortal = member.immortal enemy.screen_x = member.x enemy.screen_y = member.y @enemies.push(enemy) end make_unique_names end end class Game_Interpreter def extend_troop(*args) $troop_ext.setup_extension(args) return true end end
  19. Nome Script: Battle Background basati sul tile Versione: 1.1 Autore/i: Reedo Informazioni: Lo script permette di settare il Background di battaglia in base all'autotile in cui il PG è posto prima che inizi la battaglia. E' anche possibile settare lo sfondo di battaglia per un'unica mappa. Screenshots: Istruzioni: Inserite lo script sopra Main. Altre istruzioni all'interno dello script/demo. Script: ############################################################################### ## Tile-Based Battle Backgrounds ## Version 1.1 ## December 28, 2009 ## By Reedo ############################################################################### ## SOURCE ## ## http://www.rpgmakervx.net/index.php?showtopic=23649 ############################################################################### ## REFERENCES ## ## None. This is an original script by Reedo. ############################################################################### ## DESCRIPTION ## ## [UPDATE 1.1] ## Added option to stretch images based on a request by Riokogen. ############################################################################### ## DESCRIPTION ## ## This script allows you to replace the background image(s) of the default ## battle scene with custom background and/or floor image of your own making. ## ## What's different about this script is that it will set the battle background ## based on the tile the player is standing on when the battle begins! ## ## The script names all of the autotiles in TileSetA, many of the single floor ## tiles, and allows you to name any others that you like. Named tiles can ## then have a specific set of battle graphics applied to them. In this way, ## the script can check to see which (if any) named tile the player is standing ## on, and set the battle background appropriately. Now Ralph and friends can ## fight in the woods when standing in the woods. ## ## The script also allows backgrounds specific to an entire map, and provides ## a list to exclude individual maps from custom battle background processing. ############################################################################### ## COMPATIBILITY ## ## Should be compatible with most other scripts. ############################################################################### ## REQUIREMENTS ## ## None ############################################################################### ## INSTALLATION ## ## Plug-and-play. ## Insert below Materials, or other Reedo scripts. ############################################################################### ## RIGHTS & RESTRICTIONS ## ## As with most Reedo scripts, this script is free to re-use, as-is, ## in personal, educational, and commercial RPGVX development projects, ## providing that: this script, as well as the rpgmakervx.net forum link ## from which it was obtained, are credited in writing displayed readily ## to the user of the final compiled code assembly. ## ## Reedo and rgpmakervx.net retain all rights of intellect and ownership. ## You forego all rights of warranty by utilizing this script. ############################################################################### ## USAGE ## ## Specify user options according to the comments below. ############################################################################### ############################################################################### ## USER OPTIONS ############################################################################### module REEDO_TILE_BASED_BATTLE_BACKGROUNDS # Set this flag to turn the entire script on and off. You can change this # value via a scipt. My long names can be a pain in the butt, so use code # like this in an event script command: # @b = REEDO_TILE_BASED_BATTLE_BACKGROUNDS # @b::ENABLED = false # ENABLED = true # Here the specific tiles that make up each game tile are specified. The # reason for this is that each auto-tile on a map is actually one of 48 # different tiles, and each tile on the game map has three possible layers # where a tile ID can be stored (so each game tile can have three tiles on it). # # The hash below attempts to name each floor tile in Tile Set A to make them # easier to refer to when specifing battle graphics. Since I was naming auto- # tiles anyway, I decided to name them all for you, incase your game makes a # tile passable when it normally would not be. The autotiles are the hard ones # to find - I started naming the non-autotile floor tiles too, and you should # be able to look at Tile Set A and figure out where I stopped at. The rest of # the tiles are numbered sequentially, left to right, top to bottom, so you # should be able to simply count to any tile in tile set A that you want to # add to the hash below. # # The hash is simply a tile group name for the key, and an array of tile IDs # followed by the target layer, for the value. The layer is 0 for most tiles, # but 1 for "bushes" and 2 for anything rendered above the character. # # NOTE - THIS IS FOR THE DEFAULT TILESETS # Though, the rules for autotiles are set, so this script should work with # custom tile sets. But for the defaults, you should not have to change # anything on the autotiles and you can add the other floor tiles easily. # # Group Name => Tile IDs , Graphic Layer TILE_GROUPS = { "RoughGrass" => [(2816 .. 2863), 0], "GreenTrees" => [(2864 .. 2911), 1], "HighMountains" => [(2912 .. 2959), 0], "LightGrass" => [(2960 .. 3007), 0], "GrassBushes" => [(3008 .. 3055), 1], "WoodenFence" => [(3056 .. 3103), 1], "StoneFloor" => [(3104 .. 3151), 0], "WoodCounter" => [(3152 .. 3199), 0], "RoughDirt" => [(3200 .. 3247), 0], "DeadTrees" => [(3248 .. 3295), 1], "MedMountains" => [(3296 .. 3343), 0], "LightDirt" => [(3344 .. 3391), 0], "DirtBushes" => [(3392 .. 3439), 1], "StoneFence1" => [(3440 .. 3487), 1], "GoldCarpet" => [(3488 .. 3535), 0], "FancyCounter" => [(3536 .. 3583), 0], "BeachSand" => [(3584 .. 3631), 0], "PalmTrees" => [(3632 .. 3679), 1], "LowMountains" => [(3680 .. 3727), 0], "DesertSand" => [(3728 .. 3775), 0], "SandBushes" => [(3776 .. 3823), 1], "StoneFence2" => [(3824 .. 3871), 1], "RedCarpet" => [(3872 .. 3919), 0], "StoneCounter" => [(3920 .. 3967), 0], "HeavySnow" => [(3968 .. 4015), 0], "SnowTrees" => [(4016 .. 4063), 1], "SnowMountains" => [(4064 .. 4111), 0], "LightSnow" => [(4112 .. 4159), 0], "SnowBushes" => [(4160 .. 4207), 1], "SnowFence" => [(4208 .. 4255), 1], "RaisedFloor" => [(4256 .. 4303), 0], "ClothCounter" => [(4304 .. 4351), 0], "BrownStone" => [[1528], 0], "GrayStone" => [[1529], 0], "LavaStone" => [[1530], 0], "IceStone" => [[1531], 0], "PlantVines" => [[1532], 0], "CrystalStone" => [[1533], 0], "LivingTissue" => [[1534], 0], "PurpleCord" => [[1535], 0], "Empty" => [[1536], 0], "CrystalClear1" => [[1537], 0], "CrystalClear2" => [[1538], 0], "CrystalIce" => [[1539], 0], "ForceField" => [[1540], 0], "CrystalClear1Steps" => [[1541], 0], "CrystalIceSteps" => [[1542], 0], "MetalGrate" => [[1543], 0], "CrystalClear2Steps" => [[1549], 0], "ForceFieldSteps" => [[1550], 0], "SquareGrayStone" => [[1552], 0], "LargeRedStone" => [[1553], 0], "LargeGoldStone" => [[1554], 0], "YellowStone" => [[1555], 0], "SmallRoundGrayStone" => [[1556], 0], "LargeRoundGrayStone" => [[1557], 0], "MossCovered" => [[1558], 0], "IceCovered" => [[1559], 0], } #END TILE_GROUPS # This hash contains the actual background image settings for each tile # group name. Enter the tile group name which should have unique battle # graphics as the key in the hash. Enter an array of the two picture # names (imported into the Pictures Game Resources), to use as the background # and floor, respectively, for the value of each hash entry. The floor # picture is optional and can be set to 'nil' if not used. DATA = {"RoughGrass" => ["opensky1", "roughgrass1"], "GreenTrees" => ["forestsky1", "greentrees1"], "RoughDirt" => ["opensky1", "roughdirt1"], "BeachSand" => ["oceansky1", "beachsand1"], "DesertSand" => ["desertsky1", "desertsand1"], } # This hash allows you to specify map IDs for maps that will always use the # same battle graphics, regardless of the tile the player is on. Just set # this to an empty hash {} if not used. SINGLE_BACKGROUND_MAPS = {7 => "RoughGrass"} # Here you can specify map IDs for maps that will be ignored by this script. # Simply input a map ID into the array and that map will not use this script # to determine its battle images. EXCLUDED_MAPS = [10, 11, 12] # These values allow you to offest the position and z-depth of the background # image. The normal background image is 544 X 224 if you use a standard floor, # but you may want some overlap or offest for transparency overlay. BACK_TOP = 0 BACK_LEFT = 0 BACK_Z_DEPTH = 0 # Set this to true to stretch the background image to fit. FIT_BACK = true # This is the size which the background image should be stretched to. FIT_BACK_SIZE = [544, 416] # These values allow you to offest the position and z-depth of the floor # image. The normal floor image is 544 X 192 if you use a standard background, # but you may want some overlap or offest for transparency overlay. FLOOR_TOP = 0 #224 FLOOR_LEFT = 0 FLOOR_Z_DEPTH = 1 # Set this to true to stretch the floor image to fit. FIT_FLOOR = true # This is the size which the floor image should be stretched to. FIT_FLOOR_SIZE = [544, 416] # This allows you to disable drawing of the default floor if you specify # a background image, but no floor image for a tile. In most cases you # won't need to modify this, but if you have another custom script providing # a floor image, then you may want to set this to false when using tiles with # only a background image specified. DEFAULT_FLOOR_ENABLED = true end ############################################################################### ## MAIN SCRIPT ############################################################################### ## EDITS BEYOND THIS POINT ARE AT YOUR OWN RISK!!! ############################################################################### class Spriteset_Battle alias reedo_tbbb_sb_create_battleback create_battleback def create_battleback tbbb = REEDO_TILE_BASED_BATTLE_BACKGROUNDS image = reedo_get_battleback if image != nil picture = Cache.picture(image) if tbbb::FIT_BACK bmp = Bitmap.new(tbbb::FIT_BACK_SIZE[0], tbbb::FIT_BACK_SIZE[1]) bmp.stretch_blt(bmp.rect, picture, picture.rect) else bmp = picture end @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = picture @battleback_sprite.x = tbbb::BACK_LEFT @battleback_sprite.y = tbbb::BACK_TOP @battleback_sprite.z = tbbb::BACK_Z_DEPTH else reedo_tbbb_sb_create_battleback end end alias reedo_tbbb_sb_create_battlefloor create_battlefloor def create_battlefloor tbbb = REEDO_TILE_BASED_BATTLE_BACKGROUNDS image = reedo_get_battlefloor if image != nil picture = Cache.picture(image) if tbbb::FIT_FLOOR bmp = Bitmap.new(tbbb::FIT_FLOOR_SIZE[0], tbbb::FIT_FLOOR_SIZE[1]) bmp.stretch_blt(bmp.rect, picture, picture.rect) else bmp = picture end @battlefloor_sprite = Sprite.new(@viewport1) @battlefloor_sprite.bitmap = bmp @battlefloor_sprite.x = tbbb::FLOOR_LEFT @battlefloor_sprite.y = tbbb::FLOOR_TOP @battlefloor_sprite.z = tbbb::FLOOR_Z_DEPTH else reedo_tbbb_sb_create_battlefloor if tbbb::DEFAULT_FLOOR_ENABLED end end def self.reedo_get_current_tile_id(layer) x = $game_player.x y = $game_player.y tile_id = $game_map.data[x, y, layer] tile_id = -1 if tile_id == nil return tile_id end def reedo_get_battleback return nil if !REEDO_TILE_BASED_BATTLE_BACKGROUNDS::ENABLED return nil if REEDO_TILE_BASED_BATTLE_BACKGROUNDS::EXCLUDED_MAPS.include?($game_map.map_id) @reedo_backs = reedo_get_battle_backgrounds if @reedo_backs == nil return nil if @reedo_backs.length == 0 return @reedo_backs[0] end def reedo_get_battlefloor return nil if !REEDO_TILE_BASED_BATTLE_BACKGROUNDS::ENABLED return nil if REEDO_TILE_BASED_BATTLE_BACKGROUNDS::EXCLUDED_MAPS.include?($game_map.map_id) @reedo_backs = reedo_get_battle_backgrounds if @reedo_backs == nil return nil if @reedo_backs.length == 0 return @reedo_backs[1] end def reedo_get_battle_backgrounds values = nil if REEDO_TILE_BASED_BATTLE_BACKGROUNDS::SINGLE_BACKGROUND_MAPS.has_key?($game_map.map_id) key = REEDO_TILE_BASED_BATTLE_BACKGROUNDS::SINGLE_BACKGROUND_MAPS[$game_map.map_id] values = REEDO_TILE_BASED_BATTLE_BACKGROUNDS::DATA[key] else t1 = Spriteset_Battle.reedo_get_current_tile_id(0) t2 = Spriteset_Battle.reedo_get_current_tile_id(1) t3 = Spriteset_Battle.reedo_get_current_tile_id(2) REEDO_TILE_BASED_BATTLE_BACKGROUNDS::TILE_GROUPS.keys.each do |key| data = REEDO_TILE_BASED_BATTLE_BACKGROUNDS::TILE_GROUPS[key] case data[1] when 0 t_id = t1 when 1 t_id = t2 when 2 t_id = t3 end if t_id != nil if data[0].include?(t_id) values = REEDO_TILE_BASED_BATTLE_BACKGROUNDS::DATA[key] break end end end end if values == nil values = REEDO_TILE_BASED_BATTLE_BACKGROUNDS::DATA["Default"] end return [] if values == nil return values end end Demo: http://www.mediafire.com/download.php?opobyf38bzgno3m Incompatibilita': Dovrebbe essere compatibile con la maggior parte di altri script. Lo script però è stato progettato per il sistema di combattimento di default e potrebbe non essere compatibile con gli altri.
  20. Nome Script: Sistema Aggressione Versione: 1.1 Alpha Autore/i: Zetu Informazioni: Questo script crea un sistema di aggressione, permettendo ai nemici di 'odiare' un eroe e quindi colpirlo in base alla sua percentuale. Istruzioni: Inserite lo script sopra Main. Script: #======================# # Z-Systems by: Zetu # #===========================#======================#===========================# # * * * Aggro System v1.01 * * * # #=#==========================================================================#=# # OVERWRITES # # Game_Enemy::make_action # # Game_Interpretor::command_339 # # SEMI-OVERWRITES # # Game_BattleAction::decide_random_target # #--------------------------------------------------------------------------# # Introduction: What is Aggro? # # Aggro (or Aggression) is a statistical value that helps determine the # # percent chance an enemy will attack a specific actor. # # What is this good for? # # In many RPGs, there are strong characters that can take a hit, also # # called "Tanks", and weaker ones that cannot take much damage. By # # manipulating these statistical values, you can control which actors # # will take damage, and which ones will not. # # How to increase Aggro? # # In this system, Aggro can be gained/lost by Attacks, Skills, and by # # guarding. The default values are defined by the module below. Inside # # note tags of skills, you may add tags to change its default amount. # # # # <aggro: X> # # Increases aggro by a rating of X. Keep this value between # # 0.0 and 1 OR 0 and 100. Does not perfectly increase aggro by the # # amount given. # # <pro aggro: X> # # This sets aggro to an amount, reducing all other aggro to match. Only # # use in hard aggro skills, such as a provoke (gain all aggro) or fade # # (remove all aggro). This tag is still in testing and not guarenteed # # to be bug free. # #--------------------------------------------------------------------------# # Version History: # # v1.01 ALPHA (Please Report all bugs related to this script) # #--------------------------------------------------------------------------# # * * * FOR SCRIPTERS WANTING TO CREATE A HUD! * * * # # The aggro values are stored in $scene.aggro and is a two dimensional # # array. @aggro[enemy.index][actor.index] returns the percent value of # # aggro, and will be between 0.0 and 1.0. # #==========================================================================# module Z_Systems module Aggro NORMAL_ATTACK = 0.06 SKILL_DEFAULT = 0.06 GUARD = -0.06 end end #========#======================#====#================================#========# #--------# #----# DO NOT EDIT PAST THIS POINT!!! #--------# #--------# End of Customization #----# Editing will cause death by #--------# #--------# #----# brain asplosions. #--------# #========#======================#====#================================#========# class Array; def sum; inject( nil ) { |sum,x| sum ? sum+x : x }; end; end class Scene_Battle < Scene_Base alias zs_aggro_start start def start zs_aggro_start @aggro = [] for e in 0...$game_troop.members.size array = [] for actor in $game_party.members array.push(1.0/$game_party.members.size) end @aggro[e] = array end end def aggro return @aggro end def normalize_aggro for e in 0...$game_troop.members.size value = @aggro[e].sum for a in 0...$game_party.members.size @aggro[e][a] /= value end end end def inc_aggro(e, a, value) return if $game_party.members.size <= 1 @aggro[e][a] += value @aggro[e][a] = [[@aggro[e][a], 0.0].max, 1.0].min return if @aggro[e][a] == 1.0 div = (@aggro[e].sum - @aggro[e][a])/(1.0-@aggro[e][a]) for aindex in 0...$game_party.members.size unless a == aindex @aggro[e][aindex] /= div end end end def set_aggro(e, a, value) return if $game_party.members.size <= 1 @aggro[e][a] = value @aggro[e][a] = [[@aggro[e][a], 0.0].max, 1.0].min if @aggro[e][a] == 1.0 for aindex in 0...$game_party.members.size unless a == aindex @aggro[e][aindex] = 0 end end else div = (@aggro[e].sum - @aggro[e][a])/(1.0-@aggro[e][a]) for aindex in 0...$game_party.members.size unless a == aindex @aggro[e][aindex] /= div end end end end alias zs_aggro_execute_action_attack execute_action_attack def execute_action_attack zs_aggro_execute_action_attack return if @active_battler.action.make_targets[0].actor? for target in @active_battler.action.make_targets inc_aggro(target.index, @active_battler.index, Z_Systems::Aggro::NORMAL_ATTACK) end normalize_aggro end alias zs_aggro_execute_action_skill execute_action_skill def execute_action_skill zs_aggro_execute_action_skill return if @active_battler.action.make_targets[0].actor? value = Z_Systems::Aggro::SKILL_DEFAULT for line in @active_battler.action.skill.note.split(//) case line when /<aggro:[ ](.*)>/i value = $1.to_f if value > 1.0 value /= 100.0 end for target in @active_battler.action.make_targets inc_aggro(target.index, @active_battler.index, value) end return when /<pro[ ][_]aggro:[ ](.*)>/i value = $1.to_f if value > 1.0 value /= 100.0 end for target in @active_battler.action.make_targets set_aggro(target.index, @active_battler.index, value) end return end end for target in @active_battler.action.make_targets inc_aggro(target.index, @active_battler.index, value) end end alias zs_aggro_execute_action_guard execute_action_guard def execute_action_guard zs_aggro_execute_action_guard for enemy in $game_troop.members inc_aggro(enemy.index, @active_battler.index, Z_Systems::Aggro::GUARD) end normalize_aggro end end class Game_Unit def random_target_aggro(enemy) $scene.normalize_aggro rref = rand(101).to_f/100.0 #~ print $scene.aggro[enemy.index].inspect for a in 0...$game_party.members.size if rref <= $scene.aggro[enemy.index][0..a].sum and !$game_party.members[a].dead? #~ print $scene.aggro[enemy.index][0..a].inspect return $game_party.members[a] end end return random_target_aggro(enemy) end end class Game_BattleAction alias zs_aggro_decide_random_target decide_random_target def decide_random_target(attacker = nil) #SEMI-OVERWRITE if !friends_unit.members[0].actor? or attacker != nil if for_friend? target = friends_unit.random_target elsif for_dead_friend? target = friends_unit.random_dead_target else target = opponents_unit.random_target_aggro(attacker) end if target == nil clear else @target_index = target.index end else zs_aggro_decide_random_target end end end class Game_Enemy < Game_Battler def make_action @action.clear return unless movable? available_actions = [] rating_max = 0 for action in enemy.actions next unless conditions_met?(action) if action.kind == 1 next unless skill_can_use?($data_skills[action.skill_id]) end available_actions.push(action) rating_max = [rating_max, action.rating].max end ratings_total = 0 rating_zero = rating_max - 3 for action in available_actions next if action.rating <= rating_zero ratings_total += action.rating - rating_zero end return if ratings_total == 0 value = rand(ratings_total) for action in available_actions next if action.rating <= rating_zero if value < action.rating - rating_zero @action.kind = action.kind @action.basic = action.basic @action.skill_id = action.skill_id @action.decide_random_target(self) return else value -= action.rating - rating_zero end end end end class Game_Interpretor def command_339 iterate_battler(@params[0], @params[1]) do |battler| next unless battler.exist? battler.action.kind = @params[2] if battler.action.kind == 0 battler.action.basic = @params[3] else battler.action.skill_id = @params[3] end if @params[4] == -2 # Last target battler.action.decide_last_target elsif @params[4] == -1 # Random battler.action.decide_random_target(battler) elsif @params[4] >= 0 # Index designation battler.action.target_index = @params[4] end battler.action.forcing = true $game_troop.forcing_battler = battler @index += 1 return false end return true end end
  21. Richiede la Total Conversion Nome Script: Allineamento personaggio Versione: N/D Autore/i: Leon w adattato da Rinnegatamante Informazioni: questo script permette di scegliere l'allineamento del PG: buono/neutrale/malvagio Istruzioni: Inserire sotto la total conversion Script: #=================================== # Leon's Good and Evil script adattato da Rinnegatamante #---------------------------------------------------------------------- # Features: # Gives an actor the "good", "Neutral" or "evil" alignment, based # upon their actions. # # Instructions: # Place above main, and below other scripts. # Use: draw_alignment_bar(actor, x, y) in a script to draw the alignment bar. # x and y being the position of the bar, and actor being the syntax for the actor's information. # # To use: # To add or subtract from their alignment, use: $game_actors[actor_id].alignment += x # To see if the actor's alignment is good, evil or neutral, use: # * Conditional Branch, tab 4, Script. # * For good, use $game_actors[actor_id] > 0 # * For evil, use $game_actors[actor_id] < 0 # * For neutral, use $game_actors[actor_id] == 0 # # Extra Information: # This script edits the original Window_Status script to add the good/evil. #=================================== #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Game_Actor #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Game_Actor < Game_Battler attr_accessor :alignment attr_accessor :alignment_name alias leon_alignment_bars_ga_setup setup def setup(actor_id) @alignment = 0 @alignment_name = "Neutrale" leon_alignment_bars_ga_setup(actor_id) end def alignment if @alignment > 0 if @alignment > 100 @alignment = 100 end @alignment_name = "Buono" return @alignment end if @alignment < 0 if @alignment < -100 @alignment = -100 end @alignment_name = "Cattivo" return @alignment end @alignment_name = "Neutrale" return @alignment end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Window_Base #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Window_Base def draw_bar(x, y, min, max, width = 152, height = 6, bar_color = Color.new(0, 75, 0, 255), end_color = Color.new(0, 255, 0, 255)) for i in 0..height self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255)) end for i in 1..(height - 1) r = 100 * (height - i) / height + 0 * i / height g = 100 * (height - i) / height + 0 * i / height b = 100 * (height - i) / height + 0 * i / height a = 255 * (height - i) / height + 255 * i / height self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a)) end for i in 1..( (min.to_f / max.to_f) * width - 1) for j in 1..(height - 1) r = bar_color.red * (width - i) / width + end_color.red * i / width g = bar_color.green * (width - i) / width + end_color.green * i / width b = bar_color.blue * (width - i) / width + end_color.blue * i / width a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a)) end end end def draw_backward_bar(x, y, min, max, width = 152, height = 6, bar_color = Color.new(75, 0, 0, 255), end_color = Color.new(255, 0, 0, 255)) for i in 0..height self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255)) end for i in 1..(height - 1) r = 100 * (height - i) / height + 0 * i / height g = 100 * (height - i) / height + 0 * i / height b = 100 * (height - i) / height + 0 * i / height a = 255 * (height - i) / height + 255 * i / height self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a)) end for i in 1..( (min.to_f / max.to_f) * width - 1) for j in 1..(height - 1) r = bar_color.red * (width - i) / width + end_color.red * i / width g = bar_color.green * (width - i) / width + end_color.green * i / width b = bar_color.blue * (width - i) / width + end_color.blue * i / width a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width self.contents.fill_rect(x - i + j, y + height - j, 1, 1, Color.new(r, g, b, a)) end end end def draw_alignment_bar(actor, x, y) #x = 320 y = 147 draw_bar(x, y, 0, 200, 200, 6) if actor.alignment > 0 draw_bar(x + 100, y, actor.alignment, 100, 100, 6) actor.alignment_name = "Buono" elsif actor.alignment < 0 draw_backward_bar(x + 100, y, -1 * actor.alignment, 100, 100, 6) actor.alignment_name = "Cattivo" elsif actor.alignment == 0 draw_bar(x + 100, y, actor.alignment, 100, 100, 6) actor.alignment_name = "Neutrale" end draw_bar(x + 97, y - 2, 2, 2, 2, 10, Color.new(255, 255, 255, 255), Color.new(255, 255, 255,255)) end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Window_Status #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Window_Status < Window_Base alias leon_alignment_bars_ws_refresh refresh def refresh leon_alignment_bars_ws_refresh if @actor.alignment > 100 @actor.alignment = 100 elsif @actor.alignment < -100 @actor.alignment = -100 end self.contents.font.color = system_color self.contents.draw_text(290, 122, 120, 32, "Carattere") draw_alignment_bar(@actor, 280, 157) self.contents.font.color = normal_color self.contents.draw_text(380, 122, 120, 32, @actor.alignment_name) end end
  22. Nome Script: napco's Side View BS Versione: 0.1 Autore/i: napco Informazioni: Lo script è ancora nelle sue fasi iniziali. Si tratta di un plugin al sistema di combattimento che dovrebbe trasformarlo in battaglie laterali. Purtroppo i membri del gruppo sono statici (mancano di animazioni), ma risolverò al più presto. Screenshots: Istruzioni: Inserite lo script sotto "materials". Script: module Cache def self.character(filename, hue = 0) load_bitmap("Graphics/Characters/", filename, hue) end end class Game_Actor < Game_Battler def use_sprite? return true end def screen_x return 512 - ($game_party.members.size - self.index) * 16 end def screen_y return 160 + self.index * 32 end def screen_z return 100 end end class Sprite_Battler < Sprite_Base def update_battler_bitmap if @battler.actor? update_actor_bitmap else update_enemy_bitmap end end def update_actor_bitmap if @battler.character_name != @battler_name or @battler.battler_hue != @battler_hue @battler_name = @battler.character_name @battler_hue = @battler.battler_hue self.bitmap = Cache.character(@battler_name, @battler_hue) sign = @battler_name[/^[!$]./] if sign != nil and sign.include?('$') @width = bitmap.width / 3 @height = bitmap.height / 4 else @width = bitmap.width / 12 @height = bitmap.height / 8 end self.ox = @width / 2 self.oy = @height index = @battler.character_index pattern = 1 sx = (index % 4 * 3 + pattern) * @width sy = (index / 4 * 4 + (4 - 2) / 2) * @height self.src_rect.set(sx, sy, @width, @height) if @battler.dead? or @battler.hidden self.opacity = 0 end end end def update_enemy_bitmap if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue @battler_name = @battler.battler_name @battler_hue = @battler.battler_hue self.bitmap = Cache.battler(@battler_name, @battler_hue) @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height if @battler.dead? or @battler.hidden self.opacity = 0 end end end end class Spriteset_Battle def create_battleback source = $game_temp.background_bitmap bitmap = Bitmap.new(640, 480) bitmap.stretch_blt(bitmap.rect, source, source.rect) bitmap.radial_blur(90, 12) @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = bitmap @battleback_sprite.ox = 320 @battleback_sprite.oy = 240 @battleback_sprite.x = 272 @battleback_sprite.y = 176 @battleback_sprite.wave_amp = 8 @battleback_sprite.wave_length = 240 @battleback_sprite.wave_speed = 120 end def create_battlefloor @battlefloor_sprite = Sprite.new(@viewport1) @battlefloor_sprite.bitmap = Cache.system("BattleFloor") @battlefloor_sprite.x = -136 @battlefloor_sprite.y = 48 @battlefloor_sprite.z = 1 @battlefloor_sprite.zoom_x = 1.5 @battlefloor_sprite.zoom_y = 2.0 @battlefloor_sprite.opacity = 128 end end Incompatibilità: Presumo che lo script sia incompatibile con altri Side View Battle scripts.
  23. Nome Script: Battle Backgrounds Versione: 1.00A Autore/i: Written by Synthesize Traduzione IT: Translated by Herupty for rpgmkr.net Informazioni: Questo script permette di cambiare lo sfondo di battaglia con uno diverso per ogni mappa Istruzioni: inserire sotto Materials Script: #=============================================================================== # Battle Backgrounds - RMVX #=============================================================================== # Written by Synthesize # Translated by Herupty for rpgmkr.net # January 20, 2008 # Version 1.00A #=============================================================================== # # * This script is untested. * # # * Edit: Lo script è stato testato da Herupty e funge* # #=============================================================================== module SynBattleB =begin Metti l'immagine di Background nella cartella 'Pictures' (Graphics/Pictures) Format = {id_mappa => Battleback Name} Es. 1 => "nomepicture" 1: id_mappa (NO GLI ZERI) =>: segno di ? (X-D) "nomepicture": il nome della picture nella cartella 'Pictures' =end Battle_background = { 1 => "Cascatella" , 11 => "Grottarocce", } #----------------------------------------------------------------------------- # Crea l' "ombra" sotto il gruppo di mostri? #----------------------------------------------------------------------------- Create_battlefloor = true #----------------------------------------------------------------------------- # This was being requested on quite a fe forums now, so I threw a quick script # together. It is nice and simple, and does what it is suppsoed to do. Once # RMVX is released in English, then I will add additional features into this. #----------------------------------------------------------------------------- end #------------------------------------------------------------------------------- # Battler #------------------------------------------------------------------------------- class Spriteset_Battle alias syn_create_battlefloor create_battlefloor #----------------------------------------------------------------------------- # Crea Sfondo #----------------------------------------------------------------------------- def create_battleback image = SynBattleB::Battle_background[$game_map.map_id] @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = Cache.picture(image) end def create_battlefloor @battlefloor_sprite = Sprite.new(@viewport1) syn_create_battlefloor if SynBattleB::Create_battlefloor == true end end #=============================================================================== # # Version 1.00A # January 20, 2008 # Written by Synthesize # Translated by Herupty for rpgmkr.net #=============================================================================== # # Battle Backgrounds - RMVX #===============================================================================
  24. Nome Script: Wait Gauge Battle Versione: N/D Autore/i: ziifee Informazioni: Rispetto ad un altro particolare sistema di battaglia,ziifee's Wait Gauge battaglia ricrea un qualcosa di molto più semplice. Guardate lo screen Screenshots: Istruzioni: All'interno della demo Demo: http://www.mediafire.com/?mkimjrfnnxz
  25. Nome script: Nemici che usano gli item Versione: 2 Autore/i: DerVVulfman, Fomar0153 Informazioni: Semplice script che permette ai nemici durante la battaglia di curarsi con gli oggetti o di lanciarveli contro.XD Istruzioni: Inserite lo script sopra Main. Altre istruzioni le potete trovare all'interno dello script. Script: #====================================================================== ======== # ** Enemies Use Items #------------------------------------------------------------------------------ # by Fomar0153 # version 2 # 04-27-2007 # Full SDK 2.2 Compatible (Does not need or require SDK 2.2) #------------------------------------------------------------------------------ # # INTRODUCTION: # # This system allows enemy battlers to use items during battle. This is accom- # plished by switching the skill used by an enemy to that of an item in a pre- # defined list in the configuration section. # # By example, you could set up a Skeleton enemy to use a 'Tonic' in battle when # it performs its 'Sleep' skill. This 'skill-to-item' change would have to be # defined in either the SWITCH_SKILL_ITEM hash, or the SWITCH_ENEMY_SKILL_ITEM # hash (explained in the configuration section below). # # The enemies can either have infinite item usage, or can be limited to the no. # of items used based on the SP points at their disposal. This feature is con- # trolled by the SWITCH_SP_LIMIT value. As long as it is false, enemies can use # items without running out. But if it is true, the enemies will use up their # SP points as they use items. The SP points used will be based on the SP Cost # of the Skill it is switched from. # #------------------------------------------------------------------------------ # # COMPATABILITY: # # This system is compatible with the default battlesystem, SDK 2.2, the RTAB # system, Fomar's Action Cost, ParaDog's and XRXS's battle system in certain # limits. # # Systems that use AT bars (everything except the 'default' and 'SDK default' # battlesystems) must have the SWITCH_SP_LIMIT value set to 'false'. All other # systems either use up the enemy sp through repeated calls of the make_action # def as their AT gauges are filled, or uses values other than sp_cost. # # In short, the 'SWITCH_SP_LIMIT' value can only be 'true' if you're using the # default or SDK default battlesystems. # #============================================================================== #======================================================================== # ** C O N F I G U R A T I O N S Y S T E M ** # #======================================================================== # This constant holds the list of skills and items they are switched with. It # is in the following format: { skill.id => item.id, skill.id => item.id,... } # The sample currently switches the "Heal" skill with the "Sharp Stone" item, # and the "Greater Heal" with the "Potion" item. SWITCH_SKILL_ITEM = {1 => 13, 2 => 1} # This constant holds the lists of skills & items switched for each enemy that # uses them. The format to apply the switch mimics the design to the one above: # { enemy.id => ( skill.id => item.id), enemy.id =>{ skill.id => item.id},... } # The sample currently switches the "Mass Heal" skill with the "Tonic" item for # the GHOST enemy, and changes the "Heal" skill with the "Barrier Stone" item # for the BASILISK enemy. SWITCH_ENEMY_SKILL_ITEM = { 1 => {3 => 9}, 2 => {1 => 14}} # This merely determines if you limit the items based on Skill SP cost. If this # is true, then the enemy must have enough SP to use the original skill before # the item is used. If it is false, then the enemy has an infinite supply. SWITCH_SP_LIMIT = false #============================================================================== # ** Game_Enemy #------------------------------------------------------------------------------ # This class handles enemies. It's used within the Game_Troop class # ($game_troop). #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * Make Action #-------------------------------------------------------------------------- alias item_make_action make_action def make_action item_make_action temp_hash = {} switch_id = self.current_action.skill_id # Sets the Skill Limiting switch if the SWITCH_SP_LIMIT is true. # If true, this sets 'sp_limted' to true if SP is too low for item use. if SWITCH_SP_LIMIT if $data_skills[switch_id].sp_cost > self.sp sp_limited = true else sp_limited = nil end else sp_limited = nil end # Perform Skill/Item switch if 'sp_limited' switch isn't true. # It won't be true if there's enough SP, or if SWITCH_SP_LIMITED is false. if !sp_limited if SWITCH_SKILL_ITEM.include? switch_id self.current_action.kind = 2 self.current_action.item_id = SWITCH_SKILL_ITEM[switch_id] self.current_action.decide_random_target_for_enemy end temp_hash = SWITCH_ENEMY_SKILL_ITEM[self.id] if SWITCH_ENEMY_SKILL_ITEM.include? self.id if temp_hash.include? switch_id self.current_action.kind = 2 self.current_action.item_id = temp_hash[switch_id] self.current_action.decide_random_target_for_enemy end end # Use up SP (If SWITCH_SP_LIMIT is true) if SWITCH_SP_LIMIT self.sp =- $data_skills[switch_id].sp_cost end end end #============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Make Item Action Results #-------------------------------------------------------------------------- alias e_make_item_action_result make_item_action_result def make_item_action_result(battler = @active_battler) @rtab = !@target_battlers if @active_battler.is_a?(Game_Actor) @rtab ? e_make_item_action_result(battler) : e_make_item_action_result else # Get item @item = $data_items[battler.current_action.item_id] if @rtab # Setting animation ID battler.anime1 = @item.animation1_id battler.anime2 = @item.animation2_id # Setting common event ID battler.event = @item.common_event_id else # Display item name on help window @help_window.set_text(@item.name, 1) # Set animation ID @animation1_id = @item.animation1_id @animation2_id = @item.animation2_id # Set common event ID @common_event_id = @item.common_event_id end # Deciding the object index = battler.current_action.target_index target = $game_party.smooth_target_actor(index) if @rtab # Setting the object side battler set_target_battlers(@item.scope, battler) # Applying the effect of the item for target in battler.target target.item_effect(@item, battler) end else # Set targeted battlers set_target_battlers(@item.scope) # Apply item effect for target in @target_battlers target.item_effect(@item) end end end end end
×