regan Posted September 6, 2009 Share Posted September 6, 2009 Scusate ragazzi, non riesco a capire come far funzionare bene questo script, ci capite qualcosa? Leggendo le istruzioni si vede che sbaglio..bhò:#==============================================================================# Add-On: Individual Battle Commands# by Charlie Lee # Modified by Atoa, to work with SBS XP#==============================================================================# This script was modified to work with SBS XP, but it configuration# didn't change# # Create an new attribute named "CMD *command*", where *command* is the# name of the command, then add this attribute to an skill.# EG.:# "CMD White Magic" will create the command "White Magic"# # Remember to add only one command attribute to an skill, and add an # command attribute to *ALL* skills, or actors won't be able to use it in# battle.## IMPORTANTE: If you using the Add-On "AABS (ATB System)", put this script# *bellow* the ATB Add-On.#============================================================================== #==============================================================================# Game_Actor#==============================================================================class Game_Actor #-------------------------------------------------------------------------- attr_accessor :individual_commands #-------------------------------------------------------------------------- alias ibc_setup_n01 setup #-------------------------------------------------------------------------- def setup(actor_id) ibc_setup_n01(actor_id) @individual_commands=[] end #-------------------------------------------------------------------------- def refresh_commands @individual_commands=[] for i in 0...@skills.size skill = $data_skills[@skills] if skill != nil for elem_id in skill.element_set if $data_system.elements[elem_id][0,3]=="CMD" if !@individual_commands.include?($data_system.elements[elem_id]) @individual_commands. push(String.new($data_system.elements[elem_id])) end end end end end for c in @individual_commands c[0,4]="" end endend #==============================================================================# Game_Party#==============================================================================class Game_Party #-------------------------------------------------------------------------- alias ibc_add_actor_n01 add_actor #-------------------------------------------------------------------------- def add_actor(actor_id) ibc_add_actor_n01(actor_id) actor = $game_actors[actor_id] actor.refresh_commands endend #==============================================================================# Scene_Battle (Parte 3)#==============================================================================class Scene_Battle #-------------------------------------------------------------------------- include N01 #-------------------------------------------------------------------------- alias ibc_phase3_setup_command_window_n01 phase3_setup_command_window alias ibc_start_skill_select_n01 start_skill_select #-------------------------------------------------------------------------- def phase3_setup_command_window ibc_phase3_setup_command_window_n01 @update_skills_commands = Window_Skill.new(@active_battler) @update_skills_commands.refresh @update_skills_commands.update @update_skills_commands.dispose @active_battler.refresh_commands s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item s5 = @escape_name if @escape_type == 0 @individual_battle_commands=[s1]+@active_battler.individual_commands+[s3, s4] @individual_battle_commands=[s1]+@active_battler.individual_commands+[s3, s4, s5] if @escape_type == 0 @actor_command_window.dispose @actor_command_window = Window_Command_IBC.new(160, @individual_battle_commands) comand_size = (@individual_battle_commands.size >= 5 ? 5 : @individual_battle_commands.size) @actor_command_window.x = 240 @actor_command_window.y = 248 - 24 * comand_size @actor_command_window.z = 2001 @actor_command_window.back_opacity = COMMAND_OPACITY @actor_command_window.index = 0 @actor_command_window.active = true @actor_command_window.visible = true @active_battler_window.refresh(@active_battler) @active_battler_window.y = 184 - 24 * comand_size @active_battler_window.z = 2002 @active_battler_window.visible = true end #-------------------------------------------------------------------------- def update_phase3_basic_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) phase3_prior_actor return end if Input.trigger?(Input::C) case @actor_command_window.commands[@actor_command_window.index] when $data_system.words.attack $game_system.se_play($data_system.decision_se) @active_battler.current_action.kind = 0 @active_battler.current_action.basic = 0 start_enemy_select when $data_system.words.guard $game_system.se_play($data_system.decision_se) @active_battler.current_action.kind = 0 @active_battler.current_action.basic = 1 phase3_next_actor when $data_system.words.item $game_system.se_play($data_system.decision_se) @active_battler.current_action.kind = 2 start_item_select when @escape_name if $game_temp.battle_can_escape == false $game_system.se_play($data_system.buzzer_se) return end @active_battler_window.visible = false @actor_command_window.visible = false for actor in $game_party.actors actor.atb = 0 actor.cast_action = nil end wait(3) $game_system.se_play($data_system.decision_se) update_phase2_escape end if @active_battler != nil and @active_battler.individual_commands. include?(@actor_command_window.commands[@actor_command_window.index]) $game_system.se_play($data_system.decision_se) @active_battler.current_action.kind = 1 @individual_battle_commands_skill_category=@actor_command_window.commands[@actor_command_window.index] start_skill_select end end end #-------------------------------------------------------------------------- def start_skill_select ibc_start_skill_select_n01 @skill_window.dispose @skill_window = Window_Skill.new(@active_battler,@individual_battle_commands_skill_category) @skill_window.help_window = @help_window endend #==============================================================================# * Window_Skill#==============================================================================class Window_Skill < Window_Selectable #-------------------------------------------------------------------------- def initialize(actor, skill_command_type = "") if skill_command_type != "" @skill_command_element_id = $data_system.elements. index("CMD " + skill_command_type) else @skill_command_element_id = -1 end super(0, 128, 640, 352) @actor = actor @column_max = 2 refresh self.index = 0 if $game_temp.in_battle self.y = 320 self.height = 160 self.z = 2000 self.back_opacity = MENU_OPACITY end end #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 0...@actor.skills.size skill = $data_skills[@actor.skills] if skill != nil if @skill_command_element_id == -1 or skill.element_set.include?( @skill_command_element_id) @data.push(skill) end end end @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end endend #==============================================================================# Window_Command#==============================================================================class Window_Command_IBC < Window_Selectable #-------------------------------------------------------------------------- attr_accessor :commands #-------------------------------------------------------------------------- def initialize(width, commands) comand_size = (commands.size >= 5 ? 192 : commands.size * 32 + 32) super(0, 0, width, comand_size) @item_max = commands.size @commands = commands self.contents = Bitmap.new(width - 32, @item_max * 32) refresh self.index = 0 end #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i, normal_color) end end #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) end #-------------------------------------------------------------------------- def disable_item(index) draw_item(index, disabled_color) endend Link to comment Share on other sites More sharing options...
0 giver Posted September 6, 2009 Share Posted September 6, 2009 Leggendo l'intestazione, mi pare che dica: - (Nel pannello System del DataBase) Si possono stabilire più categorie di skill, inserendole come Elementi il cui nome deve iniziare con CMD.Es. CMD Magia Bianca o CMD Magia dell'Acqua o CMD Tecniche Ninja - Per ogni skill creata nel DataBase è obbligatorio assegnarle uno (ed uno soltanto) di questi elementi-categoria, altrimenti non saranno utilizzabili in battaglia.(Se si desidera che una skill appartenga a più categorie, bisognerà crearla tante volte quante sono le categorie a cui appartiene ed assegnarle ogni volta un elemento diverso, quindi . . .) (- In battaglia, senza bisogno di indicare altro, verranno verificati gli elementi/categoria delle skill conosciute dal personaggio e nel suo elenco di comandi in battaglia appariranno tanti comandi quante sono le categorie delle skill che conosce, ognuno dei quali permetterà di visualizzare solo le skill appartenenti a quella categoria, con il nome della categoria stessa, al posto del singolo comando SKILL . . .) Io l'ho interpretato così, ma visto che non uso lo script, non posso garantire . . . SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
0 Guardian of Irael Posted September 6, 2009 Share Posted September 6, 2009 Ho provato ad incollare lo script in un nuovo progetto, ma mi da svariati errori, dovrebbe quindi funzionare solo se usato insieme al SBS XP di Atoa visto che è modificato proprio per funzionare con quello. Ti dico quello che ho capito leggendo le istruzioni: per inserire un comando di battaglia individuale devi creare un nuovo attributo con il nome "CMD *comando*" dove *comando* è il nome del comando che vuoi inserire, poi devi assegnare alla skill quell' attributo. Esempio CMD Magia bianca aggiungerà il comando di battaglia Magia bianca e per inserire magie sotto quel comando dovrai assegnare l'attributo CMD Magia bianca a quelle magie.Non puoi assegnare più comandi atttributo ad una magia (Es.: non puoi assegnare gli attributi CMD Magia bianca e CMD Magia rossa alla stessa skill Cura1).^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Question
regan
Scusate ragazzi, non riesco a capire come far funzionare bene questo script, ci capite qualcosa? Leggendo le istruzioni si vede che sbaglio..bhò:
#==============================================================================
# Add-On: Individual Battle Commands
# by Charlie Lee
# Modified by Atoa, to work with SBS XP
#==============================================================================
# This script was modified to work with SBS XP, but it configuration
# didn't change
#
# Create an new attribute named "CMD *command*", where *command* is the
# name of the command, then add this attribute to an skill.
# EG.:
# "CMD White Magic" will create the command "White Magic"
#
# Remember to add only one command attribute to an skill, and add an
# command attribute to *ALL* skills, or actors won't be able to use it in
# battle.
#
# IMPORTANTE: If you using the Add-On "AABS (ATB System)", put this script
# *bellow* the ATB Add-On.
#==============================================================================
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
#--------------------------------------------------------------------------
attr_accessor :individual_commands
#--------------------------------------------------------------------------
alias ibc_setup_n01 setup
#--------------------------------------------------------------------------
def setup(actor_id)
ibc_setup_n01(actor_id)
@individual_commands=[]
end
#--------------------------------------------------------------------------
def refresh_commands
@individual_commands=[]
for i in 0...@skills.size
skill = $data_skills[@skills]
if skill != nil
for elem_id in skill.element_set
if $data_system.elements[elem_id][0,3]=="CMD"
if !@individual_commands.include?($data_system.elements[elem_id])
@individual_commands.
push(String.new($data_system.elements[elem_id]))
end
end
end
end
end
for c in @individual_commands
c[0,4]=""
end
end
end
#==============================================================================
# Game_Party
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
alias ibc_add_actor_n01 add_actor
#--------------------------------------------------------------------------
def add_actor(actor_id)
ibc_add_actor_n01(actor_id)
actor = $game_actors[actor_id]
actor.refresh_commands
end
end
#==============================================================================
# Scene_Battle (Parte 3)
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
include N01
#--------------------------------------------------------------------------
alias ibc_phase3_setup_command_window_n01 phase3_setup_command_window
alias ibc_start_skill_select_n01 start_skill_select
#--------------------------------------------------------------------------
def phase3_setup_command_window
ibc_phase3_setup_command_window_n01
@update_skills_commands = Window_Skill.new(@active_battler)
@update_skills_commands.refresh
@update_skills_commands.update
@update_skills_commands.dispose
@active_battler.refresh_commands
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
s5 = @escape_name if @escape_type == 0
@individual_battle_commands=[s1]+@active_battler.individual_commands+[s3, s4]
@individual_battle_commands=[s1]+@active_battler.individual_commands+[s3, s4, s5] if @escape_type == 0
@actor_command_window.dispose
@actor_command_window = Window_Command_IBC.new(160, @individual_battle_commands)
comand_size = (@individual_battle_commands.size >= 5 ? 5 : @individual_battle_commands.size)
@actor_command_window.x = 240
@actor_command_window.y = 248 - 24 * comand_size
@actor_command_window.z = 2001
@actor_command_window.back_opacity = COMMAND_OPACITY
@actor_command_window.index = 0
@actor_command_window.active = true
@actor_command_window.visible = true
@active_battler_window.refresh(@active_battler)
@active_battler_window.y = 184 - 24 * comand_size
@active_battler_window.z = 2002
@active_battler_window.visible = true
end
#--------------------------------------------------------------------------
def update_phase3_basic_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
phase3_prior_actor
return
end
if Input.trigger?(Input::C)
case @actor_command_window.commands[@actor_command_window.index]
when $data_system.words.attack
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
when $data_system.words.guard
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when $data_system.words.item
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
when @escape_name
if $game_temp.battle_can_escape == false
$game_system.se_play($data_system.buzzer_se)
return
end
@active_battler_window.visible = false
@actor_command_window.visible = false
for actor in $game_party.actors
actor.atb = 0
actor.cast_action = nil
end
wait(3)
$game_system.se_play($data_system.decision_se)
update_phase2_escape
end
if @active_battler != nil and @active_battler.individual_commands.
include?(@actor_command_window.commands[@actor_command_window.index])
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
@individual_battle_commands_skill_category=@actor_command_window.commands[@actor
_command_window.index]
start_skill_select
end
end
end
#--------------------------------------------------------------------------
def start_skill_select
ibc_start_skill_select_n01
@skill_window.dispose
@skill_window = Window_Skill.new(@active_battler,@individual_battle_commands_skill_category)
@skill_window.help_window = @help_window
end
end
#==============================================================================
# * Window_Skill
#==============================================================================
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
def initialize(actor, skill_command_type = "")
if skill_command_type != ""
@skill_command_element_id = $data_system.elements.
index("CMD " + skill_command_type)
else
@skill_command_element_id = -1
end
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
if $game_temp.in_battle
self.y = 320
self.height = 160
self.z = 2000
self.back_opacity = MENU_OPACITY
end
end
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills]
if skill != nil
if @skill_command_element_id == -1 or skill.element_set.include?(
@skill_command_element_id)
@data.push(skill)
end
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
end
#==============================================================================
# Window_Command
#==============================================================================
class Window_Command_IBC < Window_Selectable
#--------------------------------------------------------------------------
attr_accessor :commands
#--------------------------------------------------------------------------
def initialize(width, commands)
comand_size = (commands.size >= 5 ? 192 : commands.size * 32 + 32)
super(0, 0, width, comand_size)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now