-
Numero contenuti
1 -
Iscritto
-
Ultima visita
Risposte Profilo pubblicati da Ryuga
-
ciao ho saputo che sei bravissimo con gli script, avrei bisogno di un aiuto posso disturbarti?
-
il problema sta nel fatto che nel mio gioco non ho un allenatore che lancia un pokemon, ho dei guerrieri che però combattono "onorevolmente 1 alla volta contro gli avversari" per cui poi mi dovrei sobbarcare la cosa di rendere invisibile il trainer.... io pensavo si potesse aggiungere una script che diceNON SONO PRATICO QUINDI SCUSA LA "SGRAMMATICITà"
se gli HP dell'actor = 0
se party.members >0
ATTIVA COMANDO SWTCH:else party.members = 0@game.over
IO però non so come si scriva correttamente una cosa del genere!
-
-
ciao ho saputo che sei bravissimo con gli script, avrei bisogno di un aiuto posso disturbarti?
-
allora ti spiego,
Nel Game_Party al rigo 73
def max_battle_members
return 1
endho modificato il return per avere solo un personaggio nel combattimento.
un file di storage per i pg mi permette di settare i pg al seuito da 1 a quanti ne voglio
=begin
#===============================================================================
Title: Battle Swap
Author: Shiggy
Date: Jan 24, 2015
--------------------------------------------------------------------------------
** Change log
Jan 24, 2015
- Initial release of the header to the script
--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Commercial uses
* Ask permission
* This is a small script so I won't charge for it
* I may ask a free copy of your game
* I may ask for other stuff like the right to use some assets
* Will do bug fixes
* Compatibility patches may be requested but no guarantees
* Please report any compatibility issues anyway
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Shiggy in your project
* Preserve this header
* Be nice to other people ( I don't want mean people to use my scripts)--------------------------------------------------------------------------------
** DescriptionThis script let you instantly swap battle members with party memebers that
are not in the fight.--------------------------------------------------------------------------------
** UsageJust use the swap command while you are in battle, you can change the name
of the command to something else in the Vocab module
--------------------------------------------------------------------------------
** InstallationPlace this script below Materials and above Main
#===============================================================================
=endmodule Vocab
Swap = "Cambia"
endclass Window_ActorCommand < Window_Command
alias battle_swap_make_command_list make_command_list
def make_command_list
battle_swap_make_command_list
add_swap_command
end
def add_swap_command
add_command(Vocab::Swap, :swap,swap?)
end
def swap?
$game_party.all_members.size > $game_party.max_battle_members
end
endclass Scene_Battle
alias battle_swap_create_actor_command_window create_actor_command_window
def create_actor_command_window
battle_swap_create_actor_command_window
@actor_command_window.set_handler(:swap, method(:command_swap))
end
def command_swap
@actor_window.off_party
@actor_window.set_handler(:ok, method(:on_swap_ok))
@actor_window.set_handler(:cancel, method(:on_swap_cancel))
select_actor_selection
end
def on_swap_ok
$game_party.swap_order(BattleManager.actor.index,@actor_window.index+$game_party.max_battle_members)
BattleManager.actor.make_actions
on_swap_cancel
end
def on_swap_cancel
@actor_window.set_handler(:ok, method(:on_actor_ok))
@actor_window.set_handler(:cancel, method(:on_actor_cancel))
@status_window.refresh
@actor_window.hide
@actor_command_window.activate
end
endclass Game_Party
def off_members
all_members-battle_members
end
endclass Window_BattleStatus < Window_Selectable
alias battle_swap_initialize initialize
def initialize
battle_swap_initialize
@party = true
end
alias battle_swap_item_max item_max
def item_max
if @party
battle_swap_item_max
else
$game_party.off_members.size
end
end
alias battle_swap_draw_item draw_item
def draw_item(index)
if @party
battle_swap_draw_item(index)
else
actor = $game_party.off_members[index]
draw_basic_area(basic_area_rect(index), actor)
draw_gauge_area(gauge_area_rect(index), actor)
end
end
def off_party
@party=false
end
def on_party
@party=true
end
ende questo è lo script per lo scambio... considerando che questi sono gli unici cambiamenti ... come ricavo lo script che mi permette automaticamente quando un pg muore idi scambiarlo con uno dei 2 in riserva?
Cioè ora al combattimanto partecipa un solo pg
in riserva ne ho altri 2, se durante il combattimento cambio pg funziona tutto perfettamente, il problema è che anche se ho 2 pg "vivi" in riseva, se il nemico sconfigge il pg che ho in combattimento mi da game over, menter io vorrei che se ci sono ancora pg vivi nel party, mi chieda chi voglio mandare avanti e continuare il combattimento, il game over deve avvenire solo quando tutti e tre i miei pg sono stati sconfitti.presumo sia una cosa fattibile poichè la meccanica dei pokemon prevede questo... a proposito di pokemon, mi piacerebbe anche la possibilità di scegliere il primo combattente all'inizio della battaglia, ma se è troppo complicato non fa nulla, va bene anche che inizi il capo lista, spero di essere stato chiaro se non sono riuscito a spiegarmi bene chiedimi pure!
Grazie della disponibilità!
-
-
allora ti spiego,
Nel Game_Party al rigo 73
def max_battle_members
return 1
endho modificato il return per avere solo un personaggio nel combattimento.
un file di storage per i pg mi permette di settare i pg al seuito da 1 a quanti ne voglio
=begin
#===============================================================================
Title: Battle Swap
Author: Shiggy
Date: Jan 24, 2015
--------------------------------------------------------------------------------
** Change log
Jan 24, 2015
- Initial release of the header to the script
--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Commercial uses
* Ask permission
* This is a small script so I won't charge for it
* I may ask a free copy of your game
* I may ask for other stuff like the right to use some assets
* Will do bug fixes
* Compatibility patches may be requested but no guarantees
* Please report any compatibility issues anyway
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Shiggy in your project
* Preserve this header
* Be nice to other people ( I don't want mean people to use my scripts)--------------------------------------------------------------------------------
** DescriptionThis script let you instantly swap battle members with party memebers that
are not in the fight.--------------------------------------------------------------------------------
** UsageJust use the swap command while you are in battle, you can change the name
of the command to something else in the Vocab module
--------------------------------------------------------------------------------
** InstallationPlace this script below Materials and above Main
#===============================================================================
=endmodule Vocab
Swap = "Cambia"
endclass Window_ActorCommand < Window_Command
alias battle_swap_make_command_list make_command_list
def make_command_list
battle_swap_make_command_list
add_swap_command
end
def add_swap_command
add_command(Vocab::Swap, :swap,swap?)
end
def swap?
$game_party.all_members.size > $game_party.max_battle_members
end
endclass Scene_Battle
alias battle_swap_create_actor_command_window create_actor_command_window
def create_actor_command_window
battle_swap_create_actor_command_window
@actor_command_window.set_handler(:swap, method(:command_swap))
end
def command_swap
@actor_window.off_party
@actor_window.set_handler(:ok, method(:on_swap_ok))
@actor_window.set_handler(:cancel, method(:on_swap_cancel))
select_actor_selection
end
def on_swap_ok
$game_party.swap_order(BattleManager.actor.index,@actor_window.index+$game_party.max_battle_members)
BattleManager.actor.make_actions
on_swap_cancel
end
def on_swap_cancel
@actor_window.set_handler(:ok, method(:on_actor_ok))
@actor_window.set_handler(:cancel, method(:on_actor_cancel))
@status_window.refresh
@actor_window.hide
@actor_command_window.activate
end
endclass Game_Party
def off_members
all_members-battle_members
end
endclass Window_BattleStatus < Window_Selectable
alias battle_swap_initialize initialize
def initialize
battle_swap_initialize
@party = true
end
alias battle_swap_item_max item_max
def item_max
if @party
battle_swap_item_max
else
$game_party.off_members.size
end
end
alias battle_swap_draw_item draw_item
def draw_item(index)
if @party
battle_swap_draw_item(index)
else
actor = $game_party.off_members[index]
draw_basic_area(basic_area_rect(index), actor)
draw_gauge_area(gauge_area_rect(index), actor)
end
end
def off_party
@party=false
end
def on_party
@party=true
end
ende questo è lo script per lo scambio... considerando che questi sono gli unici cambiamenti ... come ricavo lo script che mi permette automaticamente quando un pg muore idi scambiarlo con uno dei 2 in riserva?