forum rpg maker kingdom
Administrateurs : dante, Ryu
 
 forum rpg maker kingdom  marche central  script 

 plus que 4 héros dans l'équipe

Nouveau sujet   Répondre
 
Bas de pagePages : 1  
Ryu
administrateur
Ryu
264 messages postés
   Posté le 07-01-2006 à 14:12:54   Voir le profil de Ryu (Offline)   Répondre à ce message   Envoyer un message privé à Ryu   

permet d'avoir plus de 4 personnages.

instalation : ouvrez l'éditeur de script (F11) et créé un nouveau script au dessu de main, nommé-le "Menu_order" (par exemple) et colé ceci dedans :

#===============================================================================
# Créer par by Vash-X le 28 avril 2005.
# Modifications par RPG advocates.
# Traduction, adaptation et ajouts de commentaires par DarkCrusaderAngel.
#===============================================================================
# NOTE IMPORTANTE : Toute modification apporté au menu devront être aporté sur
# ce scrïpt ci, car,il infulera définitivement sur le menu.
#===============================================================================
class Game_Party
#--------------------------------------------------------------------------
def add_actor(actor_id)
actor = $game_actors[actor_id]
# La fonction pour avoir plusieurs perso dans l'équipe (Ici 8).
# Changer le chiffre pour avoir plusieurs personnage.
if @actors.size < 8 and not @actors.include?(actor)
@actors.push(actor)
$game_player.refresh
end
end
end

class Scene_Battle
BATTLE_ACTOR_LIMIT = 4 # Le nombre de persos en combat.
# Changer le chiffre pour avoir plusieurs personnage.

alias stack_party_main main

def main
@map_party = []
if $game_party.actors.size > BATTLE_ACTOR_LIMIT && BATTLE_ACTOR_LIMIT > 0
for i in BATTLE_ACTOR_LIMIT ... $game_party.actors.size
@map_party.push( $game_party.actors[i].id )
end
for i in @map_party
$game_party.remove_actor(i)
end
end
stack_party_main
end

alias stack_party_battle_end battle_end

def battle_end(result)
ret = stack_party_battle_end(result)
for i in @map_party
$game_party.add_actor(i)
end
return ret
end
end

class Window_MenuStatus
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, $game_party.actors.size * 116 - 16)
self.contents.font.name = $defaultfonttype = "Tahoma" #Police du menu.
self.contents.font.size = $defaultfontsize = 22 #Taille de la police.
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
def top_row
return self.oy / 116
end
#--------------------------------------------------------------------------
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 116
end
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = self.width / @column_max - 32
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 116 - self.oy
self.cursor_rect.set(x, y, cursor_width, 96)
end
def page_row_max
return 4
end
end

class Scene_Menu # Les modifications qui influencerons sur le menu.
# --------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
@changer = 0
@where = 0
@checker = 0
end
# --------------------------------
def main
@spriteset = Spriteset_Map.new # Garder la map tout en ouvrant le menu.
s1 = $data_system.words.item # Fonction "Objets"
s2 = $data_system.words.skill# Fonction "Capacité"
s3 = $data_system.words.equip# Fonction "Equiper"
s4 = "Status" # Fonction "Status"
s5 = "Ordre" # Fonction "Ordres" [La fonction ajouté]
s6 = "Sauvegarder" # Fonction "Sauvegarder"
s7 = "Quitter" # Fonction "Quitter"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.back_opacity= 160
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
if $game_party.actors.size == 1
@command_window.disable_item(6)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 256
@playtime_window.back_opacity= 160
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
@gold_window.back_opacity= 160
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
@status_window.back_opacity= 160
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@gold_window.dispose
@status_window.dispose
@spriteset.dispose
end
# --------------------------------
def update
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
@spriteset.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
# --------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
if $game_party.actors.size == 1 and @command_window.index ==6
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
$scene = Scene_Item.new # Fonction qui permets d'accéder au menu "Objets".
when 1
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
@checker = 0
@command_window.active = false
@status_window.active = true
@status_window.index = 0

when 5
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)# Fonction qui perrmets de jouer le son d'accés au menu.
return
end
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
$scene = Scene_Save.new # Fonction qui permets d'accéder au menu "Sauvegarder".
when 6
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
$scene = Scene_End.new# Fonction qui permets d'accéder au menu "Quitter".
end
return
end
end
# --------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
$scene = Scene_Skill.new(@status_window.index)# Fonction qui permets d'accéder au menu "Competences".
when 2
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
$scene = Scene_Equip.new(@status_window.index)# Fonction qui permets d'accéder au menu "Equipement".
when 3
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
$scene = Scene_Status.new(@status_window.index)# Fonction qui permets d'accéder au menu "Status".
when 4
$game_system.se_play($data_system.decision_se)# Fonction qui perrmets de jouer le son d'accés au menu.
if @checker == 0
@changer = $game_party.actors[@status_window.index]
@where = @status_window.index
@checker = 1
else
$game_party.actors[@where] = $game_party.actors[@status_window.index]
$game_party.actors[@status_window.index] = @changer
@checker = 0
@status_window.refresh
end
end
return
end
end
end




pour changé le nombre maximum de perso en combat, c'est à la ligne 23 (changé le 4), attention, le 5ème se retrouve en dehors de l'écran. si quelqu'un sais comment résoudre le problème, ce serrais sympas qu'il nous dise comment^^

et pour changer le nombre de perso maximum (en comptans ceux qui se batte pas) c'est à la ligne 25, (changer le 8)


--------------------
Haut de pagePages : 1  
 
 forum rpg maker kingdom  marche central  script  plus que 4 héros dans l'équipeNouveau sujet   Répondre
 
Identification rapide :         
 
Divers
Imprimer ce sujet
Aller à :   
 
créer forum