[ACE] cRmGSS - Distribuição de Atributos[RGSS3]
3 participantes
Página 1 de 1
[ACE] cRmGSS - Distribuição de Atributos[RGSS3]
IMAGENS
DESCRIÇÃO DO SCRIPT
Adiciona um menu de distribuição de atributos ao seu projeto
Apenas uma pequena observação, para alterar o jogador que está recebendo os atributos, basta apertar as teclas "Q" ou "W" ( Como nos outros menus [Equipamento, habilidades e etc] padrões do RPG Maker)
Código do Script
- Spoiler:
- Código:
#===============================================================
# Distribuição de Atributos
# Compativel com RMVXAce
# Autor: JohnBolton
#---------------------------------------------------------------
# Exclusividade da comunidade : [url=http://www.centrorpgmaker.com]www.centrorpgmaker.com[/url]
# É permitido postar em outros lugares contanto que não seja mudado
# as linhas dos créditos.
#===============================================================
#--------------------------------------------------------------------------
# * Instruções
#--------------------------------------------------------------------------
=begin
Para chamar o menu de distribuição de atributos, em "Chamar script", digite:
SceneManager.call(Scene_Distribuct)
Para adicionar pontos a um jogador, faça:
$game_actors[id].points += pontos
Exemplo: $game_actors[1].points += 3
No menu de distribuição, utilize as teclas "Q" e "W" para alterar o jogador
que receberá os pontos
=end
module JohnBolton92
module Dist_Points
#--------------------------------------------------------------------------
# * Configurações
#--------------------------------------------------------------------------
#Pontos Iniciais
Start_points = 10
#Pontos adquiridos ao upar
Points_level = 7
#Atributos adquiridos de HP ao utilizar 1 ponto
HP_Points = 1
#Atributos adquiridos de MP ao utilizar 1 ponto
MP_Points = 2
#Atributos adquiridos de Ataque ao utilizar 1 ponto
Atack_Points = 3
#Atributos adquiridos de Defesa ao utilizar 1 ponto
Defense_Points = 4
#Atributos adquiridos de Inteligencia ao utilizar 1 ponto
Inteligence_Points = 5
#Atributos adquiridos de Resistência ao utilizar 1 ponto
Resistence_Points = 6
#Atributos adquiridos de Agilidade ao utilizar 1 ponto
Agility_Points = 7
#Atributos adquiridos de Sorte ao utilizar 1 ponto
Luck_Points = 8
#Cabeçalho (Nome do Menu)
Head_Name = " Distribuição de atributos"
#Nomes das opções
HP_Name = "HP"
MP_Name = "MP"
Atack_Name = "Ataque"
Defense_Name = "Defesa"
Inteligence_Name = "Inteligencia"
Resistence_Name = "Resistência"
Agility_Name = "Agilidade"
Luck_Name = "Sorte"
#Adicionar a opção de acesso ao Distribuição de atributos no menu?
Active_in_Menu = true #(Obs: Só ative esta opção se usar o menu padrão)
Option_Menu_Name = "Distribuição" #Nome da opção no menu
#--------------------------------------------------------------------------
# * Fim das Configurações
#--------------------------------------------------------------------------
end
end
class Game_System
attr_accessor :points_enabled
alias bolton92_distribuct_initialize initialize
def initialize
@points_enabled = nil
bolton92_distribuct_initialize
end
end
class Game_Actor < Game_Battler
include JohnBolton92::Dist_Points
attr_accessor :points
def points
return @points
end
alias bolton_distri_initialize initialize
def initialize(actor_id)
@points = Start_points
bolton_distri_initialize(actor_id)
end
alias bolton_level_up level_up
def level_up
@points += Points_level
bolton_level_up
end
end
class Window_MenuCommand < Window_Command
include JohnBolton92::Dist_Points
if Active_in_Menu
alias dist_bolton_make_command_list add_formation_command
def add_formation_command
add_dist_points
dist_bolton_make_command_list
end
def add_dist_points
add_command(Option_Menu_Name, :dist)
end
end
end
class Scene_Menu < Scene_MenuBase
include JohnBolton92::Dist_Points
if Active_in_Menu
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:skill, method(:command_personal))
@command_window.set_handler(:equip, method(:command_personal))
@command_window.set_handler(:status, method(:command_personal))
@command_window.set_handler(:formation, method(:command_formation))
@command_window.set_handler(:dist, method(:dist))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
end
def dist
SceneManager.call(Scene_Distribuct)
end
end
class Window_DistribuctCommand < Window_Command
include JohnBolton92::Dist_Points
def initialize
super(300, 47)
end
def window_width
return 244
end
def make_command_list
add_main_commands
end
def add_main_commands
add_command(HP_Name, :hp, $game_system.points_enabled)
add_command(MP_Name, :mp, $game_system.points_enabled)
add_command(Atack_Name, :atack, $game_system.points_enabled)
add_command(Defense_Name, :defense, $game_system.points_enabled)
add_command(Inteligence_Name, :int, $game_system.points_enabled)
add_command(Resistence_Name, :res, $game_system.points_enabled)
add_command(Agility_Name, :agility, $game_system.points_enabled)
add_command(Luck_Name, :luck, $game_system.points_enabled)
end
end
class Window_DistribuctStatus < Window_Selectable
def initialize(actor)
super(0, 47, 300, 369)
@actor = actor
refresh
activate
end
def refresh; contents.clear
draw_block1 (line_height * 0)
draw_block2 (line_height * 2)
draw_block3 (line_height * 7)
end
def actor=(actor)
return if @actor == actor
@actor = actor
refresh
end
def draw_block1(y)
draw_actor_name(@actor, 4, y)
draw_actor_class(@actor, 128, y)
draw_actor_nickname(@actor, 288, y)
end
def draw_block2(y)
draw_actor_face(@actor, 8, y)
draw_basic_info(136, y)
end
def draw_block3(y)
draw_parameters(32, y)
end
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + line_height * 0)
draw_actor_icons(@actor, x, y + line_height * 1)
draw_actor_hp(@actor, x, y + line_height * 2)
draw_actor_mp(@actor, x, y + line_height * 3)
end
def draw_parameters(x, y)
6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
end
end
class Scene_Distribuct < Scene_MenuBase
include JohnBolton92::Dist_Points
def start
super
create_help_window
end
def create_help_window
@help_window = Window_Help.new(1)
@help_window.set_text(Head_Name)
@help_window_points = Window_Help.new(1)
@help_window_points.set_text("Pontos: " + @actor.points.to_s)
@help_window_points.x, @help_window_points.y = 300, 366
@help_window_points.width, @help_window_points.height = 244, 50
@status_window = Window_DistribuctStatus.new(@actor)
@window_options = Window_DistribuctCommand.new
create_command_window_status
create_command_window_distribucts
end
def create_command_window_status
@status_window.set_handler(:cancel, method(:return_scene))
@status_window.set_handler(:pagedown, method(:next_actor))
@status_window.set_handler(:pageup, method(:prev_actor))
end
def create_command_window_distribucts
@window_options.set_handler(:hp, method(:hp))
@window_options.set_handler(:mp, method(:mp))
@window_options.set_handler(:atack, method(:atack))
@window_options.set_handler(:defense, method(:defense))
@window_options.set_handler(:int, method(:int))
@window_options.set_handler(:res, method(:res))
@window_options.set_handler(:agility, method(:agility))
@window_options.set_handler(:luck, method(:luck))
end
def update
Graphics.update
Input.update
check_points
update_windows
refresh_windows
end
def update_windows
@status_window.update
@window_options.update
@help_window.update
@help_window_points.set_text("Pontos: " + @actor.points.to_s)
end
def check_points
if @actor.points > 0
$game_system.points_enabled = true
else
$game_system.points_enabled = false
end
end
def refresh_windows
@window_options.refresh
end
def on_actor_change
@status_window.actor = @actor
@status_window.activate
end
def hp
for i in 1..99
@actor.class.params[0, i] += HP_Points
end
@select = :hp
take_off
end
def mp
for i in 1..99
@actor.class.params[1, i] += MP_Points
end
@select = :mp
take_off
end
def atack
for i in 1..99
@actor.class.params[2, i] += Atack_Points
end
@select = :atack
take_off
end
def defense
for i in 1..99
@actor.class.params[3, i] += Defense_Points
end
@select = :defense
take_off
end
def int
for i in 1..99
@actor.class.params[4, i] += Inteligence_Points
end
@select = :int
take_off
end
def res
for i in 1..99
@actor.class.params[5, i] += Resistence_Points
end
@select = :res
take_off
end
def agility
for i in 1..99
@actor.class.params[6, i] += Agility_Points
end
@select = :agility
take_off
end
def luck
for i in 1..99
@actor.class.params[7, i] += Luck_Points
end
@select = :luck
take_off
end
def take_off
@actor.points -= 1
terminate
create_help_window
@window_options.select_symbol(@select)
end
def terminate
@status_window.dispose
@window_options.dispose
@help_window_points.dispose
@help_window.dispose
end
end
Créditos
JohnBolt - Criação do Script.
LRM-Por Disponibilizar este espaço.
XjlucasX-Disponibiliza-lo aqui na LRM .
LRM-Por Disponibilizar este espaço.
XjlucasX-Disponibiliza-lo aqui na LRM .
XjlucasX- Mensagens : 10
Data de inscrição : 26/12/2011
Re: [ACE] cRmGSS - Distribuição de Atributos[RGSS3]
Ola amigo eu queria saber se tem como eu mudar o Menu Azul para um Preto??? podes me ajuda e que sou novato
Andrewsinx- Mensagens : 23
Data de inscrição : 28/12/2011
Re: [ACE] cRmGSS - Distribuição de Atributos[RGSS3]
eh soh mudar a windowskin, de uma pesquisada windowskin RMVXAce, que vai ter exemplos e lugares explicando como adiciona no seu projeto.
Raizen884- Mensagens : 22
Data de inscrição : 26/11/2011
Tópicos semelhantes
» [RGSS3]cRmGSS - Som de Passos
» [dúvida][RGSS3] Atributos de Inimigos
» script de distribuição de pontos
» [RGSS3] APS_AutoDescription
» [RGSS3] Battle Start
» [dúvida][RGSS3] Atributos de Inimigos
» script de distribuição de pontos
» [RGSS3] APS_AutoDescription
» [RGSS3] Battle Start
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos