Colapso
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

[RMVX][v 1.1.1] Summons

Ir para baixo

[RMVX][v 1.1.1] Summons Empty [RMVX][v 1.1.1] Summons

Mensagem por Convidad Dom 20 Fev - 10:21

Função:
Sistema de summon, em que pode-se invocar um personagem para batalhar no lugar da equipe. Essa invocação custa uma porcentagem de MP de todos os personagens.

Incompactilidade:
Sistemas de batalha personalizados. Só fuciona no padrão e no SBS Tankentai.

Instalação:
Colocar acima de main. Configurações no inicio.

Spoiler for Ver 1.0.8 - Summon no Menu:
Código: [Selecionar]
###########################################################
######################## SUMMONS ##########################
#### V 1.0.8 ##############################################
################################### Por: LB ###############
################################# Ideia: Kaos #############
###########################################################
############### www.ReinoRpg.com ##########################
###########################################################

module Conf_Summon

OP_NAME = "Summon" # Nome da opção no menu de batalha
TEMP = 40 # Tempo de espera em frames
# Quando o Summom morre...
DEATH_TYPE = 1 # 0 = Regenera o Summon | 1 = Desativa a switch
SUMMON = []
# SUMMON[] = ["",,,]
SUMMON[0] = ["Ultra Fortaum",5,1,50]
SUMMON[1] = ["Ultra Fortaum 2",6,2,50]
SUMMON[2] = ["Ultra Fortaum 3",7,3,50]
SUMMON[3] = ["Ultra Fortaum 4",8,4,50]
# Pode ter quantos quiser...

# Crie os Summons no database de personagens, depois coloque o ID nas configurações acima.

end
class Game_Party < Game_Unit
attr_reader:actors
end
class Window_PartyCommand < Window_Command
def initialize
s1 = Vocab::fight
s2 = Conf_Summon::OP_NAME
s3 = Vocab::escape
super(128, [s1, s2, s3], 1, 4)
draw_item(0, true)
draw_item(2, $game_troop.can_escape)
a = $game_party.actors
for s in 0...Conf_Summon::SUMMON.size
if $game_switches[Conf_Summon::SUMMON[s][2]] == true
for d in 0...a.size
ddd = ($game_actors[a[d]].maxmp / (100 / Conf_Summon::SUMMON[s][3]))
if $game_actors[a[d]].mp >= ddd
g = true
end
end
end
end
if g != true
draw_item(1, false)
end
self.active = false
end
end
class Scene_Battle < Scene_Base
def update_party_command_selection
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # Lutar
Sound.play_decision
@status_window.index = @actor_index = -1
next_actor
when 1 # Summon
if @summon == nil
a = $game_party.actors
@aactors = []
for z in 0...a.size
@aactors[z] = a[z]
end
op = []
per = []
porc = []
for s in 0...Conf_Summon::SUMMON.size
g = []
if $game_switches[Conf_Summon::SUMMON[s][2]] == true
for d in 0...a.size
ddd = ($game_actors[a[d]].maxmp / (100 / Conf_Summon::SUMMON[s][3]))
if $game_actors[a[d]].mp >= ddd
g[d] = true
end
end
end
if g[0] == true or g[1] == true or g[2] == true or g[3] == true
op[op.size] = Conf_Summon::SUMMON[s][0]
per[per.size] = Conf_Summon::SUMMON[s][1]
porc[porc.size] = Conf_Summon::SUMMON[s][3]
end
end
if op != []
@window_summon = Window_Command.new(200,op)
@window_summon.height = 128
@window_summon.create_contents
@window_summon.refresh
@window_summon.y = 160
loop do
@window_summon.update
Graphics.update
Input.update
if Input.trigger?(Input::C)
@summon = per[@window_summon.index]
@porc = porc[@window_summon.index]
@num = Conf_Summon::SUMMON[@window_summon.index][1]
@id = @window_summon.index
break
elsif Input.trigger?(Input::B)
break
end
end
@window_summon.dispose
if @summon != nil
for i in 0...a.size
$game_actors[a[i]].mp -= ($game_actors[a[i]].maxmp / (100 / @porc))
end
@status_window.refresh
for b in 0...Conf_Summon::TEMP
Graphics.update
end
$game_party.remove_actor(@aactors[0])
$game_party.add_actor(@summon)
for c in 0...a.size-1
$game_party.remove_actor(@aactors[c+1])
end
@status_window.refresh
@party_command_window.draw_item(1, false)
else
Sound.play_buzzer
end
else
Sound.play_buzzer
end
end
when 2 # Fugir
if @summon != nil
$game_party.add_actor(@aactors[0])
$game_party.remove_actor(@summon)
for c in 0...@aactors.size-1
$game_party.add_actor(@aactors[c+1])
end
@summon = nil
end
if $game_troop.can_escape == false
Sound.play_buzzer
return
end
Sound.play_decision
process_escape
end
end
end
alias b1 process_victory
def process_victory
if @summon != nil
$game_party.add_actor(@aactors[0])
$game_party.remove_actor(@summon)
for c in 0...@aactors.size-1
$game_party.add_actor(@aactors[c+1])
end
end
b1
end
alias b2 process_defeat
def process_defeat
if @summon != nil and @m != 0
if Conf_Summon::DEATH_TYPE == 1
$game_switches[Conf_Summon::SUMMON[@id][2]] = false
end
$game_actors[@num].recover_all
$game_party.add_actor(@aactors[0])
$game_party.remove_actor(@summon)
for c in 0...@aactors.size-1
$game_party.add_actor(@aactors[c+1])
end
@m = 0
else
b2
end
end
end

Spoiler for Ver 1.1.1 - Summon por Habilidade:
Código: [Selecionar]
###########################################################
######################## SUMMONS ##########################
#### V 1.1.1 ##############################################
################################### Por: LB ###############
################################# Ideia: Kaos #############
###########################################################
############### www.ReinoRpg.com ##########################
###########################################################

module Conf_Summon

TEMP = 40 # Tempo de espera em frames
# Quando o Summom morre...
DEATH_TYPE = 1 # 0 = Regenera o Summon | 1 = Desativa a switch
UNSUMMON_SKILL = 1 # Habilidade que desative os summons (para ser usadas apenas pelos summons)
SUMMON = []
# SUMMON[] = ["",,,,]
SUMMON[0] = ["Ultra Fortaum" ,5,1,50,1]
SUMMON[1] = ["Ultra Fortaum 2",6,2,50,2]
SUMMON[2] = ["Ultra Fortaum 3",7,3,50,3]
SUMMON[3] = ["Ultra Fortaum 4",8,4,50,4]
# Pode ter quantos quiser...

# Crie os Summons no database de personagens, depois coloque o ID nas configurações acima.

end
class Game_Party < Game_Unit
attr_reader:actors
end
class Scene_Battle < Scene_Base
def execute_action_skill
skill = @active_battler.action.skill
text = @active_battler.name + skill.message1
@message_window.add_instant_text(text)
unless skill.message2.empty?
wait(10)
@message_window.add_instant_text(skill.message2)
end
@active_battler.mp -= @active_battler.calc_mp_cost(skill)
targets = @active_battler.action.make_targets
display_animation(targets, skill.animation_id)
Conf_Summon::SUMMON.each do |s|
if s[4] == skill.id
@summon = s[1]
@actor = @active_battler.id
@status_window.refresh
Conf_Summon::TEMP.times{Graphics.update}
$game_party.remove_actor(@active_battler.id)
$game_party.add_actor(@summon)
@status_window.refresh
@party_command_window.draw_item(1, false)
return
end
end
if skill.id == UNSUMMON_SKILL and @summon
@summon = nil
@status_window.refresh
Conf_Summon::TEMP.times{Graphics.update}
$game_party.remove_actor(@summon)
$game_party.add_actor(@actor)
return
end
$game_temp.common_event_id = skill.common_event_id
for target in targets
target.skill_effect(@active_battler, skill)
display_action_effects(target, skill)
end
end
alias b1 process_victory
def process_victory
if @summon
$game_party.remove_actor(@summon)
$game_party.add_actor(@actor)
end
b1
end
alias b2 process_defeat
def process_defeat
if @summon
if Conf_Summon::DEATH_TYPE == 1
$game_switches[Conf_Summon::SUMMON[@id][2]] = false
end
$game_actors[@num].recover_all
$game_party.remove_actor(@summon)
$game_party.add_actor(@actor)
end
b2
end
end

Anonymous
Convidad
Convidado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos