Dołączył: 17 Kwi 2010 Posty: 44 Skąd: ja mogę wiedzieć
Wysłany: Wto 11 Maj, 2010 10:28
Większy Team [VX]
~`Większy Team~`
Opis : Można mieć 9 osób w grupie
Autor : by DerVVulfman (original by Fomar0153)
Screeny :
Spoiler:
Skrypt :
Spoiler:
Kod:
#===============================================================================
# ** Large Party System
#------------------------------------------------------------------------------
# by DerVVulfman (original by Fomar0153)
# version 1.0
# 03-01-2008
# RGSS2
#-------------------------------------------------------------------------------
# This system allows you to break the 4 team barrier setup by RPGMaker VX. By
# using this code, you can have 5, 6 or even 10 member parties.
#
# This page of the code can enhance your project to allow parties of over four
# members. The controls are very simple. To establish a default number of
# party members, edit the PARTY SIZE value in the configuration section below.
# If you wish to alter the party size limit while the game is running, call on
# the $game_party.party_size value from a map event and change it there. But,
# remember that you'll need to run '$game_party.refresh' for the change to take
# effect.
#------------------------------------------------------------------------------
#
# EDITS AND MODIFICATIONS:
#
# This system Aliases the following methods:
# * initialize (Game_Party)
# * refresh (Window_MenuStatus)
# * update_info_viewport (Scene_Battle)
#
# This system redefines the following methods:
# * add_actor (Game_Party)
# * initialize (Window_MenuStatus)
# * update_cursor (Window_MenuStatus)
# * initialize (Window_BattleStatus)
# * create_info_viewport (Scene_Battle)
#
#===============================================================================
PARTY_SIZE = 6
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :party_size # Current size of the party
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias fomar_init initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
fomar_init
@party_size = PARTY_SIZE
end
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def add_actor(actor_id)
if @actors.size < $game_party.party_size and not @actors.include?(actor_id)
@actors.push(actor_id)
$game_player.refresh
end
end
#--------------------------------------------------------------------------
# * Adjust the maximum party value (permits addition & keeps within range)
#--------------------------------------------------------------------------
def party_size=(party_size)
# Prevent Nil values
@party_size = 4 if party_size == nil
# Set party size
@party_size = party_size
# Reset to default if an incorrect value
@party_size = 4 if party_size < 1
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias large_refresh refresh
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
unless $game_party.members.size > 4
super(x, y, 384, 416)
else
super(x, y, 384, 138 * $game_party.members.size)
end
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
large_refresh
self.height = 416
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0
self.cursor_rect.empty
return
end
# Get top row
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
# Reset Top Row if at bottom of list
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
# Obtain cursor width
cursor_width = self.width / @column_max
x = @index % @column_max * cursor_width
y = @index / @column_max * 96 - self.oy
# Draw the cursor
self.cursor_rect.set(x, y, cursor_width, 96)
end
#--------------------------------------------------------------------------
# * Get Top Row
#--------------------------------------------------------------------------
def top_row
return self.oy / 96
end
#--------------------------------------------------------------------------
# * Set Top Row
# row : row shown on top
#--------------------------------------------------------------------------
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 96
end
#--------------------------------------------------------------------------
# * Get Number of Rows Displayable on 1 Page
#--------------------------------------------------------------------------
def page_row_max
return 4
end
end
#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
# This window displays the status of all party members on the battle screen.
#==============================================================================
class Window_BattleStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
unless $game_party.members.size > 4
super(0, 0, 416, 128)
else
super(0, 0, 416, 32 * $game_party.members.size)
end
refresh
self.active = false
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias fomar_update update_info_viewport
#--------------------------------------------------------------------------
# * Create Information Display Viewport
#--------------------------------------------------------------------------
def create_info_viewport
# Change viewport to accommodate party size
unless $game_party.members.size > 4
@info_viewport = Viewport.new(0, 288, 544, 128)
else
@info_viewport = Viewport.new(0, 416 - (32 * $game_party.members.size),
544, (32 * $game_party.members.size))
end
@info_viewport.z = 100
@status_window = Window_BattleStatus.new
@party_command_window = Window_PartyCommand.new
@actor_command_window = Window_ActorCommand.new
@status_window.viewport = @info_viewport
@party_command_window.viewport = @info_viewport
@actor_command_window.viewport = @info_viewport
@status_window.x = 128
@actor_command_window.x = 544
@info_viewport.visible = false
end
#--------------------------------------------------------------------------
# * Update Information Display Viewport
#--------------------------------------------------------------------------
def update_info_viewport
# Obtain Battlestatus Height
oldheight = @status_window.height.to_i / 32
# Reset Battlestatus Height if party size increases
if $game_party.members.size > oldheight
dispose_info_viewport
create_info_viewport
end
# Perform the original call
fomar_update
end
end
Moim zdaniem zbyt rozciąga okno walki :/
Ale jeśli komuś to nie wadzi, a potrzebuje dużej drużyny, to bardzo dobry skrypt.
Mnie się co prawda nie przyda, bo w moich grach zawsze jest jeden bohater, łatwiej wtedy prowadzić sensowną fabułę...
________________________
"Na trolla pewne są tylko dwie pewne metody, jedna samopowtarzalna i druga, wymagająca przeładowania ręcznego."
Czy da się dodać 2 takich samych bohaterów ? Bo chcę zrobić takie coś że można rekrutować np. orków ale mogę dodać 1 orka tz. mogę dodać więcej ale ich nie będzie. Da się jakoś zamienić ten skrypt ?
Czy da się dodać 2 takich samych bohaterów ? Bo chcę zrobić takie coś że można rekrutować np. orków ale mogę dodać 1 orka tz. mogę dodać więcej ale ich nie będzie. Da się jakoś zamienić ten skrypt ?
Kto ci broni wziąsc kopiuj na orka i z kopiowac na dół.
Wtedy będzie dwóch bohaterów takich samych - twoje orki.
Pomógł: 33 razy Dołączył: 20 Lip 2010 Posty: 278 Skąd: w nim ta moc ?
Wysłany: Nie 19 Lut, 2012 11:59
Ezio.... jemu chyba chodzi o coś innego przecież dawanie 2 takich bohaterów było by bez sensu. Poza tym naucz się pisać bo po przeczytaniu nic nie zrozumiałem... Nie dodaje się posta po postem. Kornel5 ~ raczej się nie da, może jest jakiś skrypt.
________________________ User bez ostrzeżenia to jak żołnierz bez karabinu ~ Piesze tak ten kto dostał ostrzeżenie
Nie liczy się ilość postów tylko ich jakość ~ Pisze tak ten kto ma 10, 20 %
Ezio.... jemu chyba chodzi o coś innego przecież dawanie 2 takich bohaterów było by bez sensu. Poza tym naucz się pisać bo po przeczytaniu nic nie zrozumiałem... Nie dodaje się posta po postem. Kornel5 ~ raczej się nie da, może jest jakiś skrypt.
Pisałem bardzo nie wyspany. A jak on chce kilka orków , to ten sposób jest dobry.
________________________ " Wtedy Geralt z Rivii wyciągnął swój wiedźmiński miecz srebrny i zastraszył nim strzygę. "
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum