Lo script funziona bene, ma c'è un problema: quando lo uso, le abilità elencate nel mio Menu delle Skill risultano scritte in Arial, mentre io adotto l'Harrington... e mi pareva di aver modificato con accuratezza tutti gli script... c'è qualche stringa che si può aggiungere al precedente script per modificare il font?
Question
Zosimos
Salve a tutti, in particolare agli Scripters espertissimi di cui vorrei gentilmente l'aiuto...
Ultimamente sto usando uno script che consente di introdurre delle nuove categorie di abilità durante la battaglia:
#======================================================================
========
# ** Individual Battle Commands (IBC) by Charlie Lee
#
# Version: 1.0
# Author: Charlie Lee
#==============================================================================
#==============================================================================
# INTRUCTIONS
#==============================================================================
# Configuration of Individual Battle Commands
# Let us assume that you want to create "Black Magic" and "White Magic".
# Well, create two elements named "CMD White Magic" and "CMD Black Magic",
# and add the proper element to all the skills in your database that belong
# to either of the two "categories".
# Finished. Yes. Simple, isn't it?
# Remember, if "name" is you category, use an element called "CMD name".
# "name" will end up in the command window of the actors, and it will be
# displayed only if that actor has at least one skill of that category.
# Enjoy!
#==============================================================================
# SUPPORT FOR INDIVIDUAL BATTLE COMMANDS
#==============================================================================
class Game_Actor
attr_accessor :individual_commands
alias individual_commands_setup setup
def setup(actor_id)
# original call
individual_commands_setup(actor_id)
@individual_commands=[]
end
def refresh_commands
@individual_commands=[]
#print("refresh_commands, actor: ",id.to_s)
#for c in @individual_commands
# print("command: ",c)
#end
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
# remove "CMD " substring
c[0,4]=""
end
end
end
class Game_Party
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
alias individual_commands_add_actor add_actor
def add_actor(actor_id)
# original call
individual_commands_add_actor(actor_id)
# Get actor
actor = $game_actors[actor_id]
actor.refresh_commands
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# * Actor Command Window Setup
#--------------------------------------------------------------------------
alias ibc_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# Original call
ibc_phase3_setup_command_window
# Refresh commands
@active_battler.refresh_commands
# Make a new window
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@individual_battle_commands=[s1]+@active_battler.individual_commands+[s3, s4]
@actor_command_window.dispose
@actor_command_window = Window_Command.new(160, @individual_battle_commands)
# Set actor command window position
@actor_command_window.x = @actor_index * 160
@actor_command_window.y = 320 - 32 - 32*@individual_battle_commands.size
@actor_command_window.back_opacity = 255
@actor_command_window.opacity = 255
@actor_command_window.active = true
@actor_command_window.visible = true
# Set index to 0
@actor_command_window.index = 0
# show the turn window (shown in start phase 2 only when the enemy attacks)
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : basic command)
#--------------------------------------------------------------------------
def update_phase3_basic_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Go to command input for previous actor
phase3_prior_actor
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by actor command window command name
case @actor_command_window.commands[@actor_command_window.index]
# attack
when $data_system.words.attack
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
# Start enemy selection
start_enemy_select
# Guard
when $data_system.words.guard
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
# Go to command input for next actor
phase3_next_actor
# item
when $data_system.words.item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 2
# Start item selection
start_item_select
end
### SUPPORT FOR INDIVIDUAL BATTLE COMMANDS ###
if @active_battler!=nil and @active_battler.individual_commands.
include?(@actor_command_window.commands[@actor_command_window.index])
# Play decision SE
$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
#--------------------------------------------------------------------------
# * Start Skill Selection
#--------------------------------------------------------------------------
alias ibc_start_skill_select start_skill_select
def start_skill_select
# Original call
ibc_start_skill_select
# Make a new skill window
@skill_window.dispose
@skill_window = Window_Skill.new(@active_battler,@individual_battle_commands_skill_category)
# Associate help window
@skill_window.help_window = @help_window
end
end
class Window_Skill
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
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 in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills]
if skill != nil
if @skill_command_element_id == -1 or skill.element_set.include?(
@skill_command_element_id)
@data.push(skill)
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
end
class Window_Command
attr_accessor :commands
end
Lo script funziona bene, ma c'è un problema: quando lo uso, le abilità elencate nel mio Menu delle Skill risultano scritte in Arial, mentre io adotto l'Harrington... e mi pareva di aver modificato con accuratezza tutti gli script... c'è qualche stringa che si può aggiungere al precedente script per modificare il font?
Grazie in anticipo!
Gioco in Sviluppo:
http://www.studibizantini.it/docs/Logo.png
Blog: Ode to my Forthcoming Winter
Riferimento
Contest:
http://rpg2s.net/gif/SCContest2Oct.gifx2 http://rpg2s.net/gif/SCContest1Oct.gifx1
Link to comment
Share on other sites
3 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