Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : Actor_Enhanced v1.0 Menu



asdren
18.08.2008, 17:32
Ich werde heute mein erstes Script der Community vorstellen!
Es ist für den Rpg Maker VX!
Beschreibung:
Mit diesem Script bekommt dein Menu diesen Look!:
http://img397.imageshack.us/img397/7256/actorenhancedv10yp3.png
Authoren: Asdren und Sojabird
Credit: Ihr müsst die Azthoren in eure Credits eintragen um dieses Script nutzen zu können!
Installation: Fügt diese Script ind die Material Section der Script Database ein.
Kompatibilität: Rpg Maker VX
Für komerzielle Spiele bitte PM an mich senden!
Klickt auf den Spoiler um das Menu zu bekommen!

####################################################################
# Actor_Enhanced v1.0
#
# By: SojaBird and Asdren
# Discription: With this script, your menu gets a awsome new look!
#
####################################################################

#==============================================================================
# ** Actor_Window
#------------------------------------------------------------------------------
# This class creates a single-actor informationwindow in the menu.
#==============================================================================

class Actor_Window < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
# actor: actor number
#--------------------------------------------------------------------------
def initialize(actor, x, y)
super(x, y, 272, 120)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.clear
@offset = (@actor - 1) * 96
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2 - @offset, 90)
x = 104
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x + 16, y - @offset)
draw_actor_state(actor,x + 115, y - @offset)
draw_actor_hp(actor, x + 16, y + WLH * 1 - @offset)
draw_actor_mp(actor, x + 16, y + WLH * 2 - @offset)
end
end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
alias old_terminate terminate
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
@party_size = $game_party.members.size
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(384, 0)
@status_window = Window_MenuStatus.new(160, 0)
@actor1_window = Actor_Window.new(1,0,175)if @party_size >= 1
@actor2_window = Actor_Window.new(3,0,296) if @party_size >= 2
@actor3_window = Actor_Window.new(2,272,175) if @party_size >= 3
@actor4_window = Actor_Window.new(4,272,296) if @party_size >= 4
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
old_terminate
@actor1_window.dispose if @party_size >= 1
@actor2_window.dispose if @party_size >= 2
@actor3_window.dispose if @party_size >= 3
@actor4_window.dispose if @party_size >= 4
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@actor1_window.update if @party_size >= 1
@actor2_window.update if @party_size >= 2
@actor3_window.update if @party_size >= 3
@actor4_window.update if @party_size >= 4
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
@party_size = $game_party.members.size
super(x, y, 224, 24 * @party_size + 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
x = 8
y = actor.index * 23 + WLH / 15
draw_actor_name(actor, x, y)
draw_actor_level(actor,x + 123,y)
end
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # No cursor
self.cursor_rect.empty
elsif @index < @item_max # Normal
self.cursor_rect.set(0, @index * 24, contents.width, 24)
elsif @index >= 30 # Self
self.cursor_rect.set(0, (@index - 30) * 24, contents.width, 24)
else # All
self.cursor_rect.set(0, 0, contents.width, @item_max * 24)
end
end
end

SMWma
19.08.2008, 10:35
sieht fein aus.
Ich arbeite zwar nicht mit den VX(also bitte: nur 5 Tilesets) aber das sieht PERFEKT aus. Hat aber keine Zusatzfunktionen.
Leider.

alpha und beta
19.08.2008, 10:51
Ich arbeite jetzt seid 4-5 Monaten mit dem RPGVX und finde
dein Menü nicht schlecht,aber leider kann ich sowas überhaupt nicht
gebrauchen...aber dennoch...sehr schön gemacht!

asdren
20.08.2008, 19:39
Danke vielmals. Schön das es euch gefällt :)

Grimmjow
21.08.2008, 13:11
heyho,

ja ok ich finds zwar nicht überwältigend, aber ist ja
dein erstes script..

neben der Goldanzeige könntest du die actor namen entfernen
und besser die spielzeit anzeigen lassen.
fänd ich besser weil die namen ja schon vorhanden sind.

Expresseon
21.08.2008, 14:53
Sry, aber hast du nicht eigentlich nur x- und y-Koordinaten der Fenster verändert und dieses Mittelfenster eingebaut? Ist für einen Rubyanfänger sicher nicht schlecht, aber es gleich "enhanced" zu nennen, ist etwas übertrieben. Jedenfalls ist es schön gemacht, das wollte ich sagen.

asdren
23.08.2008, 10:34
@Expression
Ummm.. so einer hat die erste Version veröffentlicht mit mir zusammen (auf ner englischen seite) Und er hat den Thread zuerst gemacht und es halt so benannt...