Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : [XP] Standardscripte die man haben sollte!



Lil_Lucy
10.01.2006, 19:43
Wei nicht ob's richtig ist oder ich das berhaupt darf, aber da es auf unserer Seite ja keine echte Referenzliste fr Ruby oder den RMXP allgemein gibt hab' ich mir berlegt das ich wenigstens mal die Standardscripte (Advanced Messagescript und Vollbildmodus) posten sollte - Sachen die man halt standardmig braucht, egal was man fr ein Spiel macht (naja, fast egal zummindest). Ich habe die Sachen einfach aus meinen Bestnden kopiert, wei auch nicht genau ob das AMS noch aktuell ist. Sollte es illegal sein weil die Sachen nicht von mir sind dann soll ein Mod eures Vertrauens den Thread wieder lschen. Andernfalls wre es nicht verkert es zu pinnen, denn ich wurde schon fter nach dem AMS gefragt.


EDIT: Ups, da sind offenbar einige Zeichenketten zu Smilies mutiert. Ich guck besser mal ob ich die Code-Klammern hinkriege...


naja, ich poste erstmal:

Advanced Message Script


#===================================================
# ■ AMS - Advanced Message Script - R4 [Update #2]
#===================================================
# For more infos and update, visit:
# www.dubealex.com (Creation Asylum)
#
# Edited, Fixed and Enhanced by: Dubealex
# Original Script Core by: XRXS Scripter (Jap Dudes)
# HTML Hexadecimal color feature from: Phylomorphis
#
# Special Thanks:
# Rabu: For enabling the Show Face feature in an encrypted project
#
# To found all my new features, search the following: #NEW
# To configure the button to skip the dialog, search: #SKIP_TEXT_CODE
#
# May 18, 2005
#===================================================

LETTER_BY_LETTER_MODE = true #Set the letter by letter mode ON/OFF

#===================================================
# ▼ CLASS AMS Begins
#===================================================
class AMS

attr_accessor :name_box_x_offset
attr_accessor :name_box_y_offset
attr_accessor :font_type
attr_accessor :name_font_type
attr_accessor :font_size
attr_accessor :name_font_size
attr_accessor :message_box_opacity
attr_accessor :name_box_skin
attr_accessor :name_box_text_color
attr_accessor :message_box_text_color
attr_accessor :message_box_skin
attr_accessor :name_box_width
attr_accessor :name_box_height
attr_accessor :message_width
attr_accessor :message_height
attr_accessor :message_x
attr_accessor :message_y_bottom
attr_accessor :message_y_middle
attr_accessor :message_y_top
attr_accessor :event_message_x_ofset
attr_accessor :event_message_y_ofset

def initialize

@name_box_x_offset = 0 #Choose the X axis offset of the name bos. default= 0
@name_box_y_offset = -10 #Choose the Y axis offset of the name bos. default= -10
@name_box_width = 8 #Choose the width of the Name Box. default= 8
@name_box_height = 26 #Choose the height of the Name Box. default= 26

@font_type = "Tahoma" #Choose the Font Name (Case Sensitive) for message box
@name_font_type = "Tahoma" #Choose the Font Name (Case Sensitive) for Name Box
@font_size = 22 #Choose the default Font Size for message box text
@name_font_size = 22 #Choose the deafault Font Size for Name Box text
@name_box_text_color=0 #Choose the Text Color of the Name Box
@message_box_text_color=0 #Choose the Text Color of the Message Box

@message_box_opacity = 160 #Choose the opacity of the message window. Default=160
@message_box_skin = "001-Blue01" #Choose the WindowSkin for the Message Box
@name_box_skin = "001-Blue01" #Choose the WindowSkin for the Name Box

@message_width = 480 #Choose the width size of the message box. Default=480
@message_height = 160 #Choose the height size of the message box. Default=160
@message_x = 80 #Choose the X position of the message box. Default=80
@message_y_bottom = 304 #Choose the Y bottom position of the message box. Default=304
@message_y_middle = 160 #Choose the Y middle position of the message box. Default=160
@message_y_top = 16 #Choose the Y top position of the message box. Default=16

@event_message_x_ofset = 0 #Choose the X position offset of the event message. Default=0
@event_message_y_ofset = 48 #Choose the Y position offset of the event message. Default=48

end
end
#===================================================
# ▲ CLASS AMS Ends
#===================================================


#===================================================
# ▼ Class Window_Message Begins
#===================================================
class Window_Message < Window_Selectable

alias xrxs9_initialize initialize

def initialize

@alex_skip = false

xrxs9_initialize

if $soundname_on_speak == nil then
$soundname_on_speak = ""
end

$gaiji_file = "./Graphics/Gaiji/sample.png"

if FileTest.exist?($gaiji_file)
@gaiji_cache = Bitmap.new($gaiji_file)
else
@gaigi_cache = nil
end
@opacity_text_buf = Bitmap.new(32, 32)
end


#--------------------------------------------------------------------------

alias xrxs9_terminate_message terminate_message

def terminate_message

if @name_window_frame != nil
@name_window_frame.dispose
@name_window_frame = nil
end

if @name_window_text != nil
@name_window_text.dispose
@name_window_text = nil
end
xrxs9_terminate_message
end

#--------------------------------------------------------------------------

def refresh

self.contents.clear
self.contents.font.color = text_color($ams.message_box_text_color)
self.contents.font.name = $ams.font_type
self.contents.font.size = $ams.font_size
self.windowskin = RPG::Cache.windowskin($ams.message_box_skin)
@x = @y = @max_x = @max_y = @indent = @lines = 0
@face_indent = 0
@opacity = 255
@cursor_width = 0
@write_speed = 0
@write_wait = 0
@mid_stop = false
@face_file = nil
@popchar = -2

if $game_temp.choice_start == 0
@x = 8
end

if $game_temp.message_text != nil
@now_text = $game_temp.message_text
if (/\A\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
@face_file = $1 + ".png"
@x = @face_indent = 128
if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
end
@now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
end

begin
last_text = @now_text.clone
@now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
end until @now_text == last_text
@now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end

#NEW
#Dubealex's Stop Skip Text ON-OFF
@now_text.gsub!(/\\[%]/) { "\100" }
#End new command

#NEW
#Dubealex's Show Monster Name Feature
@now_text.gsub!(/\\[Mm]\[([0-9]+)\]/) do
$data_enemies[$1.to_i] != nil ? $data_enemies[$1.to_i].name : ""
end
#End new command

#NEW
#Dubealex's Show Item Price Feature
@now_text.gsub!(/\\[Pp]rice\[([0-9]+)\]/) do
$data_items[$1.to_i] != nil ? $data_items[$1.to_i].price : ""
end
#End new command

#NEW
#Dubealex's Show Hero Class Name Feature
@now_text.gsub!(/\\[Cc]lass\[([0-9]+)\]/) do
$data_classes[$data_actors[$1.to_i].class_id] != nil ? $data_classes[$data_actors[$1.to_i].class_id].name : ""
end
#End new command

#NEW
#Dubealex's Show Current Map Name Feature
@now_text.gsub!(/\\[Mm]ap/) do
$game_map.name != nil ? $game_map.name : ""
end
#End new command

#NEW
#Dubealex's Choose Name Box Text Color
@now_text.gsub!(/\\[Zz]\[([0-9]+)\]/) do
$ams.name_box_text_color=$1.to_i
@now_text.sub!(/\\[Zz]\[([0-9]+)\]/) { "" }
end
#End new command

name_window_set = false
if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
name_window_set = true
name_text = $1
@now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
end

if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
@popchar = $1.to_i
if @popchar == -1
@x = @indent = 48
@y = 4
end
@now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
end

@max_choice_x = 0
if @popchar >= 0
@text_save = @now_text.clone
@max_x = 0
@max_y = 4
for i in 0..3
line = @now_text.split(/\n/)[3-i]
@max_y -= 1 if line == nil and @max_y <= 4-i
next if line == nil
line.gsub!(/\\\w\[(\w+)\]/) { "" }
cx = contents.text_size(line).width
@max_x = cx if cx > @max_x
if i >= $game_temp.choice_start
@max_choice_x = cx if cx > @max_choice_x
end
end
self.width = @max_x + 32 + @face_indent
self.height = (@max_y - 1) * 32 + 64
@max_choice_x -= 68
@max_choice_x -= @face_indent*216/128
else
@max_x = self.width - 32 - @face_indent
for i in 0..3
line = @now_text.split(/\n/)[i]
next if line == nil
line.gsub!(/\\\w\[(\w+)\]/) { "" }
cx = contents.text_size(line).width
if i >= $game_temp.choice_start
@max_choice_x = cx if cx > @max_choice_x
end
end
@max_choice_x += 8
end
@cursor_width = 0
@now_text.gsub!(/\\\\/) { "\000" }
@now_text.gsub!(/\\[Cc]\[([0123456789ABCDEF#]+)\]/) { "\001[#{$1}]" }
@now_text.gsub!(/\\[Gg]/) { "\002" }
@now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
@now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }

#NEW
#Dubealex's Permanent Color Change
@now_text.gsub!(/\\[Cc]olor\[([0-9]+)\]/) do
$ams.message_box_text_color= $1.to_i
@now_text.sub!(/\\[Cc]\[([0-9]+)\]/) { "" }
end
#End of new command

#NEW
#Dubealex's Font Change Feature
@now_text.gsub(/\\[Tt]\[(.*?)\]/) do
buftxt = $1.to_s
$ams.font_type = buftxt
@now_text.sub!(/\\[Tt]\[(.*?)\]/) { "" }
end
#End of new command

@now_text.gsub!(/\\[.]/) { "\005" }
@now_text.gsub!(/\\[|]/) { "\006" }
@now_text.gsub!(/\\[>]/) { "\016" }
@now_text.gsub!(/\\[<]/) { "\017" }
@now_text.gsub!(/\\[!]/) { "\020" }
@now_text.gsub!(/\\[~]/) { "\021" }
@now_text.gsub!(/\\[Ee]\[([0-9]+)\]/) { "\022[#{$1}]" }
@now_text.gsub!(/\\[Ii]/) { "\023" }
@now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
@now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
@now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
@now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "\027[#{$1}]" }

reset_window

if name_window_set
color=$ams.name_box_text_color
off_x = $ams.name_box_x_offset
off_y = $ams.name_box_y_offset
space = 2
x = self.x + off_x - space / 2
y = self.y + off_y - space / 2
w = self.contents.text_size(name_text).width + $ams.name_box_width + space
h = $ams.name_box_height + space
@name_window_frame = Window_Frame.new(x, y, w, h)
@name_window_frame.z = self.z + 1
x = self.x + off_x + 4
y = self.y + off_y
@name_window_text = Air_Text.new(x, y, name_text, color)
@name_window_text.z = self.z + 2
end
end

reset_window

if $game_temp.choice_max > 0
@item_max = $game_temp.choice_max
self.active = true
self.index = 0
end

if $game_temp.num_input_variable_id > 0
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
@input_number_window.number = number
@input_number_window.x = self.x + 8
@input_number_window.y = self.y + $game_temp.num_input_start * 32
end
end

#--------------------------------------------------------------------------

def update

super

if @fade_in
self.contents_opacity += 24
if @input_number_window != nil
@input_number_window.contents_opacity += 24
end
if self.contents_opacity == 255
@fade_in = false
end
return
end
@now_text = nil if @now_text == ""

if @now_text != nil and @mid_stop == false
if @write_wait > 0
@write_wait -= 1
return
end
text_not_skip = LETTER_BY_LETTER_MODE
while true
@max_x = @x if @max_x < @x
@max_y = @y if @max_y < @y
if (c = @now_text.slice!(/./m)) != nil
if c == "\000"
c = "\\"
end

if c == "\001"
@now_text.sub!(/\[([0123456789ABCDEF#]+)\]/, "")
temp_color = $1
color = temp_color.to_i
leading_x = temp_color.to_s.slice!(/./m)
if leading_x == "#"
self.contents.font.color = hex_color(temp_color)
next
end
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
next
end

if c == "\002"
if @gold_window == nil and @popchar <= 0
@gold_window = Window_Gold.new
@gold_window.x = 560 - @gold_window.width
if $game_temp.in_battle
@gold_window.y = 192
else
@gold_window.y = self.y >= 128 ? 32 : 384
end
@gold_window.opacity = self.opacity
@gold_window.back_opacity = self.back_opacity
end
c = ""
end

if c == "\003"
@now_text.sub!(/\[([0-9]+)\]/, "")
speed = $1.to_i
if speed >= 0 and speed <= 19
@write_speed = speed
end
c = ""
end

if c == "\004"
@now_text.sub!(/\[(.*?)\]/, "")
buftxt = $1.dup.to_s
if buftxt.match(/\//) == nil and buftxt != "" then
$soundname_on_speak = "Audio/SE/" + buftxt
else
$soundname_on_speak = buftxt.dup
end
c = ""
elsif c == "\004"
c = ""
end

if c == "\005"
@write_wait += 5
c = ""
end

if c == "\006"
@write_wait += 20
c = ""
end

if c == "\016"
text_not_skip = false
c = ""
end

if c == "\017"
text_not_skip = true
c = ""
end

if c == "\020"
@mid_stop = true
c = ""
end

if c == "\021"
terminate_message
return
end

if c == "\023"
@indent = @x
c = ""
end

if c == "\024"
@now_text.sub!(/\[([0-9]+)\]/, "")
@opacity = $1.to_i
color = self.contents.font.color
self.contents.font.name = $ams.font_type
self.contents.font.size = $ams.font_size
self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
c = ""
end

if c == "\025"
@now_text.sub!(/\[([0-9]+)\]/, "")
self.contents.font.size = [[$1.to_i, 6].max, 32].min
c = ""
end

if c == "\026"
@now_text.sub!(/\[([0-9]+)\]/, "")
@x += $1.to_i
c = ""
end

if c == "\027"
@now_text.sub!(/\[(.*?)\]/, "")
@x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
if $soundname_on_speak != ""
Audio.se_play($soundname_on_speak)
end
c = ""
end

if c == "\030"
@now_text.sub!(/\[(.*?)\]/, "")
self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
if $soundname_on_speak != ""
Audio.se_play($soundname_on_speak)
end
@x += 24
c = ""
end

if c == "\n"
@lines += 1
@y += 1
@x = 0 + @indent + @face_indent
if @lines >= $game_temp.choice_start
@x = 8 + @indent + @face_indent
@cursor_width = @max_choice_x
end
c = ""
end

if c == "\022"
@now_text.sub!(/\[([0-9]+)\]/, "")
@x += gaiji_draw(4 + @x, @y * line_height + (line_height - self.contents.font.size), $1.to_i)
c = ""
end

#NEW
#Dubealex's Text Skip On/OFF Command
if c == "\100"
if @alex_skip==false
@alex_skip=true
else
@alex_skip=false
end
c = ""
end
#end of new command

if c != ""
self.contents.draw_text(0+@x, 32 * @y, 40, 32, c)
@x += self.contents.text_size(c).width
if $soundname_on_speak != "" then
Audio.se_play($soundname_on_speak)
end
end

#SKIP_TEXT_CODE

# B = Escape, 0 (On The NumPad), X
# C = Enter, Space Bar and C
# A = Shift, Z

if Input.press?(Input::C) # <-- Change the value on that line
if @alex_skip==false
text_not_skip = false
end
end
else
text_not_skip = true
break
end

if text_not_skip
break
end
end
@write_wait += @write_speed
return
end

if @input_number_window != nil
@input_number_window.update
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] =
@input_number_window.number
$game_map.need_refresh = true
@input_number_window.dispose
@input_number_window = nil
terminate_message
end
return
end

if @contents_showing
if $game_temp.choice_max == 0
self.pause = true
end

if Input.trigger?(Input::B)
if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
terminate_message
end
end

if Input.trigger?(Input::C)
if $game_temp.choice_max > 0
$game_system.se_play($data_system.decision_se)
$game_temp.choice_proc.call(self.index)
end
if @mid_stop
@mid_stop = false
return
else
terminate_message
end
end
return
end

if @fade_out == false and $game_temp.message_text != nil
@contents_showing = true
$game_temp.message_window_showing = true
refresh
Graphics.frame_reset
self.visible = true
self.contents_opacity = 0
if @input_number_window != nil
@input_number_window.contents_opacity = 0
end
@fade_in = true
return
end

if self.visible
@fade_out = true
self.opacity -= 48
if self.opacity == 0
self.visible = false
@fade_out = false
$game_temp.message_window_showing = false
end
return
end
end

#--------------------------------------------------------------------------

def get_character(parameter)

case parameter
when 0
return $game_player
else
events = $game_map.events
return events == nil ? nil : events[parameter]
end
end

#--------------------------------------------------------------------------

def reset_window

#MESSAGE_SIZE
#MESSAGE_POSITION

if @popchar >= 0
events = $game_map.events
if events != nil
character = get_character(@popchar)
x = [[character.screen_x - $ams.event_message_x_ofset - self.width / 2, 4].max, 636 - self.width].min
y = [[character.screen_y - $ams.event_message_y_ofset - self.height, 4].max, 476 - self.height].min
self.x = x
self.y = y
end
elsif @popchar == -1
self.x = -4
self.y = -4
self.width = 648
self.height = 488
else
if $game_temp.in_battle
self.y = 16
else
case $game_system.message_position
when 0
self.y = $ams.message_y_top
when 1
self.y = $ams.message_y_middle
when 2
self.y = $ams.message_y_bottom
end
self.x = $ams.message_x
if @face_file == nil
self.width = $ams.message_width
self.x = $ams.message_x
else
if self.width <= 600
self.width = 600
self.x -=60
end
end
self.height = $ams.message_height
end
end
self.contents = Bitmap.new(self.width - 32, self.height - 32)
self.contents.font.color = text_color($ams.message_box_text_color)
self.contents.font.name = $ams.font_type
self.contents.font.size = $ams.font_size
if @face_file != nil
self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
end
if @popchar == -1
self.opacity = 255
self.back_opacity = 0
elsif $game_system.message_frame == 0
self.opacity = 255
self.back_opacity = $ams.message_box_opacity
else
self.opacity = 0
self.back_opacity = $ams.message_box_opacity
end
end

#--------------------------------------------------------------------------

def gaiji_draw(x, y, num)

if @gaiji_cache == nil
return 0
else
if @gaiji_cache.width < num * 24
return 0
end

if self.contents.font.size >= 20 and self.contents.font.size <= 24
size = 24
else
size = self.contents.font.size * 100 * 24 / 2200
end

self.contents.stretch_blt(Rect.new(x, y, size, size), @gaiji_cache, Rect.new(num * 24, 0, 24, 24))

if $soundname_on_speak != "" then
Audio.se_play($soundname_on_speak)
end
return size
end
end

#--------------------------------------------------------------------------

def line_height
return 32

if self.contents.font.size >= 20 and self.contents.font.size <= 24
return 32
else
return self.contents.font.size * 15 / 10
end
end

#--------------------------------------------------------------------------

def ruby_draw_text(target, x, y, str,opacity)

sizeback = target.font.size
target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
rubysize = [rubysize, 6].max
opacity = [[opacity, 0].max, 255].min
split_s = str.split(/,/)
split_s[0] == nil ? split_s[0] = "" : nil
split_s[1] == nil ? split_s[1] = "" : nil

height = sizeback + rubysize
width = target.text_size(split_s[0]).width

target.font.size = rubysize
ruby_width = target.text_size(split_s[1]).width
target.font.size = sizeback

buf_width = [target.text_size(split_s[0]).width, ruby_width].max

width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0

if opacity == 255
target.font.size = rubysize
target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
target.font.size = sizeback
target.draw_text(x, y, width, target.font.size, split_s[0])
return width
else
if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
@opacity_text_buf.dispose
@opacity_text_buf = Bitmap.new(buf_width, height)
else
@opacity_text_buf.clear
end
@opacity_text_buf.font.size = rubysize
@opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
@opacity_text_buf.font.size = sizeback
@opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
if sub_x >= 0
target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
else
target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
end
return width
end
end

#--------------------------------------------------------------------------

def convart_value(option, index)
option == nil ? option = "" : nil
option.downcase!

case option
when "i"
unless $data_items[index].name == nil
r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
end
when "w"
unless $data_weapons[index].name == nil
r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
end
when "a"
unless $data_armors[index].name == nil
r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
end
when "s"
unless $data_skills[index].name == nil
r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
end
else
r = $game_variables[index]
end

r == nil ? r = "" : nil
return r
end

#--------------------------------------------------------------------------

def dispose
terminate_message

if @gaiji_cache != nil
unless @gaiji_cache.disposed?
@gaiji_cache.dispose
end
end

unless @opacity_text_buf.disposed?
@opacity_text_buf.dispose
end

$game_temp.message_window_showing = false
if @input_number_window != nil
@input_number_window.dispose
end
super
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index >= 0
n = $game_temp.choice_start + @index
self.cursor_rect.set(8 + @indent + @face_indent, n * 32, @cursor_width, 32)
else
self.cursor_rect.empty
end
end
end
#=========================================
# ▲ CLASS Window_Message Ends
#=========================================


#=========================================
# ▼ Class Window_Frame Begins
#=========================================
class Window_Frame < Window_Base

def initialize(x, y, width, height)
super(x, y, width, height)
self.windowskin = RPG::Cache.windowskin($ams.name_box_skin)
self.contents = nil
end

#--------------------------------------------------------------------------

def dispose
super
end
end
#=========================================
# ▲ CLASS Window_Frame Ends
#=========================================


#=========================================
# ▼ CLASS Game_Map Additional Code Begins
#=========================================
class Game_Map

#Dubealex's Addition (from XRXS) to show Map Name on screen
def name
$map_infos[@map_id]
end
end
#=========================================
# ▲ CLASS Game_Map Additional Code Ends
#=========================================


#=========================================
# ▼ CLASS Scene_Title Additional Code Begins
#=========================================
class Scene_Title

#Dubealex's Addition (from XRXS) to show Map Name on screen
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end

#Dubealex's addition to save data from the AMS in the save files
$ams = AMS.new

end
#=========================================
# ▲ CLASS Scene_Title Additional Code Ends
#=========================================


#=========================================
# ▼ CLASS Window_Base Additional Code Begins
#=========================================
class Window_Base < Window

#Dubealex Addition (from Phylomorphis) to use HTML Hex Code Colors
def hex_color(string)
red = 0
green = 0
blue = 0
if string.size != 6
print("Hex strings must be six characters long.")
print("White text will be used.")
return Color.new(255, 255, 255, 255)
end
for i in 1..6
s = string.slice!(/./m)
if s == "#"
print("Hex color string may not contain the \"#\" character.")
print("White text will be used.")
return Color.new(255, 255, 255, 255)
end
value = hex_convert(s)
if value == -1
print("Error converting hex value.")
print("White text will be used.")
return Color.new(255, 255, 255, 255)
end
case i
when 1
red += value * 16
when 2
red += value
when 3
green += value * 16
when 4
green += value
when 5
blue += value * 16
when 6
blue += value
end
end
return Color.new(red, green, blue, 255)
end

#--------------------------------------------------------------------------

def hex_convert(character)
case character
when "0"
return 0
when "1"
return 1
when "2"
return 2
when "3"
return 3
when "4"
return 4
when "5"
return 5
when "6"
return 6
when "7"
return 7
when "8"
return 8
when "9"
return 9
when "A"
return 10
when "B"
return 11
when "C"
return 12
when "D"
return 13
when "E"
return 14
when "F"
return 15
end
return -1
end
end
#=========================================
# ▲ CLASS Window_Base Additional Code Ends
#=========================================


#=========================================
# ▼ Class Air_Text Begins
#=========================================
class Air_Text < Window_Base

def initialize(x, y, designate_text, color=0)

super(x-16, y-16, 32 + designate_text.size * 12, 56)
self.opacity = 0
self.back_opacity = 0
self.contents = Bitmap.new(self.width - 32, self.height - 32)
w = self.contents.width
h = self.contents.height
self.contents.font.name = $ams.name_font_type
self.contents.font.size = $ams.name_font_size
self.contents.font.color = text_color(color)
self.contents.draw_text(0, 0, w, h, designate_text)
end

#--------------------------------------------------------------------------

def dispose
self.contents.clear
super
end
end
#==========================================
# ▲ CLASS Air_Text Ends
#==========================================


#===================================================
# ▼ CLASS Scene_Save Additional Code Begins
#===================================================
class Scene_Save < Scene_File

alias ams_original_write_save_data write_save_data

def write_save_data(file)
ams_original_write_save_data(file)
Marshal.dump($ams, file)
end

end
#===================================================
# ▲ CLASS Scene_Save Additional Code Ends
#===================================================


#===================================================
# ▼ CLASS Scene_Load Additional Code Begins
#===================================================
class Scene_Load < Scene_File

alias ams_original_read_save_data read_save_data

def read_save_data(file)
ams_original_read_save_data(file)
$ams = Marshal.load(file)
end

end
#===================================================
# ▲ CLASS Scene_Load Additional Code Ends
#===================================================


ReadMe fr das AMS

www.dubealex.com (Creation Asylum)
Instruction Manual:
Each of those "commands" are to be used in your message events.

Change the text color temporarly (Default):
\c[ColorID]
Insert the color ID of your choice. All colors are coded in Window_Base starting at line #39, 0 is white.

Change the text color temporarly (Hexadecimal):
\c[#000000]
Enter an Hexadecimal color code as in HTML in there. For example:

#000000 = black
#FFFFFF = white

Show the gold window:
\G
This will show a gold window in the top-right corner of the screen, with the amount of gold the player have in possesion.

Show the hero's name:

\n[HeroID]

Use the hero ID of the hero's name you want to display in the message box.

Show the monter's name:

\m[MonsterID]

Use the monster ID of the monster's name you want to display in the message box. This function was added by Dubealex.

Show an item's price:

\Price[ItemID]

Use the item ID of the item's price you want to display in the message box. This function was added by Dubealex.

Show the current map name:

\Map

This will show the name of the map you are currently on. This function was added by Dubealex.

Show a face graphic in your message box:

\f[FaceName]

FaceName must be the filename of a graphic file found in the directoyr Graphics\Pictures of your RPG Maker XP project. The file must be a PNG of 96X96 pixels. You do not need to write the file extention.

Show the class name of a character:

\Class[HeroID]

Use the hero ID of the hero's class name you want to display in the message box. This function was added by Dubealex.

Show variables, items, weapons, armor and skill names:

\v[xID]

You must replace the x by the first lettter of what you want to modify, it goes as follows:

Variable = Do not write anything, use the standard \v[VariableID]
Items = i + itemID --> \v[iID]
Armors = a + armorID --> \v[aID]
Weapons = w + weaponID --> \v[wID]
Skills = s + skillID --> \v[sID]

Show a name or other info in a name box:

\Name[text]

Use this to show a name box above the message box that will contains the text you specified. You can also use variable and other commands such as "Show hero name" in that name box. As the following example:

\Name[\v[12]] --> Will show the value of variable ID# 12 in the name box.
\Name[Dubealex] --> Will show "Dubealex" in the name box.
\Name[\n[1]] --> Will show the name of hero ID# 1 in the name box.

Modify the text opacity:

\o[Opacity]

Use this to modify the opacity of the text in the message box. Enter a number between 0 and 255, where 255 is fully opaque and 0 is fully transparent.

Modify the text speed:

\s[Speed]

Use this to modify the speed of the text in the message box. Enter a number between 1 and 19, where 19 is the slowest.

Modify the text size:

\h[Size]

Use this to modify the size of the text in the message box. Enter a number between 6 and 32, where 32 is the biggest.

Show the message box above player or events:

\p[Option]

Use this to set the window to appear whether above the player or any event present in your map. Use the following options:

\p[Event ID]
\P[0]
\p[-1]

Using "\p[Event ID]" will put the window on top of the specified event ID.
Using "\p[0]" will put the window on top of the player.
Using "\p[-1]" will make a window without background and without borders.

Add wait in message and other commands like that:

\| --> Wait for 1 second
\. --> Wait for .25 second
\~ --> Auto close window at last letter
\! --> Wait for key input from the player
\\ --> Will show the backslash \ character

Set the letter by letter ON/OFF temporarly:

\< --> Will set it ON
\> --> Will set it OFF

Change the font in a message box (permanent):

\t[FontName]

FontName must be a .TTF found in Windows\Fonts and must be case sensitive. The changes made to the font will be permanent. So remember to do another command to revert it to anything you want. This script now works with the parenthesis, new in R3... So no worry about that ! It's safe now. This feature was added by Dubealex.

Play an SE as the letter are shown (permanent):

\a[FileName]

File must be in directory Audio\SE
Remember to set that effect OFF when you dont need it anymore using \a[] Leaving the brackets empty, or else the SE will be heard on all window from this point on.

Display text as a superscript:

\[First]second

The "FIRST" will be at normal size, and "SECOND" will be a little bit higher on the line, as a superscript.

Allow / Disallow Text Skip button (permanent):

\%

Use this command to toggle the text skip button to whether enabled or disabled. It's useful if you want to control the flow of some stories and you don't want the player to be able to skip the text by himself. Remember that the changes are permanent, meaning that if you use it once to disable the text skip, it will stay like that. Remember to do it once again to revert the text skip to enabled for the rest of the game. Feature added by Dubealex.

Modify the text color of the name box (permanent):

\z[ColorID]

Use this as you use the normal color command \c[ColorID] - But this time it will set the color used in the name box; and the changes will be permanent. So remember to do it once again to change the color back. Feature added by Dubealex.

Change the color of the text in message box permanentatly:

\Color[ColorID]

Use this as you use the normal color command \c[ColorID] - But this time it will set the color used in the message box permanently; meaning you wont have to use a color command on each message event from now on. Remember to do another command like this to revert the color to something you want. Feature added by Dubealex.

Customize other aspects of the AMS:

In the first lines of the AMS, you can customize things.

Those lines help you configure the default you will use in the AMS; so you can now specify the font name and size for both message box and name box independatly, and set their windowskin; which will not affect any other windows as the menus.

You can also set the position and size of the name box, just play with the values and test it. The default are written in the comments aside each line so you cannot "mess" the script up.

I also created an object named $ams that hold all those values for you, and it saves them in your save files, and load them when you load a game. This means that if you changed the font in the middle of your game, save the game, and reload the game, the font will still be the one you specified in the middle of your game -- This would not have worked in any other message script.

You can also access those settings to read or write to them in your game using the ATTR_ACCESSOR I created.

Have fun, and report any bug in this topic. But take note that some bug may occur because of other script, and I may not be able to help if it's the case.


Fullscreen-Automatik



unless $keybd
$keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
$keybd.call 0xA4, 0, 0, 0
$keybd.call 13, 0, 0, 0
$keybd.call 13, 0, 2, 0
$keybd.call 0xA4, 0, 2, 0 end

Direkt in Main reinkopieren, vor "begin"!



Weitere Scripte gibt's im Creation Asylum unter: http://www.dubealex.com/creation_asylum/

oder RMXP.net

Sollte was fehlen oder nicht gehen bitte bescheid sagen!

MfG

Lil_Lucy

Nazira
10.01.2006, 19:47
omg wie wrs wennde die scripts verlinkst da sonst diese rthread noch mchtig gro wird :rolleyes

Hier noch n script den ich besonders bevorzuge:

Hinterherlaufen (http://scientia.rpgfantasy.de/wiki/index.php/Hinterherlaufen)

Nazira

haZZ
10.01.2006, 19:54
Saubere Arbeit Lil_Lucy! Respekt und ein dickes Lob an dich! Wir bestimmt vielen hilfreich sein!

StrongSoul
11.01.2006, 18:07
Habs zwar mittlerweile gefunden, aber trotzdem ein Lob an dich das du es doch noch gepostet hast;) denke mal das man den Thread hier noch erweitern knnte und vorallem Pinnen sollte

Macros
14.01.2006, 11:59
Ich mchte noch ein weiteres Script vorstellen, welches meiner Meinung nach in jedes RmXp Spiel hinein gehrt.
Es ist natrlich nicht von mir sondern von Near Fantastica aus dem Creation Asylum (http://www.dubealex.com/asylum/index.php?showforum=79)

Mit dem Anti Lag Script werden "Ruckler" vermieden, die durch Maps mit vielen Events entstehen.
Es funktioniert auch in Verbindung mit anderen Ruby-Scripts die sich auf Events beziehen.
So ruckelt eine groe Map mit ber 300 Event, die jeweils einen Echtzeit animierten Schatten haben, nicht.

Soviel ich weiss werden damit die Events, die nicht aktive sind und sich nicht im Sichtfeld des Spielers befinden angehalten.
Da bin ich mir jetzt aber nicht sicher und ich kann leider auch kein Ruby.

Das Script muss lediglich in ein Neues Script ber Main kopiert werden und arbeitet dann selbststndig.


#======================================
# ■ Anti Event Lag Script
#======================================
#  By: Near Fantastica
# Date: 12.06.05
# Version: 3
#======================================

#======================================
# ■ Game_Map
#======================================

class Game_Map
#--------------------------------------------------------------------------
def in_range?(object)
screne_x = $game_map.display_x
screne_x -= 256
screne_y = $game_map.display_y
screne_y -= 256
screne_width = $game_map.display_x
screne_width += 2816
screne_height = $game_map.display_y
screne_height += 2176
return false if object.real_x <= screne_x-32
return false if object.real_x >= screne_width+32
return false if object.real_y <= screne_y-32
return false if object.real_y >= screne_height+32
return true
end
#--------------------------------------------------------------------------
def update
if $game_map.need_refresh
refresh
end
if @scroll_rest > 0
distance = 2 ** @scroll_speed
case @scroll_direction
when 2
scroll_down(distance)
when 4
scroll_left(distance)
when 6
scroll_right(distance)
when 8
scroll_up(distance)
end
@scroll_rest -= distance
end
for event in @events.values
if in_range?(event) or event.trigger == 3 or event.trigger == 4
event.update
end
end
for common_event in @common_events.values
common_event.update
end
@fog_ox -= @fog_sx / 8.0
@fog_oy -= @fog_sy / 8.0
if @fog_tone_duration >= 1
d = @fog_tone_duration
target = @fog_tone_target
@fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
@fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
@fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
@fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
@fog_tone_duration -= 1
end
if @fog_opacity_duration >= 1
d = @fog_opacity_duration
@fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
@fog_opacity_duration -= 1
end
end
end

#======================================
# ■ Spriteset_Map
#======================================

class Spriteset_Map
#--------------------------------------------------------------------------
def in_range?(object)
screne_x = $game_map.display_x
screne_x -= 256
screne_y = $game_map.display_y
screne_y -= 256
screne_width = $game_map.display_x
screne_width += 2816
screne_height = $game_map.display_y
screne_height += 2176
return false if object.real_x <= screne_x
return false if object.real_x >= screne_width
return false if object.real_y <= screne_y
return false if object.real_y >= screne_height
return true
end
#--------------------------------------------------------------------------
def update
if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end
if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8
@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone
i=0
for sprite in @character_sprites
if sprite.character.is_a?(Game_Event)
if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4
sprite.update
i+=1
end
else
sprite.update
i+=1
end
end
#p i
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
for sprite in @picture_sprites
sprite.update
end
@timer_sprite.update
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
@viewport3.color = $game_screen.flash_color
@viewport1.update
@viewport3.update
end
end

Lil_Lucy
14.01.2006, 14:58
@Macros: Stimmt, von dem Script hab' ich schon gehrt! Ich habe es nie ausprobiert da ich bisher keine Verwendung dafr hatte. Allerdings hatte ich mal Gerchte gehrt die besagten das es in der englischen Verkaufsversion Probleme verursacht hat. Wenn du oder irgendwer anders mir noch schnell besttigen knnten das es ordnungsgem funktioniert wrde ich es mit in den ersten Post aufnehmen!

MagicMagor
14.01.2006, 18:23
Eine weitere Sache, die fr alle hoffentlich bald unentbehrlich wird ist das SDK (Standard Development Kit).

Das Problem ist, da viele Scripte untereinander inkompatibel sind, weil sie teilweise diesselben Teile der Standardskripte berschreiben. Zwei Skripte zum zusammen arbeiten umzuschreiben ist eine schwierige und mhselige Arbeit. Werden es deutlich mehr als zwei Skripte, steigt der Aufwand ins Extreme und nicht jeder ist so fit in Ruby, da er das berhaupt machen knnte.

Das SDK ist ein Versuch der RMXP.net Mitglieder, genau dieses Problem zu minimieren. Das SDK splittet dabei die Standardskripte in viele kleine Untermethoden, dadurch wird die Wahrscheinlichkeit, da zwei Skripte diesselbe Methode berschreiben minimiert.

Die Skripte mssen natrlich mit dem SDK kompatibel sein. Viele der groen Skripter untersttzen das SDK indem sie ihre neuen Skripte SDK-kompatibel rausbringen und auch alte Skripte werden wohl mit der Zeit entsprechend modifiziert.
Das ein Skript SDK-kompatibel ist, wird durch eine kleine Grafik im Anfangspost des entsprechenden Threads auf rmxp.net symbolisiert.

Ich hoffe, das immer mehr Leute das SDK in ihre Spiele einbauen und seine Verbreitung so frdern. Denn wenn immer mehr Skriptbenutzer das SDK verwenden mssen auch die Skriptschreiber zwangslufig SDK-kompatibel schreiben. Letztendlich spart es allen Beteiligten viel rger.

Link zum SDK-Thread (http://www.rmxp.org/forums/showthread.php?t=1802)

Edit: URL geupdated

Macros
14.01.2006, 20:37
@Lil_Lucy
Leider kann ich dir nicht beweisen, dass es keine Probleme gibt.
Ich habe es zwar in meinem Spiel, aber da ich erst vor kurzen auf den Xp umgestiegen binn, bin ich gerade noch am Scripten fr das Ks andere grundliegende Technik.
Hier (http://www.rmxp.net/forums/index.php?showtopic=8947&hl=rataime's_demo) allerdings findest du eine Demo wo gut gezeigt, dass es funktioniert.
ffne es im Maker und starte auf der Map Lag Test.
Dann kannst du ja mahl das Anti Lag Script lschen und du solltest einen erheblichen Unterschied sehen.

Lil_Lucy
15.01.2006, 14:58
Ich erreiche aus irgendeinem Grund RMXP.net seit einer ganzen Weile schon nicht mehr, auch eure Links gehen bei mir nicht. Dachte bisher die Seite wr das Problem, aber wenn's bei euch geht liegt das Problem wohl bei mir. Werd mal versuchen das zu lsen, dann schau ich mir das Script an!

EDIT: Kriegs einfach nicht hin... Cookies lschen hat nix gebracht und ich wei nicht worans noch liegen kann. Die Seite will einfach nicht geladen werden, kann mir jemand helfen?

EDITIDITIT: Wie ich sehe wurde ich gepinnt! YIPPIE, das hab' ich mir schon immer gewnscht!!! XD

RMXP.net erreiche ich aber immernoch nicht... Das war beim Creation Asylum auch mal ne Weile so, jetzt gehts wieder. Vielleicht gibt sich dann auch dashier irgendwann, aber vorher kann ich das mit dem SDK nicht nachschauen.

Lil_Lucy
17.01.2006, 17:18
O.K., hier mal was auf eigene Faust, das heist das hab ich mir selber zusammengepfuscht und zwar ohne viel ber Ruby zu wissen. Bei mir funktioniert es, aber wer's benutzen will tut das auf EIGENE GEFAHR!!!

Wenn jemand mit Ahnung das liest soll er mir bitte mitteilen was er denkt, ob es unvollstndig, fehlerhaft oder gar gefhrlich ist (glaub ich eigentlich nicht), dann lsche ich es sofort wieder!

Das ganze soll dem Zweck dienen die Dauer des 'Fade's beim "Playertransfer" (von einer Map zur anderen) zu steuern, und zwar in beliebigen Framezahlen. Das heist, wer will dass das berblenden zur nchsten Map schnell von statten geht whrend es an anderer Stelle mal dem Effekt halber lnger dauert kann den Wert einfach via Callscript neu setzen.

Um das umzusetzen ffnet man erstmal den Scripteditor des Makers und sucht sich "scene_map" raus. Dort scrollt man ganz runter bis zur Zeile 272! Der Code der dort steht mte so aussehen:


if $game_temp.transition_processing
# Clear transition processing flag
$game_temp.transition_processing = false
# Execute transition
Graphics.transition(20)


Die letzte Zeile,


Graphics.transition(20)

ist die auf die es ankommt. Die in () stehende 20 gibt die Framezahl an die der ganze Spa dauern soll. Wer den Wert nur einmal einstellen will kann das direkt tun, aber wer ihn desfteren neu einstellen mchte sollte diese Zahl gegen eine Variable ersetzen, z.B. so:


Graphics.transition($trans_wait)

Dadurch wird statt einer Zahl der in der Variable gespeicherte Wert als Zeitangabe verwendet.

Das kleine Problem ist das es diese Variable nicht gibt, man mu sie also zu Spielbegin erst erstellen. Alternativ knnte man auch eine der In-Game-Variablen ($game_variables[nummer der Variable]) verwenden wodurch man sie direkt via Clickscript modifizieren knnte, das hab ich aber nicht ausprobiert.

Um sie zu erstellen habe ich sie in "scene_title" in unter def "command_new_game" mit eingebaut. Direkt unter "$scene = scene_map.new" einfach "$trans_wait = 20" einfgen, bzw. den namen der Variable die ihr verwenden wollt und den von euch angestrebten Startwert. Das ganze bewirkt dann das eine Variable "$trans_wait" erstellt und auf den Wert 20 gesetzt wird. Bei jedem Playertransfer wird dann der in dieser variable gespeicherte Wert als Frameangabe fr die dauer des Fades (sofern dieser eingestellt ist) verwendet.

Allerdings wird diese Variable nur dann erstellt wenn man ein neues Spiel startet. Sollte man das Spiel beenden und einen Speicher laden wird das Spiel beim ersten Teleport abbrechen da es die angeforderte Variable nicht gibt!

Aus diesem Grund mu man dafr sorgen das die variable abgespeichert, und auch geladen wird! Hierzu ffnet man "scene_save" und scrollt ganz runter zu diesen ganzen "Marshal.dump (XX)"-Teilen. Fgt direkt unter dem letzten Marshal.dump einen weiteren ein, der eure trans_wait Variable speichert:



Marshal.dump($trans_wait, file)


Dadurch wird die Variable mit in die Savefile geschrieben. Um sie laden zu knnen mu der Maker aber auch wissen das es etwas zu laden gibt, daher mu diese Info auch noch in die "scene_load" aufgenommen werden. Dot also ebenfalls ganz runter scrollen und unterhalb des letzten "Marshal.load" einen weiteren nach dem gleichen Schema einfgen:



$trans_wait = Marshal.load(file)


Um die Transferdauer jetzt nach belieben einstellen zu knnen mu man nurnoch "$trans_wait" auf den gewnschten Wert setzen. Das geht mit dem Eventbefehl "Script", der letzte in der Befehlsliste, ganz unten rechts auf der letzten Seite. Hier gibt man einfach folgendes ein:



$trans_wait = XX


XX ist dann natrlich die Framezahl, lasst euch nicht einfallen hier Buchstaben einzusetzen, das wrde der Maker natrluch nicht verstehen!

Achso: das Ganze hat nur dann Auswirkungen wenn die "Fading"-Option bei "Transfer Player" auf "Yes" steht, sonst nicht!

So, wie gesagt, bei mir hat alles bisher problemfrei funktioniert aber das ndert nichts daran das all das komplett selbst zusammengepfuscht ist, ich bernehmen keinerlei Verantwortung fr Fehler und Probleme die dadurch entstehen. Eigentlich, nach allem was ich davon verstehe drfte es keine Probleme damit geben da nichts weiter getan wurde als einen festen Wert durch eine Variable zu erstetzen und diese zu definieren und abzuspeichern.

Wenn jemand einen Fehler findet, oder einen anderen grund warum ich den ganzen Quatsch lieber wieder lschen sollte, bitte posten!

MfG

Lil_Lucy

ani-kun
18.01.2006, 10:47
sieht ganz vernnftig aus, aber da gibts auch nicht viel, dass man falsch machen knnte^^
allerdings denke ich, es wre sinnvoller eine ingame-variable zu nehmen, da es das modifizieren von save/load ersparen wrde ...

Lil_Lucy
18.01.2006, 14:05
Sicher, das hab ich ja auch angedeutet, allerdings ist dashier nicht sooo viel aufwndiger und man spart sich die In-Game-Variable. Nicht dass es da einen Mangel gbe, aber ich hab's halt so gemacht...

ani-kun
18.01.2006, 14:18
joah, eh egal, mehraufwand ist minimal ~ aber per ingame-variable wrs vor allem fr nicht-ruby-fhige leute wesentlich bedienungsfreundlicher, weil sie dann nur ne einfache variable bedienen mssen und kein script ausfhren ...

Xered
26.03.2006, 10:58
Da die Links im RmXP FAQ Thread bie mir net klappen, knnte mir jemand ein Skript fr ein SK oder ein Men sagen.
Oder mir sagen wie man das Men umstylt.

Hot Blizzard
07.04.2006, 06:44
#================================================
# Aliases and redefines draw_text so that a sadow is drawn
# Made by: Ultimate Jesus
#================================================

class Bitmap

ShadowIndent = 2 # Size of the shadow (usually 1..3)
ShadowColour = Color.new(0, 0, 0, 200)# the colour of the shadow
# the 4th value is transparency (0-255)

unless @ja_ta_feito == 1 # Fix for F12 Rebot by P@nCHo
alias draw_text_plain draw_text
@ja_ta_feito = 1
end

def draw_text(arg1 = 0, arg2 = 0, arg3 = 0, arg4 = 0, arg5 = 0, arg6 = 0)
if arg1.is_a?(Rect)
x = arg1.x
y = arg1.y
width = arg1.width
height = arg1.height
string = arg2
align = arg3
else
x = arg1
y = arg2
width = arg3
height = arg4
string = arg5
align = arg6
end
colour = self.font.color.dup
self.font.color = ShadowColour
draw_text_plain(x + ShadowIndent, y + ShadowIndent, width, height, string, align)
self.font.color = colour
draw_text_plain(x, y, width, height, string, align)
end
end

Schatten Schrift.


Einfach das teil als neues Script einfgen ganz oben und fertig.

Lil_Lucy
08.04.2006, 21:14
hm... knntet ihr bitte wenn ihr hier Scripte postet noch etwas ausfhrlicher werden. Ein paar Angaben zur genauen Funktion (Schattenschrift alleine reicht mir z.B. nicht, um zu wissen/mir vorzustellen wie es letztlich bei mir aussieht) und der Quelle von der ihr's habt. Wenn bekannt whre es auch schn mit anzugeben welche Teile des Standardscriptes berschrieben werden um Kompatibilittsprobleme zu vermeiden.

Fab4
18.04.2006, 15:49
Hmm evt knnt ihr mir bei meinem Problem weiterhelfen. Wre zwar eigentlich kein Problem das ganze auch mit RPG-Maker Scrpits zu lsen wre aber schon schner, wenn es so gehen wrde wie ich mir das vorstelle und habe fr den maker eigentlich keine lust mich mit ruby zu beschftigen.

bevor ich nur laber folgende problematik besteht:
ich benutze ein 8 Frame Movement System. Dadurch sieht das Savemen sehr unschnaus, da die Figur im endeffekt zwei mal angezeigt wird, da der Maker das Charset noch immer in nur 4 und nicht in 8 teile unterteilt. was ich im endeffekt bruchte wre, dass das ganze so umgeschrieben wird, dass die Battle-Grafik eines Spielers im Savemen angezeigt wird anstatt des normalen Charsets.
wre nett wenn sich mal wer mit befassen knnte ;)


Fullscreen-Automatik



unless $keybd
$keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
$keybd.call 0xA4, 0, 0, 0
$keybd.call 13, 0, 0, 0
$keybd.call 13, 0, 2, 0
$keybd.call 0xA4, 0, 2, 0 end

Direkt in Main reinkopieren, vor "begin"!



klappt bei mir nicht, spiel strzt ab und smmtliche funktionen wie maustasten oder tastatureinstellungen sind auf den Kopf gestellt.

Lil_Lucy
18.04.2006, 16:02
Tut mir Leid, aber das gehrt echt nicht HIER her! Das ist ein Problem das dich und dein Spiel betrifft und kein Standardscript das man haben sollte.
Die Lsung des Problems knntest du von miraus hierher posten aber die Frage selbst stellst du besser in einem eignen Thread, anstatt denhier zuzumllen!

Ich denke das du auch nicht viel Glck httest hier Hilfe zu finden, da ein neuer Thread garantiert eher wahrgenommen wird als Posting in einem Bestehenden.

Pincky
20.04.2006, 17:05
Fullscreen-Automatik



unless $keybd
$keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
$keybd.call 0xA4, 0, 0, 0
$keybd.call 13, 0, 0, 0
$keybd.call 13, 0, 2, 0
$keybd.call 0xA4, 0, 2, 0 end

Direkt in Main reinkopieren, vor "begin"!





Das Skript hab ich grad verwendet und alle Funktionen meines Pcs sind ausgefallen! ich konnte garnichts mehr machen, noch nicht maln Programm ffnen oder schlieen, musste neu satrten und jetzt gehts GOTTSEIDANK wieder, aber knnte mir jemand den Fullscreen-Mode posten, der auch funktioniert und nicht meinen ganzen PC lahm legt!

Kelven
20.04.2006, 17:36
Dieser Thread ist kein Diskussionsthread, hier sollen nur die Scripte gepostet werden. Warum das Script bei dir nicht funktioniert kann ich nicht sagen, aber da es bei vielen anderen funktioniert, scheint wohl eher dein PC ein Problem zu haben.

Ascare
20.04.2006, 18:42
Vollbild / Fullscreen:
Ich habe noch zwei alternative Vollbild Scripte im Angebot:


$showm = Win32API.new 'user32',
'keybd_event', %w(l l l l), ''
$showm.call(18,0,0,0)
$showm.call(13,0,0,0)
$showm.call(13,0,2,0)
$showm.call(18,0,2,0)


oder



unless $keybd
$keybd = Win32API.new('user32.dll',
'keybd_event', ['i', 'i', 'l', 'l'],
'v')
$keybd.call(0x12, 0, 0, 0)
$keybd.call(0x0D, 0, 0, 0)
$keybd.call(0x0D, 0, 2, 0)
$keybd.call(0x12, 0, 2, 0)
end


Ebenfalls in Main und vor dem Befehl "begin" reinkopieren. Bei mir klappen brigens alle Vollbildscripte ohne Probleme.
Und noch ne Kleinigkeit...
Manueller Quit:

$scene = nil
Einfach unter Call Script aufrufen und das Spiel beendet sich.

Lil_Lucy
21.04.2006, 16:43
Das Skript hab ich grad verwendet und alle Funktionen meines Pcs sind ausgefallen! ich konnte garnichts mehr machen, noch nicht maln Programm ffnen oder schlieen, musste neu satrten und jetzt gehts GOTTSEIDANK wieder, aber knnte mir jemand den Fullscreen-Mode posten, der auch funktioniert und nicht meinen ganzen PC lahm legt!

Das Problem hatte schonmal jemand. Sowas passiert glaube ich dann wenn beim Kopieren des Scriptes die Zeilenumbrche verschoben werden und sich dadurch, oder durch andere Fehler, der Code ndert.

Bei den Meisten Scripten hat das nicht gar so krasse Auswirkungen, aber dashier ist etwas kritisch da es eine Tasteneingabe simuliert die auch im Windows noch gilt wenn sie nicht beendet wurde.

Achtet daher darauf das derartige Fehler beim Kopieren nicht passieren. Man sollte vor allem vermeiden Scripte im Editor zwichenzuspeichern, da der bei Platzmangel gern mal selbststndig Zeilenumbrche einfgt.

The Black Mole
29.06.2006, 07:21
Ich htte hier noch ein Script was ntzlich sein knnte ^^ Einige mchten ja gerne, dass der Titel-Screen bersprungen wird und direkt das Spiel startet, naja, hier das Script:

#===============================
# ■ Scene_Title modified by The Black Mole
#-----------------------------------------
#  Direkt ohne Titelbild das Spiel starten
#===============================

class Scene_Title
#-----------------------------
# Main Script starten
#-----------------------------
def main
# Systemdateien initialisieren
$data_actors = load_data("Data/Actors.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Spiel zum Start vorbereiten
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Party bestimmen
$game_party.setup_starting_members
# Startmap initialisieren
$game_map.setup($data_system.start_map_id)
# Player zur startposition teleportieren
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
# Map Update
$game_map.update
# Initialisierung der Map abschlieen
$scene = Scene_Map.new
end
end

ani-kun
02.07.2006, 10:38
da fehlen aber einige der datenbank-initialisierungen:



# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")


sonst kommt irgendwann das bse erwachen^^

chrisbyRRC
29.05.2007, 16:02
Hy hab das "Anti Lag Script" von Macros getestet weil ich es auch bentige!
Es funktioniert zwar aber hngt sich bei manchen Events die etwas weiter
vom Spieler entfernt sind auf.
Kann der Fehler behoben werden, wre echt ntzlich?
(Ich kann kein Ruby)

Macros
30.05.2007, 17:40
Hy hab das "Anti Lag Script" von Macros getestet weil ich es auch bentige!
Es funktioniert zwar aber hngt sich bei manchen Events die etwas weiter
vom Spieler entfernt sind auf.
Kann der Fehler behoben werden, wre echt ntzlich?
(Ich kann kein Ruby)
Zum einen Hast du jetzt wonglich eine veraltete Version.
Zum anderen gibt es inzwischen auch einige andere Anti Lag Scripts. falls es mit der neuen Version des von mir geposteten nicht funktioniert, wrde ich nach einem Script von einem anderen Scripter suchen.

Ansonsten msste ich wissen, um was fr ein Event es sich genau handelt. Also ob es ein paralleler Prozess ist, oder nicht, was drin steht etc.

Hier findest du die auch die anderen Anti Lag Scripte
http://www.rmxp.org/forums/

PS.:
Willkommen im Forum ;)

Stray
05.06.2007, 12:04
Hat jemand einen Skript mit dem es Mglich ist den Helden von hrerer Position zu sehen? also das er kleiner ist oder das man nher dran ist.
Ich hab schon berall geschaut aber nichts gefunden.:confused:

-KD-
05.06.2007, 13:41
Wenn du genauer erklrst was du willst, kann ich dir vielleicht sogar weiterhelfen oO

Stray
05.06.2007, 21:12
Der Held ist kleiner. Alles was sich abspielt sieht man aus HHERER ENTFERNUNG anders kann ich nicht erklren.

-KD-
05.06.2007, 21:58
Zoomen? Oder was meinst du?
Sowas ist im Prinzip nicht so einfach. Die meisten aufwendigen Grafikprozesse sind afair nicht in Ruby, sondern in C (oder einer anderen Sprache) geschrieben. So auch die Anzeige der Map. Sowas in Ruby zu schreiben wre wohl zu performancelastig. Andererseits ist eben das beim Mode07-Script der Fall. Und die Performance wird hier noch recht human beansprucht. Man knnte das Mode7 Script also verwenden und etwas umschreiben, um den Zoomgrad der Map zu verndern.

Wesentlich einfacher wre es aber, wenn du nur die Hero-Grafik verkleinerst. Dann wirkt das doch auch, als wre der Hero weiter entfernt.

Fr was willst du das eigentlich verwenden? Fr eine Weltkarte? Falls ja, dann wrde ich dir gleich das Mode07-Script (http://www.rpg-palace.com/scripts/mode07.php) empfehlen, das hierfr eigentlich ideal ist.

Expresseon
07.06.2007, 17:33
Das Zoomen in kleinen Szenen ist einfach:
Einen Screen machen und als Bild ins Projekt importieren. Das Bild kann man dann zoomen. Mode 07 ist eine gute Variante, dem Spiel durchgngig diesen Effekt zu geben, man muss es aber richtig anwenden, und soooo schn finde ich das nicht.

Stray
07.06.2007, 23:13
Nunja.....h....Das mit dem kleinen Helden ist einfach nicht so gut da man dann alles einzelln machen muss. Und AllzuVIEL versteh ich auch wieder nicht von Ruby...Hmmm.....

Stray
09.06.2007, 22:29
Ich bin's wiedr!
Hat jemand ein Script das man manuell als Bedingung fr Spielzeit
Also eben so. Wenn man Bedingung whlt kann man auch die Bedingung Script whlen. Also ein Mauelles Script das automatisch durch eine Bedingung in Gang gesetzt wird.

-KD-
10.06.2007, 00:30
(Graphics.frame_count / Graphics.frame_rate)
Damit erhlst du die Anzahl der Sekunden, die du bereits spielst.


(Graphics.frame_count / Graphics.frame_rate / 3600)
Damit erhlst du die Anzahl der Stunden, die du bereits spielst

Zum Abfragen verknpfst du diese Werte einfach mit einem Vergleichsoperator.
> Grer, >= grer gleich
< Kleiner, <= kleiner gleich
== ist gleich
und einer Zahl.

Beispiel:

(Graphics.frame_count / Graphics.frame_rate / 3600) > 5
Gibst du das im Script Feld des Conditional Branchs ein, so wird dieser ausgefhrt, wenn die Spielzeit ber 5 Stunden betrgt.

Auf diese Weise kann man auch leicht die reale Zeit abfragen. Das geht sogar noch einfacher. Hier wrde der Code zum Abfragen der Stunde

Time.now.hour
heien.

Stray
10.06.2007, 20:28
He danke!!! Ich hoffe aber auch das das anderen auch helfen wird!:)

Tyr
17.06.2007, 12:44
So Leute, einer muss es mal ansprechen:

Der Thread suckt! ^^''

Jetzt mal ehrlich, der ist angetackert als "Wichtig!", hat aber keinerlei interessante Inhalte. Warum? Weil er im Laufe der Zeit verkommen ist, da sich niemand mehr wirklich drum kmmert. Jetzt fungiert er als genau das, was er eigentlich nie sein wollte; eine Bettelquelle fr Scripte.

Nicht, dass man mich falsch versteht. Ich finde beides gut. Aber dann mssen diese Themen auch ernsthaft durchgesetzt werden.

Fangen wir mal mit diesem Thema an: Standardscripte die man haben sollte!
Man knnte sich ja fragen, ob man dieses Thema berhaupt braucht. Schlielich gibts ja RMXP.org und Creation Asylum. Aber das ist genau die Tatsache, warum ich diesen Thread fr wichtig erachte. Erstmal ist beides auf englisch, was natrlich kein Hindernis sein sollte, aber trotzdem lhmend sein kann, auerdem sind beide Seiten sehr langsam im Seitenaufbau, was ungemein frustrierend ist, wenn man sich dort lnger aufhlt.
Ich erzhle mal von meinen Erfahrungen:
Nach etwa einem Jahr wollte ich mich wieder an den RPGMakerXP setzen, mit einem Projekt weitermachen und schauen, ob es irgendwelche neuen interessanten Programmiererrungenschaften gibt.
Erst einmal ist es, wenn man mit den Entwicklungen der letzten Monate nicht vertraut ist unglaublich schwierig, bei der Flle an unterschiedlichen Kampfsystemen, Mens und Erweiterungen den berblick zu behalten. Es ist dann auch noch absolut zeitaufwendig, verschiedene auf den ersten Blick gleichwertige Scripte zu testen und zu vergleichen.
Ich versuchte mir die vergangene Woche mal einen berblick zu verschaffen und bin nun so klug als wie zuvor. Naja, vielleicht etwas klger ^^
Es wre wunderbar gewesen, htte dieser Thread als Erfahrungsaustausch fungieren knnen zwischen Leuten, die diese Entwicklung mitgemacht haben und Leuten die neu dazugekommen sind.

Meine Verbesserungsvorschlge wren:

-Die Scripte nicht posten sondern einen Link. Fast alle Scripts hier sind veraltet, das ist unschn. Und wer hier liest, der erkennt das hufig auch gar nicht.
Wer sich ein Script selber ausgedacht hat, kann dies natrlich so schreiben ^^
Zustzlich sollte jemand, der merkt, dass es eine neue Version oder bessere Alternative gibt, ein bisschen Verantwortungsbewusstsein entwickeln und das hier kundtun. Nur so knnen wir hoffen, dass wir aktuelle Informationen weitergeben knnen.

-Die Links zu den Scripten in den ersten Post stecken, damit man nicht den ganzen Thread durchblttern muss (gut, zwei Seiten geht noch, aber das kann auch auch schnell mal mehr werden) mit einer Kurzbeschreibung.
IMHO kann ruhig in diesem Thread auch diskutiert werden. Wie ich erwhnte, Erfahrungsaustausch ist wichtig. Wer eine bessere Alternative kennt, ruhig her damit.

-Vielleicht sollten die Scripte auch etwas in Kategorien gebracht werden? KS, Messages, Mens etc., dann knnte man sie auch gut miteinander vergleichen.

Natrlich knnte man sich die Mhe machen und selber nach passenden Sachen suchen, aber es wre doch sehr schn, wenn es auch eine deutsche Auflistung gbe, von Leuten die Ahnung haben.

Wieviele Leute knnen den Ruby? Ich kanns nicht und ich habe auch wirklich keine Zeit mich damit gro auseinanderzusetzen. Ich will doch blo ein RPG machen! ^^ Sicher geht es vielen Leuten so, und dann greift man auf nette Scripts zurck, weil der XP diese Mglichkeit bietet. Vielleicht wre es gut "Standard"-Scripts durch "Sehr gute" Scripts zu ersetzen und auch mal nette Mens und soetwas vorzustellen. Es gibt so viele Quellen und man allein kann so schlecht den berblick behalten.

Oben erwhnte ich mal das Fragen nach Scripts. Fnde ich auch nicht schlecht, einen Thread dafr, aber das knnte auch zu weit fhren. Das soll ja hier kein Script-Forum werden. Naja.

So, ich hoffe, dass ich mal ein paar kleine Anregungen geben konnte, wie man diesen verwahrlosten Thread neues Leben einhauchen knnte.
Motivation ist etwas wichtiges und meiner Erfahrung nach kann das suchen nach hbschen Scripts motvierend, aber auf dauer auch sehr unmotvierend sein, wenn man von der Masse erschlagen wird, die es gibt. Und da wre so ein Thread hier rettend.

Ranarion
17.06.2007, 17:32
-Die Scripte nicht posten sondern einen Link. Fast alle Scripts hier sind veraltet, das ist unschn. Und wer hier liest, der erkennt das hufig auch gar nicht.Bitte nicht. Links haben gerne mal die Angewohnheit zu toten Links zu werden und es macht keinen Spa sich durch 50 tote Links zu klicken, das habe ich bei XP-Scripten oft genug erlebt.

Tower
21.06.2007, 12:13
Auch wenn mein Vorredner anderer Meinung ist post ich hier trotzdem mal 3 Links. Sie fhren alle zu englischen Seiten also solltet ihr der englischen Sprache mchtig sein. In jedem Fall gibt es dort groe Mengen an sehr guten Scripts zu bestaunen (Auf RMXP.org ist allerdings eine Anmeldung erforderlich).



http://www.gamebaker.com/rmxp/scripts/
http://www.rmxp.org/forums/forumdisplay.php?f=5
http://rmrk.net/


MFG

Aldinsys
22.06.2007, 13:07
Wie wrs,indem wir einfach einen News Thread fr Skripte erffnen. Immer wenn ein User ein interessantes Script entdeckt, kann er ja eine News mit Link reinschreiben. Es ist immer wieder eine Schinderei ,sich auf allen Seiten stundenlang umschauen zu mssen.

Expresseon
24.06.2007, 19:23
Wie wrs,indem wir einfach einen News Thread fr Skripte erffnen. Immer wenn ein User ein interessantes Script entdeckt, kann er ja eine News mit Link reinschreiben. Es ist immer wieder eine Schinderei ,sich auf allen Seiten stundenlang umschauen zu mssen.

In dem Fall empfehle ich aber nur wirklich interessante Skripte, also nichts, was es bei rmxp.org auf den ersten 3 Seiten zu finden gibt, da das sonst eh schon viele Leute haben...

Macros
24.06.2007, 20:39
Wie wrs,indem wir einfach einen News Thread fr Skripte erffnen. Immer wenn ein User ein interessantes Script entdeckt, kann er ja eine News mit Link reinschreiben. Es ist immer wieder eine Schinderei ,sich auf allen Seiten stundenlang umschauen zu mssen.

Man knnte einen extra Vorstellthread erstellen, wo dann wirklich nur Scripte vorgestellt werden.
Alle anderen Posts sollten in einen seperaten Diskussionsthread verschoben werden (bzw. gleich in diesen gepostet werden).

Dass wre zwar sehr bersichtlich, aber wrde dann darauf hinausaufen, dass es in diesem Unterforum nur diese zwei Threads gibt.
Wre es dann nicht gleich besser ein Skrit-biete-Forum und ein allgemeines RGSS-Fragen-Forum zu machen?
Aber bitte kein Script-suche/biete-Forum, denn dann gehen die Scripte wieder zwischen den ganzen Anfragen unter.

MagicMagor
25.06.2007, 09:19
Ich denke, da grte Problem dieses Threads war es, da kein Moderator ihn genau kontrolliert hat und der Threadersteller eben keine Mglichkeit hatte ihn entsprechend zu moderieren.
Vom Konzept her sollten hier nur Skripte rein, die man wirklich als "Pflicht" oder eben Standard ansehen kann, was mMn nur einige wenige sind. Tatschlich wurde der Thread aber dazu gebraucht alle mglichen interessanten Skripte zu posten, sowie alle mglichen Fragen rund um diese Skripte zu stellen.


Wie wrs,indem wir einfach einen News Thread fr Skripte erffnen. Immer wenn ein User ein interessantes Script entdeckt, kann er ja eine News mit Link reinschreiben. Es ist immer wieder eine Schinderei ,sich auf allen Seiten stundenlang umschauen zu mssen.
Gott, bitte nein. Es gibt viele Skripte die an den verschiedensten Stellen vorgestellt wurden, wenn wir so einen News-Thread haben wird es mMn zwangslufig dazu fhren, da viele Skripte mehrfach vorgestellt werden weil der eine es im Forum A entdeckt hat und der andere aber im Forum B und keiner der User gengend Ruby-Kentnisse oder Lust hatte zu berprfen ob es nicht eventuell dieselben Skripte sind.

Was Sinn machen wrde wre ein bersichtsthread wo wichtige Links zusammen gefasst werden. Das knnten Links der Kategorie "Wie lerne ich Ruby/RGSS?" sein, groe XP-Seiten auf denen es viele Skripte gibt, sowie eventuell direkte Skript-Links zu Skripten die extrem oft nachgefragt werden (Vollbild zB). Das wichtigste wre hier aber, da sich ein Moderator um diesen Thread kmmert, damit der Thread nicht nur gepinnt, sondern auch geschlossen wird und dabei dennoch beizeiten aktualisiert wird.
(Eigenwerbung: Im Quartier haben wir einen solchen Thread, der zeigt wie ich mir das vorstelle Klick mich! (http://forum.rpg2000.4players.de/viewtopic.php?t=72991))

Von Skriptvorstellungen gefundener Skripte halte ich sowieso relativ wenig, es sei denn es ist wirklich ein exotisches/besonderes Skript und die Quelle ist recht unbekannt (irgend eine japanische seite zB). Wenn aber jeder meint die neuste Men-nderung von rmxp.org hier vorstellen zu mssen, geht die bersicht sowieso direkt wieder flten.


Bitte nicht. Links haben gerne mal die Angewohnheit zu toten Links zu werden und es macht keinen Spa sich durch 50 tote Links zu klicken, das habe ich bei XP-Scripten oft genug erlebt.
Was daran lag, da rmxp.net die bekannteste und grte englische Skript-quelle massive Hoster/Domain-Probleme hatte und auch rmxp.org die Nachfolgeseite oft unter Hackerangriffen und Ausfllen zu leiden hatte. Wenn wir auf Links verzichten und die Skripte direkt posten geht mit Sicherheit irgendwo und irgendwann die ursprngliche Quelle unter.


Dass wre zwar sehr bersichtlich, aber wrde dann darauf hinausaufen, dass es in diesem Unterforum nur diese zwei Threads gibt.
Wre es dann nicht gleich besser ein Skrit-biete-Forum und ein allgemeines RGSS-Fragen-Forum zu machen?
Aber bitte kein Script-suche/biete-Forum, denn dann gehen die Scripte wieder zwischen den ganzen Anfragen unter.
Ich habe nicht das Gefhl, da in diesem Forum irgend ein Thread in einer Flut von Anfragen untergeht. Im Vergleich zum anderen Technick-Forum ist hier sogar relativ wenig los, irgend eine Aufspaltung oder Einfhrung weiterer Unterforen wre unsinniger Overkill.

Jerome Denis Andre
20.08.2007, 13:02
So Leute, einer muss es mal ansprechen:

Der Thread suckt! ^^''

8Jetzt mal ehrlich, der ist angetackert als "Wichtig!", hat aber keinerlei interessante Inhalte. Warum? Weil er im Laufe der Zeit verkommen ist, da sich niemand mehr wirklich drum kmmert. Jetzt fungiert er als genau das, was er eigentlich nie sein wollte; eine Bettelquelle fr Scripte.

Nicht, dass man mich falsch versteht. Ich finde beides gut. Aber dann mssen diese Themen auch ernsthaft durchgesetzt werden.

Fangen wir mal mit diesem Thema an: Standardscripte die man haben sollte!
Man knnte sich ja fragen, ob man dieses Thema berhaupt braucht. Schlielich gibts ja RMXP.org und Creation Asylum. Aber das ist genau die Tatsache, warum ich diesen Thread fr wichtig erachte. Erstmal ist beides auf englisch, was natrlich kein Hindernis sein sollte, aber trotzdem lhmend sein kann, auerdem sind beide Seiten sehr langsam im Seitenaufbau, was ungemein frustrierend ist, wenn man sich dort lnger aufhlt.
Ich erzhle mal von meinen Erfahrungen:
Nach etwa einem Jahr wollte ich mich wieder an den RPGMakerXP setzen, mit einem Projekt weitermachen und schauen, ob es irgendwelche neuen interessanten Programmiererrungenschaften gibt.
Erst einmal ist es, wenn man mit den Entwicklungen der letzten Monate nicht vertraut ist unglaublich schwierig, bei der Flle an unterschiedlichen Kampfsystemen, Mens und Erweiterungen den berblick zu behalten. Es ist dann auch noch absolut zeitaufwendig, verschiedene auf den ersten Blick gleichwertige Scripte zu testen und zu vergleichen.
Ich versuchte mir die vergangene Woche mal einen berblick zu verschaffen und bin nun so klug als wie zuvor. Naja, vielleicht etwas klger ^^
Es wre wunderbar gewesen, htte dieser Thread als Erfahrungsaustausch fungieren knnen zwischen Leuten, die diese Entwicklung mitgemacht haben und Leuten die neu dazugekommen sind.

Meine Verbesserungsvorschlge wren:

-Die Scripte nicht posten sondern einen Link. Fast alle Scripts hier sind veraltet, das ist unschn. Und wer hier liest, der erkennt das hufig auch gar nicht.
Wer sich ein Script selber ausgedacht hat, kann dies natrlich so schreiben ^^
Zustzlich sollte jemand, der merkt, dass es eine neue Version oder bessere Alternative gibt, ein bisschen Verantwortungsbewusstsein entwickeln und das hier kundtun. Nur so knnen wir hoffen, dass wir aktuelle Informationen weitergeben knnen.

-Die Links zu den Scripten in den ersten Post stecken, damit man nicht den ganzen Thread durchblttern muss (gut, zwei Seiten geht noch, aber das kann auch auch schnell mal mehr werden) mit einer Kurzbeschreibung.
IMHO kann ruhig in diesem Thread auch diskutiert werden. Wie ich erwhnte, Erfahrungsaustausch ist wichtig. Wer eine bessere Alternative kennt, ruhig her damit.

-Vielleicht sollten die Scripte auch etwas in Kategorien gebracht werden? KS, Messages, Mens etc., dann knnte man sie auch gut miteinander vergleichen.

Natrlich knnte man sich die Mhe machen und selber nach passenden Sachen suchen, aber es wre doch sehr schn, wenn es auch eine deutsche Auflistung gbe, von Leuten die Ahnung haben.

Wieviele Leute knnen den Ruby? Ich kanns nicht und ich habe auch wirklich keine Zeit mich damit gro auseinanderzusetzen. Ich will doch blo ein RPG machen! ^^ Sicher geht es vielen Leuten so, und dann greift man auf nette Scripts zurck, weil der XP diese Mglichkeit bietet. Vielleicht wre es gut "Standard"-Scripts durch "Sehr gute" Scripts zu ersetzen und auch mal nette Mens und soetwas vorzustellen. Es gibt so viele Quellen und man allein kann so schlecht den berblick behalten.

Oben erwhnte ich mal das Fragen nach Scripts. Fnde ich auch nicht schlecht, einen Thread dafr, aber das knnte auch zu weit fhren. Das soll ja hier kein Script-Forum werden. Naja.

So, ich hoffe, dass ich mal ein paar kleine Anregungen geben konnte, wie man diesen verwahrlosten Thread neues Leben einhauchen knnte.
Motivation ist etwas wichtiges und meiner Erfahrung nach kann das suchen nach hbschen Scripts motvierend, aber auf dauer auch sehr unmotvierend sein, wenn man von der Masse erschlagen wird, die es gibt. Und da wre so ein Thread hier rettend.


JEP!!!Recht hast du!!!

Vielleicht wre es gut "Standard"-Scripts durch "Sehr gute" Scripts zu ersetzen und auch mal nette Mens und soetwas vorzustellen. Es gibt so viele Quellen und man allein kann so schlecht den berblick behalten.

Und deshalb hab ich hier ein paar interessante skripts rausgesucht:




Bei Spielen, die mit den RPG Maker 2000 oder 2003 erstellt wurden, wurden am Anfang immer 1 bis 3 Logos gezeigt. Diese Funktion kann auch in den RPG Maker XP eingebaut werden.
Folgendes Skript wie im Header beschrieben einbauen. Weitere Instruktionen sind ebenfalls im Skript zu finden.


Credits an:
~DeR ErZenGeL~


Source code:



#Im Scene_Title Skript unter
# # Make system object
# $game_system = Game_System.new
#einfgen (Standard: Zeile 33)
#===============================INTROSCREEN 2.0===============================#
$game_system.bgm_play($data_system.title_bgm)
unless introscreen
@sprite = Sprite.new
# Name des Bildes mit Endung in Lila, Anfhrungszeichen und Klammern
# Diese zwei Punkte sind zu beachten und befolgen:
# hat Gre: max. 640x480 sonst zentriert
# in Ordner: Graphics/Titles
@sprite.bitmap = RPG::Cache.title("001-Title01.png")
# Anzeigeposition x und y des Bildes
@sprite.x = (640 - @sprite.bitmap.width) / 2
@sprite.y = (480 - @sprite.bitmap.height) / 2
# Transparenz des Bildes [Rot]
@sprite.opacity = 255
# Einblendzeit des Bildes [Rot und in Klammern]
Graphics.transition(40)
for i in 0..40
Graphics.update
end
Graphics.freeze
@sprite.bitmap.dispose
@sprite.dispose
# Ausblendzeit des Bildes [Rot und in Klammern]
Graphics.transition(40)
Graphics.freeze
end
# Bei Neustart [F12] kein zweites Anzeigen des Bildes
introscreen = true


Um mehrere Bilder anzuzeigen einfach


@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title("001-Title01.png")
@sprite.x = (640 - @sprite.bitmap.width) / 2
@sprite.y = (480 - @sprite.bitmap.height) / 2
@sprite.opacity = 255
Graphics.transition(40)
for i in 0..40
Graphics.update
end
Graphics.freeze
@sprite.bitmap.dispose
@sprite.dispose
Graphics.transition(40)
Graphics.freeze





Ich habe das Ringmenskript (http://scientia.rpgfantasy.de/wiki/index.php/Ringmen) einmal angepasst, auf Wunsch eines Freundes hin.
Dieses ist dreidimensional, nicht mehr dieser de Kreis.
Absofort knnt ihr statt Icons auch Grafiken aus dem Ordner Pictures einbinden.
Setzt dafr einfach grafik_typ = "p" und passt die Dateinamen an (Bei Icons im Ordner icons, bei Pictures im Ordner pictures, ohne Dateinamen).


#==============================================================================
# Window_RingMenu
#==============================================================================
#==============================================================================
# Edited by MakirouAru
# 3D Version by Deblu
#==============================================================================
class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# : ’N’0’X'"
#--------------------------------------------------------------------------


# Grafiktyp: Grafiken oder Icons?
grafik_typ = "i" # p = Pictures, i = Icons

# Die Dateinamen (ohne Dateiendung)
grafik_gegenstaende = "034-Item03"
grafik_faehigkeiten = "044-Skill01"
grafik_ausruestung = "001-Weapon01"
grafik_status = "050-Skill07"
grafik_speichern = "038-Item07"
grafik_beenden = "046-Skill03"

STARTUP_FRAMES = 20 # 0`’A’j’[’V’!’"’t’R[’"
MOVING_FRAMES = 5 # ’`’"’O 0}~’t’R[’"
RING_R = 256 # ’`’"’O"Ra

if grafik_typ == "i"
PIC_ITEM = RPG::Cache.icon(grafik_gegenstaende) # u’A’C’e’v’’j’&[’A’C’R’"
PIC_SKILL = RPG::Cache.icon(grafik_faehigkeiten) # u’X’L’9v’’j’&[’A’C’R’"
PIC_EQUIP = RPG::Cache.icon(grafik_ausruestung) # u'""v’’j’&[’A’C’R’"
PIC_STATUS = RPG::Cache.icon(grafik_status) # u’X’e[’^’Xv’’j’&[’A’C’R’"
PIC_SAVE = RPG::Cache.icon(grafik_speichern) # u’Z[’uv’’j’&[’A’C’R’"
PIC_EXIT = RPG::Cache.icon(grafik_beenden) # uIv’’j’&[’A’C’R’"
else
PIC_ITEM = RPG::Cache.picture(grafik_gegenstaende) # u’A’C’e’v’’j’&[’A’C’R’"
PIC_SKILL = RPG::Cache.picture(grafik_faehigkeiten) # u’X’L’9v’’j’&[’A’C’R’"
PIC_EQUIP = RPG::Cache.picture(grafik_ausruestung) # u'""v’’j’&[’A’C’R’"
PIC_STATUS = RPG::Cache.picture(grafik_status) # u’X’e[’^’Xv’’j’&[’A’C’R’"
PIC_SAVE = RPG::Cache.picture(grafik_speichern) # u’Z[’uv’’j’&[’A’C’R’"
PIC_EXIT = RPG::Cache.picture(grafik_beenden) # uIv’’j’&[’A’C’R’"
end

PIC_DISABLE= RPG::Cache.icon("") # }gp9}~"tA’C’R’"
SE_STARTUP = "056-Right02" # ’’j’&[ `JƫSE
MODE_START = 1 # ’X’^[’g’A’b’v’A’j’[’V’!’"
MODE_WAIT = 2 # '9@
MODE_MOVER = 3 # }~Rv00"]’A’j’[’V’!’"
MODE_MOVEL = 4 # "}~Rv00"]’A’j’[’V’!’"
#--------------------------------------------------------------------------
# : ’A’N’Z’T
#--------------------------------------------------------------------------
attr_accessor :index
#--------------------------------------------------------------------------
# S ’I’u’W’F’N’g0`0
#--------------------------------------------------------------------------
def initialize( center_x, center_y )
super(0, 0, 640, 480)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.opacity = 0
self.back_opacity = 0
s1 = "Gegenstnde"
s2 = "Fhigkeiten"
s3 = "Ausrstung"
s4 = "Status"
s5 = "Speichern"
s6 = "Beenden"
@commands = [ s1, s2, s3, s4, s5, s6 ]
@item_max = 6
@index = 0
@items = [ PIC_ITEM, PIC_SKILL, PIC_EQUIP, PIC_STATUS, PIC_SAVE, PIC_EXIT ]
@disabled = [ false, false, false, false, false, false ]
@cx = center_x - 16
@cy = center_y - 16
setup_move_start
refresh
end
#--------------------------------------------------------------------------
# S ’t’R[’XV
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# S 0"`0
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ’A’C’R’" "`0
case @mode
when MODE_START
refresh_start
when MODE_WAIT
refresh_wait
when MODE_MOVER
refresh_move(1)
when MODE_MOVEL
refresh_move(0)
end
# ’A’N’e’B’u’R’}’"’h"\}
rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index],1)
end
#--------------------------------------------------------------------------
# : 0"`0(0`0}~)
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / STARTUP_FRAMES
r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r/3 * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# : 0"`0('9@}~)
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R/3 * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# : 0"`0(0"]}~)
# mode : 0="}~Rv0 1=}~Rv0
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R/3 * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# S "`0
# x :
# y :
# i : "
#--------------------------------------------------------------------------
def draw_item(x, y, i)
#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
rect = Rect.new(0, 0, @items[i].width, @items[i].height)
if @index == i
self.contents.blt( x, y, @items[i], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[i], rect, 128 )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
end
end
end
#--------------------------------------------------------------------------
# S Rɷ
# index : "
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# : 0`0’A’j’[’V’!’""
#--------------------------------------------------------------------------
def setup_move_start
@mode = MODE_START
@steps = STARTUP_FRAMES
if SE_STARTUP != nil and SE_STARTUP != ""
Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
end
end
#--------------------------------------------------------------------------
# : 0"]’A’j’[’V’!’""
#--------------------------------------------------------------------------
def setup_move_move(mode)
if mode == MODE_MOVER
@index -= 1
@index = @items.size - 1 if @index < 0
elsif mode == MODE_MOVEL
@index += 1
@index = 0 if @index >= @items.size
else
return
end
@mode = mode
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# : ’A’j’[’V’!’"' Ǥ
#--------------------------------------------------------------------------
def animation?
return @mode != MODE_WAIT
end
end
#==============================================================================
# Window_MenuStatus
#------------------------------------------------------------------------------
# @’’j’&[0’p[’e’B’’"’o[’X’e[’^’X "\}’E’B’"’h’EŷB
#==============================================================================

class Window_RingMenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# S ’I’u’W’F’N’g0`0
#--------------------------------------------------------------------------
def initialize
super(204, 64, 232, 352)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# S ’`’t’R’b’V’&
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = "Arial"
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 80
y = 80 * i
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y + 24)
end
end
#--------------------------------------------------------------------------
# S ’J[’\’99R`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
end
end
end
#==============================================================================
# # Scene_RingMenu
# Scene_Menu
#------------------------------------------------------------------------------
# @’’j’&[0 s’N’0’XŷB
#==============================================================================

#class Scene_RingMenu
class Scene_Menu
#--------------------------------------------------------------------------
# S ’I’u’W’F’N’g0`0
# menu_index : ’R’}’"’h’J[’\’90`'u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# S ’’C’"
#--------------------------------------------------------------------------
def main
# ’X’v’0’C’g’Z’b’g
@spriteset = Spriteset_Map.new
# ’R’}’"’h’E’B’"’h’E
px = $game_player.screen_x - 15
py = $game_player.screen_y - 24
@command_window = Window_RingMenu.new(px,py)
@command_window.index = @menu_index
# ’p[’e’Bl" 0 l!
if $game_party.actors.size == 0
# ’A’C’e’A’X’L’9A'""A’X’e[’^’X R0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@command_window.z = 100
# ’Z[’u9}~!
if $game_system.save_disabled
# ’Z[’u Rɷ
@command_window.disable_item(4)
end
# ’X’e[’^’X’E’B’"’h’E
@status_window = Window_RingMenuStatus.new
@status_window.x = 160
@status_window.y = 0
@status_window.z = 200
@status_window.visible = false
# ’g’0’"’W’V’!’"}s
Graphics.transition
# ’’C’"’9[’v
loop do
# ’Q[’0 XV
Graphics.update
# "" XV
Input.update
# ’t’R[’XV
update
# 0ʪ'’9[’v ' 'f
if $scene != self
break
end
end
# ’g’0’"’W’V’!’""
Graphics.freeze
# ’X’v’0’C’g’Z’b’g 0 "
@spriteset.dispose
# ’E’B’"’h’E 0 "
@command_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# S ’t’R[’XV
#--------------------------------------------------------------------------
def update
# ’E’B’"’h’E XV
@command_window.update
@status_window.update
# ’R’}’"’h’E’B’"’h’E’A’N’e’B’u!: update_command R
if @command_window.active
update_command
return
end
# ’X’e[’^’X’E’B’"’h’E’A’N’e’B’u!: update_status R
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# S ’t’R[’XV (’R’}’"’h’E’B’"’h’E’A’N’e’B’u!)
#--------------------------------------------------------------------------
def update_command
# B ’{’^’"0x!
if Input.trigger?(Input::B)
# ’L’’’"’Z’9 SE 00't
$game_system.se_play($data_system.cancel_se)
# ’}’b’v0'֦
$scene = Scene_Map.new
return
end
# C ’{’^’"0x!
if Input.trigger?(Input::C)
# ’p[’e’Bl" 0 lA’Z[’uA’Q[’I`O’R’}’"’h!
if $game_party.actors.size == 0 and @command_window.index < 4
# ’u’U[ SE 00't
$game_system.se_play($data_system.buzzer_se)
return
end
# ’R’}’"’h’E’B’"’h’E’J[’\’9'u"`
case @command_window.index
when 0 # ’A’C’e’
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’A’C’e’0'֦
$scene = Scene_Item.new
when 1 # ’X’L’9
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’X’e[’^’X’E’B’"’h’E ’A’N’e’B’uɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 2 # '""
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’X’e[’^’X’E’B’"’h’E ’A’N’e’B’uɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 3 # ’X’e[’^’X
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’X’e[’^’X’E’B’"’h’E ’A’N’e’B’uɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 4 # ’Z[’u
# ’Z[’u9}~!
if $game_system.save_disabled
# ’u’U[ SE 00't
$game_system.se_play($data_system.buzzer_se)
return
end
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’Z[’u0'֦
$scene = Scene_Save.new
when 5 # ’Q[’I
# R' SE 00't
$game_system.se_play($data_system.decision_se)




Ein kleines, aber feines Script frs Schnellspeichern la The Elder Scrolls. Hier der Code:


class Quicksave
def Quicksave.save
file = File.open("quicksave.sav", "wb")
Scene_Save.new.write_save_data(file)
file.close
end
#----------
def Quicksave.load
return unless FileTest.exist?("quicksave.sav")
file = File.open("quicksave.sav", "rb")
Scene_Load.new.read_save_data(file)
file.close
Graphics.freeze
sprite = Sprite.new
sprite.bitmap = Bitmap.new(640, 480)
sprite.bitmap.fill_rect(0, 0, 640, 480, Color.new(0, 0, 0))
Graphics.transition(10)
$scene = Scene_Map.new
end
end


Beim Aufruf von "Quicksave.save" wird das Spiel in eine Datei namens "quicksave.sav" gespeichert. Beim Aufruf von "Quicksave.load" wird der Spielstand aus dieser Datei, sofern vorhanden, geladen.
Damit das Schnellspeichern jederzeit auf der Map per Tastendruck, z.B. F5, funktioniert, muss im Script Scene_Map in der update-Methode was eingefgt werden:



...
if $DEBUG and Input.press?(Input::F9)
$game_temp.debug_calling = true
end

#~~~~~~~~~~~~~~~
if Input.trigger?(Input::F5)
Quicksave.save
end

if Input.trigger?(Input::F6)
Quicksave.load
end
#~~~~~~~~~~~~~~~

unless $game_player.moving?
if $game_temp.battle_calling
call_battle
elsif $game_temp.shop_calling
...


F5 -> Speichern
F6 -> Laden
Es knnen auch andere Tasten verwendet werden, dann muss man statt F5 und F6 eben was anderes schreiben, mglich ist F5-F9.

Das alles funktioniert ohne jegliche Dialoge. Zumindest mich nervt es, wenn ich fr jedes Speichern erst mal das Men aufrufen, den Menpunkt Speichern anwhlen und einen Spielstand bestimmen muss.

Bei Verwendung wie immer bitte Creditseintrag^^






NPC-WindowsAuf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/lschen Diesen Beitrag einem Moderator melden Zum Anfang der Seite springen
So, ich hab mal wieder Zeit gefunden, was zu scripten: kleine Fenster ber den NPC's (geht natrlich auch ber anderen Events). Dort kann man z.B. den Namen der Characters anzeigen lassen. Das Ganze sieht dann so aus:
http://img379.imageshack.us/img379/8397/npcwindows7cb.png
Ich bin kein Mapper, sondern Scripter, also achtet mehr auf die Fenster als auf's Mapping Augenzwinkern

Um das Script zu benutzen, muss man folgenden Code als neues Script ber Main einfgen:


#//////////////////////////////////////////NPC-Window///////////////////////////////////////////////
#~~~~~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#__________________________________________________

class Interpreter
def set_text(character, text)
#@parameter character: -1 --> player, 0 ---> this event, 1 ---> event with that id
character = get_character(character)
character.text = text if text != character.text
end
end
#==========================
class Game_Character
attr_accessor :text

alias init initialize
def initialize
init
@text = ""
@window_text = nil
@old_text = ""
end
#-----------
alias npc_text_update update
def update
npc_text_update
if @text != @old_text
@window_text.dispose if @window_text != nil
if @text == nil or @text == ""
@window_text = nil
@old_text = ""
else
@window_text = NPC_Window.new(@text)
@old_text = @text
end
end
if @window_text != nil
@window_text.update
@window_text.visible = ! @transparent
@window_text.x = screen_x - @window_text.width/2
@window_text.y = screen_y - 40 - 50
end
end
end
#====================
class NPC_Window < Window_Base
def initialize(text)
dummy_bitmap = Bitmap.new(32,32)
dummy_bitmap.font.name = $defaultfonttype
dummy_bitmap.font.size = 14
text_size = dummy_bitmap.text_size(text).width
super(0, 0, text_size+32, 30)
self.contents = nil
self.back_opacity = 140
@air_text = Air_Text.new(self.x, self.y, self.width, self.height, text)
end
#-----------
def refresh
@air_text.refresh
super
end
#-----------
def update
@air_text.update
@air_text.x = self.x-16
@air_text.y = self.y-16
super
end
#-----------
def dispose
@air_text.dispose
super
end
end
#===========
class Air_Text < Window_Base
def initialize(x, y, width, height, designate_text)
super(x-48, y-48, width+32, height+32)
self.contents = Bitmap.new(self.width - 32, self.height - 32)
self.opacity = 0
self.back_opacity = 0
w = self.contents.width
h = self.contents.height
self.contents.font.name = $defaultfonttype
self.contents.font.size = 14
self.contents.draw_text(0, 0, w, h, designate_text, 1)
end
#--------------------
def dispose
self.contents.clear
super
end
end

Wie benutzt man das Script: Ganz einfach. Mit der Eventfunktion "Script aufrufen" / "Call Script":


set_text(CHARACTER, "TEXT")


Fr CHARACTER muss man eine Zahl schreiben, die angibt, ber welchem Character das Fenster sein soll:
-1 --> Spieler (ich wei, das is kein NPC, geht aber trotzdem)
0 --> das Event, in dem man den Befehl aufruft
alles andere > 0 ---> das Event mit der entsprechenden ID
Fr TEXT schreibt man einfach in doppelten Anfhrungsstrichen den Text, der im Fenster stehen soll. Um ein Fenster zu entfernen, setzt man den Text "", also gar keinen Text, dann wird auch kein Fenster angezeigt.
Die Fenster bewegen sich auch mit, wenn der jeweilige Character sich bewegt.

Ich glaub, mehr gibt's auch gar nicht zu erklren. Viel Spa mit dem Script!

Und wie immer: Bei Verwendung des Scripts bitte ich um einen Creditseintrag.




So hier ist das Menscript von Prexus



Einfach ein neues Script ber Main einfgen und Bilder mit den Namen eurer Charas in den Pictures Ordner tun^^


# Advanced CMS Menu by Prexus
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Statut"
s5 = "Sauvegarder"
s6 = "Quitter"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
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
@command_window.x = 32
@command_window.y = 32
@command_window.z = 3005
@command_window.back_opacity = 128
@playtime_window = Window_PlayTime.new
@playtime_window.x = 32
@playtime_window.y = 480-32-@playtime_window.height
@playtime_window.back_opacity = 128
@playtime_window.z = 3005
@gold_window = Window_Gold.new
@gold_window.x = 640-32-@gold_window.width
@gold_window.y = 480-32-@gold_window.height
@gold_window.back_opacity = 128
@gold_window.z = 3005
@chr_status = Window_CharacterStatus.new
@chr_status.visible = false
@status_window = Window_MenuStatus.new
@status_window.chr_status = @chr_status
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@chr_status.dispose
@status_window.dispose
@gold_window.dispose
@playtime_window.dispose
end
def update
if @status_window.active and (@command_window.x != -128 or @playtime_window.x != 32-@playtime_window.width)
if @command_window.x != -128
@command_window.z = 3001
@command_window.x -= 5
end
if @playtime_window.x != 32-@playtime_window.width
@playtime_window.x -= 5
end
return
end
if @command_window.active and (@command_window.x != 32 or @playtime_window.x != 32)
if @command_window.x != 32
@command_window.z = 3005
@command_window.x += 5
end
if @playtime_window.x != 32
@playtime_window.x += 5
end
return
end
@command_window.update
@status_window.update
@gold_window.update
@playtime_window.update
@chr_status.update
if @command_window.active
update_command
@chr_status.visible = false
return
end
if @status_window.active
update_status
@chr_status.visible = true
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
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
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)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end

class Window_CharacterStatus < Window_Base
def initialize
super(480-32, 0, 192, 128)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.back_opacity = 0
self.z = 3006
end
def refresh(index)
self.contents.clear
if index >= 0
actor = $game_party.actors[index]
draw_actor_name(actor, 0, 0)
draw_actor_level(actor, 0, 24)
draw_actor_hp(actor, 0, 48)
draw_actor_sp(actor, 0, 72)
end
end
end

class Window_MenuStatus < Window_Base
attr_reader :index
attr_reader :chr_status
def initialize
@viewport = Viewport.new(0, 0, 640, 480)
@viewport.z = 3001
super(-16, -16, 640+32, 480+32)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.active = false
self.z = 3000
@index = -1
@column_max = 1
@sprites = []
refresh
end
def index=(index)
@index = index
if self.active and @chr_status != nil
update_chr_status
end
update_cursor_rect
refresh
end
def refresh
self.contents.clear
for i in 0...@sprites.size
@sprites[i].dispose
end
@sprites = []
@item_max = $game_party.actors.size
for i in 0...@item_max
actor = $game_party.actors[@item_max-i-1]
@sprites[@item_max-i-1] = Sprite.new(@viewport)
@sprites[@item_max-i-1].bitmap = RPG::Cache.picture(actor.image_name)
@sprites[@item_max-i-1].x = 560-((i+1)*120)
@sprites[@item_max-i-1].y = 480-@sprites[@item_max-i-1].bitmap.height
@sprites[@item_max-i-1].opacity = 255
@sprites[@item_max-i-1].z = 3004-i
end
end
def update_cursor_rect
if @index < 0
for i in 0...@sprites.size
@sprites[i].opacity = 255
end
else
for i in 0...@sprites.size
if i == @index
@sprites[i].opacity = 255
@sprites[i].z += 4
else
@sprites[i].opacity = 200
@sprites[i].z = 3001+i
end
end
end
end
def dispose
super
for i in 0...@sprites.size
@sprites[i].dispose
end
end
def chr_status=(chr_status)
@chr_status = chr_status
if self.active and @chr_status != nil
update_chr_status
end
end
def update
super
if self.active and @item_max > 0 and @index >= 0
if Input.repeat?(Input::RIGHT)
if Input.trigger?(Input::RIGHT) or @index < @item_max - @column_max
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
if Input.repeat?(Input::LEFT)
if Input.trigger?(Input::LEFT) or @index >= @column_max
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
end
if self.active and @chr_status != nil
update_chr_status
elsif @chr_status != nil
@chr_status.refresh(-1)
end
update_cursor_rect
end
def update_chr_status
@chr_status.refresh(@index)
end
end

class Window_Base
def shadow_color
return Color.new(0, 0, 0, 255)
end
def draw_actor_name(actor, x, y)
self.contents.font.color = shadow_color
self.contents.draw_text(x+1, y+1, 120, 32, actor.name)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
def draw_actor_level(actor, x, y)
self.contents.font.color = shadow_color
self.contents.draw_text(x+1, y+1, 32, 32, "Lv")
self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = shadow_color
self.contents.draw_text(x+1, y+1, 32, 32, $data_system.words.hp)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end

http://www.rpgcreative.net/Site/RPG Maker/image tutorial/scripts/new menu.JPG
die bilder gibts
HIER (http://naramura.kdn.ne.jp/game/sozai/character.html)




Hi,

ich habe mal ein kleines billiges Skript gemacht, womit man die Steuerung des Helden vertauschen kann. Ich nenne das ganze das "Drunken Mode" Skript ;-)

Folgende Modi sind vorgegeben:

Modus 0:

Pfeil Unten -> Nach Oben gehen
Pfeil Links -> Nach Rechts gehen
Pfeil Rechts -> Nach Links gehen
Pfeil Oben -> Nach Unten gehen

Modus 1:

Pfeil Unten -> Nach Rechts gehen
Pfeil Links -> Nach Unten gehen
Pfeil Rechts -> Nach Oben gehen
Pfeil Oben -> Nach Links gehen

Modus 2:

Pfeil Unten -> Nach Links gehen
Pfeil Links -> Nach Oben gehen
Pfeil Rechts -> Nach Unten gehen
Pfeil Oben -> Nach Rechts gehen


Einbau:

1. Folgenden Code ber "Main" einfgen:


#=======Drunken Mode Skript=======#
#============by Monsta============#
#====Version 1.0=== 31.1.2006 ====#
#=========www.Monsta.aw3.de=======#

class Game_Player < Game_Character
SWITCH_ID = 1
MODES = [["move_up","move_right","move_left","move_down"],
["move_right","move_down","move_up","move_left"],
["move_left","move_up","move_down","move_right"]]

def drunken_moving
case Input.dir4
when 2
if $game_switches[SWITCH_ID]
eval(MODES[@mode][0])
else
move_down
end
when 4
if $game_switches[SWITCH_ID]
eval(MODES[@mode][1])
else
move_left
end
when 6
if $game_switches[SWITCH_ID]
eval(MODES[@mode][2])
else
move_right
end
when 8
if $game_switches[SWITCH_ID]
eval(MODES[@mode][3])
else
move_up
end
end
end

def mode(mode)
@mode = mode
end

alias drunken_ini initialize
def initialize
@mode = 0
drunken_ini
end
end

2. Im Skript "Game_Player" die Zeilen 214 - 223:


case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end

durch diesen Code ersetzen:


drunken_moving

drunken_moving


3. Im Skript bei "SWITCH_ID" den Switch eintragen, der das Skript An und Aus Schalten soll.
Zustzlich kann man in der Konstante "MODES" noch eigene Tastenrichtungen vorgeben.

Im Spiel kann man den Modus des Skriptes ndern, indem man dies in ein Event Skript folgendes Schreibt (Modus 0-2 sind vorgegeben):



$game_player.mode(0)

Vielleicht kanns ja jemand frn Minigame oder so gebrauchen^^ Viel Spa damit...

Mfg Monsta



Hallo Community,
vor ein paar Tagen habe ich angefangen,
mich mit RGSS zu beschftigen...
Ich bekam immer mehr Ideen
und wollte diese natrlich umsetzten *:D*
Sodass ich mich an einen Creditsscript gewagt hab
und hier ist es :

Ein neues Script unter Scene_Title erstellen und den Scene_Credits nennen:


#--------------------------------------------------------------------------
# * Credits Script by Firephoenix / Visit www.rpgxp-world.net / www.ysites.de/rmtoplist/
#--------------------------------------------------------------------------
# * Versions Log: - v0.1 Relase
#--------------------------------------------------------------------------
# * Thanx to !Tocs! for his help. I'm a beginner and so he explain me a lot...
#--------------------------------------------------------------------------

class Window1 < Window_Base
#------------------------------------------------------------------------
# * Object Initialization
#------------------------------------------------------------------------
def initialize
Audio.bgm_fade(1500)
Audio.bgs_fade(1500)
Audio.me_fade(1500)
super(0, 0, 640, 240)
self.contents = Bitmap.new(width - 32, height - 32)
# Hier kann man die Transparenz des oberen Fensters ndern
# 0 = Die "Box" ist nicht sichtbar | 255 = Keine Transparenz
self.opacity = 240
refresh
end
#-----------------------------------------------------------------------
# * Refresh
#------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
# Hier kann der Text gendert werden
self.contents.draw_text(0, -108, 640, 240, "Erste Zeile", 0)
self.contents.draw_text(0, -85, 640, 240, "Zweite Zeile", 0)
self.contents.draw_text(0, -60, 640, 240, "Dritte Zeile", 0)
self.contents.draw_text(0, -35, 640, 240, "Vierte Zeile", 0)
self.contents.draw_text(0, -10, 640, 240, "Fnfte Zeile", 0)
self.contents.draw_text(0, 15, 640, 240, "Sexte Zeile", 0)
self.contents.draw_text(0, 40, 640, 240, "Achte Zeile", 0)
self.contents.draw_text(0, 67, 640, 240, "Neunte Zeile", 0)

end
end

class Window2 < Window_Base
#------------------------------------------------------------------------
# * Object Initialization
#------------------------------------------------------------------------
def initialize
super(0, 240, 640, 240)
self.contents = Bitmap.new(width - 32, height - 32)
# Hier kann man die Transparenz des unteren Fensters ndern
# 0 = Die "Box" ist nicht sichtbar | 255 = Keine Transparenz
self.opacity = 240
refresh
end
#------------------------------------------------------------------------
# * Refresh
#------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
# Hier kann der Text gendert werden
self.contents.draw_text(0, -108, 640, 240, "Erste Zeile", 0)
self.contents.draw_text(0, -85, 640, 240, "Zweite Zeile", 0)
self.contents.draw_text(0, -60, 640, 240, "Dritte Zeile", 0)
self.contents.draw_text(0, -35, 640, 240, "Vierte Zeile", 0)
self.contents.draw_text(0, -10, 640, 240, "Fnfte Zeile", 0)
self.contents.draw_text(0, 15, 640, 240, "Sexte Zeile", 0)
self.contents.draw_text(0, 40, 640, 240, "Achte Zeile", 0)
self.contents.draw_text(0, 67, 640, 240, "Neunte Zeile", 0)
end
end


class Credits
#------------------------------------------------------------------------
# * Main Processing
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#------------------------------------------------------------------------
# * Main Processing
#------------------------------------------------------------------------
def main
@window1 = Window1.new
@window2 = Window2.new
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update

# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@window1.dispose
@window2.dispose
end
#------------------------------------------------------------------------
# * Frame Update
#------------------------------------------------------------------------
def update
@window1.update
@window2.update

if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Title.new
return
end
end
end

Scene_Title mit dem hier ersetzten:


#=============================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
#=============================================

class Scene_Title
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = "Beginnen"
s2 = "Fortfahren"
s3 = "Beenden"
s4 = "Credits"
@command_window = Window_Command.new(250, [s1, s2, s4, s3])
@command_window.back_opacity = 40
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 300
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
#@command_TEXT.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 3 # Shutdown
command_shutdown
when 2 # Credits
command_credits
end
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Command: Credits
#--------------------------------------------------------------------------
def command_credits
$scene = Credits.new
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end


Nun bei Window_Command bei Zeile 40

self.contents.draw_text(rect, @commands[index])
mit

self.contents.draw_text(rect, @commands[index], 1)
ersetzen.


Nun sollte alles funktionieren...
Wer Vorschlge/Kritik/ *g* Lob hat,
nur her damit ^^...


MFG Firephoenix





I know that there are a few scripts that let the player distribute their own stat points when they level up, but I wasn't too happen with the one I downloaded when it conflicted with some other scripts I had. So I decided to script my own level up system. As of the moment, you can change the hero's maxhp, maxsp, str, dex, agi, and int. I am working on how to get around the error that shows up when I try to include atk, pdef, and mdef. Anyways, those 3 last attributes have been commented out from this version of the script, so it should work fine. I have also added instructions on how to implement a pop up window when they enter the status menu asking the player if he/she wants to distribute any remaining AP of the selected hero if and only if the selected hero has remaining AP.

Anyways, here is the script. Just paste it above Main in the script editor.

I have added a lot of commented instructions at the top of the script. Please follow it carefully.

To call the script, use "$scene = Scene_AP_Distribute.new(@actor_index)"

@actor_index being the position of the heroes currently in the party.

So if Arshes was in the first position in party, he would be @actor_index = 0

Report any bugs here if you find them. Anyways, enjoy !!!


#=========================================================================
=====
# * Scene_AP_Distribute
#------------------------------------------------------------------------------
# * by Skyboar
# * made August 2007
#
# * Script allows the player to freely customizing the Hero's stat points
# * including max hp, max sp, technique, critical, agility, and spirit
#
#==============================================================================
# *Instructions on how to use*
#
# Just Insert this script above "Main" in script editor.
#
#------------------------------------------------------------------------------
# Insert the following code in "Window_BattleStatus"
#
# this code: actor.stat_points += $AP
#
# under this code: if @level_up_flags[i]
#------------------------------------------------------------------------------
#
#Insert the following code in "Game_Actor"
#
# this code: attr_accessor :stat_points
#
# under this code: class Game_Actor < Game_Battler
#
#------------------------------------------------------------------------------
#
#Insert the following code in "Game_Actor"
#
# this code: @stat_points = 0
#
# under this code: def setup(actor_id)
# actor = $data_actors[actor_id]
#
# #------------------------------------------------------------------------------
#
# * Instructions on how to implement a pop up window asking the player if he/she would
# * like to distribute any remaining AP that the selected hero has.
#
#------------------------------------------------------------------------------
#
#Insert the following code in "Scene_Status"
#
# this code:
##--------------[Used for Level Up AP System]-----------------------
#
# if @actor.stat_points > 0
# @alert = true
# else
# @alert = false
# end


# @alert_window = Window_AP_RemainAlert.new(@actor)
# @alert_window.x = 320 - (@alert_window.width / 2)
# @alert_window.y = 120
# @alert_window.z = 10000

# if @alert == true
# @alert_window.visible = true
# elsif @alert == false
# @alert_window.visible = false
# end

# @alertconfirm_window = Window_AP_RemainConfirm.new(@actor)
# @alertconfirm_window.x = 320 - (@alertconfirm_window.width / 2)
# @alertconfirm_window.y = 230
# @alertconfirm_window.z = 10001
# @alertconfirm_window.index = 0
# if @alert == true
# @alertconfirm_window.visible = true
# @alertconfirm_window.active = true
# elsif @alert == false
# @alertconfirm_window.visible = false
# @alertconfirm_window.active = false
# end


##--------------[Used for Level Up AP System]-----------------------

#
# under this code: def main
# @actor = $game_party.actors[@actor_index]


#
#------------------------------------------------------------------------------
#

#Insert the following code in "Scene_Status"
#
# this code:

##--------------[Used for Level Up AP System]-----------------

# @alert_window.dispose
# @alertconfirm_window.dispose

##--------------[Used for Level Up AP System]-----------------------

#
# under this code: Graphics.freeze
#


#
#------------------------------------------------------------------------------
#

#Insert the following code in "Scene_Status"
#
# this code:

##--------------[Used for Level Up AP System]-----------------

#@alertconfirm_window.update

# if @alertconfirm_window.active
# update_alertconfirm
# return
# end

##--------------[Used for Level Up AP System]-----------------------

#
# under this code: def update
#

# Insert the following code in "Scene_Status"
# under "def update's 'end' " but before the class's end (the very last 'end' in the scene) "

# code to be inserted into Scene_Status:

##--------------[Used for Level Up AP System]-----------------

#def update_alertconfirm

# if Input.trigger?(Input::B)

# $game_system.se_play($data_system.cancel_se)

# @alert_window.visible = false
# @alertconfirm_window.active = false
# @alertconfirm_window.visible = false
# @alert = false
# return
# end

# if Input.trigger?(Input::C)

# $game_system.se_play($data_system.decision_se)

# case @alertconfirm_window.index
# when 0

# $scene = Scene_AP_Distribute.new(@actor_index)
# when 1

# @alert_window.visible = false
# @alertconfirm_window.active = false
# @alertconfirm_window.visible = false
# @alert = false
# return
# end
#end

#--------------[Used for Level Up AP System]-----------------
#------------------------------------------------------------------------------
#

# *Now you are ready to define the variables for the leveling up stats scene
# *You are welcome to freely change the variables instead of using the default
# *that I set up the script up with.
#
# *Enjoy!!!
#
#==============================================================================


#-------------[global variables for leveling up system]--------------------------------
#-------------[Change the VALUES BELOW to your liking]---------------------------
#-------------[global variables for leveling up system]--------------------------------

$AP = 9 #determines how much Attribute Points each hero gets upon Level Up

#change the following values to how much is added to each hero's attribute upon AP distribution

$add_stat_maxhp = 10 #for example value 10 means that 10 will be added to the hero's max hp
$add_stat_maxsp = 3

$add_stat_atk = 1
$add_stat_pdef = 1
$add_stat_mdef = 1

$add_stat_tech = 1
$add_stat_crit = 1
$add_stat_agi = 1
$add_stat_spr = 1

#-------------[global variables for leveling up system]--------------------------------
#-------------[Change the VALUES BELOW to your liking]---------------------------
#-------------[global variables for leveling up system]--------------------------------



#==============================================================================
# * Window_AP_RemainAlert
#prompts the player asking to distribute remaining AP if and only if they have any remaining.
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_RemainAlert< Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 300, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
refresh
end

#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = normal_color
self.contents.draw_text(-15, -5, 300, 32, "!!! Alert !!!", 1)
self.contents.font.color = normal_color
self.contents.draw_text(-15, 25, 300, 32, @actor.name + " has " + @actor.stat_points.to_s + " AP remaining.", 1)
self.contents.draw_text(-15, 55, 300, 32, "Distribute the remaining " + @actor.stat_points.to_s + " AP ?", 1)
end

end


#==============================================================================
# * Window_AP_RemainConfirm
#prompts the player asking if he/she permanently wants to distribute remaining AP.
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_RemainConfirm < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 200, 55)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 2
@row_max = 1
@column_max = 2
@actor = actor
@commands = ["Yes", "No"]
refresh
end
#--------------------------------------------------------------------------
# - Refresh
#--------------------------------------------------------------------------

def refresh
self.contents.clear

t = @commands.size
for i in 0...@commands.size
x = (i % 2) * 100
y = (i / 2) * 32
self.contents.font.color = normal_color
self.contents.draw_text(x - 15, y - 5 , 100, 32, @commands[i], 1)
end
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((@index * 100), -5, 70, 32)
end
end

#--------------------------------------------------------------------------

end


#==============================================================================
# * Window_AP_Warning #prompts the player asking if he/she permanently wants to use the ap they distributed
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_Warning< Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 300, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end

#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = normal_color
self.contents.draw_text(-15, -5, 300, 32, "!!! WARNING !!!", 1)
self.contents.font.color = normal_color
self.contents.draw_text(-15, 25, 300, 32, "AP distributed will be permanently removed", 1)
self.contents.draw_text(-15, 55, 300, 32, "from Hero's Remaining AP count.", 1)
end

end


#==============================================================================
# * Window_AP_WarningConfirm #prompts the player asking if he/she permanently wants to use the ap they distributed
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_WarningConfirm < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 55)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 2
@row_max = 1
@column_max = 2
@commands = ["Confirm", "Cancel"]
refresh
end
#--------------------------------------------------------------------------
# - Refresh
#--------------------------------------------------------------------------

def refresh
self.contents.clear

t = @commands.size
for i in 0...@commands.size
x = (i % 2) * 100
y = (i / 2) * 32
self.contents.font.color = normal_color
self.contents.draw_text(x - 15, y - 5 , 100, 32, @commands[i], 1)
end
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((@index * 100), -5, 70, 32)
end
end

#--------------------------------------------------------------------------

end


#==============================================================================
# * Window_AP_HeroFace
#------------------------------------------------------------------------------
#displays the hero's portrait or battler graphic as well as name, lv, class, and remaining AP.
#==============================================================================

class Window_AP_HeroFace < Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(50, 40, 160, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
self.z = 10
refresh
end

#======[use this for displaying hero's portrait]===============

def draw_actor_face_portrait(actor, x, y)
bitmap = RPG::Cache.picture(actor.id.to_s)
src_rect = Rect.new(0, 0, 96, 192)
self.contents.blt(28, 0, bitmap, src_rect)
end

#======[use this for displaying hero's battler portrait]===============
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
src_rect = Rect.new(0, 0, 96, 192)
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 200, 480))
end
#======================================

#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

x = 0
y = 0

draw_actor_battler(@actor,0,0) #used for displaying battler
#draw_actor_face_portrait(@actor, x + 28, y + 0) #used for displaying hero portrait
draw_actor_name(@actor, x + 28, y + 165)
draw_actor_level(@actor, x + 28, y + 190)
draw_actor_class(@actor, x + 28, y + 215)

self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y + 240, 320, 32, "AP", 0)

self.contents.font.color = normal_color
self.contents.draw_text(x - 40, y + 240, 160, 32, @actor.stat_points.to_s, 2)


end
end



#==============================================================================
# * Window_AP_HeroStatus
#------------------------------------------------------------------------------
# displays the Hero's current status before the AP is distributed and the stat points are changed.
#==============================================================================

class Window_AP_HeroStatus < Window_Base
#--------------------------------------------------------------------------
# - Object initialization
# actor : Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(10, 200, 300, 360)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(105, -5, 120, 32, "Current Stats", 0)

self.contents.font.color = normal_color
self.contents.draw_text(105, 30, 120, 32, "Max HP", 0)
self.contents.font.color = normal_color
self.contents.draw_text(105, 55, 120, 32, "Max SP", 0)

self.contents.font.color = normal_color
self.contents.draw_text(122, 30, 120, 32, @actor.maxhp.to_s, 2)
self.contents.draw_text(122, 55, 120, 32, @actor.maxsp.to_s, 2)

draw_actor_parameter(@actor, 105, 105, 0)#char's attack
draw_actor_parameter(@actor, 105, 130, 1)#char's phy def
draw_actor_parameter(@actor, 105, 155, 2)#char's mag def

draw_actor_parameter(@actor, 105, 205, 3)#char's Tech
draw_actor_parameter(@actor, 105, 230, 4)#char's Critical
draw_actor_parameter(@actor, 105, 255, 5)#char's Agility
draw_actor_parameter(@actor, 105, 280, 6)#char's Spirit

end
end


#==============================================================================
# * Window_AP_Add
#------------------------------------------------------------------------------
# displays and updates the values of the subtotal and total AP distribution and stat points
#==============================================================================

class Window_AP_Add < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
# actor : Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(10, 200, 340, 360)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 11
@row_max = 11
@column_max = 1
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(5, 0, 120, 32, "Added Stats", 0)

#-----[global variables subtotal display]----------------------------------------------------

self.contents.font.color = normal_color

self.contents.draw_text(-65, 35, 120, 32, $subtotal_stat_maxhp.to_s, 2)
self.contents.draw_text(-65, 60, 120, 32, $subtotal_stat_maxsp.to_s, 2)

self.contents.draw_text(-65, 110, 120, 32, $subtotal_stat_atk.to_s, 2)
self.contents.draw_text(-65, 135, 120, 32, $subtotal_stat_pdef.to_s, 2)
self.contents.draw_text(-65, 160, 120, 32, $subtotal_stat_mdef.to_s, 2)

self.contents.draw_text(-65, 210, 120, 32, $subtotal_stat_tech.to_s, 2)
self.contents.draw_text(-65, 235, 120, 32, $subtotal_stat_crit.to_s, 2)
self.contents.draw_text(-65, 260, 120, 32, $subtotal_stat_agi.to_s, 2)
self.contents.draw_text(-65, 285, 120, 32, $subtotal_stat_spr.to_s, 2)

#-----["=" sign display]----------------------------------------------------

self.contents.font.color = normal_color

self.contents.draw_text(22, 35, 120, 32, "=", 2)
self.contents.draw_text(22, 60, 120, 32, "=", 2)

self.contents.draw_text(22, 110, 120, 32, "=", 2)
self.contents.draw_text(22, 135, 120, 32, "=", 2)
self.contents.draw_text(22, 160, 120, 32, "=", 2)

self.contents.draw_text(22, 210, 120, 32, "=", 2)
self.contents.draw_text(22, 235, 120, 32, "=", 2)
self.contents.draw_text(22, 260, 120, 32, "=", 2)
self.contents.draw_text(22, 285, 120, 32, "=", 2)

#-----[global variables total display]----------------------------------------------------

self.contents.font.color = system_color
self.contents.draw_text(125, 0, 120, 32, "New Stats", 2)

self.contents.font.color = normal_color

self.contents.draw_text(125, 35, 120, 32, $total_stat_maxhp.to_s, 2)
self.contents.draw_text(125, 60, 120, 32, $total_stat_maxsp.to_s, 2)

self.contents.draw_text(125, 110, 120, 32, $total_stat_atk.to_s, 2)
self.contents.draw_text(125, 135, 120, 32, $total_stat_pdef.to_s, 2)
self.contents.draw_text(125, 160, 120, 32, $total_stat_mdef.to_s, 2)

self.contents.draw_text(125, 210, 120, 32, $total_stat_tech.to_s, 2)
self.contents.draw_text(125, 235, 120, 32, $total_stat_crit.to_s, 2)
self.contents.draw_text(125, 260, 120, 32, $total_stat_agi.to_s, 2)
self.contents.draw_text(125, 285, 120, 32, $total_stat_spr.to_s, 2)

end

#-----[update of cursor]----------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, (@index * 25) + 35, 280, 28)
end
end

end


#==============================================================================
# * Window_AP_Confirm #gives options for confirming, distribute, and resetting AP.
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_Confirm < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 300, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 3
@row_max = 1
@column_max = 3
@commands = ["Confirm", "Distribute", "Reset"]
refresh
end

#--------------------------------------------------------------------------
# - Refresh
#--------------------------------------------------------------------------

def refresh
self.contents.clear
t = @commands.size
for i in 0...@commands.size
x = (i % 3) * 100
y = (i / 3) * 32
self.contents.font.color = normal_color
self.contents.draw_text(x - 15, y - 5 , 100, 32, @commands[i], 1)
end
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((@index * 100), -5, 70, 32)
end
end

end


#==============================================================================

class Scene_AP_Distribute #this is where all the magic happens

#--------------------------------------------------------------------------
# - Main processing
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end

#--------------------------------------------------------------------------
def main

@actor = $game_party.actors[@actor_index]

#-------------[global variables for leveling up system]--------------------------------
#-------------[DO NOT TAMPER WITH THESE VALUES BELOW]-------------------
#-------------[global variables for leveling up system]--------------------------------

@old_stat_points = @actor.stat_points #used to keep track of AP amount before distribution

$total_stat_maxhp = @actor.maxhp
$total_stat_maxsp = @actor.maxsp

$total_stat_atk = @actor.atk
$total_stat_pdef = @actor.pdef
$total_stat_mdef = @actor.mdef

$total_stat_tech = @actor.str
$total_stat_crit = @actor.dex
$total_stat_agi = @actor.agi
$total_stat_spr = @actor.int

$subtotal_stat_maxhp = 0
$subtotal_stat_maxsp = 0

$subtotal_stat_atk = 0
$subtotal_stat_pdef = 0
$subtotal_stat_mdef = 0

$subtotal_stat_tech = 0
$subtotal_stat_crit = 0
$subtotal_stat_agi = 0
$subtotal_stat_spr = 0

#-------------[global variables for leveling up system]-------------------------------
#-------------[DO NOT TAMPER WITH THESE VALUES ABOVE]-------------------
#-------------[global variables for leveling up system]--------------------------------

@map_sprite = Spriteset_Map.new

@alert_window = Window_AP_Warning.new
@alert_window.x = 320 - (@alert_window.width / 2)
@alert_window.y = 120
@alert_window.z = 100000
@alert_window.opacity = 240
@alert_window.visible = false

@alertconfirm_window = Window_AP_WarningConfirm.new
@alertconfirm_window.x = 320 - (@alertconfirm_window.width / 2)
@alertconfirm_window.y = 230
@alertconfirm_window.z = 100000
@alertconfirm_window.opacity = 240
@alertconfirm_window.active = false
@alertconfirm_window.visible = false
@alertconfirm_window.index = 0

@confirm_window = Window_AP_Confirm.new
@confirm_window.x = 320 - (@confirm_window.width / 2)
@confirm_window.y = 380
@confirm_window.z = 10000
@confirm_window.opacity = 200
@confirm_window.active = true
@confirm_window.index = 1

@hero_window = Window_AP_HeroFace.new(@actor)
@hero_window.x = -10
@hero_window.y = 30
@hero_window.z = 10000
@hero_window.opacity = 200

@herostatus_window = Window_AP_HeroStatus.new(@actor)
@herostatus_window.x = 40
@herostatus_window.y = 40
@herostatus_window.z = 1000
@herostatus_window.opacity = 200

@ap_add_window = Window_AP_Add.new(@actor)
@ap_add_window.x = 320
@ap_add_window.y = 35
@ap_add_window.z = 1000
@ap_add_window.opacity = 200
@ap_add_window.active = false
@ap_add_window.index = -1

# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@confirm_window.dispose
@hero_window.dispose
@herostatus_window.dispose
@ap_add_window.dispose
@alert_window.dispose
@alertconfirm_window.dispose
@map_sprite.dispose

# When it changes to the title picture and it is in
if $scene.is_a?(Scene_Title)
# Fading out picture
Graphics.transition
Graphics.freeze
end
end


#--------------------------------------------------------------------------
# - Frame renewal
#--------------------------------------------------------------------------
def update

@ap_add_window.update
@confirm_window.update
@alertconfirm_window.update

if @confirm_window.active
update_confirm
return
end

if @ap_add_window.active
update_ap_add
return
end

if @alertconfirm_window.active
update_alertconfirm
return
end

end

# --------------------------------
def update_confirm

if Input.trigger?(Input::B) #cancel
$game_system.se_play($data_system.cancel_se)
if @actor.stat_points != @old_stat_points #checks to see if player has used any of the remaining AP
@alert_window.visible = true
@alertconfirm_window.active = true
@alertconfirm_window.visible = true
@confirm_window.active = false
@confirm_window.index = -1
else
$scene = Scene_Status.new(@actor_index)
end
return
end

if Input.trigger?(Input::C) #confirm
case @confirm_window.index
when 0 #confirm distribution of ap
$game_system.se_play($data_system.decision_se)
if @actor.stat_points != @old_stat_points #checks to see if player has used any of the remaining AP
@alert_window.visible = true
@alertconfirm_window.active = true
@alertconfirm_window.visible = true
@confirm_window.active = false
@confirm_window.index = -1
else
$scene = Scene_Status.new(@actor_index)
end

when 1 #distribute ap
$game_system.se_play($data_system.decision_se)
@confirm_window.active = false
@confirm_window.index = -1
@ap_add_window.active = true
@ap_add_window.index = 0
when 2 #reset distributed ap
$game_system.se_play($data_system.decision_se)

$subtotal_stat_maxhp = 0
$subtotal_stat_maxsp = 0

$subtotal_stat_atk = 0
$subtotal_stat_pdef = 0
$subtotal_stat_mdef = 0

$subtotal_stat_tech = 0
$subtotal_stat_crit = 0
$subtotal_stat_agi = 0
$subtotal_stat_spr = 0

$total_stat_maxhp = @actor.maxhp
$total_stat_maxsp = @actor.maxsp

$total_stat_atk = @actor.atk
$total_stat_pdef = @actor.pdef
$total_stat_mdef = @actor.mdef

$total_stat_tech = @actor.str
$total_stat_crit = @actor.dex
$total_stat_agi = @actor.agi
$total_stat_spr = @actor.int

@actor.stat_points = @old_stat_points

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

end
return
end
end

# --------------------------------
def update_ap_add #updates the distribution of the AP to hero's attributes

if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@ap_add_window.active = false
@ap_add_window.index = -1
@confirm_window.active = true
@confirm_window.index = 1
return
end

if Input.trigger?(Input::A) #resets AP
$game_system.se_play($data_system.decision_se)

$subtotal_stat_maxhp = 0
$subtotal_stat_maxsp = 0

$subtotal_stat_atk = 0
$subtotal_stat_pdef = 0
$subtotal_stat_mdef = 0

$subtotal_stat_tech = 0
$subtotal_stat_crit = 0
$subtotal_stat_agi = 0
$subtotal_stat_spr = 0

$total_stat_maxhp = @actor.maxhp
$total_stat_maxsp = @actor.maxsp

$total_stat_atk = @actor.atk
$total_stat_pdef = @actor.pdef
$total_stat_mdef = @actor.mdef

$total_stat_tech = @actor.str
$total_stat_crit = @actor.dex
$total_stat_agi = @actor.agi
$total_stat_spr = @actor.int

@actor.stat_points = @old_stat_points

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

return
end

if Input.repeat?(Input::LEFT) #subtract AP

$game_system.se_play($data_system.cursor_se)

case @ap_add_window.index

when 0 #subtract from maxhp
if$subtotal_stat_maxhp > 0
@actor.stat_points += 1
$subtotal_stat_maxhp = $subtotal_stat_maxhp - $add_stat_maxhp #update subtotal
$total_stat_maxhp = $total_stat_maxhp - $add_stat_maxhp #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 1 #subtract from maxsp
if$subtotal_stat_maxsp > 0
@actor.stat_points += 1
$subtotal_stat_maxsp = $subtotal_stat_maxsp - $add_stat_maxsp
$total_stat_maxsp = $total_stat_maxsp - $add_stat_maxsp #update total
else
$game_system.se_play($data_system.buzzer_se)
end

# when 3 #subtract from atk
# if$subtotal_stat_atk > 0
# @actor.stat_points += 1
# $subtotal_stat_atk = $subtotal_stat_atk - $add_stat_atk
# $total_stat_atk = $total_stat_atk - $add_stat_atk #update total
# else
# $game_system.se_play($data_system.buzzer_se)
# end

# when 4 #subtract from pdef
# if$subtotal_stat_pdef > 0
# @actor.stat_points += 1
# $subtotal_stat_pdef = $subtotal_stat_pdef - $add_stat_pdef
# $total_stat_pdef = $total_stat_pdef - $add_stat_pdef #update total
# else
# $game_system.se_play($data_system.buzzer_se)
# end

# when 5 #subtract from mdef
# if$subtotal_stat_mdef > 0
# @actor.stat_points += 1
# $subtotal_stat_mdef = $subtotal_stat_mdef - $add_stat_mdef
# $total_stat_mdef = $total_stat_mdef - $add_stat_mdef #update total
# else
# $game_system.se_play($data_system.buzzer_se)
# end

when 7 #subtract from tech
if$subtotal_stat_tech > 0
@actor.stat_points += 1
$subtotal_stat_tech = $subtotal_stat_tech - $add_stat_tech
$total_stat_tech = $total_stat_tech - $add_stat_tech #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 8 #subtract from crit
if$subtotal_stat_crit > 0
@actor.stat_points += 1
$subtotal_stat_crit = $subtotal_stat_crit - $add_stat_crit
$total_stat_crit = $total_stat_crit - $add_stat_crit #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 9 #subtract from agi
if$subtotal_stat_agi > 0
@actor.stat_points += 1
$subtotal_stat_agi = $subtotal_stat_agi - $add_stat_agi
$total_stat_agi = $total_stat_agi - $add_stat_agi #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 10 #subtract from spr
if$subtotal_stat_spr > 0
@actor.stat_points += 1
$subtotal_stat_spr = $subtotal_stat_spr - $add_stat_spr
$total_stat_spr = $total_stat_spr - $add_stat_spr #update total

else
$game_system.se_play($data_system.buzzer_se)
end

end

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

return
end


if Input.repeat?(Input::RIGHT) #add AP

if @actor.stat_points > 0

$game_system.se_play($data_system.cursor_se)

case @ap_add_window.index

when 0 #add to maxhp
@actor.stat_points -= 1
$subtotal_stat_maxhp = $subtotal_stat_maxhp + $add_stat_maxhp #update subtotal
$total_stat_maxhp = $total_stat_maxhp + $add_stat_maxhp #update total

when 1 #add to maxsp
@actor.stat_points -= 1
$subtotal_stat_maxsp = $subtotal_stat_maxsp + $add_stat_maxsp
$total_stat_maxsp = $total_stat_maxsp + $add_stat_maxsp

#when 3 #add to atk
# @actor.stat_points -= 1
# $subtotal_stat_atk = $subtotal_stat_atk + $add_stat_atk
# $total_stat_atk = $total_stat_atk + $add_stat_atk

# when 4 #add to pdef
# @actor.stat_points -= 1
# $subtotal_stat_pdef = $subtotal_stat_pdef + $add_stat_pdef
# $total_stat_pdef = $total_stat_pdef + $add_stat_pdef

# when 5 #add to mdef
# @actor.stat_points -= 1
# $subtotal_stat_mdef = $subtotal_stat_mdef + $add_stat_mdef
# $total_stat_mdef = $total_stat_mdef + $add_stat_mdef

when 7 #add to tech
@actor.stat_points -= 1
$subtotal_stat_tech = $subtotal_stat_tech + $add_stat_tech
$total_stat_tech = $total_stat_tech + $add_stat_tech

when 8 #add to crit
@actor.stat_points -= 1
$subtotal_stat_crit = $subtotal_stat_crit + $add_stat_crit
$total_stat_crit = $total_stat_crit + $add_stat_crit

when 9 #add to agi
@actor.stat_points -= 1
$subtotal_stat_agi = $subtotal_stat_agi + $add_stat_agi
$total_stat_agi = $total_stat_agi + $add_stat_agi

when 10 #add to spr
@actor.stat_points -= 1
$subtotal_stat_spr = $subtotal_stat_spr + $add_stat_spr
$total_stat_spr = $total_stat_spr + $add_stat_spr

end

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

else
$game_system.se_play($data_system.buzzer_se)
end

return
end


end



# --------------------------------
def update_alertconfirm

if Input.trigger?(Input::B) #cancel
$game_system.se_play($data_system.cancel_se)
@alert_window.visible = false
@alertconfirm_window.active = false
@alertconfirm_window.visible = false
@confirm_window.active = true
@confirm_window.index = 0
return
end

if Input.trigger?(Input::C)
case @alertconfirm_window.index
when 0 #when confirm adds distributed AP to stats permanently
$game_system.se_play($data_system.decision_se)

@actor.maxhp = $total_stat_maxhp
@actor.maxsp = $total_stat_maxsp

@actor.hp = @actor.maxhp #restores the hero's hp to max
@actor.sp = @actor.maxsp #restores the hero's sp to max

#@actor.base_atk = $total_stat_atk
#@actor.base_pdef = $total_stat_pdef
#@actor.base_mdef = $total_stat_mdef

@actor.str = $total_stat_tech
@actor.dex = $total_stat_crit
@actor.agi = $total_stat_agi
@actor.int = $total_stat_spr

$scene = Scene_Status.new(@actor_index)

when 1 #cancel
$game_system.se_play($data_system.cancel_se)
@alert_window.visible = false
@alertconfirm_window.active = false
@alertconfirm_window.visible = false
@confirm_window.active = true
@confirm_window.index = 0

end
end
end

end







I hope this is the right sub forum for this .

Well that aside this script basically allows you to have the players Strength as their Attack power when they have no weapons equiped isntead of magically losing all of their attack powers for having no weapon.

To use it's very simple just put it above main and look for this in the script:


WEAPON_ANIMATION_ID = 4


Then change the number 4 to the ID of the animation you want it to have when the player attacks with no weapon.


#======================================================================
========
# TDS Attack with no weapon
# Version: 1.0
# This script aliases the base_atk method and the animation2_id method.
#==============================================================================
#------------------------------------------------------------------------------
# This script allows to attack with now weapons.
#==============================================================================
# When no weapon is equiped animation ID
WEAPON_ANIMATION_ID = 4
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get Basic Attack Power
#--------------------------------------------------------------------------
alias tds_no_weapon_attack_base_atk base_atk
def base_atk
tds_no_weapon_attack_base_atk
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.atk : base_str
end
#--------------------------------------------------------------------------
# * Get Offensive Animation ID for Normal Attacks
#--------------------------------------------------------------------------
alias tds_no_weapon_attack_animation2_id animation2_id
def animation2_id
tds_no_weapon_attack_animation2_id
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.animation2_id : WEAPON_ANIMATION_ID
end
end




Battle Report
Version: 1.6


Introduction

A script that shows the battle result like in the Final Fantasy games.

Features
Scrolling down Exp

Edits:
Exp Bars filling up
Possible displaying of Facesets instead of Charactersets
Exp scrolling down faster, depending on how much exp you gain after battle.
Play a ME as long as you want in the result window.


Script:


class Game_Actor < Game_Battler
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1

# NEW - David
$d_new_skill = nil

for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)

# NEW - David
skill = $data_skills[j.skill_id]
$d_new_skill = skill.name

end
end
end
while @exp < @exp_list[@level]
@level -= 1
end
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end

#--------------------------------------------------------------------------
# * Get the current EXP
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get the next level's EXP
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end

end

class Window_LevelUp < Window_Base

#----------------------------------------------------------------
def initialize(actor, pos)
#change this to false to show the actor's graphic
@face = false
@actor = actor
y = (pos * 120)
super(280, y, 360, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
if $d_dum == false
refresh
end
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 18
if @face == true
draw_actor_face(@actor, 4, 0)
else
draw_actor_graphic(@actor, 50, 80)
end
draw_actor_name(@actor, 111, 0)
draw_actor_level(@actor, 186, 0)
show_next_exp = @actor.level == 99 ? "---" : "#{@actor.next_exp}"
min_bar = @actor.level == 99 ? 1 : @actor.now_exp
max_bar = @actor.level == 99 ? 1 : @actor.next_exp
draw_slant_bar(115, 80, min_bar, max_bar, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
self.contents.draw_text(115, 24, 300, 32, "Exp:#{@actor.now_exp}")
self.contents.draw_text(115, 48, 300, 32, "Level Up:" + show_next_exp)
end


#----------------------------------------------------------------
def level_up
self.contents.font.color = system_color
self.contents.draw_text(230, 48, 80, 32, "LEVEL UP!")
end

#----------------------------------------------------------------
def update
super
end

end # of Window_LevelUp

#=================================
#Window_EXP
# Written by: David Schooley
#=================================

class Window_EXP < Window_Base

#----------------------------------------------------------------
def initialize(exp)
super(0, 0, 280, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(exp)
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh(exp)
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 150, 32, "Exp Earned:")
self.contents.font.color = normal_color
self.contents.draw_text(180, 0, 54, 32, exp.to_s, 2)
end

#----------------------------------------------------------------
def update
super
end

end # of Window_EXP

#=================================
#Window_Money_Items
# Written by: David Schooley
#=================================

class Window_Money_Items < Window_Base

#----------------------------------------------------------------
def initialize(money, treasures)
@treasures = treasures
super(0, 60, 280, 420)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(money)
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh(money)
@money = money
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(4, 4, 100, 32, "Items Found:")
self.contents.font.color = normal_color

y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end

cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 340, 220-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(4, 300, 220-cx-2, 32, "+ " + @money.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 340, cx + 100, 32, $data_system.words.gold, 2)
end

def update
super
end

end # of Window_Money_Items


class Scene_Battle
alias raz_battle_report_main main
alias raz_battle_report_be battle_end

def main
# NEW - David
#$battle_end = false
@lvup_window = []
@show_dummies = true # Show dummy windows or not?
raz_battle_report_main
# NEW - David
@lvup_window = nil
@level_up = nil
@ch_stats = nil
@ch_compare_stats = nil
Audio.me_stop
end

def battle_end(result)
raz_battle_report_be(result)
# NEW - David
@status_window.visible = false
@spriteset.dispose
Graphics.transition
if result == 0
display_lv_up(@exp, @gold, @treasures)
loop do
Graphics.update
Input.update
if Input.trigger?(Input::C)
break
end
end
trash_lv_up
end

end

def start_phase5
@phase = 5
$game_system.me_play($game_system.battle_end_me)
$game_system.bgm_play($game_temp.map_bgm)
exp = 0
gold = 0
treasures = []
for enemy in $game_troop.enemies
unless enemy.hidden
exp += enemy.exp
gold += enemy.gold
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
treasures = treasures[0..5]

# NEW - David
@treasures = treasures
@exp = exp
@gold = gold


for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
@phase5_wait_count = 10
end

def update_phase5
if @phase5_wait_count > 0
@phase5_wait_count -= 1
if @phase5_wait_count == 0

# NEW - David
$game_temp.battle_main_phase = false
end
return
end

# NEW - David
battle_end(0)

end

def display_lv_up(exp, gold, treasures)

$d_dum = false
d_extra = 0
i = 0
for actor in $game_party.actors
# Fill up the Lv up windows
@lvup_window[i] = Window_LevelUp.new($game_party.actors[i], i)
i += 1
end

# Make Dummies
if @show_dummies == true
$d_dum = true
for m in i..3
@lvup_window[m] = Window_LevelUp.new(m, m)
end
end

@exp_window = Window_EXP.new(exp)
@m_i_window = Window_Money_Items.new(gold, treasures)
@press_enter = nil
gainedexp = exp
@level_up = [0, 0, 0, 0]
@d_new_skill = ["", "", "", ""]
@d_breakout = false
@m_i_window.refresh(gold)
wait_for_OK

@d_remember = $game_system.bgs_memorize
Audio.bgs_play("Audio/SE/032-Switch01", 100, 300)

# NEW - David
max_exp = exp
value = 28
if exp < value
value = exp
end
if value == 0
value = 1
end
for n in 0..gainedexp - (max_exp / value)
exp -= (max_exp / value)
if @d_breakout == false
Input.update
end

for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += (max_exp / value)
# Fill up the Lv up windows
if @d_breakout == false
@lvup_window[i].refresh
@exp_window.refresh(exp)
end

if actor.level > last_level
@level_up[i] = 5
Audio.se_play("Audio/SE/056-Right02.ogg", 70, 150)
if $d_new_skill
@d_new_skill[i] = $d_new_skill
end
end

if @level_up[i] == 0
@d_new_skill[i] = ""
end

if @level_up[i] > 0
@lvup_window[i].level_up
end

if Input.trigger?(Input::C) or exp <= 0
@d_breakout = true
end
end

if @d_breakout == false
if @level_up[i] >0
@level_up[i] -= 1
end
Graphics.update
end
end

if @d_breakout == true
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += exp
end
end
exp = 0
break
end
end
Audio.bgs_stop
@d_remember = $game_system.bgs_restore

for i in 0...$game_party.actors.size
@lvup_window[i].refresh
end
@exp_window.refresh(exp)
Audio.se_play("Audio/SE/006-System06.ogg", 70, 150)
$game_party.gain_gold(gold)
@m_i_window.refresh(0)
Graphics.update
end

def trash_lv_up
# NEW - David
i=0

for i in 0 ... 4
@lvup_window[i].visible = false
end
@exp_window.visible = false
@m_i_window.visible = false
@lvup_window = nil
@exp_window = nil
@m_i_window = nil
end

# Wait until OK key is pressed
def wait_for_OK
loop do
Input.update
Graphics.update
if Input.trigger?(Input::C)
break
end
end
end

end

class Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
self.contents.blt(x, y, bitmap, Rect.new(0,0,96,96))
end

#--------------------------------------------------------------------------
# * Draw Slant Bar(by SephirothSpawn)
#--------------------------------------------------------------------------
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end

end

Instructions

Place this script above main. Make a folder in the pictures folder and call it Faces. When using a face picture, make sure it's named like the character's file. To turn facesets on search for @face = false and set it to true to turn facesets on.

FAQ

None yet.

Compatibility

May be incompatible with your CBS.
Is incompatible with Cogwheels RTAB script and please don't ask it to be merged, as I won't do it.

Credits and Thanks
I only want to say that this script was made by illustrationism not by me.
I only made the edits.
Thanks to neonshadow for fixing a bug.

This post has been edited by Raziel: Sep 13 2006, 03:17 PM





not sure if this already exists here.
if it does please just delete this topic or something.


i found this great script for up to 99 save slots on xp!


just replace Scene_File with this.


class Scene_File
SAVEFILE_MAX = 99
# -------------------
def initialize(help_text)
@help_text = help_text
end
# -------------------
def main
@help_window = Window_Help.new
@help_window.set_text(@help_text)
@savefile_windows = []
@cursor_displace = 0
for i in 0..3
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i), i))
end
@file_index = 0
@savefile_windows[@file_index].selected = true
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
for i in @savefile_windows
i.dispose
end
end
# -------------------
def update
@help_window.update
for i in @savefile_windows
i.update
end
if Input.trigger?(Input::C)
on_decision(make_filename(@file_index))
$game_temp.last_file_index = @file_index
return
end
if Input.trigger?(Input::B)
on_cancel
return
end
if Input.repeat?(Input::DOWN)
if Input.trigger?(Input::DOWN) or @file_index < SAVEFILE_MAX - 1
if @file_index == SAVEFILE_MAX - 1
$game_system.se_play($data_system.buzzer_se)
return
end
@cursor_displace += 1
if @cursor_displace == 4
@cursor_displace = 3
for i in @savefile_windows
i.dispose
end
@savefile_windows = []
for i in 0..3
f = i - 2 + @file_index
name = make_filename(f)
@savefile_windows.push(Window_SaveFile.new(f, name, i))
@savefile_windows[i].selected = false
end
end
$game_system.se_play($data_system.cursor_se)
@file_index = (@file_index + 1)
if @file_index == SAVEFILE_MAX
@file_index = SAVEFILE_MAX - 1
end
for i in 0..3
@savefile_windows[i].selected = false
end
@savefile_windows[@cursor_displace].selected = true
return
end
end
if Input.repeat?(Input::UP)
if Input.trigger?(Input::UP) or @file_index > 0
if @file_index == 0
$game_system.se_play($data_system.buzzer_se)
return
end
@cursor_displace -= 1
if @cursor_displace == -1
@cursor_displace = 0
for i in @savefile_windows
i.dispose
end
@savefile_windows = []
for i in 0..3
f = i - 1 + @file_index
name = make_filename(f)
@savefile_windows.push(Window_SaveFile.new(f, name, i))
@savefile_windows[i].selected = false
end
end
$game_system.se_play($data_system.cursor_se)
@file_index = (@file_index - 1)
if @file_index == -1
@file_index = 0
end
for i in 0..3
@savefile_windows[i].selected = false
end
@savefile_windows[@cursor_displace].selected = true
return
end
end
end
# -------------------
def make_filename(file_index)
return "Save#{file_index + 1}.rxdata"
end
# -------------------
end

and replace the Window_SaveFile initialize method with this


class Window_SaveFile < Window_Base
# -------------------
def initialize(file_index, filename, position)
y = 64 + position * 104
super(0, y, 640, 104)
self.contents = Bitmap.new(width - 32, height - 32)
@file_index = file_index
@filename = "Save#{@file_index + 1}.rxdata"
@time_stamp = Time.at(0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@time_stamp = file.mtime
@characters = Marshal.load(file)
@frame_count = Marshal.load(file)
@game_system = Marshal.load(file)
@game_switches = Marshal.load(file)
@game_variables = Marshal.load(file)
@total_sec = @frame_count / Graphics.frame_rate
file.close
end
refresh
@selected = false
end


you can edit the 99 part in the first script to however many save slots you want.
remember!
this is not mine, i simply found this!
should work with almost everything ive tried!



Instructions
Very simple really, just paste the script right above main and thats it XD

Also, you must go into your database and put the name of the item before the description e.g. "Potion: Heals character by 500". In the end i thought it would be more beneficial to make it like this rather then call upon another window to display the name.


#==============================================================================
# Icon Inventory System - Scripted By Mac
#------------------------------------------------------------------------------
# This window displays the Icons and the amount of the item you have.
#==============================================================================

class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 63, 640, 417)
@column_max = 10
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# * Get Item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 10 * (32 + 32)
y = index / 10 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x, y + 9, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# * Help Text Update
#--------------------------------------------------------------------------

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end

Credits
Me! XD



by Near Fantastica & Fuso


Credit due: Fuso made the main part of this script all I did was make it work€ Fuso needs as much credit or more then I do for this script€

Features:

NO MORE CUSTOM MOVEMENTS ~! This script uses path finding to return the shortest path from the START XY to the END XY then uses the custom movement to move the character€ You can chain this path finds together to path link between 2 points or more...

As well an Error message will be displayed if you try to send an event to a place it can not get to€. €œTarget Is Unreachable for Event ID€?

Syntax Event:


CODE
$AEMS.setup_event(index, repeat, skippable = false)


index = the index of the event
repeat = set the repeat flag to true and the define movement will repeat false it will not repeat..
skippable = set skippable flag to true and the event will move ever when blocked
NOTE : This is not wanted in must cases that is why its defaulted to false


CODE
$AEMS.add_command_event(index, code, parameters = [])


index = the index of the event
code = movement code
parameters = the needed parameters for that movement code

Note : the movement codes can be found in the Game_Character page 2 move_type_custom as well as there needed parameters


CODE
$AEMS.start_movement_event(index)


index = the index of the event


CODE
$AEMS.add_paths_event(index, src_x, src_y, trg_x, trg_y)


index = the index of the event
src_x = source x
src_y = source y
trg_x = target x
trg_y = target y

Syntax Player:


CODE
$AEMS.setup_player(repeat, skippable = false)


repeat = set the repeat flag to true and the define movement will repeat false it will not repeat..
skippable = set skippable flag to true and the event will move ever when blocked
NOTE : This is not wanted in must cases that is why its defaulted to false


CODE
$AEMS.add_command_player(code, parameters = [])


code = movement code
parameters = the needed parameters for that movement code

Note : the movement codes can be found in the Game_Character page 2 move_type_custom as well as there needed parameters


CODE
$AEMS.start_movement_player


CODE
$AEMS.add_paths_player(src_x, src_y, trg_x, trg_y)


src_x = source x
src_y = source y
trg_x = target x
trg_y = target y

How to use:

You need to setup a movement event before you can add a path or commands this is done with the $AEMS.setup(index, repeat) command then you can add a command or a path this is done by $AEMS.add_command(index, code, parameters = []) or $AEMS.add_paths(index, src_x, src_y, trg_x, trg_y) commands. Now you can add as many commands and paths as you want to event by adding more of these€ this is called path linking€ then when you are ready to start the movement use $AEMS.start_movement(index)

Now this can be done in 2 places in the events command window or in the custom movement of an event. If you do it in the movement window to start use this
return $AEMS.start_movement(index) or the code will not work right€

As well I found out something interesting if you have a repeating movement event using this movement with a defined wait the wait will repeat everytime€ but if you add a normal move event wait it will only operate once€ this can be a good things to add this delay so not all the events start at once yet do not repeat that wait later€



#======================================
# –� Advanced Event Movement System
#------------------------------------------------------------------------------
# €€By: Near Fantastica
# Date: 23/3/05
#
# Advanced Event Movement using Path Fiding and the Game
# Characters force_move_route method
#======================================
class AEMS
#--------------------------------------------------------------------------
def initialize
@event_route = []
@player_route = nil
end
#--------------------------------------------------------------------------
def setup_event(index, repeat, skippable = false)
@event_route[index] = RPG::MoveRoute.new
@event_route[index].repeat = repeat
@event_route[index].skippable = skippable
@event_route[index].list.clear
end
#--------------------------------------------------------------------------
def add_command_event(index, code, parameters = [])
@event_route[index].list.push RPG::MoveCommand.new(code,parameters)
end
#--------------------------------------------------------------------------
def start_movement_event(index)
@event_route[index].list.push RPG::MoveCommand.new(0)
$game_map.events[index].move_route = @event_route[index]
$game_map.events[index].move_route_index = 0
end
#--------------------------------------------------------------------------
def add_paths_event(index, src_x,src_y,trg_x,trg_y)
paths = $game_map.find_short_paths(src_x,src_y,trg_x,trg_y)
if paths == nil
print "Target Is Unreachable for Event " + index.to_s
return
end
for i in 0...paths.size
case paths[i]
when 2
@event_route[index].list.push RPG::MoveCommand.new(4)
when 4
@event_route[index].list.push RPG::MoveCommand.new(2)
when 6
@event_route[index].list.push RPG::MoveCommand.new(3)
when 8
@event_route[index].list.push RPG::MoveCommand.new(1)
end
end
end
#--------------------------------------------------------------------------
def setup_player(repeat, skippable = false)
@player_route = RPG::MoveRoute.new
@player_route.repeat = repeat
@player_route.skippable = skippable
@player_route.list.clear
end
#--------------------------------------------------------------------------
def add_command_player(code, parameters = [])
@player_route.list.push RPG::MoveCommand.new(code,parameters)
end
#--------------------------------------------------------------------------
def start_movement_player
@player_route.list.push RPG::MoveCommand.new(0)
$game_player.move_route = @player_route
$game_player.move_route_index = 0
end
#--------------------------------------------------------------------------
def add_paths_player(src_x,src_y,trg_x,trg_y)
paths = $game_map.find_short_paths(src_x,src_y,trg_x,trg_y)
if paths == nil
print "Target Is Unreachable for Player "
return
end
for i in 0...paths.size
case paths[i]
when 2
@player_route.list.push RPG::MoveCommand.new(4)
when 4
@player_route.list.push RPG::MoveCommand.new(2)
when 6
@player_route.list.push RPG::MoveCommand.new(3)
when 8
@player_route.list.push RPG::MoveCommand.new(1)
end
end
end
end
#======================================
# –� Path Finding
#------------------------------------------------------------------------------
# €€By: Fuso
#======================================
class Game_Map
#--------------------------------------------------------------------------
attr_accessor :events
#--------------------------------------------------------------------------
def initialize
@events = {}
end
#--------------------------------------------------------------------------
UP = 2
LEFT = 4
RIGHT = 6
DOWN = 8
#--------------------------------------------------------------------------
def find_short_paths(src_x,src_y,trg_x,trg_y,depth = 100, self_event = nil, option_close = false)
return [] if not (passable?(trg_x, trg_y, UP, self_event) or
passable?(trg_x, trg_y, LEFT, self_event) or
passable?(trg_x, trg_y, RIGHT, self_event) or
passable?(trg_x, trg_y, DOWN, self_event))
# Paths will hold the succeeding paths.
paths = []
# path_map will hold what paths has already been visited, to prevent that we attempt to
# walk on the same tile twice.
path_map = [src_x + src_y / 10000.0]
trackers = []
new_trackers = [[src_x, src_y, []]]
if not option_close
depth.times {
trackers = new_trackers
new_trackers = []
for tracker in trackers
if tracker[0] == trg_x and tracker[1] == trg_y
paths.push tracker[2].compact
next
end
path_map.push tracker[0] + tracker[1] / 10000.0
if passable?(tracker[0], tracker[1], DOWN, self_event) and
passable?(tracker[0], tracker[1] - 1, UP) and
not path_map.include? tracker[0] + (tracker[1] - 1) / 10000.0
path_map.push tracker[0] + (tracker[1] - 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] - 1, [tracker[2], UP].flatten]
end
if passable?(tracker[0], tracker[1], RIGHT, self_event) and
passable?(tracker[0] - 1, tracker[1], LEFT) and
not path_map.include? tracker[0] - 1 + tracker[1] / 10000.0
path_map.push tracker[0] - 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] - 1, tracker[1], [tracker[2], LEFT].flatten]
end
if passable?(tracker[0], tracker[1], LEFT, self_event) and
passable?(tracker[0] + 1, tracker[1], RIGHT) and
not path_map.include? tracker[0] + 1 + tracker[1] / 10000.0
path_map.push tracker[0] + 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] + 1, tracker[1], [tracker[2], RIGHT].flatten]
end
if passable?(tracker[0], tracker[1], UP, self_event) and
passable?(tracker[0], tracker[1] + 1, DOWN) and
not path_map.include? tracker[0] + (tracker[1] + 1) / 10000.0
path_map.push tracker[0] + (tracker[1] + 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] + 1, [tracker[2], DOWN].flatten]
end
end
break if paths.size > 0
}
else
paths_distance = 10000 ** 2 * 2
depth.times {
trackers = new_trackers
new_trackers = []
for tracker in trackers
if tracker[0] == trg_x and tracker[1] == trg_y
if paths_distance > 0
paths_distance = 0
paths.clear
end
paths.push tracker[2].compact
next
end
distance = (tracker[0] - trg_x) ** 2 + (tracker[1] - trg_y) ** 2
if distance <= paths_distance
if distance < paths_distance
paths.clear
paths_distance = distance
end
paths.push tracker[2].compact
end
path_map.push tracker[0] + tracker[1] / 10000.0
if passable?(tracker[0], tracker[1], DOWN, self_event) and
passable?(tracker[0], tracker[1] - 1, UP) and
not path_map.include? tracker[0] + (tracker[1] - 1) / 10000.0
path_map.push tracker[0] + (tracker[1] - 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] - 1, [tracker[2], UP].flatten]
end
if passable?(tracker[0], tracker[1], RIGHT, self_event) and
passable?(tracker[0] - 1, tracker[1], LEFT) and
not path_map.include? tracker[0] - 1 + tracker[1] / 10000.0
path_map.push tracker[0] - 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] - 1, tracker[1], [tracker[2], LEFT].flatten]
end
if passable?(tracker[0], tracker[1], LEFT, self_event) and
passable?(tracker[0] + 1, tracker[1], RIGHT) and
not path_map.include? tracker[0] + 1 + tracker[1] / 10000.0
path_map.push tracker[0] + 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] + 1, tracker[1], [tracker[2], RIGHT].flatten]
end
if passable?(tracker[0], tracker[1], UP, self_event) and
passable?(tracker[0], tracker[1] + 1, DOWN) and
not path_map.include? tracker[0] + (tracker[1] + 1) / 10000.0
path_map.push tracker[0] + (tracker[1] + 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] + 1, [tracker[2], DOWN].flatten]
end
end
break if distance == 0 and paths.size > 0
}
end
route = paths[0]
return route
end
end
#======================================
class Scene_Title
#--------------------------------------------------------------------------
alias aems_scene_title_update update
#--------------------------------------------------------------------------
def update
$AEMS = AEMS.new
aems_scene_title_update
end
end
#======================================
class Game_Character
attr_accessor :move_route
attr_accessor :move_route_index
end

Expresseon
20.08.2007, 17:02
@ Titellogoskript
Wo wird denn da "introscreen" definiert? Funktionieren tut es nicht.

Stray
21.08.2007, 17:49
Darf man vielleicht fragen wohin das Ringmenscript gehrt???
Ausserdem Schtze ich haben sich einige Buchstaben in Zeichen verwandelt.
Der Link darber funktioniert nicht und genauso wie das 99 SaveSlots script.:confused:

Expresseon
22.08.2007, 08:42
Darf man vielleicht fragen wohin das Ringmenscript gehrt???
Ausserdem Schtze ich haben sich einige Buchstaben in Zeichen verwandelt.
Der Link darber funktioniert nicht und genauso wie das 99 SaveSlots script.:confused:

Das Saveslot-Skript funktioniert. Man muss nur die Anweisungen befolgen und es richtig einfgen.

Bubu
14.10.2007, 16:02
Ich wei, dass das hier kein Diskussionstheard ist und ich hoffe es ist nicht all zu schlimm, dass ich jetzt frage.
Ich habe das 99 Speicherslotskript ausprobiert und es funktioniert auch soweit. Allerdings werden jetzt keine Bezeichnungen, wie File 1;2;3 usw. mehr angezeigt und die Spielzeit fehlt auch. Ich wei nicht woran das liegen knnte, weil es laut Skript, glaube ich, doch eigentlich angezeitgt werden sollte. Ich hoffe mir kann jemand helfen.

Stray
16.02.2008, 19:09
Gut es ist nicht lebensnotwendig aber hier hab ich mal das Skript vom sogenannten...







=begin

Mode07 on the Map!
Includes:
Mode07 v0.6
Overworld Sprite Resize
Written by mewsterus

Special Thanks:
Fanha Giang (for a reverse engineered Tilemap class)
--------------------------------------------------------------------------------
Instructions:
--------------------------------------------------------------------------------
To install, just insert this in a descriptive code slot right above Main.
This is different than previous instructions; please read the next paragraph.

If you had a previous install of this script and need an original version of
Spriteset_Map, one can be found at:
http://www.rpg-palace.com/scripts/spriteset_map.txt

To activate Mode07, add [#XX] to the map's name, replacing XX with the
percentage of Mode07 to apply. Greater numbers will result in a more slanted
world.

To activate overworld sprite resize, add [OV] to the map's name. This will make
sprites smaller on that map.

For the purposes of location scripts, these identifiers will not appear.


Examples:

"Overworld[#40]" will result in a slant identical to the second screenshot.
"Underworld[OV]" will resize only the player character to a small size, as if
seen from high above.
"Atthelevelworld[OV][#12]" will result in the player being resized, and a modest
slant of 12%
"JustPlainWorld" will result in the same old map you've always seen.

To add a sky, simply use the panorama with the tileset. Also, events will not
be drawn flat with the map. Any vertical objects such as trees should be put
in events and displayed that way.

You can also add a sky by adding a fog. If you add this, you can make it look
like the first screenshot.

A note on the $strip_size variable; the default value is 8, however there is
extremely minimal, almost nonexistant lag with 16. The screen is extremely
smooth with 4, or even 2. If you're having major problems with lag, you may
need to use 32, but it won't look too pretty.
--------------------------------------------------------------------------------
* Draw_Tilemap v1.72-0.6
Fanha Giang, 02/12/2006 (mm/dd/yyyy)
Edited for Mode07 by mewsterus 08/08/2006 (mm/dd/yyyy)
=end
#===============================================================================
$width = 640 # Screen width (will not change resolution,
$height = 480 # Screen height here for compatibility)
$ov_zoom = 0.6 # Overworld zoom multiplier
$strip_size = 8 # Size of each strip of the map. Higher numbers will lag less.
# Recommended that this number be a power of 2.
# Do not make higher than 64.
$curve = true # Whether the map is curled, for overworlds (old method)
$data_map = load_data("Data/MapInfos.rxdata")
#===============================================================================
class RPG::MapInfo
def name # Definition prevents location scripts from reading anything within
return @name.gsub(/\[.*\]/) {""} # brackets, including the brackets
end
#-----------------------------------------------------------------------------
def original_name
return @name
end
#-----------------------------------------------------------------------------
def overworld?
return @name.scan(/[OV]/).size > 0
end
#-----------------------------------------------------------------------------
def pitch
@name =~ /\[#[ ]*([00-99]+)\]/i
return $1
end
end
#===============================================================================
class Draw_Tilemap # This class controls a set of sprites, with different Z
# values, arranged into horizontal bars
attr_accessor :tileset
attr_accessor :map_data
attr_accessor :priorities
attr_accessor :autotiles
attr_accessor :bitmaps
attr_accessor :pitch
attr_accessor :ox
attr_accessor :oy
attr_accessor :plus_y
INDEX = # Autotile definitions
[
26, 27, 32, 33, 4, 27, 32, 33, 26, 5, 32, 33, 4, 5, 32, 33,
26, 27, 32, 11, 4, 27, 32, 11, 26, 5, 32, 11, 4, 5, 32, 11,
26, 27, 10, 33, 4, 27, 10, 33, 26, 5, 10, 33, 4, 5, 10, 33,
26, 27, 10, 11, 4, 27, 10, 11, 26, 5, 10, 11, 4, 5, 10, 11,
24, 25, 30, 31, 24, 5, 30, 31, 24, 25, 30, 11, 24, 5, 30, 11,
14, 15, 20, 21, 14, 15, 20, 11, 14, 15, 10, 21, 14, 15, 10, 11,
28, 29, 34, 35, 28, 29, 10, 35, 4, 29, 34, 35, 4, 29, 10, 35,
38, 39, 44, 45, 4, 39, 44, 45, 38, 5, 44, 45, 4, 5, 44, 45,
24, 29, 30, 35, 14, 15, 44, 45, 12, 13, 18 ,19, 12, 13, 18, 11,
16, 17, 22, 23, 16, 17, 10, 23, 40, 41, 46, 47, 4, 41, 46, 47,
36, 37, 42, 43, 36, 5, 42, 43, 12, 17, 18, 23, 12, 13, 42, 43,
36, 41, 42, 47, 16, 17, 46, 47, 12, 17, 42, 47, 0, 1, 6, 7
]
X = [0, 1, 0, 1] # Used in 16x16 autotile drawing; left, right, left, right
Y = [0, 0, 1, 1] # Used in 16x16 autotile drawing; up, up, down, down
#-----------------------------------------------------------------------------
def initialize
# Get initial data from Game_Map
@tileset = RPG::Cache.tileset($game_map.tileset_name)
@map_data = $game_map.data
@priorities = $game_map.priorities
@autotiles = []
for i in 0..6
@autotiles[i] = RPG::Cache.autotile($game_map.autotile_names[i])
end
# Provide blank data in proper object form
@ox = 0
@oy = 0
# Bitmaps used for each priority's drawing. Priorities 2-5 are combined.
@bitmaps = [Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size),
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size),
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size)]
# Generate blank sprites
@sprites = [[], [], []]
for i in 0..2 # For each layer
for j in 0..$game_map.height * (32 / $strip_size) - 1
# For each horizontal strip of $strip_size height, make a blank sprite
@sprites[i].push(Sprite.new)
@sprites[i][j].bitmap = Bitmap.new($game_map.width*32, $strip_size*2)
@sprites[i][j].x = $width / 2
@sprites[i][j].y = -64
@sprites[i][j].z = -5 + (i * 10)
end
end
@disposed = false
draw
end
#-----------------------------------------------------------------------------
def update
# Retrieve variable values for slant drawing; these values accesible by event
@pitch = $game_map.pitch.to_f
@plus_y = $game_map.plus_y
for i in 0..2 # For each layer
for j in [0, (($height / 2) - (($height * 60) /
@pitch) + @oy) / $strip_size].max.to_i..[@sprites[i].size - 1,
(@oy + $height) / $strip_size].min.to_i
# For each strip within the visible screen, update OX/Y
@sprites[i][j].x = $width / 2
@sprites[i][j].y = j * $strip_size - @oy
unless @pitch == 0 # Apply X Zoom
@sprites[i][j].zoom_x = (@sprites[i][j].y - $height / 2) *
(@pitch / ($height * 25)) + 1
if $curve # Zoom Y values same as X, and compensate
@sprites[i][j].zoom_y = @sprites[i][j].zoom_x
@sprites[i][j].y += $strip_size * (1 - @sprites[i][j].zoom_y) *
((1 - @sprites[i][j].zoom_y) /
(2 * ((@pitch / 100) /
($height / ($strip_size * 2)))) + 0.5)
end
end
@sprites[i][j].ox = @ox + $width / 2
# Add plus_y value; used in airship script
@sprites[i][j].y += @plus_y
end
end
end
#-----------------------------------------------------------------------------
def dispose
# Dispose all sprites
for i in 0..2
for j in @sprites[i]
j.bitmap.dispose
j.dispose
end
end
for i in @bitmaps
i.dispose
end
@tileset.dispose
for i in 0..6
@autotiles[i].dispose
end
@disposed = true
end
#-----------------------------------------------------------------------------
def disposed?
return @disposed
end
#-----------------------------------------------------------------------------
def draw
# Draw each individual position by XY value
for x in 0...@map_data.xsize
for y in 0...@map_data.ysize
draw_position(x, y)
end
end
for i in 0..2 # For each priority
for j in 0..@sprites[i].size - 1
# For each horizontal strip, transfer the bitmap appropriately
@sprites[i][j].bitmap.blt(0, 0, @bitmaps[i],
Rect.new(0, j * $strip_size, $game_map.width * 32, $strip_size * 2))
end
end
end
#-----------------------------------------------------------------------------
def draw_position(x, y)
for layer in 0..2
pos = @map_data[x, y, layer]
@priorities[pos] = 2 if @priorities[pos] > 2 # Round priorities down to 2
if pos >= 384 # If it is a tile
# src_rect = 32x32 Rect on the tileset for source bitmap
src_rect = Rect.new(((pos-384)%8)*32, ((pos-384)/8)*32, 32, 32)
# Transfer source bitmap on the tileset to the current map tile
@bitmaps[@priorities[pos]].blt(x * 32, y * 32, @tileset, src_rect)
elsif pos >= 48 and pos < 384 # If it is an autotile
id = pos / 48 - 1 # Which autotile is used (0-6)
# plus_x is in development for animated autotiles
plus_x = 0 #((@anim / 4) % (@autotiles[id].width / 96)) * 96
for corner in 0..3
h = 4 * (pos % 48) + corner # Used to access INDEX
# src_rect = 16x16 Rect on the autotile for source bitmap
src_rect = Rect.new((INDEX[h]%6)*16+plus_x, (INDEX[h]/6)*16, 16, 16)
# Transfer source bitmap on the autotile to the current 16x16 tile
@bitmaps[@priorities[pos]].blt(x*32+X[corner]*16, y*32+Y[corner]*16,
@autotiles[id], src_rect)
end
end
end
end
end
#===============================================================================
class Game_Map
attr_accessor :pitch
attr_accessor :plus_y
#-----------------------------------------------------------------------------
alias setup_or :setup
def setup(map_id)
setup_or(map_id)
@pitch = $data_map[$game_map.map_id].pitch
@plus_y = 0
end
#-----------------------------------------------------------------------------
def name
return $data_map[@map_id].name
end
end
#===============================================================================
class Sprite_Character < RPG::Sprite
attr_accessor :character
#-----------------------------------------------------------------------------
def initialize(character = nil)
super()
@character = character
update
end
#-----------------------------------------------------------------------------
alias update_or :update
def update
update_or
# Update pitch value, and update zoom values to match
@pitch = $data_map[$game_map.map_id].pitch.to_f
self.zoom_x =
self.zoom_y = ((@character.screen_y - 16) - ($height / 2)) *
(@pitch / ($height * 25)) + 1
# Set sprite coordinates. X value is multiplied by zoom value from the center
self.x = ($width / 2) + ((@character.screen_x - ($width / 2)) * self.zoom_x)
self.y = @character.screen_y
# Add Y value for zoom compensation while in curve mode
if $curve and @pitch != 0
self.y += (8 * (1 - self.zoom_y) * ((1 - self.zoom_y) /
(2 * ((@pitch / 100) / ($height / 16.0))) + 0.5))
end
# Add plus_y value; used in airship script
self.y += $game_map.plus_y unless @character.is_a?(Game_Player)
self.z = @character.screen_z(@ch) - (self.zoom_y < 0.5 ? 1000 : 0)
if $data_map[$game_map.map_id].overworld? and
@character.is_a?(Game_Player) # Multiply zoom by Overworld factor if
self.zoom_x *= $ov_zoom # the map is marked with [OV] and event
self.zoom_y *= $ov_zoom # is a Game_Player
end
end
end
#===============================================================================
class Spriteset_Map
def initialize
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 2000
@viewport3.z = 5000
# Make tilemap
@tilemap = Draw_Tilemap.new
# Make panorama plane
@panorama = Plane.new
@panorama.z = -2000
# Make fog plane
@fog = Plane.new
@fog.z = 3000
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new($game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new($game_player))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame update
update
end
#-----------------------------------------------------------------------------
def dispose
# Dispose of tilemap
@tilemap.dispose
# Dispose of panorama plane
@panorama.dispose
# Dispose of fog plane
@fog.dispose
# Dispose of character sprites
for sprite in @character_sprites
sprite.dispose
end
# Dispose of weather
@weather.dispose
# Dispose of picture sprites
for sprite in @picture_sprites
sprite.dispose
end
# Dispose of timer sprite
@timer_sprite.dispose
# Dispose of viewports
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
end
end





__________________________________________________

Ich glaube die Erklrung ist darin enthalten.
Bilder sowie Informationen mssten auf der Seite davon sein:
http://www.rpg-palace.com/downloads/details.php?id=2

----------------------------------------------------------

AeyKey
25.04.2008, 13:42
wow leute also ich muss sagen dass das hier ja der reine wahnsinn ist!:D
diese ganzen scripte sind echt hammer und bin froh dass ihr die hier verffentlicht!
was wrde ich nur ohne euch tun?http://www.multimediaxis.de/images/smilies/old/sm_12.gif http://www.multimediaxis.de/images/smilies/old/sm_12.gif :D

SMWma
20.05.2008, 23:09
Um gute Scripts zu erstellen, braucht man hufig nicht Ruby!!!
Ich habe ein Spiel mit einem Vorspann und animiertem Titel.
Der Trick:
Das sind beides Karten!!!
Bei scenen_Titel gibt es eine Zeile, wo steht:
If Imput C.
Im Klartext:
Wenn Enter gedrckt worden ist.
Jetzt luft es Automatisch ab.
Es gibt aber noch ein Problen.
Wenn es eine Save.DateiX im Ordner gibt,
ist die Start-Auswahl 1.
Dann habe ich berall Scene_Load.new durch Scene_Game.new erstetz...
Die Karte habe ich dann mit Conditional Branch und Script erstellt...
Der Rest ist euch berlassen!!!
Dies ist ein gutes Beispiel fr Change-not-All-by-Adrian2000
Am Ende sieht es genau so aus:
[PHP]
#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
#  タイトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# 戦闘テストの場合
if $BTEST
battle_test
return
end
# データベースをロード
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# システムオブジェクトを作成
$game_system = Game_System.new
# タイトルグラフィックを作成
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# コマンドウィンドウを作成
s1 = ""
s2 = ""
s3 = ""
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 999 - @command_window.width / 2
@command_window.y = 999
# コンティニュー有効判定
# セーブファイルがひとつでも存在するかどうかを調べる
# 有効なら @continue_enabled を true、無効なら false にする
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.sav")
@continue_enabled = true
end
end
# コンティニューが有効な場合、カーソルをコンティニューに合わせる
# 無効な場合、コンティニューの文字をグレー表示にする
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# タイトル BGM を演奏
$game_system.bgm_play($data_system.title_bgm)
# ME、BGS の演奏を停止
Audio.me_stop
Audio.bgs_stop
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# コマンドウィンドウを解放
@command_window.dispose
# タイトルグラフィックを解放
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# コマンドウィンドウを更新
@command_window.update
# C ボタンが押された場合
# コマンドウィンドウのカーソル位置で分岐
case @command_window.index
when 0 # ニューゲーム
command_new_game
when 1 # ニューゲーム
command_new_game
when 2 # ニューゲーム
command_new_game
end
end
end
#--------------------------------------------------------------------------
# ● コマンド : ニューゲーム
#--------------------------------------------------------------------------
def command_new_game
# BGM を停止
Audio.bgm_stop
# プレイ時間計測用のフレームカウントをリセット
Graphics.frame_count = 0
# 各種ゲームオブジェクトを作成
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# 初期パーティをセットアップ
$game_party.setup_starting_members
# 初期位置のマップをセットアップ
$game_map.setup($data_system.start_map_id)
# プレイヤーを初期位置に移動
$game_player.moveto($data_system.start_x, $data_system.start_y)
# プレイヤーをリフレッシュ
$game_player.refresh
# マップに設定されている BGM と BGS の自動切り替えを実行
$game_map.autoplay
# マップを更新 (並列イベント実行)
$game_map.update
# マップ画面に切り替え
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# ● コマンド : コンティニュー
#--------------------------------------------------------------------------
def command_continue
# コンティニューが無効の場合
unless @continue_enabled
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# ロード画面に切り替え
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# ● コマンド : シャットダウン
#--------------------------------------------------------------------------
def command_shutdown
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# BGM、BGS、ME をフェードアウト
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# シャットダウン
$scene = nil
end
#--------------------------------------------------------------------------
# ● 戦闘テスト
#--------------------------------------------------------------------------
def battle_test
# データベース (戦闘テスト用) をロード
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# プレイ時間計測用のフレームカウントをリセット
Graphics.frame_count = 0
# 各種ゲームオブジェクトを作成
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# 戦闘テスト用のパーティをセットアップ
$game_party.setup_battle_test_members
# トループ ID、逃走可能フラグ、バトルバックを設定
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# バトル開始 SE を演奏
$game_system.se_play($data_system.battle_start_se)
# バトル BGM を演奏
$game_system.bgm_play($game_system.battle_bgm)
# バトル画面に切り替え
$scene = Scene_Battle.new
end
[/CODE]

Morlon
25.07.2008, 12:11
Tschuldigd das ich str aber ich bin neu und wrde gern wissen wie ich
ein neuen Thread aufmach\erstell.

WeTa
25.07.2008, 13:50
Tschuldigd das ich str aber ich bin neu und wrde gern wissen wie ich
ein neuen Thread aufmach\erstell.

Auf den "neues Thema" Button klicken.

SMWma
18.10.2008, 14:24
Gut es ist nicht lebensnotwendig aber hier hab ich mal das Skript vom sogenannten...







=begin

Mode07 on the Map!
Includes:
Mode07 v0.6
Overworld Sprite Resize
Written by mewsterus

Special Thanks:
Fanha Giang (for a reverse engineered Tilemap class)
--------------------------------------------------------------------------------
Instructions:
--------------------------------------------------------------------------------
To install, just insert this in a descriptive code slot right above Main.
This is different than previous instructions; please read the next paragraph.

If you had a previous install of this script and need an original version of
Spriteset_Map, one can be found at:
http://www.rpg-palace.com/scripts/spriteset_map.txt

To activate Mode07, add [#XX] to the map's name, replacing XX with the
percentage of Mode07 to apply. Greater numbers will result in a more slanted
world.

To activate overworld sprite resize, add [OV] to the map's name. This will make
sprites smaller on that map.

For the purposes of location scripts, these identifiers will not appear.


Examples:

"Overworld[#40]" will result in a slant identical to the second screenshot.
"Underworld[OV]" will resize only the player character to a small size, as if
seen from high above.
"Atthelevelworld[OV][#12]" will result in the player being resized, and a modest
slant of 12%
"JustPlainWorld" will result in the same old map you've always seen.

To add a sky, simply use the panorama with the tileset. Also, events will not
be drawn flat with the map. Any vertical objects such as trees should be put
in events and displayed that way.

You can also add a sky by adding a fog. If you add this, you can make it look
like the first screenshot.

A note on the $strip_size variable; the default value is 8, however there is
extremely minimal, almost nonexistant lag with 16. The screen is extremely
smooth with 4, or even 2. If you're having major problems with lag, you may
need to use 32, but it won't look too pretty.
--------------------------------------------------------------------------------
* Draw_Tilemap v1.72-0.6
Fanha Giang, 02/12/2006 (mm/dd/yyyy)
Edited for Mode07 by mewsterus 08/08/2006 (mm/dd/yyyy)
=end
#===============================================================================
$width = 640 # Screen width (will not change resolution,
$height = 480 # Screen height here for compatibility)
$ov_zoom = 0.6 # Overworld zoom multiplier
$strip_size = 8 # Size of each strip of the map. Higher numbers will lag less.
# Recommended that this number be a power of 2.
# Do not make higher than 64.
$curve = true # Whether the map is curled, for overworlds (old method)
$data_map = load_data("Data/MapInfos.rxdata")
#===============================================================================
class RPG::MapInfo
def name # Definition prevents location scripts from reading anything within
return @name.gsub(/\[.*\]/) {""} # brackets, including the brackets
end
#-----------------------------------------------------------------------------
def original_name
return @name
end
#-----------------------------------------------------------------------------
def overworld?
return @name.scan(/[OV]/).size > 0
end
#-----------------------------------------------------------------------------
def pitch
@name =~ /\[#[ ]*([00-99]+)\]/i
return $1
end
end
#===============================================================================
class Draw_Tilemap # This class controls a set of sprites, with different Z
# values, arranged into horizontal bars
attr_accessor :tileset
attr_accessor :map_data
attr_accessor :priorities
attr_accessor :autotiles
attr_accessor :bitmaps
attr_accessor :pitch
attr_accessor :ox
attr_accessor :oy
attr_accessor :plus_y
INDEX = # Autotile definitions
[
26, 27, 32, 33, 4, 27, 32, 33, 26, 5, 32, 33, 4, 5, 32, 33,
26, 27, 32, 11, 4, 27, 32, 11, 26, 5, 32, 11, 4, 5, 32, 11,
26, 27, 10, 33, 4, 27, 10, 33, 26, 5, 10, 33, 4, 5, 10, 33,
26, 27, 10, 11, 4, 27, 10, 11, 26, 5, 10, 11, 4, 5, 10, 11,
24, 25, 30, 31, 24, 5, 30, 31, 24, 25, 30, 11, 24, 5, 30, 11,
14, 15, 20, 21, 14, 15, 20, 11, 14, 15, 10, 21, 14, 15, 10, 11,
28, 29, 34, 35, 28, 29, 10, 35, 4, 29, 34, 35, 4, 29, 10, 35,
38, 39, 44, 45, 4, 39, 44, 45, 38, 5, 44, 45, 4, 5, 44, 45,
24, 29, 30, 35, 14, 15, 44, 45, 12, 13, 18 ,19, 12, 13, 18, 11,
16, 17, 22, 23, 16, 17, 10, 23, 40, 41, 46, 47, 4, 41, 46, 47,
36, 37, 42, 43, 36, 5, 42, 43, 12, 17, 18, 23, 12, 13, 42, 43,
36, 41, 42, 47, 16, 17, 46, 47, 12, 17, 42, 47, 0, 1, 6, 7
]
X = [0, 1, 0, 1] # Used in 16x16 autotile drawing; left, right, left, right
Y = [0, 0, 1, 1] # Used in 16x16 autotile drawing; up, up, down, down
#-----------------------------------------------------------------------------
def initialize
# Get initial data from Game_Map
@tileset = RPG::Cache.tileset($game_map.tileset_name)
@map_data = $game_map.data
@priorities = $game_map.priorities
@autotiles = []
for i in 0..6
@autotiles[i] = RPG::Cache.autotile($game_map.autotile_names[i])
end
# Provide blank data in proper object form
@ox = 0
@oy = 0
# Bitmaps used for each priority's drawing. Priorities 2-5 are combined.
@bitmaps = [Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size),
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size),
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size)]
# Generate blank sprites
@sprites = [[], [], []]
for i in 0..2 # For each layer
for j in 0..$game_map.height * (32 / $strip_size) - 1
# For each horizontal strip of $strip_size height, make a blank sprite
@sprites[i].push(Sprite.new)
@sprites[i][j].bitmap = Bitmap.new($game_map.width*32, $strip_size*2)
@sprites[i][j].x = $width / 2
@sprites[i][j].y = -64
@sprites[i][j].z = -5 + (i * 10)
end
end
@disposed = false
draw
end
#-----------------------------------------------------------------------------
def update
# Retrieve variable values for slant drawing; these values accesible by event
@pitch = $game_map.pitch.to_f
@plus_y = $game_map.plus_y
for i in 0..2 # For each layer
for j in [0, (($height / 2) - (($height * 60) /
@pitch) + @oy) / $strip_size].max.to_i..[@sprites[i].size - 1,
(@oy + $height) / $strip_size].min.to_i
# For each strip within the visible screen, update OX/Y
@sprites[i][j].x = $width / 2
@sprites[i][j].y = j * $strip_size - @oy
unless @pitch == 0 # Apply X Zoom
@sprites[i][j].zoom_x = (@sprites[i][j].y - $height / 2) *
(@pitch / ($height * 25)) + 1
if $curve # Zoom Y values same as X, and compensate
@sprites[i][j].zoom_y = @sprites[i][j].zoom_x
@sprites[i][j].y += $strip_size * (1 - @sprites[i][j].zoom_y) *
((1 - @sprites[i][j].zoom_y) /
(2 * ((@pitch / 100) /
($height / ($strip_size * 2)))) + 0.5)
end
end
@sprites[i][j].ox = @ox + $width / 2
# Add plus_y value; used in airship script
@sprites[i][j].y += @plus_y
end
end
end
#-----------------------------------------------------------------------------
def dispose
# Dispose all sprites
for i in 0..2
for j in @sprites[i]
j.bitmap.dispose
j.dispose
end
end
for i in @bitmaps
i.dispose
end
@tileset.dispose
for i in 0..6
@autotiles[i].dispose
end
@disposed = true
end
#-----------------------------------------------------------------------------
def disposed?
return @disposed
end
#-----------------------------------------------------------------------------
def draw
# Draw each individual position by XY value
for x in 0...@map_data.xsize
for y in 0...@map_data.ysize
draw_position(x, y)
end
end
for i in 0..2 # For each priority
for j in 0..@sprites[i].size - 1
# For each horizontal strip, transfer the bitmap appropriately
@sprites[i][j].bitmap.blt(0, 0, @bitmaps[i],
Rect.new(0, j * $strip_size, $game_map.width * 32, $strip_size * 2))
end
end
end
#-----------------------------------------------------------------------------
def draw_position(x, y)
for layer in 0..2
pos = @map_data[x, y, layer]
@priorities[pos] = 2 if @priorities[pos] > 2 # Round priorities down to 2
if pos >= 384 # If it is a tile
# src_rect = 32x32 Rect on the tileset for source bitmap
src_rect = Rect.new(((pos-384)%8)*32, ((pos-384)/8)*32, 32, 32)
# Transfer source bitmap on the tileset to the current map tile
@bitmaps[@priorities[pos]].blt(x * 32, y * 32, @tileset, src_rect)
elsif pos >= 48 and pos < 384 # If it is an autotile
id = pos / 48 - 1 # Which autotile is used (0-6)
# plus_x is in development for animated autotiles
plus_x = 0 #((@anim / 4) % (@autotiles[id].width / 96)) * 96
for corner in 0..3
h = 4 * (pos % 48) + corner # Used to access INDEX
# src_rect = 16x16 Rect on the autotile for source bitmap
src_rect = Rect.new((INDEX[h]%6)*16+plus_x, (INDEX[h]/6)*16, 16, 16)
# Transfer source bitmap on the autotile to the current 16x16 tile
@bitmaps[@priorities[pos]].blt(x*32+X[corner]*16, y*32+Y[corner]*16,
@autotiles[id], src_rect)
end
end
end
end
end
#===============================================================================
class Game_Map
attr_accessor :pitch
attr_accessor :plus_y
#-----------------------------------------------------------------------------
alias setup_or :setup
def setup(map_id)
setup_or(map_id)
@pitch = $data_map[$game_map.map_id].pitch
@plus_y = 0
end
#-----------------------------------------------------------------------------
def name
return $data_map[@map_id].name
end
end
#===============================================================================
class Sprite_Character < RPG::Sprite
attr_accessor :character
#-----------------------------------------------------------------------------
def initialize(character = nil)
super()
@character = character
update
end
#-----------------------------------------------------------------------------
alias update_or :update
def update
update_or
# Update pitch value, and update zoom values to match
@pitch = $data_map[$game_map.map_id].pitch.to_f
self.zoom_x =
self.zoom_y = ((@character.screen_y - 16) - ($height / 2)) *
(@pitch / ($height * 25)) + 1
# Set sprite coordinates. X value is multiplied by zoom value from the center
self.x = ($width / 2) + ((@character.screen_x - ($width / 2)) * self.zoom_x)
self.y = @character.screen_y
# Add Y value for zoom compensation while in curve mode
if $curve and @pitch != 0
self.y += (8 * (1 - self.zoom_y) * ((1 - self.zoom_y) /
(2 * ((@pitch / 100) / ($height / 16.0))) + 0.5))
end
# Add plus_y value; used in airship script
self.y += $game_map.plus_y unless @character.is_a?(Game_Player)
self.z = @character.screen_z(@ch) - (self.zoom_y < 0.5 ? 1000 : 0)
if $data_map[$game_map.map_id].overworld? and
@character.is_a?(Game_Player) # Multiply zoom by Overworld factor if
self.zoom_x *= $ov_zoom # the map is marked with [OV] and event
self.zoom_y *= $ov_zoom # is a Game_Player
end
end
end
#===============================================================================
class Spriteset_Map
def initialize
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 2000
@viewport3.z = 5000
# Make tilemap
@tilemap = Draw_Tilemap.new
# Make panorama plane
@panorama = Plane.new
@panorama.z = -2000
# Make fog plane
@fog = Plane.new
@fog.z = 3000
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new($game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new($game_player))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame update
update
end
#-----------------------------------------------------------------------------
def dispose
# Dispose of tilemap
@tilemap.dispose
# Dispose of panorama plane
@panorama.dispose
# Dispose of fog plane
@fog.dispose
# Dispose of character sprites
for sprite in @character_sprites
sprite.dispose
end
# Dispose of weather
@weather.dispose
# Dispose of picture sprites
for sprite in @picture_sprites
sprite.dispose
end
# Dispose of timer sprite
@timer_sprite.dispose
# Dispose of viewports
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
end
end





__________________________________________________

Ich glaube die Erklrung ist darin enthalten.
Bilder sowie Informationen mssten auf der Seite davon sein:
http://www.rpg-palace.com/downloads/details.php?id=2

----------------------------------------------------------


wie baue ich es ein???

Mailin1001
18.10.2008, 16:07
Ich kapier das mit mode07 ebenfalls nicht ...

J.A
26.10.2008, 18:58
Das steht

Einfach euere Map zbs "Mapxxx[#Eure Zahl] bennen dann wirds scho^^'
bersetzt^^

chrisblue
30.12.2008, 22:20
Ich liste hier einfach mal die ganzen bereits geposteten Scripte auf.
Geupdated wird immer wenn neue Scripte dazu kommen!


#===================================================
# ■ AMS - Advanced Message Script - R4 [Update #2]
#===================================================
# For more infos and update, visit:
# www.dubealex.com (Creation Asylum)
#
# Edited, Fixed and Enhanced by: Dubealex
# Original Script Core by: XRXS Scripter (Jap Dudes)
# HTML Hexadecimal color feature from: Phylomorphis
#
# Special Thanks:
# Rabu: For enabling the Show Face feature in an encrypted project
#
# To found all my new features, search the following: #NEW
# To configure the button to skip the dialog, search: #SKIP_TEXT_CODE
#
# May 18, 2005
#===================================================

LETTER_BY_LETTER_MODE = true #Set the letter by letter mode ON/OFF

#===================================================
# ▼ CLASS AMS Begins
#===================================================
class AMS

attr_accessor :name_box_x_offset
attr_accessor :name_box_y_offset
attr_accessor :font_type
attr_accessor :name_font_type
attr_accessor :font_size
attr_accessor :name_font_size
attr_accessor :message_box_opacity
attr_accessor :name_box_skin
attr_accessor :name_box_text_color
attr_accessor :message_box_text_color
attr_accessor :message_box_skin
attr_accessor :name_box_width
attr_accessor :name_box_height
attr_accessor :message_width
attr_accessor :message_height
attr_accessor :message_x
attr_accessor :message_y_bottom
attr_accessor :message_y_middle
attr_accessor :message_y_top
attr_accessor :event_message_x_ofset
attr_accessor :event_message_y_ofset

def initialize

@name_box_x_offset = 0 #Choose the X axis offset of the name bos. default= 0
@name_box_y_offset = -10 #Choose the Y axis offset of the name bos. default= -10
@name_box_width = 8 #Choose the width of the Name Box. default= 8
@name_box_height = 26 #Choose the height of the Name Box. default= 26

@font_type = "Tahoma" #Choose the Font Name (Case Sensitive) for message box
@name_font_type = "Tahoma" #Choose the Font Name (Case Sensitive) for Name Box
@font_size = 22 #Choose the default Font Size for message box text
@name_font_size = 22 #Choose the deafault Font Size for Name Box text
@name_box_text_color=0 #Choose the Text Color of the Name Box
@message_box_text_color=0 #Choose the Text Color of the Message Box

@message_box_opacity = 160 #Choose the opacity of the message window. Default=160
@message_box_skin = "001-Blue01" #Choose the WindowSkin for the Message Box
@name_box_skin = "001-Blue01" #Choose the WindowSkin for the Name Box

@message_width = 480 #Choose the width size of the message box. Default=480
@message_height = 160 #Choose the height size of the message box. Default=160
@message_x = 80 #Choose the X position of the message box. Default=80
@message_y_bottom = 304 #Choose the Y bottom position of the message box. Default=304
@message_y_middle = 160 #Choose the Y middle position of the message box. Default=160
@message_y_top = 16 #Choose the Y top position of the message box. Default=16

@event_message_x_ofset = 0 #Choose the X position offset of the event message. Default=0
@event_message_y_ofset = 48 #Choose the Y position offset of the event message. Default=48

end
end
#===================================================
# ▲ CLASS AMS Ends
#===================================================


#===================================================
# ▼ Class Window_Message Begins
#===================================================
class Window_Message < Window_Selectable

alias xrxs9_initialize initialize

def initialize

@alex_skip = false

xrxs9_initialize

if $soundname_on_speak == nil then
$soundname_on_speak = ""
end

$gaiji_file = "./Graphics/Gaiji/sample.png"

if FileTest.exist?($gaiji_file)
@gaiji_cache = Bitmap.new($gaiji_file)
else
@gaigi_cache = nil
end
@opacity_text_buf = Bitmap.new(32, 32)
end


#--------------------------------------------------------------------------

alias xrxs9_terminate_message terminate_message

def terminate_message

if @name_window_frame != nil
@name_window_frame.dispose
@name_window_frame = nil
end

if @name_window_text != nil
@name_window_text.dispose
@name_window_text = nil
end
xrxs9_terminate_message
end

#--------------------------------------------------------------------------

def refresh

self.contents.clear
self.contents.font.color = text_color($ams.message_box_text_color)
self.contents.font.name = $ams.font_type
self.contents.font.size = $ams.font_size
self.windowskin = RPG::Cache.windowskin($ams.message_box_skin)
@x = @y = @max_x = @max_y = @indent = @lines = 0
@face_indent = 0
@opacity = 255
@cursor_width = 0
@write_speed = 0
@write_wait = 0
@mid_stop = false
@face_file = nil
@popchar = -2

if $game_temp.choice_start == 0
@x = 8
end

if $game_temp.message_text != nil
@now_text = $game_temp.message_text
if (/\A\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
@face_file = $1 + ".png"
@x = @face_indent = 128
if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
end
@now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
end

begin
last_text = @now_text.clone
@now_text.gsub!(/\\[Vv]\[(?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
end until @now_text == last_text
@now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end

#NEW
#Dubealex's Stop Skip Text ON-OFF
@now_text.gsub!(/\\[%]/) { "\100" }
#End new command

#NEW
#Dubealex's Show Monster Name Feature
@now_text.gsub!(/\\[Mm]\[([0-9]+)\]/) do
$data_enemies[$1.to_i] != nil ? $data_enemies[$1.to_i].name : ""
end
#End new command

#NEW
#Dubealex's Show Item Price Feature
@now_text.gsub!(/\\[Pp]rice\[([0-9]+)\]/) do
$data_items[$1.to_i] != nil ? $data_items[$1.to_i].price : ""
end
#End new command

#NEW
#Dubealex's Show Hero Class Name Feature
@now_text.gsub!(/\\[Cc]lass\[([0-9]+)\]/) do
$data_classes[$data_actors[$1.to_i].class_id] != nil ? $data_classes[$data_actors[$1.to_i].class_id].name : ""
end
#End new command

#NEW
#Dubealex's Show Current Map Name Feature
@now_text.gsub!(/\\[Mm]ap/) do
$game_map.name != nil ? $game_map.name : ""
end
#End new command

#NEW
#Dubealex's Choose Name Box Text Color
@now_text.gsub!(/\\[Zz]\[([0-9]+)\]/) do
$ams.name_box_text_color=$1.to_i
@now_text.sub!(/\\[Zz]\[([0-9]+)\]/) { "" }
end
#End new command

name_window_set = false
if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
name_window_set = true
name_text = $1
@now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
end

if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
@popchar = $1.to_i
if @popchar == -1
@x = @indent = 48
@y = 4
end
@now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
end

@max_choice_x = 0
if @popchar >= 0
@text_save = @now_text.clone
@max_x = 0
@max_y = 4
for i in 0..3
line = @now_text.split(/\n/)[3-i]
@max_y -= 1 if line == nil and @max_y <= 4-i
next if line == nil
line.gsub!(/\\\w\[(\w+)\]/) { "" }
cx = contents.text_size(line).width
@max_x = cx if cx > @max_x
if i >= $game_temp.choice_start
@max_choice_x = cx if cx > @max_choice_x
end
end
self.width = @max_x + 32 + @face_indent
self.height = (@max_y - 1) * 32 + 64
@max_choice_x -= 68
@max_choice_x -= @face_indent*216/128
else
@max_x = self.width - 32 - @face_indent
for i in 0..3
line = @now_text.split(/\n/)[i]
next if line == nil
line.gsub!(/\\\w\[(\w+)\]/) { "" }
cx = contents.text_size(line).width
if i >= $game_temp.choice_start
@max_choice_x = cx if cx > @max_choice_x
end
end
@max_choice_x += 8
end
@cursor_width = 0
@now_text.gsub!(/\\\\/) { "\000" }
@now_text.gsub!(/\\[Cc]\[([0123456789ABCDEF#]+)\]/) { "\001[#{$1}]" }
@now_text.gsub!(/\\[Gg]/) { "\002" }
@now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
@now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }

#NEW
#Dubealex's Permanent Color Change
@now_text.gsub!(/\\[Cc]olor\[([0-9]+)\]/) do
$ams.message_box_text_color= $1.to_i
@now_text.sub!(/\\[Cc]\[([0-9]+)\]/) { "" }
end
#End of new command

#NEW
#Dubealex's Font Change Feature
@now_text.gsub(/\\[tt]\[(.*?)\]/) do
buftxt = $1.to_s
$ams.font_type = buftxt
@now_text.sub!(/\\[tt]\[(.*?)\]/) { "" }
end
#End of new command

@now_text.gsub!(/\\[.]/) { "\005" }
@now_text.gsub!(/\\[|]/) { "\006" }
@now_text.gsub!(/\\[>]/) { "\016" }
@now_text.gsub!(/\\[<]/) { "\017" }
@now_text.gsub!(/\\[!]/) { "\020" }
@now_text.gsub!(/\\[~]/) { "\021" }
@now_text.gsub!(/\\[Ee]\[([0-9]+)\]/) { "\022[#{$1}]" }
@now_text.gsub!(/\\[Ii]/) { "\023" }
@now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
@now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
@now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
@now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "\027[#{$1}]" }

reset_window

if name_window_set
color=$ams.name_box_text_color
off_x = $ams.name_box_x_offset
off_y = $ams.name_box_y_offset
space = 2
x = self.x + off_x - space / 2
y = self.y + off_y - space / 2
w = self.contents.text_size(name_text).width + $ams.name_box_width + space
h = $ams.name_box_height + space
@name_window_frame = Window_Frame.new(x, y, w, h)
@name_window_frame.z = self.z + 1
x = self.x + off_x + 4
y = self.y + off_y
@name_window_text = Air_Text.new(x, y, name_text, color)
@name_window_text.z = self.z + 2
end
end

reset_window

if $game_temp.choice_max > 0
@item_max = $game_temp.choice_max
self.active = true
self.index = 0
end

if $game_temp.num_input_variable_id > 0
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
@input_number_window.number = number
@input_number_window.x = self.x + 8
@input_number_window.y = self.y + $game_temp.num_input_start * 32
end
end

#--------------------------------------------------------------------------

def update

super

if @fade_in
self.contents_opacity += 24
if @input_number_window != nil
@input_number_window.contents_opacity += 24
end
if self.contents_opacity == 255
@fade_in = false
end
return
end
@now_text = nil if @now_text == ""

if @now_text != nil and @mid_stop == false
if @write_wait > 0
@write_wait -= 1
return
end
text_not_skip = LETTER_BY_LETTER_MODE
while true
@max_x = @x if @max_x < @x
@max_y = @y if @max_y < @y
if (c = @now_text.slice!(/./m)) != nil
if c == "\000"
c = "\\"
end

if c == "\001"
@now_text.sub!(/\[([0123456789ABCDEF#]+)\]/, "")
temp_color = $1
color = temp_color.to_i
leading_x = temp_color.to_s.slice!(/./m)
if leading_x == "#"
self.contents.font.color = hex_color(temp_color)
next
end
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
next
end

if c == "\002"
if @gold_window == nil and @popchar <= 0
@gold_window = Window_Gold.new
@gold_window.x = 560 - @gold_window.width
if $game_temp.in_battle
@gold_window.y = 192
else
@gold_window.y = self.y >= 128 ? 32 : 384
end
@gold_window.opacity = self.opacity
@gold_window.back_opacity = self.back_opacity
end
c = ""
end

if c == "\003"
@now_text.sub!(/\[([0-9]+)\]/, "")
speed = $1.to_i
if speed >= 0 and speed <= 19
@write_speed = speed
end
c = ""
end

if c == "\004"
@now_text.sub!(/\[(.*?)\]/, "")
buftxt = $1.dup.to_s
if buftxt.match(/\//) == nil and buftxt != "" then
$soundname_on_speak = "Audio/SE/" + buftxt
else
$soundname_on_speak = buftxt.dup
end
c = ""
elsif c == "\004"
c = ""
end

if c == "\005"
@write_wait += 5
c = ""
end

if c == "\006"
@write_wait += 20
c = ""
end

if c == "\016"
text_not_skip = false
c = ""
end

if c == "\017"
text_not_skip = true
c = ""
end

if c == "\020"
@mid_stop = true
c = ""
end

if c == "\021"
terminate_message
return
end

if c == "\023"
@indent = @x
c = ""
end

if c == "\024"
@now_text.sub!(/\[([0-9]+)\]/, "")
@opacity = $1.to_i
color = self.contents.font.color
self.contents.font.name = $ams.font_type
self.contents.font.size = $ams.font_size
self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
c = ""
end

if c == "\025"
@now_text.sub!(/\[([0-9]+)\]/, "")
self.contents.font.size = [[$1.to_i, 6].max, 32].min
c = ""
end

if c == "\026"
@now_text.sub!(/\[([0-9]+)\]/, "")
@x += $1.to_i
c = ""
end

if c == "\027"
@now_text.sub!(/\[(.*?)\]/, "")
@x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
if $soundname_on_speak != ""
Audio.se_play($soundname_on_speak)
end
c = ""
end

if c == "\030"
@now_text.sub!(/\[(.*?)\]/, "")
self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
if $soundname_on_speak != ""
Audio.se_play($soundname_on_speak)
end
@x += 24
c = ""
end

if c == "\n"
@lines += 1
@y += 1
@x = 0 + @indent + @face_indent
if @lines >= $game_temp.choice_start
@x = 8 + @indent + @face_indent
@cursor_width = @max_choice_x
end
c = ""
end

if c == "\022"
@now_text.sub!(/\[([0-9]+)\]/, "")
@x += gaiji_draw(4 + @x, @y * line_height + (line_height - self.contents.font.size), $1.to_i)
c = ""
end

#NEW
#Dubealex's Text Skip On/OFF Command
if c == "\100"
if @alex_skip==false
@alex_skip=true
else
@alex_skip=false
end
c = ""
end
#end of new command

if c != ""
self.contents.draw_text(0+@x, 32 * @y, 40, 32, c)
@x += self.contents.text_size(c).width
if $soundname_on_speak != "" then
Audio.se_play($soundname_on_speak)
end
end

#SKIP_TEXT_CODE

# B = Escape, 0 (On The NumPad), X
# C = Enter, Space Bar and C
# A = Shift, Z

if Input.press?(Input::C) # <-- Change the value on that line
if @alex_skip==false
text_not_skip = false
end
end
else
text_not_skip = true
break
end

if text_not_skip
break
end
end
@write_wait += @write_speed
return
end

if @input_number_window != nil
@input_number_window.update
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] =
@input_number_window.number
$game_map.need_refresh = true
@input_number_window.dispose
@input_number_window = nil
terminate_message
end
return
end

if @contents_showing
if $game_temp.choice_max == 0
self.pause = true
end

if Input.trigger?(Input::B)
if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
terminate_message
end
end

if Input.trigger?(Input::C)
if $game_temp.choice_max > 0
$game_system.se_play($data_system.decision_se)
$game_temp.choice_proc.call(self.index)
end
if @mid_stop
@mid_stop = false
return
else
terminate_message
end
end
return
end

if @fade_out == false and $game_temp.message_text != nil
@contents_showing = true
$game_temp.message_window_showing = true
refresh
Graphics.frame_reset
self.visible = true
self.contents_opacity = 0
if @input_number_window != nil
@input_number_window.contents_opacity = 0
end
@fade_in = true
return
end

if self.visible
@fade_out = true
self.opacity -= 48
if self.opacity == 0
self.visible = false
@fade_out = false
$game_temp.message_window_showing = false
end
return
end
end

#--------------------------------------------------------------------------

def get_character(parameter)

case parameter
when 0
return $game_player
else
events = $game_map.events
return events == nil ? nil : events[parameter]
end
end

#--------------------------------------------------------------------------

def reset_window

#MESSAGE_SIZE
#MESSAGE_POSITION

if @popchar >= 0
events = $game_map.events
if events != nil
character = get_character(@popchar)
x = [[character.screen_x - $ams.event_message_x_ofset - self.width / 2, 4].max, 636 - self.width].min
y = [[character.screen_y - $ams.event_message_y_ofset - self.height, 4].max, 476 - self.height].min
self.x = x
self.y = y
end
elsif @popchar == -1
self.x = -4
self.y = -4
self.width = 648
self.height = 488
else
if $game_temp.in_battle
self.y = 16
else
case $game_system.message_position
when 0
self.y = $ams.message_y_top
when 1
self.y = $ams.message_y_middle
when 2
self.y = $ams.message_y_bottom
end
self.x = $ams.message_x
if @face_file == nil
self.width = $ams.message_width
self.x = $ams.message_x
else
if self.width <= 600
self.width = 600
self.x -=60
end
end
self.height = $ams.message_height
end
end
self.contents = Bitmap.new(self.width - 32, self.height - 32)
self.contents.font.color = text_color($ams.message_box_text_color)
self.contents.font.name = $ams.font_type
self.contents.font.size = $ams.font_size
if @face_file != nil
self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
end
if @popchar == -1
self.opacity = 255
self.back_opacity = 0
elsif $game_system.message_frame == 0
self.opacity = 255
self.back_opacity = $ams.message_box_opacity
else
self.opacity = 0
self.back_opacity = $ams.message_box_opacity
end
end

#--------------------------------------------------------------------------

def gaiji_draw(x, y, num)

if @gaiji_cache == nil
return 0
else
if @gaiji_cache.width < num * 24
return 0
end

if self.contents.font.size >= 20 and self.contents.font.size <= 24
size = 24
else
size = self.contents.font.size * 100 * 24 / 2200
end

self.contents.stretch_blt(Rect.new(x, y, size, size), @gaiji_cache, Rect.new(num * 24, 0, 24, 24))

if $soundname_on_speak != "" then
Audio.se_play($soundname_on_speak)
end
return size
end
end

#--------------------------------------------------------------------------

def line_height
return 32

if self.contents.font.size >= 20 and self.contents.font.size <= 24
return 32
else
return self.contents.font.size * 15 / 10
end
end

#--------------------------------------------------------------------------

def ruby_draw_text(target, x, y, str,opacity)

sizeback = target.font.size
target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
rubysize = [rubysize, 6].max
opacity = [[opacity, 0].max, 255].min
split_s = str.split(/,/)
split_s[0] == nil ? split_s[0] = "" : nil
split_s[1] == nil ? split_s[1] = "" : nil

height = sizeback + rubysize
width = target.text_size(split_s[0]).width

target.font.size = rubysize
ruby_width = target.text_size(split_s[1]).width
target.font.size = sizeback

buf_width = [target.text_size(split_s[0]).width, ruby_width].max

width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0

if opacity == 255
target.font.size = rubysize
target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
target.font.size = sizeback
target.draw_text(x, y, width, target.font.size, split_s[0])
return width
else
if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
@opacity_text_buf.dispose
@opacity_text_buf = Bitmap.new(buf_width, height)
else
@opacity_text_buf.clear
end
@opacity_text_buf.font.size = rubysize
@opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
@opacity_text_buf.font.size = sizeback
@opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
if sub_x >= 0
target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
else
target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
end
return width
end
end

#--------------------------------------------------------------------------

def convart_value(option, index)
option == nil ? option = "" : nil
option.downcase!

case option
when "i"
unless $data_items[index].name == nil
r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
end
when "w"
unless $data_weapons[index].name == nil
r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
end
when "a"
unless $data_armors[index].name == nil
r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
end
when "s"
unless $data_skills[index].name == nil
r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
end
else
r = $game_variables[index]
end

r == nil ? r = "" : nil
return r
end

#--------------------------------------------------------------------------

def dispose
terminate_message

if @gaiji_cache != nil
unless @gaiji_cache.disposed?
@gaiji_cache.dispose
end
end

unless @opacity_text_buf.disposed?
@opacity_text_buf.dispose
end

$game_temp.message_window_showing = false
if @input_number_window != nil
@input_number_window.dispose
end
super
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index >= 0
n = $game_temp.choice_start + @index
self.cursor_rect.set(8 + @indent + @face_indent, n * 32, @cursor_width, 32)
else
self.cursor_rect.empty
end
end
end
#=========================================
# ▲ CLASS Window_Message Ends
#=========================================


#=========================================
# ▼ Class Window_Frame Begins
#=========================================
class Window_Frame < Window_Base

def initialize(x, y, width, height)
super(x, y, width, height)
self.windowskin = RPG::Cache.windowskin($ams.name_box_skin)
self.contents = nil
end

#--------------------------------------------------------------------------

def dispose
super
end
end
#=========================================
# ▲ CLASS Window_Frame Ends
#=========================================


#=========================================
# ▼ CLASS Game_Map Additional Code Begins
#=========================================
class Game_Map

#Dubealex's Addition (from XRXS) to show Map Name on screen
def name
$map_infos[@map_id]
end
end
#=========================================
# ▲ CLASS Game_Map Additional Code Ends
#=========================================


#=========================================
# ▼ CLASS Scene_Title Additional Code Begins
#=========================================
class Scene_Title

#Dubealex's Addition (from XRXS) to show Map Name on screen
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end

#Dubealex's addition to save data from the AMS in the save files
$ams = AMS.new

end
#=========================================
# ▲ CLASS Scene_Title Additional Code Ends
#=========================================


#=========================================
# ▼ CLASS Window_Base Additional Code Begins
#=========================================
class Window_Base < Window

#Dubealex Addition (from Phylomorphis) to use HTML Hex Code Colors
def hex_color(string)
red = 0
green = 0
blue = 0
if string.size != 6
print("Hex strings must be six characters long.")
print("White text will be used.")
return Color.new(255, 255, 255, 255)
end
for i in 1..6
s = string.slice!(/./m)
if s == "#"
print("Hex color string may not contain the \"#\" character.")
print("White text will be used.")
return Color.new(255, 255, 255, 255)
end
value = hex_convert(s)
if value == -1
print("Error converting hex value.")
print("White text will be used.")
return Color.new(255, 255, 255, 255)
end
case i
when 1
red += value * 16
when 2
red += value
when 3
green += value * 16
when 4
green += value
when 5
blue += value * 16
when 6
blue += value
end
end
return Color.new(red, green, blue, 255)
end

#--------------------------------------------------------------------------

def hex_convert(character)
case character
when "0"
return 0
when "1"
return 1
when "2"
return 2
when "3"
return 3
when "4"
return 4
when "5"
return 5
when "6"
return 6
when "7"
return 7
when "8"
return 8
when "9"
return 9
when "A"
return 10
when "B"
return 11
when "C"
return 12
when "D"
return 13
when "E"
return 14
when "F"
return 15
end
return -1
end
end
#=========================================
# ▲ CLASS Window_Base Additional Code Ends
#=========================================


#=========================================
# ▼ Class Air_Text Begins
#=========================================
class Air_Text < Window_Base

def initialize(x, y, designate_text, color=0)

super(x-16, y-16, 32 + designate_text.size * 12, 56)
self.opacity = 0
self.back_opacity = 0
self.contents = Bitmap.new(self.width - 32, self.height - 32)
w = self.contents.width
h = self.contents.height
self.contents.font.name = $ams.name_font_type
self.contents.font.size = $ams.name_font_size
self.contents.font.color = text_color(color)
self.contents.draw_text(0, 0, w, h, designate_text)
end

#--------------------------------------------------------------------------

def dispose
self.contents.clear
super
end
end
#==========================================
# ▲ CLASS Air_Text Ends
#==========================================


#===================================================
# ▼ CLASS Scene_Save Additional Code Begins
#===================================================
class Scene_Save < Scene_File

alias ams_original_write_save_data write_save_data

def write_save_data(file)
ams_original_write_save_data(file)
Marshal.dump($ams, file)
end

end
#===================================================
# ▲ CLASS Scene_Save Additional Code Ends
#===================================================


#===================================================
# ▼ CLASS Scene_Load Additional Code Begins
#===================================================
class Scene_Load < Scene_File

alias ams_original_read_save_data read_save_data

def read_save_data(file)
ams_original_read_save_data(file)
$ams = Marshal.load(file)
end

end
#===================================================
# ▲ CLASS Scene_Load Additional Code Ends
#===================================================[I]Geposted von Lil_Lucy.


unless $keybd
$keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
$keybd.call 0xA4, 0, 0, 0
$keybd.call 13, 0, 0, 0
$keybd.call 13, 0, 2, 0
$keybd.call 0xA4, 0, 2, 0 endGeposted von Lil_Lucy.


#======================================
# ■ Anti Event Lag Script
#======================================
#  By: Near Fantastica
# Date: 12.06.05
# Version: 3
#======================================

#======================================
# ■ Game_Map
#======================================

class Game_Map
#--------------------------------------------------------------------------
def in_range?(object)
screne_x = $game_map.display_x
screne_x -= 256
screne_y = $game_map.display_y
screne_y -= 256
screne_width = $game_map.display_x
screne_width += 2816
screne_height = $game_map.display_y
screne_height += 2176
return false if object.real_x <= screne_x-32
return false if object.real_x >= screne_width+32
return false if object.real_y <= screne_y-32
return false if object.real_y >= screne_height+32
return true
end
#--------------------------------------------------------------------------
def update
if $game_map.need_refresh
refresh
end
if @scroll_rest > 0
distance = 2 ** @scroll_speed
case @scroll_direction
when 2
scroll_down(distance)
when 4
scroll_left(distance)
when 6
scroll_right(distance)
when 8
scroll_up(distance)
end
@scroll_rest -= distance
end
for event in @events.values
if in_range?(event) or event.trigger == 3 or event.trigger == 4
event.update
end
end
for common_event in @common_events.values
common_event.update
end
@fog_ox -= @fog_sx / 8.0
@fog_oy -= @fog_sy / 8.0
if @fog_tone_duration >= 1
d = @fog_tone_duration
target = @fog_tone_target
@fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
@fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
@fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
@fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
@fog_tone_duration -= 1
end
if @fog_opacity_duration >= 1
d = @fog_opacity_duration
@fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
@fog_opacity_duration -= 1
end
end
end

#======================================
# ■ Spriteset_Map
#======================================

class Spriteset_Map
#--------------------------------------------------------------------------
def in_range?(object)
screne_x = $game_map.display_x
screne_x -= 256
screne_y = $game_map.display_y
screne_y -= 256
screne_width = $game_map.display_x
screne_width += 2816
screne_height = $game_map.display_y
screne_height += 2176
return false if object.real_x <= screne_x
return false if object.real_x >= screne_width
return false if object.real_y <= screne_y
return false if object.real_y >= screne_height
return true
end
#--------------------------------------------------------------------------
def update
if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end
if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8
@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone
i=0
for sprite in @character_sprites
if sprite.character.is_a?(Game_Event)
if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4
sprite.update
i+=1
end
else
sprite.update
i+=1
end
end
#p i
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
for sprite in @picture_sprites
sprite.update
end
@timer_sprite.update
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
@viewport3.color = $game_screen.flash_color
@viewport1.update
@viewport3.update
end
endGeposted von Macros.


#================================================
# Aliases and redefines draw_text so that a sadow is drawn
# Made by: Ultimate Jesus
#================================================

class Bitmap

ShadowIndent = 2 # Size of the shadow (usually 1..3)
ShadowColour = Color.new(0, 0, 0, 200)# the colour of the shadow
# the 4th value is transparency (0-255)

unless @ja_ta_feito == 1 # Fix for F12 Rebot by P@nCHo
alias draw_text_plain draw_text
@ja_ta_feito = 1
end

def draw_text(arg1 = 0, arg2 = 0, arg3 = 0, arg4 = 0, arg5 = 0, arg6 = 0)
if arg1.is_a?(Rect)
x = arg1.x
y = arg1.y
width = arg1.width
height = arg1.height
string = arg2
align = arg3
else
x = arg1
y = arg2
width = arg3
height = arg4
string = arg5
align = arg6
end
colour = self.font.color.dup
self.font.color = ShadowColour
draw_text_plain(x + ShadowIndent, y + ShadowIndent, width, height, string, align)
self.font.color = colour
draw_text_plain(x, y, width, height, string, align)
end
endGeposted von Hot Blizzard.



Bei Spielen, die mit den RPG Maker 2000 oder 2003 erstellt wurden, wurden am Anfang immer 1 bis 3 Logos gezeigt. Diese Funktion kann auch in den RPG Maker XP eingebaut werden.
Folgendes Skript wie im Header beschrieben einbauen. Weitere Instruktionen sind ebenfalls im Skript zu finden.


Credits an:
~DeR ErZenGeL~


Source code:



#Im Scene_Title Skript unter
# # Make system object
# $game_system = Game_System.new
#einfgen (Standard: Zeile 33)
#===============================INTROSCREEN 2.0===============================#
$game_system.bgm_play($data_system.title_bgm)
unless introscreen
@sprite = Sprite.new
# Name des Bildes mit Endung in Lila, Anfhrungszeichen und Klammern
# Diese zwei Punkte sind zu beachten und befolgen:
# hat Gre: max. 640x480 sonst zentriert
# in Ordner: Graphics/Titles
@sprite.bitmap = RPG::Cache.title("001-Title01.png")
# Anzeigeposition x und y des Bildes
@sprite.x = (640 - @sprite.bitmap.width) / 2
@sprite.y = (480 - @sprite.bitmap.height) / 2
# Transparenz des Bildes [Rot]
@sprite.opacity = 255
# Einblendzeit des Bildes [Rot und in Klammern]
Graphics.transition(40)
for i in 0..40
Graphics.update
end
Graphics.freeze
@sprite.bitmap.dispose
@sprite.dispose
# Ausblendzeit des Bildes [Rot und in Klammern]
Graphics.transition(40)
Graphics.freeze
end
# Bei Neustart [F12] kein zweites Anzeigen des Bildes
introscreen = true
Um mehrere Bilder anzuzeigen einfach


@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title("001-Title01.png")
@sprite.x = (640 - @sprite.bitmap.width) / 2
@sprite.y = (480 - @sprite.bitmap.height) / 2
@sprite.opacity = 255
Graphics.transition(40)
for i in 0..40
Graphics.update
end
Graphics.freeze
@sprite.bitmap.dispose
@sprite.dispose
Graphics.transition(40)
Graphics.freeze






#==============================================================================
# Window_RingMenu
#==============================================================================
#==============================================================================
# Edited by MakirouAru
# 3D Version by Deblu
#==============================================================================
class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# : ’N’0’X'"
#--------------------------------------------------------------------------


# Grafiktyp: Grafiken oder Icons?
grafik_typ = "i" # p = Pictures, i = Icons

# Die Dateinamen (ohne Dateiendung)
grafik_gegenstaende = "034-Item03"
grafik_faehigkeiten = "044-Skill01"
grafik_ausruestung = "001-Weapon01"
grafik_status = "050-Skill07"
grafik_speichern = "038-Item07"
grafik_beenden = "046-Skill03"

STARTUP_FRAMES = 20 # 0`’A’j’[’V’!’"’t’R[’"
MOVING_FRAMES = 5 # ’`’"’O 0}~’t’R[’"
RING_R = 256 # ’`’"’O"Ra

if grafik_typ == "i"
PIC_ITEM = RPG::Cache.icon(grafik_gegenstaende) # u’A’C’e’v’’j’&[’A’C’R’"
PIC_SKILL = RPG::Cache.icon(grafik_faehigkeiten) # u’X’L’9v’’j’&[’A’C’R’"
PIC_EQUIP = RPG::Cache.icon(grafik_ausruestung) # u'""v’’j’&[’A’C’R’"
PIC_STATUS = RPG::Cache.icon(grafik_status) # u’X’e[’^’Xv’’j’&[’A’C’R’"
PIC_SAVE = RPG::Cache.icon(grafik_speichern) # u’Z[’uv’’j’&[’A’C’R’"
PIC_EXIT = RPG::Cache.icon(grafik_beenden) # uIv’’j’&[’A’C’R’"
else
PIC_ITEM = RPG::Cache.picture(grafik_gegenstaende) # u’A’C’e’v’’j’&[’A’C’R’"
PIC_SKILL = RPG::Cache.picture(grafik_faehigkeiten) # u’X’L’9v’’j’&[’A’C’R’"
PIC_EQUIP = RPG::Cache.picture(grafik_ausruestung) # u'""v’’j’&[’A’C’R’"
PIC_STATUS = RPG::Cache.picture(grafik_status) # u’X’e[’^’Xv’’j’&[’A’C’R’"
PIC_SAVE = RPG::Cache.picture(grafik_speichern) # u’Z[’uv’’j’&[’A’C’R’"
PIC_EXIT = RPG::Cache.picture(grafik_beenden) # uIv’’j’&[’A’C’R’"
end

PIC_DISABLE= RPG::Cache.icon("") # }gp9}~"tA’C’R’"
SE_STARTUP = "056-Right02" # ’’j’&[ `JƫSE
MODE_START = 1 # ’X’^[’g’A’b’v’A’j’[’V’!’"
MODE_WAIT = 2 # '9@
MODE_MOVER = 3 # }~Rv00"]’A’j’[’V’!’"
MODE_MOVEL = 4 # "}~Rv00"]’A’j’[’V’!’"
#--------------------------------------------------------------------------
# : ’A’N’Z’T
#--------------------------------------------------------------------------
attr_accessor :index
#--------------------------------------------------------------------------
# S ’I’u’W’F’N’g0`0
#--------------------------------------------------------------------------
def initialize( center_x, center_y )
super(0, 0, 640, 480)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.opacity = 0
self.back_opacity = 0
s1 = "Gegenstnde"
s2 = "Fhigkeiten"
s3 = "Ausrstung"
s4 = "Status"
s5 = "Speichern"
s6 = "Beenden"
@commands = [ s1, s2, s3, s4, s5, s6 ]
@item_max = 6
@index = 0
@items = [ PIC_ITEM, PIC_SKILL, PIC_EQUIP, PIC_STATUS, PIC_SAVE, PIC_EXIT ]
@disabled = [ false, false, false, false, false, false ]
@cx = center_x - 16
@cy = center_y - 16
setup_move_start
refresh
end
#--------------------------------------------------------------------------
# S ’t’R[’XV
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# S 0"`0
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ’A’C’R’" "`0
case @mode
when MODE_START
refresh_start
when MODE_WAIT
refresh_wait
when MODE_MOVER
refresh_move(1)
when MODE_MOVEL
refresh_move(0)
end
# ’A’N’e’B’u’R’}’"’h"\}
rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index],1)
end
#--------------------------------------------------------------------------
# : 0"`0(0`0}~)
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / STARTUP_FRAMES
r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r/3 * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# : 0"`0('9@}~)
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R/3 * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# : 0"`0(0"]}~)
# mode : 0="}~Rv0 1=}~Rv0
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R/3 * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# S "`0
# x :
# y :
# i : "
#--------------------------------------------------------------------------
def draw_item(x, y, i)
#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
rect = Rect.new(0, 0, @items[i].width, @items[i].height)
if @index == i
self.contents.blt( x, y, @items[i], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[i], rect, 128 )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
end
end
end
#--------------------------------------------------------------------------
# S Rɷ
# index : "
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# : 0`0’A’j’[’V’!’""
#--------------------------------------------------------------------------
def setup_move_start
@mode = MODE_START
@steps = STARTUP_FRAMES
if SE_STARTUP != nil and SE_STARTUP != ""
Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
end
end
#--------------------------------------------------------------------------
# : 0"]’A’j’[’V’!’""
#--------------------------------------------------------------------------
def setup_move_move(mode)
if mode == MODE_MOVER
@index -= 1
@index = @items.size - 1 if @index < 0
elsif mode == MODE_MOVEL
@index += 1
@index = 0 if @index >= @items.size
else
return
end
@mode = mode
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# : ’A’j’[’V’!’"' Ǥ
#--------------------------------------------------------------------------
def animation?
return @mode != MODE_WAIT
end
end
#==============================================================================
# Window_MenuStatus
#------------------------------------------------------------------------------
# @’’j’&[0’p[’e’B’’"’o[’X’e[’^’X "\}’E’B’"’h’EŷB
#==============================================================================

class Window_RingMenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# S ’I’u’W’F’N’g0`0
#--------------------------------------------------------------------------
def initialize
super(204, 64, 232, 352)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# S ’`’t’R’b’V’&
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = "Arial"
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 80
y = 80 * i
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y + 24)
end
end
#--------------------------------------------------------------------------
# S ’J[’\’99R`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
end
end
end
#==============================================================================
# # Scene_RingMenu
# Scene_Menu
#------------------------------------------------------------------------------
# @’’j’&[0 s’N’0’XŷB
#==============================================================================

#class Scene_RingMenu
class Scene_Menu
#--------------------------------------------------------------------------
# S ’I’u’W’F’N’g0`0
# menu_index : ’R’}’"’h’J[’\’90`'u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# S ’’C’"
#--------------------------------------------------------------------------
def main
# ’X’v’0’C’g’Z’b’g
@spriteset = Spriteset_Map.new
# ’R’}’"’h’E’B’"’h’E
px = $game_player.screen_x - 15
py = $game_player.screen_y - 24
@command_window = Window_RingMenu.new(px,py)
@command_window.index = @menu_index
# ’p[’e’Bl" 0 l!
if $game_party.actors.size == 0
# ’A’C’e’A’X’L’9A'""A’X’e[’^’X R0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@command_window.z = 100
# ’Z[’u9}~!
if $game_system.save_disabled
# ’Z[’u Rɷ
@command_window.disable_item(4)
end
# ’X’e[’^’X’E’B’"’h’E
@status_window = Window_RingMenuStatus.new
@status_window.x = 160
@status_window.y = 0
@status_window.z = 200
@status_window.visible = false
# ’g’0’"’W’V’!’"}s
Graphics.transition
# ’’C’"’9[’v
loop do
# ’Q[’0 XV
Graphics.update
# "" XV
Input.update
# ’t’R[’XV
update
# 0ʪ'’9[’v ' 'f
if $scene != self
break
end
end
# ’g’0’"’W’V’!’""
Graphics.freeze
# ’X’v’0’C’g’Z’b’g 0 "
@spriteset.dispose
# ’E’B’"’h’E 0 "
@command_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# S ’t’R[’XV
#--------------------------------------------------------------------------
def update
# ’E’B’"’h’E XV
@command_window.update
@status_window.update
# ’R’}’"’h’E’B’"’h’E’A’N’e’B’u!: update_command R
if @command_window.active
update_command
return
end
# ’X’e[’^’X’E’B’"’h’E’A’N’e’B’u!: update_status R
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# S ’t’R[’XV (’R’}’"’h’E’B’"’h’E’A’N’e’B’u!)
#--------------------------------------------------------------------------
def update_command
# B ’{’^’"0x!
if Input.trigger?(Input::B)
# ’L’’’"’Z’9 SE 00't
$game_system.se_play($data_system.cancel_se)
# ’}’b’v0'֦
$scene = Scene_Map.new
return
end
# C ’{’^’"0x!
if Input.trigger?(Input::C)
# ’p[’e’Bl" 0 lA’Z[’uA’Q[’I`O’R’}’"’h!
if $game_party.actors.size == 0 and @command_window.index < 4
# ’u’U[ SE 00't
$game_system.se_play($data_system.buzzer_se)
return
end
# ’R’}’"’h’E’B’"’h’E’J[’\’9'u"`
case @command_window.index
when 0 # ’A’C’e’
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’A’C’e’0'֦
$scene = Scene_Item.new
when 1 # ’X’L’9
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’X’e[’^’X’E’B’"’h’E ’A’N’e’B’uɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 2 # '""
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’X’e[’^’X’E’B’"’h’E ’A’N’e’B’uɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 3 # ’X’e[’^’X
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’X’e[’^’X’E’B’"’h’E ’A’N’e’B’uɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 4 # ’Z[’u
# ’Z[’u9}~!
if $game_system.save_disabled
# ’u’U[ SE 00't
$game_system.se_play($data_system.buzzer_se)
return
end
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ’Z[’u0'֦
$scene = Scene_Save.new
when 5 # ’Q[’I
# R' SE 00't
$game_system.se_play($data_system.decision_se)



Ein kleines, aber feines Script frs Schnellspeichern la The Elder Scrolls. Hier der Code:


class Quicksave
def Quicksave.save
file = File.open("quicksave.sav", "wb")
Scene_Save.new.write_save_data(file)
file.close
end
#----------
def Quicksave.load
return unless FileTest.exist?("quicksave.sav")
file = File.open("quicksave.sav", "rb")
Scene_Load.new.read_save_data(file)
file.close
Graphics.freeze
sprite = Sprite.new
sprite.bitmap = Bitmap.new(640, 480)
sprite.bitmap.fill_rect(0, 0, 640, 480, Color.new(0, 0, 0))
Graphics.transition(10)
$scene = Scene_Map.new
end
end

Beim Aufruf von "Quicksave.save" wird das Spiel in eine Datei namens "quicksave.sav" gespeichert. Beim Aufruf von "Quicksave.load" wird der Spielstand aus dieser Datei, sofern vorhanden, geladen.
Damit das Schnellspeichern jederzeit auf der Map per Tastendruck, z.B. F5, funktioniert, muss im Script Scene_Map in der update-Methode was eingefgt werden:



...
if $DEBUG and Input.press?(Input::F9)
$game_temp.debug_calling = true
end

#~~~~~~~~~~~~~~~
if Input.trigger?(Input::F5)
Quicksave.save
end

if Input.trigger?(Input::F6)
Quicksave.load
end
#~~~~~~~~~~~~~~~

unless $game_player.moving?
if $game_temp.battle_calling
call_battle
elsif $game_temp.shop_calling
...

F5 -> Speichern
F6 -> Laden
Es knnen auch andere Tasten verwendet werden, dann muss man statt F5 und F6 eben was anderes schreiben, mglich ist F5-F9.

Das alles funktioniert ohne jegliche Dialoge. Zumindest mich nervt es, wenn ich fr jedes Speichern erst mal das Men aufrufen, den Menpunkt Speichern anwhlen und einen Spielstand bestimmen muss.

Bei Verwendung wie immer bitte Creditseintrag^^








So hier ist das Menscript von Prexus



Einfach ein neues Script ber Main einfgen und Bilder mit den Namen eurer Charas in den Pictures Ordner tun^^


# Advanced CMS Menu by Prexus
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Statut"
s5 = "Sauvegarder"
s6 = "Quitter"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
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
@command_window.x = 32
@command_window.y = 32
@command_window.z = 3005
@command_window.back_opacity = 128
@playtime_window = Window_PlayTime.new
@playtime_window.x = 32
@playtime_window.y = 480-32-@playtime_window.height
@playtime_window.back_opacity = 128
@playtime_window.z = 3005
@gold_window = Window_Gold.new
@gold_window.x = 640-32-@gold_window.width
@gold_window.y = 480-32-@gold_window.height
@gold_window.back_opacity = 128
@gold_window.z = 3005
@chr_status = Window_CharacterStatus.new
@chr_status.visible = false
@status_window = Window_MenuStatus.new
@status_window.chr_status = @chr_status
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@chr_status.dispose
@status_window.dispose
@gold_window.dispose
@playtime_window.dispose
end
def update
if @status_window.active and (@command_window.x != -128 or @playtime_window.x != 32-@playtime_window.width)
if @command_window.x != -128
@command_window.z = 3001
@command_window.x -= 5
end
if @playtime_window.x != 32-@playtime_window.width
@playtime_window.x -= 5
end
return
end
if @command_window.active and (@command_window.x != 32 or @playtime_window.x != 32)
if @command_window.x != 32
@command_window.z = 3005
@command_window.x += 5
end
if @playtime_window.x != 32
@playtime_window.x += 5
end
return
end
@command_window.update
@status_window.update
@gold_window.update
@playtime_window.update
@chr_status.update
if @command_window.active
update_command
@chr_status.visible = false
return
end
if @status_window.active
update_status
@chr_status.visible = true
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
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
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)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end

class Window_CharacterStatus < Window_Base
def initialize
super(480-32, 0, 192, 128)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.back_opacity = 0
self.z = 3006
end
def refresh(index)
self.contents.clear
if index >= 0
actor = $game_party.actors[index]
draw_actor_name(actor, 0, 0)
draw_actor_level(actor, 0, 24)
draw_actor_hp(actor, 0, 48)
draw_actor_sp(actor, 0, 72)
end
end
end

class Window_MenuStatus < Window_Base
attr_reader :index
attr_reader :chr_status
def initialize
@viewport = Viewport.new(0, 0, 640, 480)
@viewport.z = 3001
super(-16, -16, 640+32, 480+32)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.active = false
self.z = 3000
@index = -1
@column_max = 1
@sprites = []
refresh
end
def index=(index)
@index = index
if self.active and @chr_status != nil
update_chr_status
end
update_cursor_rect
refresh
end
def refresh
self.contents.clear
for i in 0...@sprites.size
@sprites[i].dispose
end
@sprites = []
@item_max = $game_party.actors.size
for i in 0...@item_max
actor = $game_party.actors[@item_max-i-1]
@sprites[@item_max-i-1] = Sprite.new(@viewport)
@sprites[@item_max-i-1].bitmap = RPG::Cache.picture(actor.image_name)
@sprites[@item_max-i-1].x = 560-((i+1)*120)
@sprites[@item_max-i-1].y = 480-@sprites[@item_max-i-1].bitmap.height
@sprites[@item_max-i-1].opacity = 255
@sprites[@item_max-i-1].z = 3004-i
end
end
def update_cursor_rect
if @index < 0
for i in 0...@sprites.size
@sprites[i].opacity = 255
end
else
for i in 0...@sprites.size
if i == @index
@sprites[i].opacity = 255
@sprites[i].z += 4
else
@sprites[i].opacity = 200
@sprites[i].z = 3001+i
end
end
end
end
def dispose
super
for i in 0...@sprites.size
@sprites[i].dispose
end
end
def chr_status=(chr_status)
@chr_status = chr_status
if self.active and @chr_status != nil
update_chr_status
end
end
def update
super
if self.active and @item_max > 0 and @index >= 0
if Input.repeat?(Input::RIGHT)
if Input.trigger?(Input::RIGHT) or @index < @item_max - @column_max
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
if Input.repeat?(Input::LEFT)
if Input.trigger?(Input::LEFT) or @index >= @column_max
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
end
if self.active and @chr_status != nil
update_chr_status
elsif @chr_status != nil
@chr_status.refresh(-1)
end
update_cursor_rect
end
def update_chr_status
@chr_status.refresh(@index)
end
end

class Window_Base
def shadow_color
return Color.new(0, 0, 0, 255)
end
def draw_actor_name(actor, x, y)
self.contents.font.color = shadow_color
self.contents.draw_text(x+1, y+1, 120, 32, actor.name)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
def draw_actor_level(actor, x, y)
self.contents.font.color = shadow_color
self.contents.draw_text(x+1, y+1, 32, 32, "Lv")
self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = shadow_color
self.contents.draw_text(x+1, y+1, 32, 32, $data_system.words.hp)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
http://www.rpgcreative.net/Site/RPG%20Maker/image%20tutorial/scripts/new%20menu.JPG
die bilder gibts
HIER (http://naramura.kdn.ne.jp/game/sozai/character.html)




Hi,

ich habe mal ein kleines billiges Skript gemacht, womit man die Steuerung des Helden vertauschen kann. Ich nenne das ganze das "Drunken Mode" Skript ;-)

Folgende Modi sind vorgegeben:

Modus 0:

Pfeil Unten -> Nach Oben gehen
Pfeil Links -> Nach Rechts gehen
Pfeil Rechts -> Nach Links gehen
Pfeil Oben -> Nach Unten gehen

Modus 1:

Pfeil Unten -> Nach Rechts gehen
Pfeil Links -> Nach Unten gehen
Pfeil Rechts -> Nach Oben gehen
Pfeil Oben -> Nach Links gehen

Modus 2:

Pfeil Unten -> Nach Links gehen
Pfeil Links -> Nach Oben gehen
Pfeil Rechts -> Nach Unten gehen
Pfeil Oben -> Nach Rechts gehen


Einbau:

1. Folgenden Code ber "Main" einfgen:


#=======Drunken Mode Skript=======#
#============by Monsta============#
#====Version 1.0=== 31.1.2006 ====#
#=========www.Monsta.aw3.de=======#

class Game_Player < Game_Character
SWITCH_ID = 1
MODES = [["move_up","move_right","move_left","move_down"],
["move_right","move_down","move_up","move_left"],
["move_left","move_up","move_down","move_right"]]

def drunken_moving
case Input.dir4
when 2
if $game_switches[SWITCH_ID]
eval(MODES[@mode][0])
else
move_down
end
when 4
if $game_switches[SWITCH_ID]
eval(MODES[@mode][1])
else
move_left
end
when 6
if $game_switches[SWITCH_ID]
eval(MODES[@mode][2])
else
move_right
end
when 8
if $game_switches[SWITCH_ID]
eval(MODES[@mode][3])
else
move_up
end
end
end

def mode(mode)
@mode = mode
end

alias drunken_ini initialize
def initialize
@mode = 0
drunken_ini
end
end
2. Im Skript "Game_Player" die Zeilen 214 - 223:


case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end
durch diesen Code ersetzen:


drunken_moving
drunken_moving


3. Im Skript bei "SWITCH_ID" den Switch eintragen, der das Skript An und Aus Schalten soll.
Zustzlich kann man in der Konstante "MODES" noch eigene Tastenrichtungen vorgeben.

Im Spiel kann man den Modus des Skriptes ndern, indem man dies in ein Event Skript folgendes Schreibt (Modus 0-2 sind vorgegeben):



$game_player.mode(0)
Vielleicht kanns ja jemand frn Minigame oder so gebrauchen^^ Viel Spa damit...

Mfg Monsta



Hallo Community,
vor ein paar Tagen habe ich angefangen,
mich mit RGSS zu beschftigen...
Ich bekam immer mehr Ideen
und wollte diese natrlich umsetzten *:D*
Sodass ich mich an einen Creditsscript gewagt hab
und hier ist es :

Ein neues Script unter Scene_Title erstellen und den Scene_Credits nennen:


#--------------------------------------------------------------------------
# * Credits Script by Firephoenix / Visit www.rpgxp-world.net / www.ysites.de/rmtoplist/
#--------------------------------------------------------------------------
# * Versions Log: - v0.1 Relase
#--------------------------------------------------------------------------
# * Thanx to !Tocs! for his help. I'm a beginner and so he explain me a lot...
#--------------------------------------------------------------------------

class Window1 < Window_Base
#------------------------------------------------------------------------
# * Object Initialization
#------------------------------------------------------------------------
def initialize
Audio.bgm_fade(1500)
Audio.bgs_fade(1500)
Audio.me_fade(1500)
super(0, 0, 640, 240)
self.contents = Bitmap.new(width - 32, height - 32)
# Hier kann man die Transparenz des oberen Fensters ndern
# 0 = Die "Box" ist nicht sichtbar | 255 = Keine Transparenz
self.opacity = 240
refresh
end
#-----------------------------------------------------------------------
# * Refresh
#------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
# Hier kann der Text gendert werden
self.contents.draw_text(0, -108, 640, 240, "Erste Zeile", 0)
self.contents.draw_text(0, -85, 640, 240, "Zweite Zeile", 0)
self.contents.draw_text(0, -60, 640, 240, "Dritte Zeile", 0)
self.contents.draw_text(0, -35, 640, 240, "Vierte Zeile", 0)
self.contents.draw_text(0, -10, 640, 240, "Fnfte Zeile", 0)
self.contents.draw_text(0, 15, 640, 240, "Sexte Zeile", 0)
self.contents.draw_text(0, 40, 640, 240, "Achte Zeile", 0)
self.contents.draw_text(0, 67, 640, 240, "Neunte Zeile", 0)

end
end

class Window2 < Window_Base
#------------------------------------------------------------------------
# * Object Initialization
#------------------------------------------------------------------------
def initialize
super(0, 240, 640, 240)
self.contents = Bitmap.new(width - 32, height - 32)
# Hier kann man die Transparenz des unteren Fensters ndern
# 0 = Die "Box" ist nicht sichtbar | 255 = Keine Transparenz
self.opacity = 240
refresh
end
#------------------------------------------------------------------------
# * Refresh
#------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
# Hier kann der Text gendert werden
self.contents.draw_text(0, -108, 640, 240, "Erste Zeile", 0)
self.contents.draw_text(0, -85, 640, 240, "Zweite Zeile", 0)
self.contents.draw_text(0, -60, 640, 240, "Dritte Zeile", 0)
self.contents.draw_text(0, -35, 640, 240, "Vierte Zeile", 0)
self.contents.draw_text(0, -10, 640, 240, "Fnfte Zeile", 0)
self.contents.draw_text(0, 15, 640, 240, "Sexte Zeile", 0)
self.contents.draw_text(0, 40, 640, 240, "Achte Zeile", 0)
self.contents.draw_text(0, 67, 640, 240, "Neunte Zeile", 0)
end
end


class Credits
#------------------------------------------------------------------------
# * Main Processing
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#------------------------------------------------------------------------
# * Main Processing
#------------------------------------------------------------------------
def main
@window1 = Window1.new
@window2 = Window2.new
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update

# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@window1.dispose
@window2.dispose
end
#------------------------------------------------------------------------
# * Frame Update
#------------------------------------------------------------------------
def update
@window1.update
@window2.update

if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Title.new
return
end
end
end
Scene_Title mit dem hier ersetzten:


#=============================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
#=============================================

class Scene_Title
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = "Beginnen"
s2 = "Fortfahren"
s3 = "Beenden"
s4 = "Credits"
@command_window = Window_Command.new(250, [s1, s2, s4, s3])
@command_window.back_opacity = 40
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 300
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
#@command_TEXT.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 3 # Shutdown
command_shutdown
when 2 # Credits
command_credits
end
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Command: Credits
#--------------------------------------------------------------------------
def command_credits
$scene = Credits.new
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end

Nun bei Window_Command bei Zeile 40

self.contents.draw_text(rect, @commands[index])mit

self.contents.draw_text(rect, @commands[index], 1)ersetzen.


Nun sollte alles funktionieren...
Wer Vorschlge/Kritik/ *g* Lob hat,
nur her damit ^^...


MFG Firephoenix





I know that there are a few scripts that let the player distribute their own stat points when they level up, but I wasn't too happen with the one I downloaded when it conflicted with some other scripts I had. So I decided to script my own level up system. As of the moment, you can change the hero's maxhp, maxsp, str, dex, agi, and int. I am working on how to get around the error that shows up when I try to include atk, pdef, and mdef. Anyways, those 3 last attributes have been commented out from this version of the script, so it should work fine. I have also added instructions on how to implement a pop up window when they enter the status menu asking the player if he/she wants to distribute any remaining AP of the selected hero if and only if the selected hero has remaining AP.

Anyways, here is the script. Just paste it above Main in the script editor.

I have added a lot of commented instructions at the top of the script. Please follow it carefully.

To call the script, use "$scene = Scene_AP_Distribute.new(@actor_index)"

@actor_index being the position of the heroes currently in the party.

So if Arshes was in the first position in party, he would be @actor_index = 0

Report any bugs here if you find them. Anyways, enjoy !!!


#=========================================================================
=====
# * Scene_AP_Distribute
#------------------------------------------------------------------------------
# * by Skyboar
# * made August 2007
#
# * Script allows the player to freely customizing the Hero's stat points
# * including max hp, max sp, technique, critical, agility, and spirit
#
#==============================================================================
# *Instructions on how to use*
#
# Just Insert this script above "Main" in script editor.
#
#------------------------------------------------------------------------------
# Insert the following code in "Window_BattleStatus"
#
# this code: actor.stat_points += $AP
#
# under this code: if @level_up_flags[i]
#------------------------------------------------------------------------------
#
#Insert the following code in "Game_Actor"
#
# this code: attr_accessor :stat_points
#
# under this code: class Game_Actor < Game_Battler
#
#------------------------------------------------------------------------------
#
#Insert the following code in "Game_Actor"
#
# this code: @stat_points = 0
#
# under this code: def setup(actor_id)
# actor = $data_actors[actor_id]
#
# #------------------------------------------------------------------------------
#
# * Instructions on how to implement a pop up window asking the player if he/she would
# * like to distribute any remaining AP that the selected hero has.
#
#------------------------------------------------------------------------------
#
#Insert the following code in "Scene_Status"
#
# this code:
##--------------[Used for Level Up AP System]-----------------------
#
# if @actor.stat_points > 0
# @alert = true
# else
# @alert = false
# end


# @alert_window = Window_AP_RemainAlert.new(@actor)
# @alert_window.x = 320 - (@alert_window.width / 2)
# @alert_window.y = 120
# @alert_window.z = 10000

# if @alert == true
# @alert_window.visible = true
# elsif @alert == false
# @alert_window.visible = false
# end

# @alertconfirm_window = Window_AP_RemainConfirm.new(@actor)
# @alertconfirm_window.x = 320 - (@alertconfirm_window.width / 2)
# @alertconfirm_window.y = 230
# @alertconfirm_window.z = 10001
# @alertconfirm_window.index = 0
# if @alert == true
# @alertconfirm_window.visible = true
# @alertconfirm_window.active = true
# elsif @alert == false
# @alertconfirm_window.visible = false
# @alertconfirm_window.active = false
# end


##--------------[Used for Level Up AP System]-----------------------

#
# under this code: def main
# @actor = $game_party.actors[@actor_index]


#
#------------------------------------------------------------------------------
#

#Insert the following code in "Scene_Status"
#
# this code:

##--------------[Used for Level Up AP System]-----------------

# @alert_window.dispose
# @alertconfirm_window.dispose

##--------------[Used for Level Up AP System]-----------------------

#
# under this code: Graphics.freeze
#


#
#------------------------------------------------------------------------------
#

#Insert the following code in "Scene_Status"
#
# this code:

##--------------[Used for Level Up AP System]-----------------

#@alertconfirm_window.update

# if @alertconfirm_window.active
# update_alertconfirm
# return
# end

##--------------[Used for Level Up AP System]-----------------------

#
# under this code: def update
#

# Insert the following code in "Scene_Status"
# under "def update's 'end' " but before the class's end (the very last 'end' in the scene) "

# code to be inserted into Scene_Status:

##--------------[Used for Level Up AP System]-----------------

#def update_alertconfirm

# if Input.trigger?(Input::B)

# $game_system.se_play($data_system.cancel_se)

# @alert_window.visible = false
# @alertconfirm_window.active = false
# @alertconfirm_window.visible = false
# @alert = false
# return
# end

# if Input.trigger?(Input::C)

# $game_system.se_play($data_system.decision_se)

# case @alertconfirm_window.index
# when 0

# $scene = Scene_AP_Distribute.new(@actor_index)
# when 1

# @alert_window.visible = false
# @alertconfirm_window.active = false
# @alertconfirm_window.visible = false
# @alert = false
# return
# end
#end

#--------------[Used for Level Up AP System]-----------------
#------------------------------------------------------------------------------
#

# *Now you are ready to define the variables for the leveling up stats scene
# *You are welcome to freely change the variables instead of using the default
# *that I set up the script up with.
#
# *Enjoy!!!
#
#==============================================================================


#-------------[global variables for leveling up system]--------------------------------
#-------------[Change the VALUES BELOW to your liking]---------------------------
#-------------[global variables for leveling up system]--------------------------------

$AP = 9 #determines how much Attribute Points each hero gets upon Level Up

#change the following values to how much is added to each hero's attribute upon AP distribution

$add_stat_maxhp = 10 #for example value 10 means that 10 will be added to the hero's max hp
$add_stat_maxsp = 3

$add_stat_atk = 1
$add_stat_pdef = 1
$add_stat_mdef = 1

$add_stat_tech = 1
$add_stat_crit = 1
$add_stat_agi = 1
$add_stat_spr = 1

#-------------[global variables for leveling up system]--------------------------------
#-------------[Change the VALUES BELOW to your liking]---------------------------
#-------------[global variables for leveling up system]--------------------------------



#==============================================================================
# * Window_AP_RemainAlert
#prompts the player asking to distribute remaining AP if and only if they have any remaining.
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_RemainAlert< Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 300, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
refresh
end

#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = normal_color
self.contents.draw_text(-15, -5, 300, 32, "!!! Alert !!!", 1)
self.contents.font.color = normal_color
self.contents.draw_text(-15, 25, 300, 32, @actor.name + " has " + @actor.stat_points.to_s + " AP remaining.", 1)
self.contents.draw_text(-15, 55, 300, 32, "Distribute the remaining " + @actor.stat_points.to_s + " AP ?", 1)
end

end


#==============================================================================
# * Window_AP_RemainConfirm
#prompts the player asking if he/she permanently wants to distribute remaining AP.
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_RemainConfirm < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 200, 55)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 2
@row_max = 1
@column_max = 2
@actor = actor
@commands = ["Yes", "No"]
refresh
end
#--------------------------------------------------------------------------
# - Refresh
#--------------------------------------------------------------------------

def refresh
self.contents.clear

t = @commands.size
for i in 0...@commands.size
x = (i % 2) * 100
y = (i / 2) * 32
self.contents.font.color = normal_color
self.contents.draw_text(x - 15, y - 5 , 100, 32, @commands[i], 1)
end
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((@index * 100), -5, 70, 32)
end
end

#--------------------------------------------------------------------------

end


#==============================================================================
# * Window_AP_Warning #prompts the player asking if he/she permanently wants to use the ap they distributed
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_Warning< Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 300, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end

#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = normal_color
self.contents.draw_text(-15, -5, 300, 32, "!!! WARNING !!!", 1)
self.contents.font.color = normal_color
self.contents.draw_text(-15, 25, 300, 32, "AP distributed will be permanently removed", 1)
self.contents.draw_text(-15, 55, 300, 32, "from Hero's Remaining AP count.", 1)
end

end


#==============================================================================
# * Window_AP_WarningConfirm #prompts the player asking if he/she permanently wants to use the ap they distributed
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_WarningConfirm < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 55)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 2
@row_max = 1
@column_max = 2
@commands = ["Confirm", "Cancel"]
refresh
end
#--------------------------------------------------------------------------
# - Refresh
#--------------------------------------------------------------------------

def refresh
self.contents.clear

t = @commands.size
for i in 0...@commands.size
x = (i % 2) * 100
y = (i / 2) * 32
self.contents.font.color = normal_color
self.contents.draw_text(x - 15, y - 5 , 100, 32, @commands[i], 1)
end
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((@index * 100), -5, 70, 32)
end
end

#--------------------------------------------------------------------------

end


#==============================================================================
# * Window_AP_HeroFace
#------------------------------------------------------------------------------
#displays the hero's portrait or battler graphic as well as name, lv, class, and remaining AP.
#==============================================================================

class Window_AP_HeroFace < Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(50, 40, 160, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
self.z = 10
refresh
end

#======[use this for displaying hero's portrait]===============

def draw_actor_face_portrait(actor, x, y)
bitmap = RPG::Cache.picture(actor.id.to_s)
src_rect = Rect.new(0, 0, 96, 192)
self.contents.blt(28, 0, bitmap, src_rect)
end

#======[use this for displaying hero's battler portrait]===============
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
src_rect = Rect.new(0, 0, 96, 192)
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 200, 480))
end
#======================================

#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

x = 0
y = 0

draw_actor_battler(@actor,0,0) #used for displaying battler
#draw_actor_face_portrait(@actor, x + 28, y + 0) #used for displaying hero portrait
draw_actor_name(@actor, x + 28, y + 165)
draw_actor_level(@actor, x + 28, y + 190)
draw_actor_class(@actor, x + 28, y + 215)

self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y + 240, 320, 32, "AP", 0)

self.contents.font.color = normal_color
self.contents.draw_text(x - 40, y + 240, 160, 32, @actor.stat_points.to_s, 2)


end
end



#==============================================================================
# * Window_AP_HeroStatus
#------------------------------------------------------------------------------
# displays the Hero's current status before the AP is distributed and the stat points are changed.
#==============================================================================

class Window_AP_HeroStatus < Window_Base
#--------------------------------------------------------------------------
# - Object initialization
# actor : Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(10, 200, 300, 360)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(105, -5, 120, 32, "Current Stats", 0)

self.contents.font.color = normal_color
self.contents.draw_text(105, 30, 120, 32, "Max HP", 0)
self.contents.font.color = normal_color
self.contents.draw_text(105, 55, 120, 32, "Max SP", 0)

self.contents.font.color = normal_color
self.contents.draw_text(122, 30, 120, 32, @actor.maxhp.to_s, 2)
self.contents.draw_text(122, 55, 120, 32, @actor.maxsp.to_s, 2)

draw_actor_parameter(@actor, 105, 105, 0)#char's attack
draw_actor_parameter(@actor, 105, 130, 1)#char's phy def
draw_actor_parameter(@actor, 105, 155, 2)#char's mag def

draw_actor_parameter(@actor, 105, 205, 3)#char's Tech
draw_actor_parameter(@actor, 105, 230, 4)#char's Critical
draw_actor_parameter(@actor, 105, 255, 5)#char's Agility
draw_actor_parameter(@actor, 105, 280, 6)#char's Spirit

end
end


#==============================================================================
# * Window_AP_Add
#------------------------------------------------------------------------------
# displays and updates the values of the subtotal and total AP distribution and stat points
#==============================================================================

class Window_AP_Add < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
# actor : Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(10, 200, 340, 360)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 11
@row_max = 11
@column_max = 1
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(5, 0, 120, 32, "Added Stats", 0)

#-----[global variables subtotal display]----------------------------------------------------

self.contents.font.color = normal_color

self.contents.draw_text(-65, 35, 120, 32, $subtotal_stat_maxhp.to_s, 2)
self.contents.draw_text(-65, 60, 120, 32, $subtotal_stat_maxsp.to_s, 2)

self.contents.draw_text(-65, 110, 120, 32, $subtotal_stat_atk.to_s, 2)
self.contents.draw_text(-65, 135, 120, 32, $subtotal_stat_pdef.to_s, 2)
self.contents.draw_text(-65, 160, 120, 32, $subtotal_stat_mdef.to_s, 2)

self.contents.draw_text(-65, 210, 120, 32, $subtotal_stat_tech.to_s, 2)
self.contents.draw_text(-65, 235, 120, 32, $subtotal_stat_crit.to_s, 2)
self.contents.draw_text(-65, 260, 120, 32, $subtotal_stat_agi.to_s, 2)
self.contents.draw_text(-65, 285, 120, 32, $subtotal_stat_spr.to_s, 2)

#-----["=" sign display]----------------------------------------------------

self.contents.font.color = normal_color

self.contents.draw_text(22, 35, 120, 32, "=", 2)
self.contents.draw_text(22, 60, 120, 32, "=", 2)

self.contents.draw_text(22, 110, 120, 32, "=", 2)
self.contents.draw_text(22, 135, 120, 32, "=", 2)
self.contents.draw_text(22, 160, 120, 32, "=", 2)

self.contents.draw_text(22, 210, 120, 32, "=", 2)
self.contents.draw_text(22, 235, 120, 32, "=", 2)
self.contents.draw_text(22, 260, 120, 32, "=", 2)
self.contents.draw_text(22, 285, 120, 32, "=", 2)

#-----[global variables total display]----------------------------------------------------

self.contents.font.color = system_color
self.contents.draw_text(125, 0, 120, 32, "New Stats", 2)

self.contents.font.color = normal_color

self.contents.draw_text(125, 35, 120, 32, $total_stat_maxhp.to_s, 2)
self.contents.draw_text(125, 60, 120, 32, $total_stat_maxsp.to_s, 2)

self.contents.draw_text(125, 110, 120, 32, $total_stat_atk.to_s, 2)
self.contents.draw_text(125, 135, 120, 32, $total_stat_pdef.to_s, 2)
self.contents.draw_text(125, 160, 120, 32, $total_stat_mdef.to_s, 2)

self.contents.draw_text(125, 210, 120, 32, $total_stat_tech.to_s, 2)
self.contents.draw_text(125, 235, 120, 32, $total_stat_crit.to_s, 2)
self.contents.draw_text(125, 260, 120, 32, $total_stat_agi.to_s, 2)
self.contents.draw_text(125, 285, 120, 32, $total_stat_spr.to_s, 2)

end

#-----[update of cursor]----------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, (@index * 25) + 35, 280, 28)
end
end

end


#==============================================================================
# * Window_AP_Confirm #gives options for confirming, distribute, and resetting AP.
#------------------------------------------------------------------------------
#==============================================================================

class Window_AP_Confirm < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 300, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@item_max = 3
@row_max = 1
@column_max = 3
@commands = ["Confirm", "Distribute", "Reset"]
refresh
end

#--------------------------------------------------------------------------
# - Refresh
#--------------------------------------------------------------------------

def refresh
self.contents.clear
t = @commands.size
for i in 0...@commands.size
x = (i % 3) * 100
y = (i / 3) * 32
self.contents.font.color = normal_color
self.contents.draw_text(x - 15, y - 5 , 100, 32, @commands[i], 1)
end
end

#--------------------------------------------------------------------------

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((@index * 100), -5, 70, 32)
end
end

end


#==============================================================================

class Scene_AP_Distribute #this is where all the magic happens

#--------------------------------------------------------------------------
# - Main processing
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end

#--------------------------------------------------------------------------
def main

@actor = $game_party.actors[@actor_index]

#-------------[global variables for leveling up system]--------------------------------
#-------------[DO NOT TAMPER WITH THESE VALUES BELOW]-------------------
#-------------[global variables for leveling up system]--------------------------------

@old_stat_points = @actor.stat_points #used to keep track of AP amount before distribution

$total_stat_maxhp = @actor.maxhp
$total_stat_maxsp = @actor.maxsp

$total_stat_atk = @actor.atk
$total_stat_pdef = @actor.pdef
$total_stat_mdef = @actor.mdef

$total_stat_tech = @actor.str
$total_stat_crit = @actor.dex
$total_stat_agi = @actor.agi
$total_stat_spr = @actor.int

$subtotal_stat_maxhp = 0
$subtotal_stat_maxsp = 0

$subtotal_stat_atk = 0
$subtotal_stat_pdef = 0
$subtotal_stat_mdef = 0

$subtotal_stat_tech = 0
$subtotal_stat_crit = 0
$subtotal_stat_agi = 0
$subtotal_stat_spr = 0

#-------------[global variables for leveling up system]-------------------------------
#-------------[DO NOT TAMPER WITH THESE VALUES ABOVE]-------------------
#-------------[global variables for leveling up system]--------------------------------

@map_sprite = Spriteset_Map.new

@alert_window = Window_AP_Warning.new
@alert_window.x = 320 - (@alert_window.width / 2)
@alert_window.y = 120
@alert_window.z = 100000
@alert_window.opacity = 240
@alert_window.visible = false

@alertconfirm_window = Window_AP_WarningConfirm.new
@alertconfirm_window.x = 320 - (@alertconfirm_window.width / 2)
@alertconfirm_window.y = 230
@alertconfirm_window.z = 100000
@alertconfirm_window.opacity = 240
@alertconfirm_window.active = false
@alertconfirm_window.visible = false
@alertconfirm_window.index = 0

@confirm_window = Window_AP_Confirm.new
@confirm_window.x = 320 - (@confirm_window.width / 2)
@confirm_window.y = 380
@confirm_window.z = 10000
@confirm_window.opacity = 200
@confirm_window.active = true
@confirm_window.index = 1

@hero_window = Window_AP_HeroFace.new(@actor)
@hero_window.x = -10
@hero_window.y = 30
@hero_window.z = 10000
@hero_window.opacity = 200

@herostatus_window = Window_AP_HeroStatus.new(@actor)
@herostatus_window.x = 40
@herostatus_window.y = 40
@herostatus_window.z = 1000
@herostatus_window.opacity = 200

@ap_add_window = Window_AP_Add.new(@actor)
@ap_add_window.x = 320
@ap_add_window.y = 35
@ap_add_window.z = 1000
@ap_add_window.opacity = 200
@ap_add_window.active = false
@ap_add_window.index = -1

# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@confirm_window.dispose
@hero_window.dispose
@herostatus_window.dispose
@ap_add_window.dispose
@alert_window.dispose
@alertconfirm_window.dispose
@map_sprite.dispose

# When it changes to the title picture and it is in
if $scene.is_a?(Scene_Title)
# Fading out picture
Graphics.transition
Graphics.freeze
end
end


#--------------------------------------------------------------------------
# - Frame renewal
#--------------------------------------------------------------------------
def update

@ap_add_window.update
@confirm_window.update
@alertconfirm_window.update

if @confirm_window.active
update_confirm
return
end

if @ap_add_window.active
update_ap_add
return
end

if @alertconfirm_window.active
update_alertconfirm
return
end

end

# --------------------------------
def update_confirm

if Input.trigger?(Input::B) #cancel
$game_system.se_play($data_system.cancel_se)
if @actor.stat_points != @old_stat_points #checks to see if player has used any of the remaining AP
@alert_window.visible = true
@alertconfirm_window.active = true
@alertconfirm_window.visible = true
@confirm_window.active = false
@confirm_window.index = -1
else
$scene = Scene_Status.new(@actor_index)
end
return
end

if Input.trigger?(Input::C) #confirm
case @confirm_window.index
when 0 #confirm distribution of ap
$game_system.se_play($data_system.decision_se)
if @actor.stat_points != @old_stat_points #checks to see if player has used any of the remaining AP
@alert_window.visible = true
@alertconfirm_window.active = true
@alertconfirm_window.visible = true
@confirm_window.active = false
@confirm_window.index = -1
else
$scene = Scene_Status.new(@actor_index)
end

when 1 #distribute ap
$game_system.se_play($data_system.decision_se)
@confirm_window.active = false
@confirm_window.index = -1
@ap_add_window.active = true
@ap_add_window.index = 0
when 2 #reset distributed ap
$game_system.se_play($data_system.decision_se)

$subtotal_stat_maxhp = 0
$subtotal_stat_maxsp = 0

$subtotal_stat_atk = 0
$subtotal_stat_pdef = 0
$subtotal_stat_mdef = 0

$subtotal_stat_tech = 0
$subtotal_stat_crit = 0
$subtotal_stat_agi = 0
$subtotal_stat_spr = 0

$total_stat_maxhp = @actor.maxhp
$total_stat_maxsp = @actor.maxsp

$total_stat_atk = @actor.atk
$total_stat_pdef = @actor.pdef
$total_stat_mdef = @actor.mdef

$total_stat_tech = @actor.str
$total_stat_crit = @actor.dex
$total_stat_agi = @actor.agi
$total_stat_spr = @actor.int

@actor.stat_points = @old_stat_points

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

end
return
end
end

# --------------------------------
def update_ap_add #updates the distribution of the AP to hero's attributes

if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@ap_add_window.active = false
@ap_add_window.index = -1
@confirm_window.active = true
@confirm_window.index = 1
return
end

if Input.trigger?(Input::A) #resets AP
$game_system.se_play($data_system.decision_se)

$subtotal_stat_maxhp = 0
$subtotal_stat_maxsp = 0

$subtotal_stat_atk = 0
$subtotal_stat_pdef = 0
$subtotal_stat_mdef = 0

$subtotal_stat_tech = 0
$subtotal_stat_crit = 0
$subtotal_stat_agi = 0
$subtotal_stat_spr = 0

$total_stat_maxhp = @actor.maxhp
$total_stat_maxsp = @actor.maxsp

$total_stat_atk = @actor.atk
$total_stat_pdef = @actor.pdef
$total_stat_mdef = @actor.mdef

$total_stat_tech = @actor.str
$total_stat_crit = @actor.dex
$total_stat_agi = @actor.agi
$total_stat_spr = @actor.int

@actor.stat_points = @old_stat_points

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

return
end

if Input.repeat?(Input::LEFT) #subtract AP

$game_system.se_play($data_system.cursor_se)

case @ap_add_window.index

when 0 #subtract from maxhp
if$subtotal_stat_maxhp > 0
@actor.stat_points += 1
$subtotal_stat_maxhp = $subtotal_stat_maxhp - $add_stat_maxhp #update subtotal
$total_stat_maxhp = $total_stat_maxhp - $add_stat_maxhp #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 1 #subtract from maxsp
if$subtotal_stat_maxsp > 0
@actor.stat_points += 1
$subtotal_stat_maxsp = $subtotal_stat_maxsp - $add_stat_maxsp
$total_stat_maxsp = $total_stat_maxsp - $add_stat_maxsp #update total
else
$game_system.se_play($data_system.buzzer_se)
end

# when 3 #subtract from atk
# if$subtotal_stat_atk > 0
# @actor.stat_points += 1
# $subtotal_stat_atk = $subtotal_stat_atk - $add_stat_atk
# $total_stat_atk = $total_stat_atk - $add_stat_atk #update total
# else
# $game_system.se_play($data_system.buzzer_se)
# end

# when 4 #subtract from pdef
# if$subtotal_stat_pdef > 0
# @actor.stat_points += 1
# $subtotal_stat_pdef = $subtotal_stat_pdef - $add_stat_pdef
# $total_stat_pdef = $total_stat_pdef - $add_stat_pdef #update total
# else
# $game_system.se_play($data_system.buzzer_se)
# end

# when 5 #subtract from mdef
# if$subtotal_stat_mdef > 0
# @actor.stat_points += 1
# $subtotal_stat_mdef = $subtotal_stat_mdef - $add_stat_mdef
# $total_stat_mdef = $total_stat_mdef - $add_stat_mdef #update total
# else
# $game_system.se_play($data_system.buzzer_se)
# end

when 7 #subtract from tech
if$subtotal_stat_tech > 0
@actor.stat_points += 1
$subtotal_stat_tech = $subtotal_stat_tech - $add_stat_tech
$total_stat_tech = $total_stat_tech - $add_stat_tech #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 8 #subtract from crit
if$subtotal_stat_crit > 0
@actor.stat_points += 1
$subtotal_stat_crit = $subtotal_stat_crit - $add_stat_crit
$total_stat_crit = $total_stat_crit - $add_stat_crit #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 9 #subtract from agi
if$subtotal_stat_agi > 0
@actor.stat_points += 1
$subtotal_stat_agi = $subtotal_stat_agi - $add_stat_agi
$total_stat_agi = $total_stat_agi - $add_stat_agi #update total
else
$game_system.se_play($data_system.buzzer_se)
end

when 10 #subtract from spr
if$subtotal_stat_spr > 0
@actor.stat_points += 1
$subtotal_stat_spr = $subtotal_stat_spr - $add_stat_spr
$total_stat_spr = $total_stat_spr - $add_stat_spr #update total

else
$game_system.se_play($data_system.buzzer_se)
end

end

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

return
end


if Input.repeat?(Input::RIGHT) #add AP

if @actor.stat_points > 0

$game_system.se_play($data_system.cursor_se)

case @ap_add_window.index

when 0 #add to maxhp
@actor.stat_points -= 1
$subtotal_stat_maxhp = $subtotal_stat_maxhp + $add_stat_maxhp #update subtotal
$total_stat_maxhp = $total_stat_maxhp + $add_stat_maxhp #update total

when 1 #add to maxsp
@actor.stat_points -= 1
$subtotal_stat_maxsp = $subtotal_stat_maxsp + $add_stat_maxsp
$total_stat_maxsp = $total_stat_maxsp + $add_stat_maxsp

#when 3 #add to atk
# @actor.stat_points -= 1
# $subtotal_stat_atk = $subtotal_stat_atk + $add_stat_atk
# $total_stat_atk = $total_stat_atk + $add_stat_atk

# when 4 #add to pdef
# @actor.stat_points -= 1
# $subtotal_stat_pdef = $subtotal_stat_pdef + $add_stat_pdef
# $total_stat_pdef = $total_stat_pdef + $add_stat_pdef

# when 5 #add to mdef
# @actor.stat_points -= 1
# $subtotal_stat_mdef = $subtotal_stat_mdef + $add_stat_mdef
# $total_stat_mdef = $total_stat_mdef + $add_stat_mdef

when 7 #add to tech
@actor.stat_points -= 1
$subtotal_stat_tech = $subtotal_stat_tech + $add_stat_tech
$total_stat_tech = $total_stat_tech + $add_stat_tech

when 8 #add to crit
@actor.stat_points -= 1
$subtotal_stat_crit = $subtotal_stat_crit + $add_stat_crit
$total_stat_crit = $total_stat_crit + $add_stat_crit

when 9 #add to agi
@actor.stat_points -= 1
$subtotal_stat_agi = $subtotal_stat_agi + $add_stat_agi
$total_stat_agi = $total_stat_agi + $add_stat_agi

when 10 #add to spr
@actor.stat_points -= 1
$subtotal_stat_spr = $subtotal_stat_spr + $add_stat_spr
$total_stat_spr = $total_stat_spr + $add_stat_spr

end

@hero_window.refresh
@herostatus_window.refresh
@ap_add_window.refresh

else
$game_system.se_play($data_system.buzzer_se)
end

return
end


end



# --------------------------------
def update_alertconfirm

if Input.trigger?(Input::B) #cancel
$game_system.se_play($data_system.cancel_se)
@alert_window.visible = false
@alertconfirm_window.active = false
@alertconfirm_window.visible = false
@confirm_window.active = true
@confirm_window.index = 0
return
end

if Input.trigger?(Input::C)
case @alertconfirm_window.index
when 0 #when confirm adds distributed AP to stats permanently
$game_system.se_play($data_system.decision_se)

@actor.maxhp = $total_stat_maxhp
@actor.maxsp = $total_stat_maxsp

@actor.hp = @actor.maxhp #restores the hero's hp to max
@actor.sp = @actor.maxsp #restores the hero's sp to max

#@actor.base_atk = $total_stat_atk
#@actor.base_pdef = $total_stat_pdef
#@actor.base_mdef = $total_stat_mdef

@actor.str = $total_stat_tech
@actor.dex = $total_stat_crit
@actor.agi = $total_stat_agi
@actor.int = $total_stat_spr

$scene = Scene_Status.new(@actor_index)

when 1 #cancel
$game_system.se_play($data_system.cancel_se)
@alert_window.visible = false
@alertconfirm_window.active = false
@alertconfirm_window.visible = false
@confirm_window.active = true
@confirm_window.index = 0

end
end
end

end





I hope this is the right sub forum for this .

Well that aside this script basically allows you to have the players Strength as their Attack power when they have no weapons equiped isntead of magically losing all of their attack powers for having no weapon.

To use it's very simple just put it above main and look for this in the script:


WEAPON_ANIMATION_ID = 4
Then change the number 4 to the ID of the animation you want it to have when the player attacks with no weapon.


#======================================================================
========
# TDS Attack with no weapon
# Version: 1.0
# This script aliases the base_atk method and the animation2_id method.
#==============================================================================
#------------------------------------------------------------------------------
# This script allows to attack with now weapons.
#==============================================================================
# When no weapon is equiped animation ID
WEAPON_ANIMATION_ID = 4
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get Basic Attack Power
#--------------------------------------------------------------------------
alias tds_no_weapon_attack_base_atk base_atk
def base_atk
tds_no_weapon_attack_base_atk
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.atk : base_str
end
#--------------------------------------------------------------------------
# * Get Offensive Animation ID for Normal Attacks
#--------------------------------------------------------------------------
alias tds_no_weapon_attack_animation2_id animation2_id
def animation2_id
tds_no_weapon_attack_animation2_id
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.animation2_id : WEAPON_ANIMATION_ID
end
end



Battle Report
Version: 1.6


Introduction

A script that shows the battle result like in the Final Fantasy games.

Features
Scrolling down Exp

Edits:
Exp Bars filling up
Possible displaying of Facesets instead of Charactersets
Exp scrolling down faster, depending on how much exp you gain after battle.
Play a ME as long as you want in the result window.


Script:


class Game_Actor < Game_Battler
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1

# NEW - David
$d_new_skill = nil

for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)

# NEW - David
skill = $data_skills[j.skill_id]
$d_new_skill = skill.name

end
end
end
while @exp < @exp_list[@level]
@level -= 1
end
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end

#--------------------------------------------------------------------------
# * Get the current EXP
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get the next level's EXP
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end

end

class Window_LevelUp < Window_Base

#----------------------------------------------------------------
def initialize(actor, pos)
#change this to false to show the actor's graphic
@face = false
@actor = actor
y = (pos * 120)
super(280, y, 360, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
if $d_dum == false
refresh
end
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 18
if @face == true
draw_actor_face(@actor, 4, 0)
else
draw_actor_graphic(@actor, 50, 80)
end
draw_actor_name(@actor, 111, 0)
draw_actor_level(@actor, 186, 0)
show_next_exp = @actor.level == 99 ? "---" : "#{@actor.next_exp}"
min_bar = @actor.level == 99 ? 1 : @actor.now_exp
max_bar = @actor.level == 99 ? 1 : @actor.next_exp
draw_slant_bar(115, 80, min_bar, max_bar, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
self.contents.draw_text(115, 24, 300, 32, "Exp:#{@actor.now_exp}")
self.contents.draw_text(115, 48, 300, 32, "Level Up:" + show_next_exp)
end


#----------------------------------------------------------------
def level_up
self.contents.font.color = system_color
self.contents.draw_text(230, 48, 80, 32, "LEVEL UP!")
end

#----------------------------------------------------------------
def update
super
end

end # of Window_LevelUp

#=================================
#Window_EXP
# Written by: David Schooley
#=================================

class Window_EXP < Window_Base

#----------------------------------------------------------------
def initialize(exp)
super(0, 0, 280, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(exp)
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh(exp)
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 150, 32, "Exp Earned:")
self.contents.font.color = normal_color
self.contents.draw_text(180, 0, 54, 32, exp.to_s, 2)
end

#----------------------------------------------------------------
def update
super
end

end # of Window_EXP

#=================================
#Window_Money_Items
# Written by: David Schooley
#=================================

class Window_Money_Items < Window_Base

#----------------------------------------------------------------
def initialize(money, treasures)
@treasures = treasures
super(0, 60, 280, 420)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(money)
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh(money)
@money = money
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(4, 4, 100, 32, "Items Found:")
self.contents.font.color = normal_color

y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end

cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 340, 220-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(4, 300, 220-cx-2, 32, "+ " + @money.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 340, cx + 100, 32, $data_system.words.gold, 2)
end

def update
super
end

end # of Window_Money_Items


class Scene_Battle
alias raz_battle_report_main main
alias raz_battle_report_be battle_end

def main
# NEW - David
#$battle_end = false
@lvup_window = []
@show_dummies = true # Show dummy windows or not?
raz_battle_report_main
# NEW - David
@lvup_window = nil
@level_up = nil
@ch_stats = nil
@ch_compare_stats = nil
Audio.me_stop
end

def battle_end(result)
raz_battle_report_be(result)
# NEW - David
@status_window.visible = false
@spriteset.dispose
Graphics.transition
if result == 0
display_lv_up(@exp, @gold, @treasures)
loop do
Graphics.update
Input.update
if Input.trigger?(Input::C)
break
end
end
trash_lv_up
end

end

def start_phase5
@phase = 5
$game_system.me_play($game_system.battle_end_me)
$game_system.bgm_play($game_temp.map_bgm)
exp = 0
gold = 0
treasures = []
for enemy in $game_troop.enemies
unless enemy.hidden
exp += enemy.exp
gold += enemy.gold
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
treasures = treasures[0..5]

# NEW - David
@treasures = treasures
@exp = exp
@gold = gold


for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
@phase5_wait_count = 10
end

def update_phase5
if @phase5_wait_count > 0
@phase5_wait_count -= 1
if @phase5_wait_count == 0

# NEW - David
$game_temp.battle_main_phase = false
end
return
end

# NEW - David
battle_end(0)

end

def display_lv_up(exp, gold, treasures)

$d_dum = false
d_extra = 0
i = 0
for actor in $game_party.actors
# Fill up the Lv up windows
@lvup_window[i] = Window_LevelUp.new($game_party.actors[i], i)
i += 1
end

# Make Dummies
if @show_dummies == true
$d_dum = true
for m in i..3
@lvup_window[m] = Window_LevelUp.new(m, m)
end
end

@exp_window = Window_EXP.new(exp)
@m_i_window = Window_Money_Items.new(gold, treasures)
@press_enter = nil
gainedexp = exp
@level_up = [0, 0, 0, 0]
@d_new_skill = ["", "", "", ""]
@d_breakout = false
@m_i_window.refresh(gold)
wait_for_OK

@d_remember = $game_system.bgs_memorize
Audio.bgs_play("Audio/SE/032-Switch01", 100, 300)

# NEW - David
max_exp = exp
value = 28
if exp < value
value = exp
end
if value == 0
value = 1
end
for n in 0..gainedexp - (max_exp / value)
exp -= (max_exp / value)
if @d_breakout == false
Input.update
end

for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += (max_exp / value)
# Fill up the Lv up windows
if @d_breakout == false
@lvup_window[i].refresh
@exp_window.refresh(exp)
end

if actor.level > last_level
@level_up[i] = 5
Audio.se_play("Audio/SE/056-Right02.ogg", 70, 150)
if $d_new_skill
@d_new_skill[i] = $d_new_skill
end
end

if @level_up[i] == 0
@d_new_skill[i] = ""
end

if @level_up[i] > 0
@lvup_window[i].level_up
end

if Input.trigger?(Input::C) or exp <= 0
@d_breakout = true
end
end

if @d_breakout == false
if @level_up[i] >0
@level_up[i] -= 1
end
Graphics.update
end
end

if @d_breakout == true
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += exp
end
end
exp = 0
break
end
end
Audio.bgs_stop
@d_remember = $game_system.bgs_restore

for i in 0...$game_party.actors.size
@lvup_window[i].refresh
end
@exp_window.refresh(exp)
Audio.se_play("Audio/SE/006-System06.ogg", 70, 150)
$game_party.gain_gold(gold)
@m_i_window.refresh(0)
Graphics.update
end

def trash_lv_up
# NEW - David
i=0

for i in 0 ... 4
@lvup_window[i].visible = false
end
@exp_window.visible = false
@m_i_window.visible = false
@lvup_window = nil
@exp_window = nil
@m_i_window = nil
end

# Wait until OK key is pressed
def wait_for_OK
loop do
Input.update
Graphics.update
if Input.trigger?(Input::C)
break
end
end
end

end

class Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
self.contents.blt(x, y, bitmap, Rect.new(0,0,96,96))
end

#--------------------------------------------------------------------------
# * Draw Slant Bar(by SephirothSpawn)
#--------------------------------------------------------------------------
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end

end
Instructions

Place this script above main. Make a folder in the pictures folder and call it Faces. When using a face picture, make sure it's named like the character's file. To turn facesets on search for @face = false and set it to true to turn facesets on.

FAQ

None yet.

Compatibility

May be incompatible with your CBS.
Is incompatible with Cogwheels RTAB script and please don't ask it to be merged, as I won't do it.

Credits and Thanks
I only want to say that this script was made by illustrationism not by me.
I only made the edits.
Thanks to neonshadow for fixing a bug.

This post has been edited by Raziel: Sep 13 2006, 03:17 PM





not sure if this already exists here.
if it does please just delete this topic or something.


i found this great script for up to 99 save slots on xp!


just replace Scene_File with this.


class Scene_File
SAVEFILE_MAX = 99
# -------------------
def initialize(help_text)
@help_text = help_text
end
# -------------------
def main
@help_window = Window_Help.new
@help_window.set_text(@help_text)
@savefile_windows = []
@cursor_displace = 0
for i in 0..3
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i), i))
end
@file_index = 0
@savefile_windows[@file_index].selected = true
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
for i in @savefile_windows
i.dispose
end
end
# -------------------
def update
@help_window.update
for i in @savefile_windows
i.update
end
if Input.trigger?(Input::C)
on_decision(make_filename(@file_index))
$game_temp.last_file_index = @file_index
return
end
if Input.trigger?(Input::B)
on_cancel
return
end
if Input.repeat?(Input::DOWN)
if Input.trigger?(Input::DOWN) or @file_index < SAVEFILE_MAX - 1
if @file_index == SAVEFILE_MAX - 1
$game_system.se_play($data_system.buzzer_se)
return
end
@cursor_displace += 1
if @cursor_displace == 4
@cursor_displace = 3
for i in @savefile_windows
i.dispose
end
@savefile_windows = []
for i in 0..3
f = i - 2 + @file_index
name = make_filename(f)
@savefile_windows.push(Window_SaveFile.new(f, name, i))
@savefile_windows[i].selected = false
end
end
$game_system.se_play($data_system.cursor_se)
@file_index = (@file_index + 1)
if @file_index == SAVEFILE_MAX
@file_index = SAVEFILE_MAX - 1
end
for i in 0..3
@savefile_windows[i].selected = false
end
@savefile_windows[@cursor_displace].selected = true
return
end
end
if Input.repeat?(Input::UP)
if Input.trigger?(Input::UP) or @file_index > 0
if @file_index == 0
$game_system.se_play($data_system.buzzer_se)
return
end
@cursor_displace -= 1
if @cursor_displace == -1
@cursor_displace = 0
for i in @savefile_windows
i.dispose
end
@savefile_windows = []
for i in 0..3
f = i - 1 + @file_index
name = make_filename(f)
@savefile_windows.push(Window_SaveFile.new(f, name, i))
@savefile_windows[i].selected = false
end
end
$game_system.se_play($data_system.cursor_se)
@file_index = (@file_index - 1)
if @file_index == -1
@file_index = 0
end
for i in 0..3
@savefile_windows[i].selected = false
end
@savefile_windows[@cursor_displace].selected = true
return
end
end
end
# -------------------
def make_filename(file_index)
return "Save#{file_index + 1}.rxdata"
end
# -------------------
end
and replace the Window_SaveFile initialize method with this


class Window_SaveFile < Window_Base
# -------------------
def initialize(file_index, filename, position)
y = 64 + position * 104
super(0, y, 640, 104)
self.contents = Bitmap.new(width - 32, height - 32)
@file_index = file_index
@filename = "Save#{@file_index + 1}.rxdata"
@time_stamp = Time.at(0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@time_stamp = file.mtime
@characters = Marshal.load(file)
@frame_count = Marshal.load(file)
@game_system = Marshal.load(file)
@game_switches = Marshal.load(file)
@game_variables = Marshal.load(file)
@total_sec = @frame_count / Graphics.frame_rate
file.close
end
refresh
@selected = false
end

you can edit the 99 part in the first script to however many save slots you want.
remember!
this is not mine, i simply found this!
should work with almost everything ive tried!



Instructions
Very simple really, just paste the script right above main and thats it XD

Also, you must go into your database and put the name of the item before the description e.g. "Potion: Heals character by 500". In the end i thought it would be more beneficial to make it like this rather then call upon another window to display the name.


#==============================================================================
# Icon Inventory System - Scripted By Mac
#------------------------------------------------------------------------------
# This window displays the Icons and the amount of the item you have.
#==============================================================================

class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 63, 640, 417)
@column_max = 10
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# * Get Item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 10 * (32 + 32)
y = index / 10 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x, y + 9, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# * Help Text Update
#--------------------------------------------------------------------------

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
Credits
Me! XD



by Near Fantastica & Fuso


Credit due: Fuso made the main part of this script all I did was make it work€ Fuso needs as much credit or more then I do for this script€

Features:

NO MORE CUSTOM MOVEMENTS ~! This script uses path finding to return the shortest path from the START XY to the END XY then uses the custom movement to move the character€ You can chain this path finds together to path link between 2 points or more...

As well an Error message will be displayed if you try to send an event to a place it can not get to€. €œTarget Is Unreachable for Event ID€?

Syntax Event:


CODE
$AEMS.setup_event(index, repeat, skippable = false)


index = the index of the event
repeat = set the repeat flag to true and the define movement will repeat false it will not repeat..
skippable = set skippable flag to true and the event will move ever when blocked
NOTE : This is not wanted in must cases that is why its defaulted to false


CODE
$AEMS.add_command_event(index, code, parameters = [])


index = the index of the event
code = movement code
parameters = the needed parameters for that movement code

Note : the movement codes can be found in the Game_Character page 2 move_type_custom as well as there needed parameters


CODE
$AEMS.start_movement_event(index)


index = the index of the event


CODE
$AEMS.add_paths_event(index, src_x, src_y, trg_x, trg_y)


index = the index of the event
src_x = source x
src_y = source y
trg_x = target x
trg_y = target y

Syntax Player:


CODE
$AEMS.setup_player(repeat, skippable = false)


repeat = set the repeat flag to true and the define movement will repeat false it will not repeat..
skippable = set skippable flag to true and the event will move ever when blocked
NOTE : This is not wanted in must cases that is why its defaulted to false


CODE
$AEMS.add_command_player(code, parameters = [])


code = movement code
parameters = the needed parameters for that movement code

Note : the movement codes can be found in the Game_Character page 2 move_type_custom as well as there needed parameters


CODE
$AEMS.start_movement_player


CODE
$AEMS.add_paths_player(src_x, src_y, trg_x, trg_y)


src_x = source x
src_y = source y
trg_x = target x
trg_y = target y

How to use:

You need to setup a movement event before you can add a path or commands this is done with the $AEMS.setup(index, repeat) command then you can add a command or a path this is done by $AEMS.add_command(index, code, parameters = []) or $AEMS.add_paths(index, src_x, src_y, trg_x, trg_y) commands. Now you can add as many commands and paths as you want to event by adding more of these€ this is called path linking€ then when you are ready to start the movement use $AEMS.start_movement(index)

Now this can be done in 2 places in the events command window or in the custom movement of an event. If you do it in the movement window to start use this
return $AEMS.start_movement(index) or the code will not work right€

As well I found out something interesting if you have a repeating movement event using this movement with a defined wait the wait will repeat everytime€ but if you add a normal move event wait it will only operate once€ this can be a good things to add this delay so not all the events start at once yet do not repeat that wait later€



#======================================
# –� Advanced Event Movement System
#------------------------------------------------------------------------------
# €€By: Near Fantastica
# Date: 23/3/05
#
# Advanced Event Movement using Path Fiding and the Game
# Characters force_move_route method
#======================================
class AEMS
#--------------------------------------------------------------------------
def initialize
@event_route = []
@player_route = nil
end
#--------------------------------------------------------------------------
def setup_event(index, repeat, skippable = false)
@event_route[index] = RPG::MoveRoute.new
@event_route[index].repeat = repeat
@event_route[index].skippable = skippable
@event_route[index].list.clear
end
#--------------------------------------------------------------------------
def add_command_event(index, code, parameters = [])
@event_route[index].list.push RPG::MoveCommand.new(code,parameters)
end
#--------------------------------------------------------------------------
def start_movement_event(index)
@event_route[index].list.push RPG::MoveCommand.new(0)
$game_map.events[index].move_route = @event_route[index]
$game_map.events[index].move_route_index = 0
end
#--------------------------------------------------------------------------
def add_paths_event(index, src_x,src_y,trg_x,trg_y)
paths = $game_map.find_short_paths(src_x,src_y,trg_x,trg_y)
if paths == nil
print "Target Is Unreachable for Event " + index.to_s
return
end
for i in 0...paths.size
case paths[i]
when 2
@event_route[index].list.push RPG::MoveCommand.new(4)
when 4
@event_route[index].list.push RPG::MoveCommand.new(2)
when 6
@event_route[index].list.push RPG::MoveCommand.new(3)
when 8
@event_route[index].list.push RPG::MoveCommand.new(1)
end
end
end
#--------------------------------------------------------------------------
def setup_player(repeat, skippable = false)
@player_route = RPG::MoveRoute.new
@player_route.repeat = repeat
@player_route.skippable = skippable
@player_route.list.clear
end
#--------------------------------------------------------------------------
def add_command_player(code, parameters = [])
@player_route.list.push RPG::MoveCommand.new(code,parameters)
end
#--------------------------------------------------------------------------
def start_movement_player
@player_route.list.push RPG::MoveCommand.new(0)
$game_player.move_route = @player_route
$game_player.move_route_index = 0
end
#--------------------------------------------------------------------------
def add_paths_player(src_x,src_y,trg_x,trg_y)
paths = $game_map.find_short_paths(src_x,src_y,trg_x,trg_y)
if paths == nil
print "Target Is Unreachable for Player "
return
end
for i in 0...paths.size
case paths[i]
when 2
@player_route.list.push RPG::MoveCommand.new(4)
when 4
@player_route.list.push RPG::MoveCommand.new(2)
when 6
@player_route.list.push RPG::MoveCommand.new(3)
when 8
@player_route.list.push RPG::MoveCommand.new(1)
end
end
end
end
#======================================
# –� Path Finding
#------------------------------------------------------------------------------
# €€By: Fuso
#======================================
class Game_Map
#--------------------------------------------------------------------------
attr_accessor :events
#--------------------------------------------------------------------------
def initialize
@events = {}
end
#--------------------------------------------------------------------------
UP = 2
LEFT = 4
RIGHT = 6
DOWN = 8
#--------------------------------------------------------------------------
def find_short_paths(src_x,src_y,trg_x,trg_y,depth = 100, self_event = nil, option_close = false)
return [] if not (passable?(trg_x, trg_y, UP, self_event) or
passable?(trg_x, trg_y, LEFT, self_event) or
passable?(trg_x, trg_y, RIGHT, self_event) or
passable?(trg_x, trg_y, DOWN, self_event))
# Paths will hold the succeeding paths.
paths = []
# path_map will hold what paths has already been visited, to prevent that we attempt to
# walk on the same tile twice.
path_map = [src_x + src_y / 10000.0]
trackers = []
new_trackers = [[src_x, src_y, []]]
if not option_close
depth.times {
trackers = new_trackers
new_trackers = []
for tracker in trackers
if tracker[0] == trg_x and tracker[1] == trg_y
paths.push tracker[2].compact
next
end
path_map.push tracker[0] + tracker[1] / 10000.0
if passable?(tracker[0], tracker[1], DOWN, self_event) and
passable?(tracker[0], tracker[1] - 1, UP) and
not path_map.include? tracker[0] + (tracker[1] - 1) / 10000.0
path_map.push tracker[0] + (tracker[1] - 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] - 1, [tracker[2], UP].flatten]
end
if passable?(tracker[0], tracker[1], RIGHT, self_event) and
passable?(tracker[0] - 1, tracker[1], LEFT) and
not path_map.include? tracker[0] - 1 + tracker[1] / 10000.0
path_map.push tracker[0] - 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] - 1, tracker[1], [tracker[2], LEFT].flatten]
end
if passable?(tracker[0], tracker[1], LEFT, self_event) and
passable?(tracker[0] + 1, tracker[1], RIGHT) and
not path_map.include? tracker[0] + 1 + tracker[1] / 10000.0
path_map.push tracker[0] + 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] + 1, tracker[1], [tracker[2], RIGHT].flatten]
end
if passable?(tracker[0], tracker[1], UP, self_event) and
passable?(tracker[0], tracker[1] + 1, DOWN) and
not path_map.include? tracker[0] + (tracker[1] + 1) / 10000.0
path_map.push tracker[0] + (tracker[1] + 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] + 1, [tracker[2], DOWN].flatten]
end
end
break if paths.size > 0
}
else
paths_distance = 10000 ** 2 * 2
depth.times {
trackers = new_trackers
new_trackers = []
for tracker in trackers
if tracker[0] == trg_x and tracker[1] == trg_y
if paths_distance > 0
paths_distance = 0
paths.clear
end
paths.push tracker[2].compact
next
end
distance = (tracker[0] - trg_x) ** 2 + (tracker[1] - trg_y) ** 2
if distance <= paths_distance
if distance < paths_distance
paths.clear
paths_distance = distance
end
paths.push tracker[2].compact
end
path_map.push tracker[0] + tracker[1] / 10000.0
if passable?(tracker[0], tracker[1], DOWN, self_event) and
passable?(tracker[0], tracker[1] - 1, UP) and
not path_map.include? tracker[0] + (tracker[1] - 1) / 10000.0
path_map.push tracker[0] + (tracker[1] - 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] - 1, [tracker[2], UP].flatten]
end
if passable?(tracker[0], tracker[1], RIGHT, self_event) and
passable?(tracker[0] - 1, tracker[1], LEFT) and
not path_map.include? tracker[0] - 1 + tracker[1] / 10000.0
path_map.push tracker[0] - 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] - 1, tracker[1], [tracker[2], LEFT].flatten]
end
if passable?(tracker[0], tracker[1], LEFT, self_event) and
passable?(tracker[0] + 1, tracker[1], RIGHT) and
not path_map.include? tracker[0] + 1 + tracker[1] / 10000.0
path_map.push tracker[0] + 1 + tracker[1] / 10000.0
new_trackers.push [tracker[0] + 1, tracker[1], [tracker[2], RIGHT].flatten]
end
if passable?(tracker[0], tracker[1], UP, self_event) and
passable?(tracker[0], tracker[1] + 1, DOWN) and
not path_map.include? tracker[0] + (tracker[1] + 1) / 10000.0
path_map.push tracker[0] + (tracker[1] + 1) / 10000.0
new_trackers.push [tracker[0], tracker[1] + 1, [tracker[2], DOWN].flatten]
end
end
break if distance == 0 and paths.size > 0
}
end
route = paths[0]
return route
end
end
#======================================
class Scene_Title
#--------------------------------------------------------------------------
alias aems_scene_title_update update
#--------------------------------------------------------------------------
def update
$AEMS = AEMS.new
aems_scene_title_update
end
end
#======================================
class Game_Character
attr_accessor :move_route
attr_accessor :move_route_index
end



Mode07 on the Map!
Includes:
Mode07 v0.6
Overworld Sprite Resize
Written by mewsterus

Special Thanks:
Fanha Giang (for a reverse engineered Tilemap class)
--------------------------------------------------------------------------------
Instructions:
--------------------------------------------------------------------------------
To install, just insert this in a descriptive code slot right above Main.
This is different than previous instructions; please read the next paragraph.

If you had a previous install of this script and need an original version of
Spriteset_Map, one can be found at:
http://www.rpg-palace.com/scripts/spriteset_map.txt

To activate Mode07, add [#XX] to the map's name, replacing XX with the
percentage of Mode07 to apply. Greater numbers will result in a more slanted
world.

To activate overworld sprite resize, add [OV] to the map's name. This will make
sprites smaller on that map.

For the purposes of location scripts, these identifiers will not appear.


Examples:

"Overworld[#40]" will result in a slant identical to the second screenshot.
"Underworld[OV]" will resize only the player character to a small size, as if
seen from high above.
"Atthelevelworld[OV][#12]" will result in the player being resized, and a modest
slant of 12%
"JustPlainWorld" will result in the same old map you've always seen.

To add a sky, simply use the panorama with the tileset. Also, events will not
be drawn flat with the map. Any vertical objects such as trees should be put
in events and displayed that way.

You can also add a sky by adding a fog. If you add this, you can make it look
like the first screenshot.

A note on the $strip_size variable; the default value is 8, however there is
extremely minimal, almost nonexistant lag with 16. The screen is extremely
smooth with 4, or even 2. If you're having major problems with lag, you may
need to use 32, but it won't look too pretty.
--------------------------------------------------------------------------------
* Draw_Tilemap v1.72-0.6
Fanha Giang, 02/12/2006 (mm/dd/yyyy)
Edited for Mode07 by mewsterus 08/08/2006 (mm/dd/yyyy)
=end
#===============================================================================
$width = 640 # Screen width (will not change resolution,
$height = 480 # Screen height here for compatibility)
$ov_zoom = 0.6 # Overworld zoom multiplier
$strip_size = 8 # Size of each strip of the map. Higher numbers will lag less.
# Recommended that this number be a power of 2.
# Do not make higher than 64.
$curve = true # Whether the map is curled, for overworlds (old method)
$data_map = load_data("Data/MapInfos.rxdata")
#===============================================================================
class RPG::MapInfo
def name # Definition prevents location scripts from reading anything within
return @name.gsub(/\[.*\]/) {""} # brackets, including the brackets
end
#-----------------------------------------------------------------------------
def original_name
return @name
end
#-----------------------------------------------------------------------------
def overworld?
return @name.scan(/[OV]/).size > 0
end
#-----------------------------------------------------------------------------
def pitch
@name =~ /\[#[ ]*([00-99]+)\]/i
return $1
end
end
#===============================================================================
class Draw_Tilemap # This class controls a set of sprites, with different Z
# values, arranged into horizontal bars
attr_accessor :tileset
attr_accessor :map_data
attr_accessor :priorities
attr_accessor :autotiles
attr_accessor :bitmaps
attr_accessor :pitch
attr_accessor :ox
attr_accessor :oy
attr_accessor :plus_y
INDEX = # Autotile definitions
[
26, 27, 32, 33, 4, 27, 32, 33, 26, 5, 32, 33, 4, 5, 32, 33,
26, 27, 32, 11, 4, 27, 32, 11, 26, 5, 32, 11, 4, 5, 32, 11,
26, 27, 10, 33, 4, 27, 10, 33, 26, 5, 10, 33, 4, 5, 10, 33,
26, 27, 10, 11, 4, 27, 10, 11, 26, 5, 10, 11, 4, 5, 10, 11,
24, 25, 30, 31, 24, 5, 30, 31, 24, 25, 30, 11, 24, 5, 30, 11,
14, 15, 20, 21, 14, 15, 20, 11, 14, 15, 10, 21, 14, 15, 10, 11,
28, 29, 34, 35, 28, 29, 10, 35, 4, 29, 34, 35, 4, 29, 10, 35,
38, 39, 44, 45, 4, 39, 44, 45, 38, 5, 44, 45, 4, 5, 44, 45,
24, 29, 30, 35, 14, 15, 44, 45, 12, 13, 18 ,19, 12, 13, 18, 11,
16, 17, 22, 23, 16, 17, 10, 23, 40, 41, 46, 47, 4, 41, 46, 47,
36, 37, 42, 43, 36, 5, 42, 43, 12, 17, 18, 23, 12, 13, 42, 43,
36, 41, 42, 47, 16, 17, 46, 47, 12, 17, 42, 47, 0, 1, 6, 7
]
X = [0, 1, 0, 1] # Used in 16x16 autotile drawing; left, right, left, right
Y = [0, 0, 1, 1] # Used in 16x16 autotile drawing; up, up, down, down
#-----------------------------------------------------------------------------
def initialize
# Get initial data from Game_Map
@tileset = RPG::Cache.tileset($game_map.tileset_name)
@map_data = $game_map.data
@priorities = $game_map.priorities
@autotiles = []
for i in 0..6
@autotiles = RPG::Cache.autotile($game_map.autotile_names[i])
end
# Provide blank data in proper object form
@ox = 0
@oy = 0
# Bitmaps used for each priority's drawing. Priorities 2-5 are combined.
@bitmaps = [Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size),
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size),
Bitmap.new($game_map.width*32, $game_map.height*32+$strip_size)]
# Generate blank sprites
@sprites = [[], [], []]
for i in 0..2 # For each layer
for j in 0..$game_map.height * (32 / $strip_size) - 1
# For each horizontal strip of $strip_size height, make a blank sprite
@sprites[i].push(Sprite.new)
@sprites[i][j].bitmap = Bitmap.new($game_map.width*32, $strip_size*2)
@sprites[i][j].x = $width / 2
@sprites[i][j].y = -64
@sprites[i][j].z = -5 + (i * 10)
end
end
@disposed = false
draw
end
#-----------------------------------------------------------------------------
def update
# Retrieve variable values for slant drawing; these values accesible by event
@pitch = $game_map.pitch.to_f
@plus_y = $game_map.plus_y
for i in 0..2 # For each layer
for j in [0, (($height / 2) - (($height * 60) /
@pitch) + @oy) / $strip_size].max.to_i..[@sprites[i].size - 1,
(@oy + $height) / $strip_size].min.to_i
# For each strip within the visible screen, update OX/Y
@sprites[i][j].x = $width / 2
@sprites[i][j].y = j * $strip_size - @oy
unless @pitch == 0 # Apply X Zoom
@sprites[i][j].zoom_x = (@sprites[i][j].y - $height / 2) *
(@pitch / ($height * 25)) + 1
if $curve # Zoom Y values same as X, and compensate
@sprites[i][j].zoom_y = @sprites[i][j].zoom_x
@sprites[i][j].y += $strip_size * (1 - @sprites[i][j].zoom_y) *
((1 - @sprites[i][j].zoom_y) /
(2 * ((@pitch / 100) /
($height / ($strip_size * 2)))) + 0.5)
end
end
@sprites[i][j].ox = @ox + $width / 2
# Add plus_y value; used in airship script
@sprites[i][j].y += @plus_y
end
end
end
#-----------------------------------------------------------------------------
def dispose
# Dispose all sprites
for i in 0..2
for j in @sprites[i]
j.bitmap.dispose
j.dispose
end
end
for i in @bitmaps
i.dispose
end
@tileset.dispose
for i in 0..6
@autotiles[i].dispose
end
@disposed = true
end
#-----------------------------------------------------------------------------
def disposed?
return @disposed
end
#-----------------------------------------------------------------------------
def draw
# Draw each individual position by XY value
for x in 0...@map_data.xsize
for y in 0...@map_data.ysize
draw_position(x, y)
end
end
for i in 0..2 # For each priority
for j in 0..@sprites[i].size - 1
# For each horizontal strip, transfer the bitmap appropriately
@sprites[i][j].bitmap.blt(0, 0, @bitmaps[i],
Rect.new(0, j * $strip_size, $game_map.width * 32, $strip_size * 2))
end
end
end
#-----------------------------------------------------------------------------
def draw_position(x, y)
for layer in 0..2
pos = @map_data[x, y, layer]
@priorities[pos] = 2 if @priorities[pos] > 2 # Round priorities down to 2
if pos >= 384 # If it is a tile
# src_rect = 32x32 Rect on the tileset for source bitmap
src_rect = Rect.new(((pos-384)%8)*32, ((pos-384)/8)*32, 32, 32)
# Transfer source bitmap on the tileset to the current map tile
@bitmaps[@priorities[pos]].blt(x * 32, y * 32, @tileset, src_rect)
elsif pos >= 48 and pos < 384 # If it is an autotile
id = pos / 48 - 1 # Which autotile is used (0-6)
# plus_x is in development for animated autotiles
plus_x = 0 #((@anim / 4) % (@autotiles[id].width / 96)) * 96
for corner in 0..3
h = 4 * (pos % 48) + corner # Used to access INDEX
# src_rect = 16x16 Rect on the autotile for source bitmap
src_rect = Rect.new((INDEX[h]%6)*16+plus_x, (INDEX[h]/6)*16, 16, 16)
# Transfer source bitmap on the autotile to the current 16x16 tile
@bitmaps[@priorities[pos]].blt(x*32+X[corner]*16, y*32+Y[corner]*16,
@autotiles[id], src_rect)
end
end
end
end
end
#===============================================================================
class Game_Map
attr_accessor :pitch
attr_accessor :plus_y
#-----------------------------------------------------------------------------
alias setup_or :setup
def setup(map_id)
setup_or(map_id)
@pitch = $data_map[$game_map.map_id].pitch
@plus_y = 0
end
#-----------------------------------------------------------------------------
def name
return $data_map[@map_id].name
end
end
#===============================================================================
class Sprite_Character < RPG::Sprite
attr_accessor :character
#-----------------------------------------------------------------------------
def initialize(character = nil)
super()
@character = character
update
end
#-----------------------------------------------------------------------------
alias update_or :update
def update
update_or
# Update pitch value, and update zoom values to match
@pitch = $data_map[$game_map.map_id].pitch.to_f
self.zoom_x =
self.zoom_y = ((@character.screen_y - 16) - ($height / 2)) *
(@pitch / ($height * 25)) + 1
# Set sprite coordinates. X value is multiplied by zoom value from the center
self.x = ($width / 2) + ((@character.screen_x - ($width / 2)) * self.zoom_x)
self.y = @character.screen_y
# Add Y value for zoom compensation while in curve mode
if $curve and @pitch != 0
self.y += (8 * (1 - self.zoom_y) * ((1 - self.zoom_y) /
(2 * ((@pitch / 100) / ($height / 16.0))) + 0.5))
end
# Add plus_y value; used in airship script
self.y += $game_map.plus_y unless @character.is_a?(Game_Player)
self.z = @character.screen_z(@ch) - (self.zoom_y < 0.5 ? 1000 : 0)
if $data_map[$game_map.map_id].overworld? and
@character.is_a?(Game_Player) # Multiply zoom by Overworld factor if
self.zoom_x *= $ov_zoom # the map is marked with [OV] and event
self.zoom_y *= $ov_zoom # is a Game_Player
end
end
end
#===============================================================================
class Spriteset_Map
def initialize
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 2000
@viewport3.z = 5000
# Make tilemap
@tilemap = Draw_Tilemap.new
# Make panorama plane
@panorama = Plane.new
@panorama.z = -2000
# Make fog plane
@fog = Plane.new
@fog.z = 3000
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new($game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new($game_player))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame update
update
end
#-----------------------------------------------------------------------------
def dispose
# Dispose of tilemap
@tilemap.dispose
# Dispose of panorama plane
@panorama.dispose
# Dispose of fog plane
@fog.dispose
# Dispose of character sprites
for sprite in @character_sprites
sprite.dispose
end
# Dispose of weather
@weather.dispose
# Dispose of picture sprites
for sprite in @picture_sprites
sprite.dispose
end
# Dispose of timer sprite
@timer_sprite.dispose
# Dispose of viewports
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
end
end[I]Geposted von Goldenpati.

http://www.multimediaxis.de/showpost.php?p=2079129&postcount=50
Inklusive Anleitung!
Geposted von Adrian2000

sPike.
31.12.2008, 00:02
Ziemlich viele davon sind aber kein "must-have".
AMS, Anti-Lag, Vollbild sind ntzliche Skripte, und ich denke ebenfalls,
das man sie benutzen sollte. Aber Quicksave, Ringmen usw. gehren
hier nicht rein.

SMWma
31.12.2008, 22:35
wo ist meiner???

SMWma
06.01.2009, 18:19
bei mir funktioniert 99 Saveload-Script net.

ICH_Zogga
04.02.2009, 08:31
was machter denn (der skript) einfach wie, nicht vorhanden oder lsster des spiel abstrzen

Riku11
10.02.2009, 11:10
@ Goldenpati :
Wofr ist der "Mode 07" Skript ?

@Thread :
Pixelgenaues 8 Wege laufen mit renn skript (leertaste/Enter um zu rennen)
Der Skript ist zwar nicht von mir ist aber seeeehr ntzlich...musste ihn mal einfgen....


# ‘S•Œƒhƒbƒgˆ“ Ver ƒ+++
# ”z•zŒEƒTƒ|[ƒgURL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# Game_Player
#------------------------------------------------------------------------------
# @ƒvƒŒƒCƒ„[‚ˆ‚ƒNƒ‰ƒX‚‚BƒCƒxƒ“ƒg‚‹N“”’‚Aƒ}ƒbƒv‚ƒXƒNƒ[ƒ‹‚‚‚
# ‹@”\‚Ž‚‚‚‚‚B‚‚ƒNƒ‰ƒX‚ƒCƒ“ƒXƒ^ƒ“ƒX‚ $game_player ‚ŽQ‚‚‚‚B
#==============================================================================

class Game_Player < Game_Character
#--------------------------------------------------------------------------
# œ ’”
#--------------------------------------------------------------------------
UP = 0 # •Œ‚—]—T(0 <= UP <= 63)
SIDE = 0 # ‰E•Œ‚—]—T(0 <= SIDE <= 63)
SLANT = false # ˆ“ƒ‹[ƒg‚Ž‚ˆ“ŽžA‘“xC
#--------------------------------------------------------------------------
# œ ŒŠJƒCƒ“ƒXƒ^ƒ“ƒX•ϐ”
#--------------------------------------------------------------------------
attr_reader :walk # ƒvƒŒ[ƒ„[ˆ“‘“x
attr_reader :event # ƒCƒxƒ“ƒgŽžˆ“‘“x
attr_accessor :move_speed # ˆ“‘“x
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Š‰
#--------------------------------------------------------------------------
def initialize
super
# @walk:•s‘“x @dash:ƒ_ƒbƒVƒ…Žžˆ“‘“x
# @event:ƒCƒxƒ“ƒgŽžˆ“‘“xi0‚Žž‚́AƒCƒxƒ“ƒgŽž‚‘“x•ύX‚‚‚‚j
@walk = 4
@dash = 5
@event = 4
@dot_m = true
@revise_x = 0
@revise_y = 0
@move == false
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
alias :update_original :update
def update
#ƒ_ƒbƒVƒ…‹@”\BƒGƒ“ƒ^[ƒL[‚‰Ÿ‚‚‚‚‚ŠԁAˆ“‘“x‚•ύX‚‚B
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
if @walk != @dash
if Input.press?(Input::C)
if @move_speed != @dash
@move_speed = @dash
end
else
if @move_speed != @walk
@move_speed = @walk
end
end
end
end
if @revise_x == nil and @revise_y == nil
@revise_x = 0
@revise_y = 0
end
unless @dot_m
update_original
return
end
if @move_route_forcing
# ƒ[ƒJƒ‹•ϐ”‚ˆ“’†‚‚‚‚‚‹L‰
last_moving = moving?
# ƒ[ƒJƒ‹•ϐ”‚ɍ•W‚‹L‰
last_real_x = @real_x
last_real_y = @real_y
# •W‚‚‚‚‚‚‡
if (@revise_x != 0 or @revise_y != 0) and not jumping? and @move == true
if @revise_x != @real_x - @x * 128 or @revise_y != @real_y - @y * 128
@revise_x = @real_x - @x * 128
@revise_y = @real_y - @y * 128
end
# ˆ“‹——distance1‚–•W‹——distance2‚’
distance1 = 2 ** @move_speed
distance2 = Math.sqrt(@revise_x ** 2 + @revise_y ** 2)
# ˆ“‹——‚–•W‹——‚‰z‚‚‡
if distance1 > distance2
# ‹•“I‚•␳•W‚—‚‚‚
@real_x = @real_x - @revise_x
@real_y = @real_y - @revise_y
@revise_x = 0
@revise_y = 0
anime_update
# ˆ“‹——‚–•W‹——‚’B‚‚‚‡
else
# ˆ“‹——•–•W‹——‚‹‚‚•
@real_x -= (distance1 * @revise_x / distance2).round
@real_y -= (distance1 * @revise_y / distance2).round
@revise_x = @real_x - @x * 128
@revise_y = @real_y - @y * 128
anime_update
end
else
super
end
else
@move = false
# ˆ“’†AƒCƒxƒ“ƒgŽs’†Aˆ“ƒ‹[ƒg‹•’†A
# ƒƒbƒZ[ƒWƒEƒBƒ“ƒhƒE•\Ž’†‚‚‚‚‚‚‚‚‡
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
@event_run = false
# •Œƒ{ƒ^ƒ“‚‰Ÿ‚‚‚‚‚‚΁A‚‚•Œ‚ƒvƒŒƒCƒ„[‚ˆ“
case Input.dir8
when 1
move_lower_left_p
when 2
move_down_p
when 3
move_lower_right_p
when 4
move_left_p
when 6
move_right_p
when 7
move_upper_left_p
when 8
move_up_p
when 9
move_upper_right_p
end
end
# ƒ[ƒJƒ‹•ϐ”‚ɍ•W‚‹L‰
last_real_x = @real_x
last_real_y = @real_y
# ˆ“ˆ—
@real_x = @x * 128 + @revise_x
@real_y = @y * 128 + @revise_y
# ƒ[ƒJƒ‹•ϐ”‚ˆ“’†‚‚‚‚‚‹L‰
last_moving = moving?
# •WXV
move_on
# Œ‚̍•W‚ˆ‘O‚̍•W‚ˆ‚‚‡
if (last_real_x != @real_x or last_real_y != @real_y)
@move_distance = 0 if @move_distance == nil
@move_distance += Math.sqrt((last_real_x - @real_x) ** 2 +
(last_real_y - @real_y) ** 2)
if @move_distance >= 128
@move_distance %= 128
increase_steps
end
# ƒAƒjƒ[ƒVƒ‡ƒ“‚XV
anime_update
elsif @walk_anime
@pattern = @original_pattern
end
end
# ƒLƒƒƒ‰ƒNƒ^[‚‰‚ˆ“‚A‚‚‰–ʏ‚ˆ’u‚’†‰›‚‚‰‚̏‡
if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
# ƒ}ƒbƒv‚‰‚ƒXƒNƒ[ƒ‹
$game_map.scroll_down(@real_y - last_real_y)
end
# ƒLƒƒƒ‰ƒNƒ^[‚‚ˆ“‚A‚‚‰–ʏ‚ˆ’u‚’†‰›‚‚荶‚̏‡
if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
# ƒ}ƒbƒv‚‚ƒXƒNƒ[ƒ‹
$game_map.scroll_left(last_real_x - @real_x)
end
# ƒLƒƒƒ‰ƒNƒ^[‚‰E‚ˆ“‚A‚‚‰–ʏ‚ˆ’u‚’†‰›‚‚‰E‚̏‡
if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
# ƒ}ƒbƒv‚‰E‚ƒXƒNƒ[ƒ‹
$game_map.scroll_right(@real_x - last_real_x)
end
# ƒLƒƒƒ‰ƒNƒ^[‚‚ˆ“‚A‚‚‰–ʏ‚ˆ’u‚’†‰›‚‚‚̏‡
if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
# ƒ}ƒbƒv‚‚ƒXƒNƒ[ƒ‹
$game_map.scroll_up(last_real_y - @real_y)
end
# ‘O‰ƒvƒŒƒCƒ„[‚ˆ“’†‚‚‚‡
if last_moving
# “ˆ’u‚ƒCƒxƒ“ƒg‚‚̐ڐG‚‚‚ƒCƒxƒ“ƒg‹N“”’
result = check_event_trigger_here([1,2])
if result == true
if (last_real_x / 128.0).round != @x and
(last_real_y / 128.0).round != @y
if @direction == 2 or @direction == 8
if (last_real_x / 128.0).round > @x
turn_left
else
turn_right
end
else
if (last_real_y / 128.0).round > @y
turn_up
else
turn_down
end
end
elsif (last_real_x / 128.0).round > @x
turn_left
elsif (last_real_x / 128.0).round < @x
turn_right
elsif (last_real_y / 128.0).round > @y
turn_up
elsif (last_real_y / 128.0).round < @y
turn_down
end
end
# ‹N“‚‚ƒCƒxƒ“ƒg‚‚‚‡
if result == false
# ƒfƒoƒbƒOƒ‚[ƒh‚ ON ‚‚ CTRL ƒL[‚‰Ÿ‚‚‚‚‚‡‚œ‚
unless $DEBUG and Input.press?(Input::CTRL)
# ƒGƒ“ƒJƒEƒ“ƒg ƒJƒEƒ“ƒgƒ_ƒEƒ“
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
# C ƒ{ƒ^ƒ“‚‰Ÿ‚‚‚‡
if Input.trigger?(Input::C)
# “ˆ’u‚‚‚ѐ–‚ƒCƒxƒ“ƒg‹N“”’
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
#--------------------------------------------------------------------------
# œ ˆ“”’
#--------------------------------------------------------------------------
def moving?
unless @dot_m
result = super
return result
end
# ‹•ˆ“‚̏‡ƒIƒŠƒWƒiƒ‹‚”’‚‚‚‚
if @move_route_forcing
if @move == false
return false
end
super
# ’ʏŽž‚Œ•W‚Ž•W‚ˆ‚‚‡‚‚ˆ“’†‚”’
else
return (@x != (@real_x / 128.0).round or @y != (@real_y / 128.0).round)
end
end
#--------------------------------------------------------------------------
# œ ˆ“”’
#--------------------------------------------------------------------------
def moving_a?
if @move == false
if (@move_route.list[@move_route_index].code <= 14 or
@move_route.list[@move_route_index].code == 25)
@move = true
end
return false
end
moving?
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒWƒƒƒ“ƒv)
#--------------------------------------------------------------------------
def update_jump
# ƒWƒƒƒ“ƒvƒJƒEƒ“ƒg‚ 1 Œ‚‚
@jump_count -= 1
# V‚‚•W‚ŒvŽZ
@real_x = (@real_x * @jump_count + @x * 128) / (@jump_count + 1)
@real_y = (@real_y * @jump_count + @y * 128) / (@jump_count + 1)
if @jump_count == 0
@revise_x = 0
@revise_y = 0
end
end
#--------------------------------------------------------------------------
# œ ˆ“ƒ^ƒCƒv : ƒJƒXƒ^ƒ€
#--------------------------------------------------------------------------
def move_type_custom
unless @dot_m
super
return
end
# ’Ž~’†‚‚‚‚‚’†’f
if jumping? or moving_a?
return
end
# ˆ“ƒRƒ}ƒ“ƒh‚ƒŠƒXƒg‚̍Œ‚“ž’B‚‚‚‚ƒ‹[ƒv
while @move_route_index < @move_route.list.size
# ˆ“ƒRƒ}ƒ“ƒh‚Ž“
command = @move_route.list[@move_route_index]
# ƒRƒ}ƒ“ƒhƒR[ƒh 0 ” (ƒŠƒXƒg‚̍Œ) ‚̏‡
if command.code == 0
# ƒIƒvƒVƒ‡ƒ“ [“‚ŒJ‚•‚] ‚ ON ‚̏‡
if @move_route.repeat
# ˆ“ƒ‹[ƒg‚ƒCƒ“ƒfƒbƒNƒX‚ŏ‰‚–‚
@move_route_index = 0
end
# ƒIƒvƒVƒ‡ƒ“ [“‚ŒJ‚•‚] ‚ OFF ‚̏‡
unless @move_route.repeat
# ˆ“ƒ‹[ƒg‹•’†‚̏‡
if @move_route_forcing and not @move_route.repeat
# ˆ“ƒ‹[ƒg‚‹•‚‰œ
@move_route_forcing = false
# ƒIƒŠƒWƒiƒ‹‚ˆ“ƒ‹[ƒg‚•œ‹A
@move_route = @original_move_route
@move_route_index = @original_move_route_index
@original_move_route = nil
end
# ’Ž~ƒJƒEƒ“ƒg‚ƒNƒŠƒA
@stop_count = 0
end
return
end
# ˆ“ŒnƒRƒ}ƒ“ƒh (‰‚ˆ“`ƒWƒƒƒ“ƒv) ‚̏‡
if command.code <= 14
# ƒRƒ}ƒ“ƒhƒR[ƒh‚•Š
case command.code
when 1 # ‰‚ˆ“
move_down
when 2 # ‚ˆ“
move_left
when 3 # ‰E‚ˆ“
move_right
when 4 # ‚ˆ“
move_up
when 5 # ‰‚ˆ“
move_lower_left
when 6 # ‰E‰‚ˆ“
move_lower_right
when 7 # ‚ˆ“
move_upper_left
when 8 # ‰E‚ˆ“
move_upper_right
when 9 # ƒ‰ƒ“ƒ_ƒ€‚ˆ“
move_random
when 10 # ƒvƒŒƒCƒ„[‚‹‚‚•
move_toward_player
when 11 # ƒvƒŒƒCƒ„[‚‚‰“‚‚‚
move_away_from_player
when 12 # ˆ•‘Oi
move_forward
when 13 # ˆ•Œ‘
move_backward
when 14 # ƒWƒƒƒ“ƒv
jump(command.parameters[0], command.parameters[1])
end
# ƒIƒvƒVƒ‡ƒ“ [ˆ“‚‚‚‚‡‚–Ž‹] ‚ OFF ‚ŁAˆ“Ž”s‚̏‡
if not @move_route.skippable and not moving? and not jumping?
return
end
@move_route_index += 1
return
end
# ƒEƒFƒCƒg‚̏‡
if command.code == 15
# ƒEƒFƒCƒgƒJƒEƒ“ƒg‚’
@wait_count = command.parameters[0] * 2 - 1
@move_route_index += 1
return
end
# Œ‚•ύXŒn‚ƒRƒ}ƒ“ƒh‚̏‡
if command.code >= 16 and command.code <= 26
# ƒRƒ}ƒ“ƒhƒR[ƒh‚•Š
case command.code
when 16 # ‰‚Œ‚•
turn_down
when 17 # ‚Œ‚•
turn_left
when 18 # ‰E‚Œ‚•
turn_right
when 19 # ‚Œ‚•
turn_up
when 20 # ‰E‚ 90 “x‰“]
turn_right_90
when 21 # ‚ 90 “x‰“]
turn_left_90
when 22 # 180 “x‰“]
turn_180
when 23 # ‰E‚‚ 90 “x‰“]
turn_right_or_left_90
when 24 # ƒ‰ƒ“ƒ_ƒ€‚•Œ“]Š
turn_random
when 25 # ƒvƒŒƒCƒ„[‚•‚Œ‚•
turn_toward_player
when 26 # ƒvƒŒƒCƒ„[‚‹t‚Œ‚•
turn_away_from_player
end
@move_route_index += 1
return
end
# ‚‚‘‚ƒRƒ}ƒ“ƒh‚̏‡
if command.code >= 27
# ƒRƒ}ƒ“ƒhƒR[ƒh‚•Š
case command.code
when 27 # ƒXƒCƒbƒ` ON
$game_switches[command.parameters[0]] = true
$game_map.need_refresh = true
when 28 # ƒXƒCƒbƒ` OFF
$game_switches[command.parameters[0]] = false
$game_map.need_refresh = true
when 29 # ˆ“‘“x‚•ύX
@move_speed = command.parameters[0]
when 30 # ˆ“•p“x‚•ύX
@move_frequency = command.parameters[0]
when 31 # ˆ“ŽžƒAƒjƒ ON
@walk_anime = true
when 32 # ˆ“ŽžƒAƒjƒ OFF
@walk_anime = false
when 33 # ’Ž~ŽžƒAƒjƒ ON
@step_anime = true
when 34 # ’Ž~ŽžƒAƒjƒ OFF
@step_anime = false
when 35 # Œ‚Œ’ ON
@direction_fix = true
when 36 # Œ‚Œ’ OFF
@direction_fix = false
when 37 # ‚‚”‚ ON
@through = true
when 38 # ‚‚”‚ OFF
@through = false
when 39 # ‘O–‚•\Ž ON
@always_on_top = true
when 40 # ‘O–‚•\Ž OFF
@always_on_top = false
when 41 # ƒOƒ‰ƒtƒBƒbƒN•ύX
@tile_id = 0
@character_name = command.parameters[0]
@character_hue = command.parameters[1]
if @original_direction != command.parameters[2]
@direction = command.parameters[2]
@original_direction = @direction
@prelock_direction = 0
end
if @original_pattern != command.parameters[3]
@pattern = command.parameters[3]
@original_pattern = @pattern
end
when 42 # •s“–“x‚•ύX
@opacity = command.parameters[0]
when 43 # ‡•–@‚•ύX
@blend_type = command.parameters[0]
when 44 # SE ‚‰‰‘t
$game_system.se_play(command.parameters[0])
when 45 # ƒXƒNƒŠƒvƒg
result = eval(command.parameters[0])
end
@move_route_index += 1
return
end
end
end
#--------------------------------------------------------------------------
# œ ‰‚ˆ“
#--------------------------------------------------------------------------
def move_down_p
# ‰‚Œ‚•
turn_down
# ˆ“‹——‚ŽZo
distance = 2 ** @move_speed
down1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance, true)
end
#--------------------------------------------------------------------------
# œ ‰‚ˆ“‰”\‚‚‚‚‚”’‚P
#--------------------------------------------------------------------------
def down1(x, y, distance, down = false)
result = down2(x, y, distance)
if result == false
@event_run = check_event_trigger_touch(x, y+1)
return result
end
if @revise_x < -SIDE
result = down2(x, y + 1, distance, 4)
result &= down2(x - 1, y, distance)
if result == false
if down
move_lower_right_p
if @revise_x > SIDE
@revise_x = SIDE
end
end
return result
end
elsif @revise_x > SIDE
result = down2(x, y + 1, distance, 6)
result &= down2(x + 1, y, distance)
if result == false
if down
move_lower_left_p
if @revise_x < -SIDE
@revise_x = -SIDE
end
end
return result
end
end
# ‰‚ˆ“‰”\‚‚‚‹——•ˆ“
@revise_y += distance
return result
end
#--------------------------------------------------------------------------
# œ ‰‚ˆ“‰”\‚‚‚‚‚”’‚Q
#--------------------------------------------------------------------------
def down2(x, y, distance, d = 2)
if @revise_y + distance > 0
unless passable?(x, y, d)
if @revise_y < 0
@revise_y = 0
end
return false
end
end
return true
end
#--------------------------------------------------------------------------
# œ ‚ˆ“
#--------------------------------------------------------------------------
def move_left_p
# ‚Œ‚•
turn_left
distance = 2 ** @move_speed
left1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance, true)
end
#--------------------------------------------------------------------------
# œ ‚ˆ“‰”\‚‚‚‚‚”’‚P
#--------------------------------------------------------------------------
def left1(x, y, distance, left = false)
result = left2(x, y, distance)
if result == false
@event_run = check_event_trigger_touch(x-1, y)
return result
end
if @revise_y < -UP
result = left2(x - 1, y, distance, 8)
result &= left2(x, y - 1, distance)
if result == false
if left
move_lower_left_p
if @revise_y > 0
@revise_y = 0
end
end
return result
end
elsif @revise_y > 0
result = left2(x - 1, y, distance, 2)
result &= left2(x, y + 1, distance)
if result == false
if left
move_upper_left_p
if @revise_y < -UP
@revise_y = -UP
end
end
return result
end
end
@revise_x -= distance
return result
end
#--------------------------------------------------------------------------
# œ ‚ˆ“‰”\‚‚‚‚‚”’‚Q
#--------------------------------------------------------------------------
def left2(x, y, distance, d = 4)
if @revise_x - distance < -SIDE
unless passable?(x, y, d)
if @revise_x > -SIDE
@revise_x = -SIDE
end
return false
end
end
return true
end
#--------------------------------------------------------------------------
# œ ‰E‚ˆ“
#--------------------------------------------------------------------------
def move_right_p
# ‰E‚Œ‚•
turn_right
distance = 2 ** @move_speed
right1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance, true)
end
#--------------------------------------------------------------------------
# œ ‰E‚ˆ“‰”\‚‚‚‚‚”’‚P
#--------------------------------------------------------------------------
def right1(x, y, distance, right = false)
result = right2(x, y, distance)
if result == false
@event_run = check_event_trigger_touch(x+1, y)
return result
end
if @revise_y < -UP
result = right2(x + 1, y, distance, 8)
result &= right2(x, y - 1, distance)
if result == false
if right
move_lower_right_p
if @revise_y > 0
@revise_y = 0
end
end
return result
end
elsif @revise_y > 0
result = right2(x + 1, y, distance, 2)
result &= right2(x, y + 1, distance)
if result == false
if right
move_upper_right_p
if @revise_y < -UP
@revise_y = -UP
end
end
return result
end
end
@revise_x += distance
return result
end
#--------------------------------------------------------------------------
# œ ‰E‚ˆ“‰”\‚‚‚‚‚”’‚Q
#--------------------------------------------------------------------------
def right2(x, y, distance, d = 6)
if @revise_x + distance > SIDE
unless passable?(x, y, d)
if @revise_x < SIDE
@revise_x = SIDE
end
return false
end
end
return true
end
#--------------------------------------------------------------------------
# œ ‚ˆ“
#--------------------------------------------------------------------------
def move_up_p
# ‚Œ‚•
turn_up
# ‰‚ˆ“
distance = 2 ** @move_speed
up1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance, true)
end
#--------------------------------------------------------------------------
# œ ‚ˆ“‰”\‚‚‚‚‚”’‚P
#--------------------------------------------------------------------------
def up1(x, y, distance, up = false)
result = up2(x, y, distance)
if result == false
@event_run = check_event_trigger_touch(x, y-1)
return result
end
if @revise_x < -SIDE
result = up2(x, y - 1, distance, 4)
result &= up2(x - 1, y, distance)
if result == false
if up
move_upper_right_p
if @revise_x > SIDE
@revise_x = SIDE
end
end
return result
end
elsif @revise_x > SIDE
result = up2(x, y - 1, distance, 6)
result &= up2(x + 1, y, distance)
if result == false
if up
move_upper_left_p
if @revise_x < -SIDE
@revise_x = -SIDE
end
end
return result
end
end
@revise_y -= distance
return result
end
#--------------------------------------------------------------------------
# œ ‚ˆ“‰”\‚‚‚‚‚”’‚Q
#--------------------------------------------------------------------------
def up2(x, y, distance, d = 8)
if @revise_y - distance < -UP
unless passable?(x, y, d)
if @revise_y > -UP
@revise_y = -UP
end
return false
end
end
return true
end
#--------------------------------------------------------------------------
# œ ‰‚ˆ“
#--------------------------------------------------------------------------
def move_lower_left_p
# Œ‚Œ’‚‚‚‡
unless @direction_fix
# ‰EŒ‚‚‚‚‡‚͍‚AŒ‚‚‚‚‡‚‰‚Œ‚•
@direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
end
# ‰‚ˆ“
distance = (2 ** @move_speed) / Math.sqrt(2)
if @direction == 2
turn_left unless down1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_down if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 2, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_y > 0 and -UP > @revise_y - distance
@revise_y = 0
end
turn_down unless left1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_left if @event_run
end
else
turn_down unless left1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_left if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 4, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_x + distance> SIDE and -SIDE > @revise_x
@revise_x = -SIDE
end
turn_left unless down1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_down if @event_run
end
end
end
#--------------------------------------------------------------------------
# œ ‰E‰‚ˆ“
#--------------------------------------------------------------------------
def move_lower_right_p
# Œ‚Œ’‚‚‚‡
unless @direction_fix
# Œ‚‚‚‚‡‚‰E‚AŒ‚‚‚‚‡‚‰‚Œ‚•
@direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
end
# ‰E‰‚ˆ“
distance = (2 ** @move_speed) / Math.sqrt(2)
if @direction == 2
turn_right unless down1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_down if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 2, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_y > 0 and -UP > @revise_y - distance
@revise_y = 0
end
turn_down unless right1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_right if @event_run
end
else
turn_down unless right1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_right if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 6, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_x > SIDE and -SIDE > @revise_x - distance
@revise_x = SIDE
end
turn_right unless down1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_down if @event_run
end
end
end
#--------------------------------------------------------------------------
# œ ‚ˆ“
#--------------------------------------------------------------------------
def move_upper_left_p
# Œ‚Œ’‚‚‚‡
unless @direction_fix
# ‰EŒ‚‚‚‚‡‚͍‚A‰Œ‚‚‚‚‡‚͏‚Œ‚•
@direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
end
# ‚ˆ“
distance = (2 ** @move_speed) / Math.sqrt(2)
if @direction == 8
turn_left unless up1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_up if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 8, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_y + distance > 0 and -UP > @revise_y
@revise_y = -UP
end
turn_up unless left1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_left if @event_run
end
else
turn_up unless left1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_left if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 4, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_x > SIDE and -SIDE > @revise_x - distance
@revise_x = SIDE
end
turn_left unless up1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_up if @event_run
end
end
end
#--------------------------------------------------------------------------
# œ ‰E‚ˆ“
#--------------------------------------------------------------------------
def move_upper_right_p
# Œ‚Œ’‚‚‚‡
unless @direction_fix
# Œ‚‚‚‚‡‚‰E‚A‰Œ‚‚‚‚‡‚͏‚Œ‚•
@direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
end
# ‰E‚ˆ“
distance = (2 ** @move_speed) / Math.sqrt(2)
if @direction == 8
turn_right unless up1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_up if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 8, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_y + distance > 0 and -UP > @revise_y
@revise_y = -UP
end
turn_up unless right1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_right if @event_run
end
else
turn_up unless right1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_right if @event_run
unless @event_run
if last_move?(@real_x, @real_y, 6, distance)
result = check_event_trigger_here([1,2], false)
if result == true
return
end
end
move_on
if @revise_x > SIDE and -SIDE > @revise_x - distance
@revise_x = SIDE
end
turn_right unless up1(((@x * 128 + @revise_x) / 128.0).round,
((@y * 128 + @revise_y) / 128.0).round, distance)
turn_up if @event_run
end
end
end
#--------------------------------------------------------------------------
# œ “ˆ’u‚ƒCƒxƒ“ƒg‹N“”’
#--------------------------------------------------------------------------
def check_event_trigger_here(triggers, run = true)
result = false
# ƒCƒxƒ“ƒgŽs’†‚̏‡
if $game_system.map_interpreter.running?
return result
end
# ‘SƒCƒxƒ“ƒg‚ƒ‹[ƒv
for event in $game_map.events.values
# ƒCƒxƒ“ƒg‚̍•W‚ƒgƒŠƒK[‚ˆ’v‚‚‡
if event.x == ((@x * 128 + @revise_x) / 128.0).round and
event.y == ((@y * 128 + @revise_y) / 128.0).round and
triggers.include?(event.trigger)
# ƒWƒƒƒ“ƒv’†ˆŠO‚ŁA‹N“”’‚“ˆ’u‚ƒCƒxƒ“ƒg‚‚
if not event.jumping? and event.over_trigger?
if event.list.size > 1
if run == true
event.start
end
result = true
end
end
end
end
return result
end
#--------------------------------------------------------------------------
# œ •WC
#--------------------------------------------------------------------------
def move_on
if @y < (@y + @revise_y / 128.0).round
@y += 1
@revise_y -= 128
end
if @x > (@x + @revise_x / 128.0).round
@x -= 1
@revise_x += 128
end
if @x < (@x + @revise_x / 128.0).round
@x += 1
@revise_x -= 128
end
if @y > (@y + @revise_y / 128.0).round
@y -= 1
@revise_y += 128
end
end
#--------------------------------------------------------------------------
# œ ƒAƒjƒ[ƒVƒ‡ƒ“ƒAƒbƒvƒf[ƒg
#--------------------------------------------------------------------------
def anime_update
# ˆ“ŽžƒAƒjƒ‚ ON ‚̏‡
if @walk_anime
# ƒAƒjƒƒJƒEƒ“ƒg‚ 1.5 ‘‚‚
@anime_count += 1.5
# ˆ“ŽžƒAƒjƒ‚ OFF ‚ŁA’Ž~ŽžƒAƒjƒ‚ ON ‚̏‡
elsif @step_anime
# ƒAƒjƒƒJƒEƒ“ƒg‚ 1 ‘‚‚
@anime_count += 1
end
# ƒAƒjƒƒJƒEƒ“ƒg‚‘’l‚’‚‚‡
# ‘’l‚́AŠ–{’l 18 ‚‚ˆ“‘“x * 1 ‚ˆ‚‚’l
if @anime_count > 18 - @move_speed * 2
# ’Ž~ŽžƒAƒjƒ‚ OFF ‚‚ ’Ž~’†‚̏‡
if not @step_anime and @stop_count > 0
# ƒpƒ^[ƒ“‚ƒIƒŠƒWƒiƒ‹‚–‚
@pattern = @original_pattern
# ’Ž~ŽžƒAƒjƒ‚ ON ‚‚‚ ˆ“’†‚̏‡
else
# ƒpƒ^[ƒ“‚XV
@pattern = (@pattern + 1) % 4
end
# ƒAƒjƒƒJƒEƒ“ƒg‚ƒNƒŠƒA
@anime_count = 0
end
end
#--------------------------------------------------------------------------
# œ Žw’ˆ’u‚ˆ“
#--------------------------------------------------------------------------
# ƒIƒŠƒWƒiƒ‹‚ƒCƒxƒ“ƒg‚‰–
alias :moveto_original :moveto
def moveto(x, y)
# •␳•W‚‰Š‰
@revise_x = 0
@revise_y = 0
# ƒIƒŠƒWƒiƒ‹‚ƒCƒxƒ“ƒg‚Œ‚яo‚
moveto_original(x, y)
end
#--------------------------------------------------------------------------
# œ ˆ“‚‚‚‚‚‚‚”’
#--------------------------------------------------------------------------
def last_move?(x, y, direction, distance)
if direction == 2 or direction == 6
distance *= -1
end
if (direction == 2 or direction == 8) and
(y / 128.0).round != ((y - distance) / 128.0).round
return true
end
if (direction == 4 or direction == 6) and
(x / 128.0).round != ((x - distance) / 128.0).round
return true
end
return false
end
end

#==============================================================================
# Game_Character (•Š„’‹` 1)
#------------------------------------------------------------------------------
# @ƒLƒƒƒ‰ƒNƒ^[‚ˆ‚ƒNƒ‰ƒX‚‚B‚‚ƒNƒ‰ƒX‚ Game_Player ƒNƒ‰ƒX‚ Game_Event
# ƒNƒ‰ƒX‚ƒX[ƒp[ƒNƒ‰ƒX‚‚‚Žg—p‚‚‚‚B
#==============================================================================

class Game_Character
#--------------------------------------------------------------------------
# œ ‰– X •W‚Ž“
#--------------------------------------------------------------------------
def screen_x
# Ž•W‚ƒ}ƒbƒv‚•\Žˆ’u‚‚‰–ʍ•W‚‹‚‚
return ((@real_x - $game_map.display_x) / 4).ceil + 16
end
#--------------------------------------------------------------------------
# œ ‰– Y •W‚Ž“
#--------------------------------------------------------------------------
def screen_y
# Ž•W‚ƒ}ƒbƒv‚•\Žˆ’u‚‚‰–ʍ•W‚‹‚‚
y = ((@real_y - $game_map.display_y) / 4).ceil + 32
# ƒWƒƒƒ“ƒvƒJƒEƒ“ƒg‚‰ž‚‚ Y •W‚‚‚•‚‚
if @jump_count >= @jump_peak
n = @jump_count - @jump_peak
else
n = @jump_peak - @jump_count
end
return y - (@jump_peak * @jump_peak - n * n) / 2
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ˆ“)
#--------------------------------------------------------------------------
def update_move
# ˆ“‘“x‚‚ƒ}ƒbƒv•WŒn‚‚ˆ“‹——‚•Š
distance = 2 ** @move_speed
if @x * 128 != @real_x and @y * 128 != @real_y and Game_Player::SLANT
distance /= Math.sqrt(2)
end
# ˜_—•W‚Ž•W‚‚‰‚̏‡
if @y * 128 > @real_y
# ‰‚ˆ“
@real_y = [@real_y + distance, @y * 128].min
end
# ˜_—•W‚Ž•W‚‚荶‚̏‡
if @x * 128 < @real_x
# ‚ˆ“
@real_x = [@real_x - distance, @x * 128].max
end
# ˜_—•W‚Ž•W‚‚‰E‚̏‡
if @x * 128 > @real_x
# ‰E‚ˆ“
@real_x = [@real_x + distance, @x * 128].min
end
# ˜_—•W‚Ž•W‚‚‚̏‡
if @y * 128 < @real_y
# ‚ˆ“
@real_y = [@real_y - distance, @y * 128].max
end
# ˆ“ŽžƒAƒjƒ‚ ON ‚̏‡
if @walk_anime
# ƒAƒjƒƒJƒEƒ“ƒg‚ 1.5 ‘‚‚
@anime_count += 1.5
# ˆ“ŽžƒAƒjƒ‚ OFF ‚ŁA’Ž~ŽžƒAƒjƒ‚ ON ‚̏‡
elsif @step_anime
# ƒAƒjƒƒJƒEƒ“ƒg‚ 1 ‘‚‚
@anime_count += 1
end
end
end

#==============================================================================
# Game_Event
#------------------------------------------------------------------------------
# @ƒCƒxƒ“ƒg‚ˆ‚ƒNƒ‰ƒX‚‚BŒ”’‚‚‚ƒCƒxƒ“ƒgƒy[ƒW‚‘‚‚A•—ˆ—
# ƒCƒxƒ“ƒgŽs‚‚‚‹@”\‚Ž‚‚‚‚AGame_Map ƒNƒ‰ƒX‚“•”‚Žg—p‚‚‚‚B
#==============================================================================

class Game_Event < Game_Character
#--------------------------------------------------------------------------
# œ ƒCƒxƒ“ƒg‹N“
#--------------------------------------------------------------------------
def start
# Žs“—e‚‹‚‚‚‡
if @list.size > 1
# $game_player.event ‚0‚‚‚‡
if $game_player.event != 0
# ˆ“‘“x‚ $game_player.event ‚‚‚
$game_player.move_speed = $game_player.event
elsif self.trigger == 0
$game_player.move_speed = $game_player.walk
end
@starting = true
end
end
end

Riku11
24.06.2009, 12:00
Wollte mal fragen wie der Ring Menskript funktioniert?
Bei mir kommt am Ende (Reihe 414) immer ein Syntax Error?
Habs mit dem Command end versucht aber...naja^^

Edit :
Sorry wegen Doppelpost...
Hab vergessen das ich den letzten Post geschrieben hab^^

Zeythier
24.06.2009, 12:36
Wenn du ihn posten knntest knnte man dir helfen. Es gibt ja mehrere Ringmen Skripts.

Riku11
24.06.2009, 12:51
Der, der im Post von Jerome_Denis_andre drin is^^

#==============================================================================
# Window_RingMenu
#==============================================================================
#==============================================================================
# Edited by MakirouAru
# 3D Version by Deblu
#==============================================================================
class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# : N0X'"
#--------------------------------------------------------------------------


# Grafiktyp: Grafiken oder Icons?
grafik_typ = "i" # p = Pictures, i = Icons

# Die Dateinamen (ohne Dateiendung)
grafik_gegenstaende = "034-Item03"
grafik_faehigkeiten = "044-Skill01"
grafik_ausruestung = "001-Weapon01"
grafik_status = "050-Skill07"
grafik_speichern = "038-Item07"
grafik_beenden = "046-Skill03"

STARTUP_FRAMES = 20 # 0`Aj[V!"̒tR["
MOVING_FRAMES = 5 # `"O 0}~̒tR["
RING_R = 256 # `"O"Ra

if grafik_typ == "i"
PIC_ITEM = RPG::Cache.icon(grafik_gegenstaende) # uACevj&[̒ACR"
PIC_SKILL = RPG::Cache.icon(grafik_faehigkeiten) # uXL9vj&[̒ACR"
PIC_EQUIP = RPG::Cache.icon(grafik_ausruestung) # u'""vj&[̒ACR"
PIC_STATUS = RPG::Cache.icon(grafik_status) # uXe[^Xvj&[̒ACR"
PIC_SAVE = RPG::Cache.icon(grafik_speichern) # uZ[uvj&[̒ACR"
PIC_EXIT = RPG::Cache.icon(grafik_beenden) # uIvj&[̒ACR"
else
PIC_ITEM = RPG::Cache.picture(grafik_gegenstaende) # uACevj&[̒ACR"
PIC_SKILL = RPG::Cache.picture(grafik_faehigkeiten) # uXL9vj&[̒ACR"
PIC_EQUIP = RPG::Cache.picture(grafik_ausruestung) # u'""vj&[̒ACR"
PIC_STATUS = RPG::Cache.picture(grafik_status) # uXe[^Xvj&[̒ACR"
PIC_SAVE = RPG::Cache.picture(grafik_speichern) # uZ[uvj&[̒ACR"
PIC_EXIT = RPG::Cache.picture(grafik_beenden) # uIvj&[̒ACR"
end

PIC_DISABLE= RPG::Cache.icon("") # }gp9}~"tACR"
SE_STARTUP = "056-Right02" # j&[ `JƫSE
MODE_START = 1 # X^[gAbvAj[V!"
MODE_WAIT = 2 # '9@
MODE_MOVER = 3 # }~Rv00"]Aj[V!"
MODE_MOVEL = 4 # "}~Rv00"]Aj[V!"
#--------------------------------------------------------------------------
# : ANZT
#--------------------------------------------------------------------------
attr_accessor :index
#--------------------------------------------------------------------------
# S IuWFNg0`0
#--------------------------------------------------------------------------
def initialize( center_x, center_y )
super(0, 0, 640, 480)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.opacity = 0
self.back_opacity = 0
s1 = "Gegenstnde"
s2 = "Fhigkeiten"
s3 = "Ausrstung"
s4 = "Status"
s5 = "Speichern"
s6 = "Beenden"
@commands = [ s1, s2, s3, s4, s5, s6 ]
@item_max = 6
@index = 0
@items = [ PIC_ITEM, PIC_SKILL, PIC_EQUIP, PIC_STATUS, PIC_SAVE, PIC_EXIT ]
@disabled = [ false, false, false, false, false, false ]
@cx = center_x - 16
@cy = center_y - 16
setup_move_start
refresh
end
#--------------------------------------------------------------------------
# S tR[XV
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# S 0"`0
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ACR" "`0
case @mode
when MODE_START
refresh_start
when MODE_WAIT
refresh_wait
when MODE_MOVER
refresh_move(1)
when MODE_MOVEL
refresh_move(0)
end
# ANeBuȒR}"h"\}
rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index],1)
end
#--------------------------------------------------------------------------
# : 0"`0(0`0}~)
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / STARTUP_FRAMES
r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r/3 * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# : 0"`0('9@}~)
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R/3 * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# : 0"`0(0"]}~)
# mode : 0="}~Rv0 1=}~Rv0
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R/3 * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# S "`0
# x :
# y :
# i : "
#--------------------------------------------------------------------------
def draw_item(x, y, i)
#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
rect = Rect.new(0, 0, @items[i].width, @items[i].height)
if @index == i
self.contents.blt( x, y, @items[i], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[i], rect, 128 )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
end
end
end
#--------------------------------------------------------------------------
# S Rɷ
# index : "
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# : 0`0Aj[V!""
#--------------------------------------------------------------------------
def setup_move_start
@mode = MODE_START
@steps = STARTUP_FRAMES
if SE_STARTUP != nil and SE_STARTUP != ""
Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
end
end
#--------------------------------------------------------------------------
# : 0"]Aj[V!""
#--------------------------------------------------------------------------
def setup_move_move(mode)
if mode == MODE_MOVER
@index -= 1
@index = @items.size - 1 if @index < 0
elsif mode == MODE_MOVEL
@index += 1
@index = 0 if @index >= @items.size
else
return
end
@mode = mode
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# : Aj[V!"' Ǥ
#--------------------------------------------------------------------------
def animation?
return @mode != MODE_WAIT
end
end
#==============================================================================
# Window_MenuStatus
#------------------------------------------------------------------------------
# @j&[0Œp[eB"o[̒Xe[^X "\}EB"hEŷB
#==============================================================================

class Window_RingMenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# S IuWFNg0`0
#--------------------------------------------------------------------------
def initialize
super(204, 64, 232, 352)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# S `tRbV&
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = "Arial"
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 80
y = 80 * i
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y + 24)
end
end
#--------------------------------------------------------------------------
# S J[\99R`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
end
end
end
#==============================================================================
# # Scene_RingMenu
# Scene_Menu
#------------------------------------------------------------------------------
# @j&[0 sN0XŷB
#==============================================================================

#class Scene_RingMenu
class Scene_Menu
#--------------------------------------------------------------------------
# S IuWFNg0`0
# menu_index : R}"h̒J[\90`'u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# S C"
#--------------------------------------------------------------------------
def main
# Xv0CgZbg
@spriteset = Spriteset_Map.new
# R}"hEB"hE
px = $game_player.screen_x - 15
py = $game_player.screen_y - 24
@command_window = Window_RingMenu.new(px,py)
@command_window.index = @menu_index
# p[eBl" 0 l!
if $game_party.actors.size == 0
# ACeAXL9A'""AXe[^X R0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@command_window.z = 100
# Z[u9}~!
if $game_system.save_disabled
# Z[u Rɷ
@command_window.disable_item(4)
end
# Xe[^XEB"hE
@status_window = Window_RingMenuStatus.new
@status_window.x = 160
@status_window.y = 0
@status_window.z = 200
@status_window.visible = false
# g0"WV!"}s
Graphics.transition
# C"9[v
loop do
# Q[0 XV
Graphics.update
# "" XV
Input.update
# tR[XV
update
# 0ʪ'9[v ' 'f
if $scene != self
break
end
end
# g0"WV!""
Graphics.freeze
# Xv0CgZbg 0 "
@spriteset.dispose
# EB"hE 0 "
@command_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# S tR[XV
#--------------------------------------------------------------------------
def update
# EB"hE XV
@command_window.update
@status_window.update
# R}"hEB"hEANeBu!: update_command R
if @command_window.active
update_command
return
end
# Xe[^XEB"hEANeBu!: update_status R
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# S tR[XV (R}"hEB"hEANeBu!)
#--------------------------------------------------------------------------
def update_command
# B {^"0x!
if Input.trigger?(Input::B)
# L"Z9 SE 00't
$game_system.se_play($data_system.cancel_se)
# }bv0'֦
$scene = Scene_Map.new
return
end
# C {^"0x!
if Input.trigger?(Input::C)
# p[eBl" 0 lAZ[uAQ[I`O̒R}"h!
if $game_party.actors.size == 0 and @command_window.index < 4
# uU[ SE 00't
$game_system.se_play($data_system.buzzer_se)
return
end
# R}"hEB"hE̒J[\9'u"`
case @command_window.index
when 0 # ACe
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# ACe0'֦
$scene = Scene_Item.new
when 1 # XL9
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# Xe[^XEB"hE ANeBuɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 2 # '""
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# Xe[^XEB"hE ANeBuɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 3 # Xe[^X
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# Xe[^XEB"hE ANeBuɷ
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 4 # Z[u
# Z[u9}~!
if $game_system.save_disabled
# uU[ SE 00't
$game_system.se_play($data_system.buzzer_se)
return
end
# R' SE 00't
$game_system.se_play($data_system.decision_se)
# Z[u0'֦
$scene = Scene_Save.new
when 5 # Q[I
# R' SE 00't
$game_system.se_play($data_system.decision_se)

Zeythier
24.06.2009, 12:58
Markier doch nochmal bitte Line 414 Fett. danke

Riku11
24.06.2009, 13:50
Das is die letzte line^^

Zeythier
24.06.2009, 16:59
Kann ich dir nicht weiterhelfen... Wende dich doch mal an das RPG-Studio, da kann man dir sicher helfen.

VegaCenter
06.04.2010, 17:17
8-way und Pixel movement = MUST HAVE!

MagicMagor
24.07.2011, 11:06
Gibt es berhaupt Thread-Necro bei einem gepinnten Thread?

Egal, ich hab jedenfalls die letzten Tage (anstatt fr meine morgige Klausur zu lernen) wieder ein wenig Lust auf Makern bekommen und dabei noch ein altes Skript auf meiner Platte entdeckt. In diesem Fall bin ich tatschlich der Meinung es ist ein "must-have", mMn insbesondere sehr ntzlich wenn man eigene Mens baut oder sonst viele eigene Window-Klassen schreiben muss.
Zur Anmerkung, das Skript ist nicht von mir, es ist Teil eines Questlog-Skript, das ich als PDF irgendwann mal (kA mehr woher genau) runtergeladen habe. Autor ist ein gewisser Caesar, wie aber auch im Kommentarblock am Anfang des Skriptes angegeben.

Es handelt sich dabei um eine HTML-Render Engine, wobei das HTML sicher etwas hoch gegriffen ist. Es erlaubt aber auf jedenfall diverse Formatierungen in Form von HTLM-Tags einfach im Text anzugeben. Verwendet wird es relativ einfach, indem man einfach die Funktion Bitmap#draw_html anstatt Bitmap#draw_text verwendet.(Parameter sind die gleichen)
Das Skript:



#///////////////////////HTML-Rendering-Engine/////////////////////////////////
#~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
class Bitmap
LINE_HEIGHT = 20
STYLES = {}

def draw_shadow_text(x, y, width, height, str, align=0)
color = font.color.dup
font.color = Color.new(192, 192, 192, 156)
draw_text(x+2, y+2, width, height, str, align)
font.color = color
draw_text(x, y, width, height, str, align)
end
#----------------
def draw_html(x, y, width, height, str)
# remember string and font variables
str = str.dup
color = font.color.dup
bold = font.bold
italic = font.italic
size = font.size
name = font.name.dup
#::::::::::
shadow = false
underlined = false
opacity = 255
str.gsub!(/<if=([0-9]+)>(.+?)<else>(.+?)<\/if>/) {$game_switches[$1.to_i] ? $2 : $3}
str.gsub!(/<var=([0-9]+)>/) {$game_variables[$1.to_i].to_s}
str.gsub!(/<eval={(.+?)}>/) {eval $1}
str.gsub!(/<style=([A-Za-z0-9_-]+)>(.+?)<\/style>/) {
STYLES.has_key?($1) ? STYLES[$1].sub("|", $2) : ""
} if defined?(STYLES)
str.gsub!(/<br>/) {"\n"}
str.gsub!(/\\\\/) {"\00"}
str.gsub!(/<b>/) {"\01"}
str.gsub!(/<\/b>/) {"\02"}
str.gsub!(/<i>/) {"\03"}
str.gsub!(/<\/i>/) {"\04"}
str.gsub!(/<color=(#?[0-9a-z_]+)>/) {"\05[#{$1}]"}
str.gsub!(/<\/color>/) {"\06"}
str.gsub!(/<shadow>/) {"\16"}
str.gsub!(/<\/shadow>/) {"\17"}
str.gsub!(/<small>/) {"\20"}
str.gsub!(/<\/small>/) {"\21"}
str.gsub!(/<big>/) {"\23"}
str.gsub!(/<\/big>/) {"\21"}
str.gsub!(/<size=([0-9]+)>/) {"\24[#{$1}]"}
str.gsub!(/<\/size>/) {"\21"}
str.gsub!(/<font=([A-Za-z0-9\s]+)>/) {"\25[#{$1}]"}
str.gsub!(/<\/font>/) {"\26"}
str.gsub!(/<u>/) {"\27"}
str.gsub!(/<\/u>/) {"\30"}
str.gsub!(/<icon=([_A-Za-z0-9-]+)>/) {"\11[#{$1}]"}
str.gsub!(/<image=([_A-Za-z0-9-]+)>/) {"\31[#{$1}]"}
str.gsub!(/<down=([0-9]+)>/) {"\22[#{$1}]"}
str.gsub!(/<space=([0-9]+)>/) {"\100[#{$1}]"}
str.gsub!(/<line>/) {"\07"}
ix = 0
iy = 0
while ((c = str.slice!(/./m)) != nil)
if c == "\00" # \\
c = "\\"
end
if c == "\01" # <b>
font.bold = true
end
if c == "\02" #</b>
font.bold = bold
end
if c == "\03" # <i>
font.italic = true
end
if c == "\04" # </i>
font.italic = false
end
if c == "\05" # <color=xxx>
str.sub!(/\[(#?[0-9a-z_]+)\]/, "")
if $1[0] == 35
col = Color.decode($1)
elsif $1.to_i != 0
col = Window_Base.text_color($1.to_i)
else
col = Color.get($1)
end
font.color = col
end
if c == "\06" # </color>
font.color = color
end
if c == "\16" # <shadow>
shadow = true
end
if c == "\17" # </shadow>
shadow = false
end
if c == "\20" # <small>
font.size -= 5 if font.size > 10
end
if c == "\21" # </small> </big> </size>
font.size = size
end
if c == "\23" # <big>
font.size += 5 if font.size < 92
end
if c == "\24" # <size=xx>
str.sub!(/\[([0-9]+)\]/, "")
newsize = $1.to_i
font.size = newsize if newsize > 5 and newsize < 97
end
if c == "\25" # <font=xxx>
str.sub!(/\[([A-Za-z0-9\s]+)\]/, "")
font.name = $1 if Font.exist?($1)
end
if c == "\26" # </font>
font.name = name
end
if c == "\27" # <u>
underlined = true
end
if c == "\30" # </u>
underlined = false
end
if c == "\11" #<icon=xxx>
str.sub!(/\[([_A-Za-z0-9-]+)\]/, "")
icon = RPG::Cache.icon($1)
blt(ix + 8, iy + LINE_HEIGHT/2 - 12, icon, Rect.new(0, 0, 24, 24))
ix += 24
end
if c == "\31" # <image=xxx>
str.sub!(/\[([_A-Za-z0-9-]+)\]/, "")
image = RPG::Cache.picture($1)
iy += LINE_HEIGHT
blt((width-image.rect.width)/2, iy, image, image.rect)
iy += image.rect.height
ix = 0
end
if c == "\22" # <down=xxx>
str.sub!(/\[([0-9]+)\]/, "")
iy += $1.to_i
ix = 0
end
if c == "\100" # <space=xxx>
str.sub!(/\[([0-9]+)\]/, "")
ix += $1.to_i
c = ""
end
if c == "\07" # <line>
iy += LINE_HEIGHT + 3
fill_rect(16, iy, width-32, 2, font.color)
fill_rect(16, iy, width-32, 2, Color.new(192, 192, 192, 156)) if shadow
iy += 5
ix = 0
end
if c == "\n"
iy += LINE_HEIGHT
ix = 0
end
#:::::::::
if shadow
draw_shadow_text(x+ix+4, y+iy, 40, font.size, c)
else
draw_text(x+ix+4, y+iy, 40, font.size, c)
end
w = text_size(c).width
if underlined
fill_rect(x+ix+4, y+iy+text_size("T").height+3, w, 2, font.color)
end
ix += w
end
#::::::::::
#reset font variables
font.color = color
font.bold = bold
font.italic = italic
font.size = size
font.name = name
#return height of the bitmap
return iy + LINE_HEIGHT
end
end
#==============
class Color
def Color.get(s)
eval "Color.#{s}" rescue Color.white
end
#------------
def Color.decode(hex)
return Color.decode(hex[1..hex.length]) if hex[0] == 35
hex.downcase!
red = hex[0..1].hex
green = hex[2..3].hex
blue = hex[4..5].hex
alpha = hex.length == 8 ? hex[6..7].hex : 255
return Color.new(red, green, blue, alpha)
end
#------------
def Color.normal_color
return Color.new(255, 255, 255, 255)
end
#-----------
def Color.disabled_color
return Color.new(255, 255, 255, 128)
end
#-----------
def Color.system_color
return Color.new(192, 224, 255, 255)
end
#-----------
def Color.crisis_color
return Color.new(255, 255, 64, 255)
end
#-----------
def Color.knockout_color
return Color.new(255, 64, 0)
end
#------------
def Color.white(alpha=255)
return Color.new(255, 255, 255, alpha)
end
#-----------
def Color.black(alpha=255)
return Color.new(0, 0, 0, alpha)
end
#----------
def Color.red(alpha=255)
return Color.new(255, 0, 0, alpha)
end
#----------
def Color.green(alpha=255)
return Color.new(0, 255, 0, alpha)
end
#---------
def Color.blue(alpha=255)
return Color.new(0, 0, 255, alpha)
end
#----------
def Color.yellow(alpha=255)
return Color.new(255, 255, 0, alpha)
end
#----------
def Color.cyan(alpha=255)
return Color.new(0, 255, 255, alpha)
end
#----------
def Color.magenta(alpha=255)
return Color.new(255, 255, 0, alpha)
end
#----------
def Color.light_gray(alpha=255)
return Color.new(192, 192, 192, alpha)
end
#-----------
def Color.gray(alpha=255)
return Color.new(128, 128, 128, alpha)
end
#-----------
def Color.dark_gray(alpha=255)
return Color.new(64, 64, 64, alpha)
end
#-----------
def Color.pink(alpha=255)
return Color.new(255, 175, 175, alpha)
end
#-----------
def Color.orange(alpha=255)
return Color.new(255, 200, 0, alpha)
end
end
#=====================
class Window_Base < Window
# redefine text colors for static context
def self.text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
return Color.white
end
end
end

Die Erluterungen aus dem PDF (beinhaltet Liste der untersttzten Tags), da ich hier nur die HTML-Engine poste und nicht das ganze Questlog gibt es dadurch bedingt einige Lcken, also strt euch nicht an der Nummerierung:

2.1.2. LINE_HEIGHT
Wie der Name schon sagt, beschreibt dieser Integer-Wert die Zeilenhöhe der Beschreibungen in Pixeln. Je höher dieser Wert ist, desto gröer ist der Zeilenabstand.

2.1.6. STYLES
Ein besonderes Schmankerl der HTML-Rendering-Engine sind die vordefinierten Styles. Angenommen, alle Questbeschreibungen enthalten Überschriften. Man könnte jetzt für jede Überschrift die entsprechenden Tags setzen, fett, unterstrichen, Schriftgröe, Schriftart, Zeilenabstand etc. Will man jetzt aber alle Überschriften um einen Grad gröer machen, hat man ganz schön Probleme, denn man muss für jede Überschrift die Tags ändern. Hier kommt das so genannte Semantische Tagging zum Einsatz: Alle Styles werden an zentraler Stelle definiert und die einzelnen Überschriften werden nur anhand ihrer Semantik bezeichnet, d.h. anhand ihrer Funktion im Dokument (z.B. Überschrift). Im Idealfall enthält das Dokument selbst dann gar keine absoluten Formatierungen mehr. Genau das gleiche Prinzip kommt bei der Gestaltung von Webseiten zum Einsatz, wenn die Formatierungen in Cascading Style Sheets (CSS) definiert werden. Die STYLES- Variable entspricht insofern dem Stylesheet.
Die Variable ist ein Hash. Die Schlüssel entsprechen den Namen der Styles und die Werte enthalten die Informationen zur Formatierung. An der Stelle des senkrechten Striches (|) wird später der getaggte Text eingefügt.
Beispiel: Ein Style enthält Informationen zur Formatierung von Überschriften. Wir verwenden die Schriftgröe 45, die Schriftart Cambria, stellen den Text fett dar und lassen einen Zeilenabstand von 40 Pixeln zur nächsten Zeile. Der Style sieht demnach wie folgt aus:
<size=45><font=Cambria><b>|</b></font></size><down=40>
Die einzelnen Tags werden unten genauer beschrieben.

2.2. Tags
Generell sind die Tags HTML nachempfunden, dennoch sind selbstverständlich nicht alle HTML- Tags im Questlog verwendbar und umgekehrt existieren nicht alle Questlog-Tags auch in HTML. Die Tags sind auerdem nicht XML-konform, d.h. es gibt auch Tags die nicht geschlossen werden. Schande über mein Haupt, aber was soll's ;-)
Leider habe ich es nicht hinbekommen, zentrierte und rechtsbündige Ausrichtung zu implementieren; auerdem ist es zuweilen etwas mühselig, die richtigen Stellen der Zeilenumbrüche herauszufinden, da hilft meist nur Ausprobieren.
Questtitel kann man übrigens mit Formatierungen gut kategorisieren, beispielsweise in Haupt- und Nebenquests. Und die Einbindung von Variablen, der If-Tag und die Code-Evaluation ermöglichen in der Questbeschreibung eine (dynamisch erzeugte) Übersicht über den Fortschritt des Quests, wie auch auf den Demoscreens zu sehen ist.
Es existieren die folgenden Tags:
<br> <b>Text</b> <i>Text</i> <u>Text</u> <color=X>Text</color> <size=X>Text</size> <small>Text</small> <big>Text</big> <font=X>Text</font> <shadow>Text</shadow> <icon=X> <image=X> <line> <down=X> <space=X> <if=X>Text<else>Anderer Text</if> <var=X> <eval={X}> <style=X>Text</style>

2.2.1. <br>
Zeilenumbruch

2.2.2. <b>Text</b>
Fetter Text

2.2.3. <i>Text</i>
Kursiver Text

2.2.4. <u>Text</u>
Unterstrichener Text

2.2.5. <color=X>Text</color>
Farbiger Text
Für X muss einer der folgenden Parameter eingesetzt werden:
a) Ein Farbcode in Hexadezimalschreibweise mit vorangestelltem #, z.B. #ffffff = wei. Die gleichen Farbcodes können in HTML bzw. CSS verwendet werden, daher gibt es im Internet viele Farbtabellen für diese Hexcodes.
b) Ein Farbwort, dabei sind folgende möglich: normal_color (wei), system_color (blau), disabled_color (grau), crisis_color (gelb), knockout_color (rot), white, black, red, green, blue, yellow, cyan, magenta, light_gray, gray, dark_gray, pink, orange.
c) Ein Message-Farbcode, der auch beim Messagecode \c[X] verwendet wird, also eine Zahl von 0-7.

2.2.6 <size=X>Text</size>
Der Text wird in der angegebenen Schriftgröe dargestellt.

2.2.7. <small>Text</small>
Kleinerer Text

2.2.8. <big>Text</big>
Gröerer Text

2.2.9. <font=X>Text</font>
Der Text wird in der angegebenen Schriftart dargestellt.

2.2.10. <shadow>Text</shadow>
Der Text wirft einen Schatten. 2.2.11.

<icon=X>
Ein Icon wird (innerhalb der Zeile) gezeichnet. Für X ist der Name des (importierten) Icons einzusetzen.

2.2.12. <image=X>
Ein Bild wird zentriert in einer neuen Zeile gezeichnet. Für X ist der Name des (importierten) Bildes einzusetzen.

2.2.13. <line>
Zeichnet eine Trennlinie, entspricht <hr> aus HTML.

2.2.14. <down=X>
Wie Zeilenumbruch, aber Zeilenabstand ist einstellbar. Für X ist der vertikale Versatz in Pixeln einzusetzen.

2.2.15. <space=X>
Lässt eine (horizontale) Lücke von X Pixeln. Z.B. für Einrückung am Zeilenanfang zu gebrauchen.

2.2.16. <if=X>Text<else>Anderer Text</if>
Schalterabhängiger Text. Für X ist die ID eines Switches einzusetzen. Wenn der Switch an ist, wird Text dargestellt, ansonsten der Andere Text.

2.2.17. <var=X>
Wert der Variable mit der ID X.

2.2.18. <eval={X}>
Hiermit kann beliebiger RGSS-Code eingebettet werden, der erst zum Zeitpunkt der Darstellung evaluiert wird. Die Tags <if> und <var> sind im Grunde nur Spezialformen dieser dynamischen Inhaltserzeugung. Mit dem Eval-Tag können so spezielle Variablen wie Heldennamen, Statuswerte und Systemvariablen eingebunden werden.

2.2.19. <style=X>Text</style>
Eines der wichtigsten Tags: das Style-Tag. Wie schon bei den Parametern beschrieben, werden die konkreten Formatierungen idealerweise zentral (bei den Parametern) definiert und die Dokumente semantisch getaggt. Dieses Semantische Tagging geschieht durch den Style-Tag. Für X ist der Name des Styles einzusetzen, der natürlich im Styles-Parameter definiert sein muss.

MrSerji
03.07.2012, 10:42
Bei mir klappt das "Titel-berspringen-Skript" nicht :/
Htte da jemand ein ersatz parat?

TwoFace
27.06.2013, 15:44
Kann man so einen Thread auch fr den VX und VX Ace machen?