• Anmelden

hordie

Ankömmling

  • »hordie« ist der Autor dieses Themas

Motto: Zum Erfolg gibt es keinen Lift, man muss die Treppe nehmen.

  • Nachricht senden

1

Freitag, 31. Dezember 2010, 16:45

Verändern der Position der Heldenbilder im Kampf

Hallo zusammen,

hab neulich ein paar scripte eingefügt und hab jetzt das Problem, dass während dem Kampf die Bilder der Helden (ca.) in der Mitte des Bildschirms sind. Normalerweiße sollten sie hinter der Schrift am unteren Bildschirmrand sein. Jetzt meine Frage:

Wo und in welcher Reihe bei einem der Scripte, die ich nicht hinzugefügt habe, kann ich die Position dieser Bilder verändern? Oder gibt es ein script, das das regelt?

Freue mich auch schnelle Antworten.
mfg

Zego

Krieger

Motto: Ein gesunder Mensch hat 1000 Wünsche, doch ein kranker nur einen!

  • Nachricht senden

2

Freitag, 31. Dezember 2010, 17:02

hab neulich ein paar scripte eingefügt

Hilfreich wäre, wenn du diese Scripts auch noch nennst und am besten mal nen Screenshot mit dein Problem machst.
Mfg
  • :music: Bushido

    Bild
  • :balloon-smiley: Lustige Zitate

    • :thumb-up: Zitat 1
      <Noone> Kann mir vielleicht jemand bei ner Deutschhausaufgabe helfen? Komm damit nicht zurecht :/
      <Siegertyp> Ja aber beeil dich, ich muss gleich los. Ich kann dir nur eine Frage beantworten.
      <Noone> Nur eine?
      <Siegertyp> Ja
      * Siegertyp has quit IRC (quit)
    • :thumb-up: Zitat 2
      <fusion> Hast du ein paar Nacktfotos deiner Freundin?
      <chrzan> nö :/
      <fusion> Willst du welche haben? :>
    • :thumb-up: Zitat 3
      <MMM> Ich glaub ich lache nie wieder so laut...göttlich heute morgen in Bio. wir haben jeweils unseren eigenen speichel mikroskopiert. Auf einmal die eine ganz aufgeregt "Hier bewegt sich was!!" Alle werden still, Prof guckt sich das kurz an, guckt nochmal hin "Oh, ja das ist definitv eine lebende Spermazelle" Ich glaub das Mädchen wäre am liebsten gestorben ;)
    • :thumb-up: Zitat 4
      <Wretched> Religionskriege sind Konflikte zwischen erwachsenen Menschen, bei denen es darum geht, wer den cooleren, imaginaeren Freund hat
      <D3nY0> looool :D wie geil
    • :thumb-up: Zitat 5
      <HDStyle> Ist dir schonmal aufgefallen, dass irgendwie nie Amokläufe an Hauptschulen stattfinden? o.o
      <Crytek> Ja ist klar. Da schießen ja auch alle zurück.
    • :thumb-up: Zitat 6
      <RAP|TaliFecT> Meine Freundin meint ich wäre neugierig ... zumindestens steht das in ihrem Tagebuch

hordie

Ankömmling

  • »hordie« ist der Autor dieses Themas

Motto: Zum Erfolg gibt es keinen Lift, man muss die Treppe nehmen.

  • Nachricht senden

3

Freitag, 31. Dezember 2010, 17:23

Balkenscript:
Spoiler
#==============================================================================
# ** COGWHEEL Plug 'n' Play Menu Bars (based on Syvkal's revisions)
#-------------------------------------------------------------------------------
# by DerVVulfman
# Version 1.1
# 06-28-06
#------------------------------------------------------------------------------
# This is a revision of Cogwheel's famous bargraph system, now set as an inser-
# table script to display bargraphs behind values in the menus.
#
# To prevent conflict with Cogwheel's RTAB system, two key definitions have been
# renamed: "gauge_rect" to "cw_gauge" & "gradation_rect" to "cw_grad_rect."
#
#
# Affected Systems: Main Menu
# Skill Menu
# Status Menu
# Hero Select Menu (for Items & Skills)
# Equipment Menu
# BattleStatus Menu
#
# The system uses a series of CONSTANTS that can be edited here. They control
# the basic gauge colors and the manner the gauge is filled:

# Gauge Border Colors
COG_COLOR1 = Color.new(0, 0, 0, 192) # Outer Border
COG_COLOR2 = Color.new(255, 255, 192, 192) # Inner Border
# Gauge Empty filler
COG_COLOR3 = Color.new(0, 0, 0, 192) # Half of Inner Shading
COG_COLOR4 = Color.new(64, 0, 0, 192) # Half of Inner Shading
# Alignment
COG_ALIGN1 = 1 # Type 1: (0: Left / 1: Center / 2: Right Justify)
COG_ALIGN2 = 2 # Type 2: (0: Upper / 1: Central / 2: Lower)
COG_ALIGN3 = 0 # FILL ALIGNMENT (0: Left Justify / 1: Right Justify)
# Gauge Settings
COG_GRADE1 = 1 # EMPTY gauge (0: Side / 1: Vertical / 2: Slanted)
COG_GRADE2 = 0 # FILLER gauge (0: Side / 1: Vertical / 2: Slanted)


#==============================================================================
# ** 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 EXP - numeric for calculations
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get Next Level EXP - numeric for calculations
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================

class Window_Base < Window


#--------------------------------------------------------------------------
# * Draw EXP w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
alias draw_actor_exp_original draw_actor_exp
def draw_actor_exp(actor, x, y, width = 204)
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
# Calculate Bar Gradiation
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
# Adjust Bar Color based on Gradiation
color1 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
color2 = Color.new(100 - 72 * rate, 240 * rate, 62 * rate, 192)
# Calculate Bar Width
if actor.next_exp != 0
exp = width * actor.now_exp / actor.next_exp
else
exp = width
end
# Draw Bar Graph
cw_gauge(x, y + 25, width, 10, exp, color1, color2)
# Call original EXP
draw_actor_exp_original(actor, x, y)
end

#--------------------------------------------------------------------------
# * Draw HP w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_hp_original draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
# Calculate Bar Gradiation
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
# Adjust Bar Color based on Gradiation
color1 = Color.new(216 - 24 * rate, 0 * rate, 0 * rate, 192)
color2 = Color.new(255 * rate, 165 * rate, 0 * rate, 192)
# Calculate Bar Width
if actor.maxhp != 0
hp = width * actor.hp / actor.maxhp
else
hp = 0
end
# Draw Bar Graph
cw_gauge(x, y + 25, width, 10, hp, color1, color2)
# Call original HP
draw_actor_hp_original(actor, x, y, width)
end

#--------------------------------------------------------------------------
# * Draw SP w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_sp_original draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
# Calculate Bar Gradiation
if actor.maxsp != 0
rate = actor.sp.to_f / actor.maxsp
else
rate = 1
end
# Adjust Bar Color based on Gradiation
color1 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
# Calculate Bar Width
if actor.maxsp != 0
sp = width * actor.sp / actor.maxsp
else
sp = width
end
# Draw Bar Graph
cw_gauge(x + width * 0 / 100, y + 25, width, 10, sp, color1, color2)
# Call original SP
draw_actor_sp_original(actor, x, y, width)
end

#--------------------------------------------------------------------------
# * Draw Parameter w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# type : parameter type (0-6)
#--------------------------------------------------------------------------
alias draw_actor_parameter_original draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
# Choose Color & Parameter Type
case type
when 0
e1 = actor.atk
c6 = Color.new(253, 53, 56, 192)
c5 = Color.new(242, 2, 6, 192)
when 1
e1 = actor.pdef
c6 = Color.new(238, 254, 124, 192)
c5 = Color.new(228, 253, 48, 192)
when 2
e1 = actor.mdef
c6 = Color.new(150, 37, 184, 192)
c5 = Color.new(170, 57, 204, 192)
when 3
e1 = actor.str
c6 = Color.new(253, 163, 33, 192)
c5 = Color.new(254, 209, 154, 192)
when 4
e1 = actor.dex
c6 = Color.new(255, 255, 255, 192)
c5 = Color.new(222, 222, 222, 192)
when 5
e1 = actor.agi
c6 = Color.new(124, 254, 155, 192)
c5 = Color.new(33, 253, 86, 192)
when 6
e1 = actor.int
c6 = Color.new(119, 203, 254, 192)
c5 = Color.new(8, 160, 253, 192)
end
# Calculate Bar Gradiation
e2 = 999
if e1.to_f != 0
rate = e1.to_f / e2.to_f
else
rate = 1
end
# Adjust Bar Color based on Gradiation & Parameter Type
for i in 0..7
r = c6.red * rate
g = (c6.green - 10) * rate
b = c6.blue * rate
a = c6.alpha
end
# Calculate Bar Width
width = 168
if e1.to_f != 0
par = width * e1.to_f / e2.to_f
else
par = width
end
# Equipment Calc Fix
case type
when 0
if e1 == 0
par = 0
end
when 1
if e1 == 0
par = 0
end
when 2
if e1 == 0
par = 0
end
end
# Draw Bar Graph
cw_gauge(x , y + 25, width, 7, par, c5, Color.new(r, g, b, a))
# Call Original Parameter
draw_actor_parameter_original(actor, x, y, type)
end

#--------------------------------------------------------------------------
# * Gauge Rectangle (New to Class)
#--------------------------------------------------------------------------
def cw_gauge(x, y, width, height, gauge, color1, color2)

# Use Cogwheel PRESETS
color3 = COG_COLOR1
color4 = COG_COLOR2
color5 = COG_COLOR3
color6 = COG_COLOR4
align1 = COG_ALIGN1
align2 = COG_ALIGN2
align3 = COG_ALIGN3
grade1 = COG_GRADE1
grade2 = COG_GRADE2

# Create Rectangle Width based on gauge max.
rect_width = width

case align1
when 1
x += (rect_width - width) / 2
when 2
x += rect_width - width
end
case align2
when 1
y -= height / 2
when 2
y -= height
end
self.contents.fill_rect(x, y, width, height, color3)
self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color4)
if align3 == 0
if grade1 == 2
grade1 = 3
end
if grade2 == 2
grade2 = 3
end
end
if (align3 == 1 and grade1 == 0) or grade1 > 0
color = color5
color5 = color6
color6 = color
end
if (align3 == 1 and grade2 == 0) or grade2 > 0
color = color1
color1 = color2
color2 = color
end
self.contents.cw_grad_rect(x + 2, y + 2, width - 4, height - 4, color5, color6, grade1)
if align3 == 1
x += width - gauge
end
self.contents.cw_grad_rect(x + 2, y + 2, gauge - 4, height - 4, color1, color2, grade2)
end

#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end


#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap

#--------------------------------------------------------------------------
# * Gradation Rectangle
#--------------------------------------------------------------------------
def cw_grad_rect(x, y, width, height, color3, color4, align = 0)
if align == 0
for i in x...x + width
red = color3.red + (color4.red - color3.red) * (i - x) / (width - 1)
green = color3.green +
(color4.green - color3.green) * (i - x) / (width - 1)
blue = color3.blue +
(color4.blue - color3.blue) * (i - x) / (width - 1)
alpha = color3.alpha +
(color4.alpha - color3.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color3.red +
(color4.red - color3.red) * (i - y) / (height - 1)
green = color3.green +
(color4.green - color3.green) * (i - y) / (height - 1)
blue = color3.blue +
(color4.blue - color3.blue) * (i - y) / (height - 1)
alpha = color3.alpha +
(color4.alpha - color3.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color3.red + (color4.red - color3.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color3.green + (color4.green - color3.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color3.blue + (color4.blue - color3.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color3.alpha + (color4.alpha - color3.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color3.red + (color4.red - color3.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color3.green + (color4.green - color3.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color3.blue + (color4.blue - color3.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color3.alpha + (color4.alpha - color3.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end

#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
zum Lesen den Text mit der Maus markieren

Zusätzliche Option im Menü:
Spoiler
#==============================================================================
# ** COGWHEEL Plug 'n' Play Menu Bars (based on Syvkal's revisions)
#-------------------------------------------------------------------------------
# by DerVVulfman
# Version 1.1
# 06-28-06
#------------------------------------------------------------------------------
# This is a revision of Cogwheel's famous bargraph system, now set as an inser-
# table script to display bargraphs behind values in the menus.
#
# To prevent conflict with Cogwheel's RTAB system, two key definitions have been
# renamed: "gauge_rect" to "cw_gauge" & "gradation_rect" to "cw_grad_rect."
#
#
# Affected Systems: Main Menu
# Skill Menu
# Status Menu
# Hero Select Menu (for Items & Skills)
# Equipment Menu
# BattleStatus Menu
#
# The system uses a series of CONSTANTS that can be edited here. They control
# the basic gauge colors and the manner the gauge is filled:

# Gauge Border Colors
COG_COLOR1 = Color.new(0, 0, 0, 192) # Outer Border
COG_COLOR2 = Color.new(255, 255, 192, 192) # Inner Border
# Gauge Empty filler
COG_COLOR3 = Color.new(0, 0, 0, 192) # Half of Inner Shading
COG_COLOR4 = Color.new(64, 0, 0, 192) # Half of Inner Shading
# Alignment
COG_ALIGN1 = 1 # Type 1: (0: Left / 1: Center / 2: Right Justify)
COG_ALIGN2 = 2 # Type 2: (0: Upper / 1: Central / 2: Lower)
COG_ALIGN3 = 0 # FILL ALIGNMENT (0: Left Justify / 1: Right Justify)
# Gauge Settings
COG_GRADE1 = 1 # EMPTY gauge (0: Side / 1: Vertical / 2: Slanted)
COG_GRADE2 = 0 # FILLER gauge (0: Side / 1: Vertical / 2: Slanted)


#==============================================================================
# ** 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 EXP - numeric for calculations
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get Next Level EXP - numeric for calculations
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================

class Window_Base < Window


#--------------------------------------------------------------------------
# * Draw EXP w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
alias draw_actor_exp_original draw_actor_exp
def draw_actor_exp(actor, x, y, width = 204)
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
# Calculate Bar Gradiation
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
# Adjust Bar Color based on Gradiation
color1 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
color2 = Color.new(100 - 72 * rate, 240 * rate, 62 * rate, 192)
# Calculate Bar Width
if actor.next_exp != 0
exp = width * actor.now_exp / actor.next_exp
else
exp = width
end
# Draw Bar Graph
cw_gauge(x, y + 25, width, 10, exp, color1, color2)
# Call original EXP
draw_actor_exp_original(actor, x, y)
end

#--------------------------------------------------------------------------
# * Draw HP w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_hp_original draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
# Calculate Bar Gradiation
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
# Adjust Bar Color based on Gradiation
color1 = Color.new(216 - 24 * rate, 0 * rate, 0 * rate, 192)
color2 = Color.new(255 * rate, 165 * rate, 0 * rate, 192)
# Calculate Bar Width
if actor.maxhp != 0
hp = width * actor.hp / actor.maxhp
else
hp = 0
end
# Draw Bar Graph
cw_gauge(x, y + 25, width, 10, hp, color1, color2)
# Call original HP
draw_actor_hp_original(actor, x, y, width)
end

#--------------------------------------------------------------------------
# * Draw SP w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_sp_original draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
# Calculate Bar Gradiation
if actor.maxsp != 0
rate = actor.sp.to_f / actor.maxsp
else
rate = 1
end
# Adjust Bar Color based on Gradiation
color1 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
# Calculate Bar Width
if actor.maxsp != 0
sp = width * actor.sp / actor.maxsp
else
sp = width
end
# Draw Bar Graph
cw_gauge(x + width * 0 / 100, y + 25, width, 10, sp, color1, color2)
# Call original SP
draw_actor_sp_original(actor, x, y, width)
end

#--------------------------------------------------------------------------
# * Draw Parameter w/ Bars
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# type : parameter type (0-6)
#--------------------------------------------------------------------------
alias draw_actor_parameter_original draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
# Choose Color & Parameter Type
case type
when 0
e1 = actor.atk
c6 = Color.new(253, 53, 56, 192)
c5 = Color.new(242, 2, 6, 192)
when 1
e1 = actor.pdef
c6 = Color.new(238, 254, 124, 192)
c5 = Color.new(228, 253, 48, 192)
when 2
e1 = actor.mdef
c6 = Color.new(150, 37, 184, 192)
c5 = Color.new(170, 57, 204, 192)
when 3
e1 = actor.str
c6 = Color.new(253, 163, 33, 192)
c5 = Color.new(254, 209, 154, 192)
when 4
e1 = actor.dex
c6 = Color.new(255, 255, 255, 192)
c5 = Color.new(222, 222, 222, 192)
when 5
e1 = actor.agi
c6 = Color.new(124, 254, 155, 192)
c5 = Color.new(33, 253, 86, 192)
when 6
e1 = actor.int
c6 = Color.new(119, 203, 254, 192)
c5 = Color.new(8, 160, 253, 192)
end
# Calculate Bar Gradiation
e2 = 999
if e1.to_f != 0
rate = e1.to_f / e2.to_f
else
rate = 1
end
# Adjust Bar Color based on Gradiation & Parameter Type
for i in 0..7
r = c6.red * rate
g = (c6.green - 10) * rate
b = c6.blue * rate
a = c6.alpha
end
# Calculate Bar Width
width = 168
if e1.to_f != 0
par = width * e1.to_f / e2.to_f
else
par = width
end
# Equipment Calc Fix
case type
when 0
if e1 == 0
par = 0
end
when 1
if e1 == 0
par = 0
end
when 2
if e1 == 0
par = 0
end
end
# Draw Bar Graph
cw_gauge(x , y + 25, width, 7, par, c5, Color.new(r, g, b, a))
# Call Original Parameter
draw_actor_parameter_original(actor, x, y, type)
end

#--------------------------------------------------------------------------
# * Gauge Rectangle (New to Class)
#--------------------------------------------------------------------------
def cw_gauge(x, y, width, height, gauge, color1, color2)

# Use Cogwheel PRESETS
color3 = COG_COLOR1
color4 = COG_COLOR2
color5 = COG_COLOR3
color6 = COG_COLOR4
align1 = COG_ALIGN1
align2 = COG_ALIGN2
align3 = COG_ALIGN3
grade1 = COG_GRADE1
grade2 = COG_GRADE2

# Create Rectangle Width based on gauge max.
rect_width = width

case align1
when 1
x += (rect_width - width) / 2
when 2
x += rect_width - width
end
case align2
when 1
y -= height / 2
when 2
y -= height
end
self.contents.fill_rect(x, y, width, height, color3)
self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color4)
if align3 == 0
if grade1 == 2
grade1 = 3
end
if grade2 == 2
grade2 = 3
end
end
if (align3 == 1 and grade1 == 0) or grade1 > 0
color = color5
color5 = color6
color6 = color
end
if (align3 == 1 and grade2 == 0) or grade2 > 0
color = color1
color1 = color2
color2 = color
end
self.contents.cw_grad_rect(x + 2, y + 2, width - 4, height - 4, color5, color6, grade1)
if align3 == 1
x += width - gauge
end
self.contents.cw_grad_rect(x + 2, y + 2, gauge - 4, height - 4, color1, color2, grade2)
end

#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end


#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap

#--------------------------------------------------------------------------
# * Gradation Rectangle
#--------------------------------------------------------------------------
def cw_grad_rect(x, y, width, height, color3, color4, align = 0)
if align == 0
for i in x...x + width
red = color3.red + (color4.red - color3.red) * (i - x) / (width - 1)
green = color3.green +
(color4.green - color3.green) * (i - x) / (width - 1)
blue = color3.blue +
(color4.blue - color3.blue) * (i - x) / (width - 1)
alpha = color3.alpha +
(color4.alpha - color3.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color3.red +
(color4.red - color3.red) * (i - y) / (height - 1)
green = color3.green +
(color4.green - color3.green) * (i - y) / (height - 1)
blue = color3.blue +
(color4.blue - color3.blue) * (i - y) / (height - 1)
alpha = color3.alpha +
(color4.alpha - color3.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color3.red + (color4.red - color3.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color3.green + (color4.green - color3.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color3.blue + (color4.blue - color3.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color3.alpha + (color4.alpha - color3.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color3.red + (color4.red - color3.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color3.green + (color4.green - color3.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color3.blue + (color4.blue - color3.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color3.alpha + (color4.alpha - color3.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end

#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
zum Lesen den Text mit der Maus markieren

HTML für Questlog:
Spoiler
#///////////////////////HTML-Rendering-Engine/////////////////////////////////
#~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
class Bitmap
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
zum Lesen den Text mit der Maus markieren

Questlog V3
Spoiler
#//////////////////////////////////Questlog 3.0/////////////////////////////////
#~~~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#===================Parameter==================
# Wenn true, werden neue Quests oben eingefügt, ansonsten unten
INSERT_AT_TOP = true
# Zeilenhöhe in der Questbeschreibung
LINE_HEIGHT = 24
# Windowskin der Questlog-Fenster (nil = default)
WINDOWSKIN = nil
# "Überschrift" des Questlogs
HEADER_TEXT = "Aufgaben"
# Geschwindigkeit beim Scrollen (Pixel / Frame)
SCROLL_SPEED = 7
# Styles für die Beschreibungen der Quests
STYLES = {
"h1" => "<size=45><font=Cambria><b>|</b></font></size><down=40>",
"h2" => "<big><b><font=Cambria>|</font></b></big><down=32>",
"disabled" => "<color=disabled_color>|</color>",
"highlight" => "<color=#eeee32>|</color>",
"system" => "<color=system_color>|</color>"
}
# Dieser Process wird ausgeführt, sobald das Questlog geschlossen wird;
# (Default: Spieler kommt wieder auf die Map)
ON_CLOSE = Proc.new {$scene = Scene_Menu.new}
#============================================
class Scene_Questlog
def main
@window_header = Window_Help.new
@window_header.x = 65
@window_header.y = 28
@window_header.z = 500
@window_header.width = 510
@window_header.windowskin = RPG::Cache.windowskin(WINDOWSKIN) unless
WINDOWSKIN.nil?
@window_header.contents = Bitmap.new(478, 32)
@window_header.contents.font.size = 30
@window_header.contents.draw_text(0, 0, 510, 32, HEADER_TEXT, 1)
@window_titles = Window_Questlog_Titles.new
@window_titles.windowskin = RPG::Cache.windowskin(WINDOWSKIN) unless
WINDOWSKIN.nil?
@window_description = Window_Questlog_Description.new(
$game_system.questlog.quests.map{|q| q.description})
@window_description.windowskin = RPG::Cache.windowskin(WINDOWSKIN) unless
WINDOWSKIN.nil?
@index = @window_titles.index
spriteset = Spriteset_Map.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@window_header.dispose
@window_titles.dispose
@window_description.dispose
spriteset.dispose
end
#----------------
def update
@window_titles.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
ON_CLOSE.call
return
end
if Input.press?(Input::R)
@window_description.scroll_down
elsif Input.press?(Input::L)
@window_description.scroll_up
end
if @index != @window_titles.index
@window_description.index = @index = @window_titles.index
end
end
end
#=============
class Quest
attr_reader :title
attr_reader :description
def initialize(title, description)
@title = title
@description = description
end
end
#============
class Questlog
attr_reader :quests
def initialize
@quests = []
end
#-----------
def add(quest, description="")
return add(Quest.new(quest, description)) unless quest.is_a?(Quest)
i = index(quest.title)
return @quests = quest if i != nil
if INSERT_AT_TOP
# insert quest at top of the list
@quests.unshift(quest)
else
# insert quest at bottom of the list
@quests.push(quest)
end
end
#-----------
def remove(title)
@quests.delete_if{ |quest| quest.title == title}
end
#-----------
def count
return @quests.length
end
#------------
def index(title)
for i in 0..@quests.length-1
return i if @quests[i].title == title
end
return nil
end
#------------
def Questlog.add(title, description="")
$game_system.questlog.add(title, description)
end
#------------
def Questlog.remove(title)
$game_system.questlog.remove(title)
end
end
#=============
class Window_Questlog_Description < Window_Base
attr_reader :index
#------------------
def initialize(descriptions)
super(275, 92, 300, 360)
@descriptions = descriptions
@cache = Array.new(descriptions.size)
self.contents = Bitmap.new(width-32, height-32)
self.index = 0
self.z = 500
end
#-----------
def index=(index)
return if index == @index or @descriptions.empty?
@index = index
self.oy = 0
# bitmaps are only rendered once and than cached to reach more efficiency
if @cache[index].nil?
buffer = Bitmap.new(width-32, 2000)
docheight = buffer.draw_html(0, 0, 270, 2000, @descriptions[index])
@cache[index] = self.contents = Bitmap.new(width-32, docheight)
self.contents.blt(0, 0, buffer, Rect.new(0, 0, self.width-32, docheight))
else
self.contents = @cache[index]
end
end
#-----------
def scroll_down
self.oy += SCROLL_SPEED if self.height + self.oy - 32 < self.contents.height
end
#------------
def scroll_up
self.oy -= SCROLL_SPEED
self.oy = 0 if self.oy < 0
end
end
#=============
class Window_Questlog_Titles < Window_Base
attr_reader :index
def initialize
super(65, 92, 210, 360)
self.z = 500
@item_max = $game_system.questlog.count
self.contents = Bitmap.new(width-32, @item_max > 0 ? @item_max*32 : 32)
@index = 0
refresh
end
#-------------
def index=(index)
@index = index
update_cursor_rect
end
#-------------
def top_row=(row)
if row < 0
row = 0
end
if row > @item_max - 1
row = @item_max - 1
end
self.oy = row * 32
end
#-------------
def page_row_max
return (self.height - 32) / 32
end
#-------------
def page_item_max
return page_row_max * @column_max
end
#-------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index
top_row = self.oy / 32
if row < top_row
self.top_row = row
end
if row > top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
self.cursor_rect.set(0, @index * 32 - self.oy, self.width - 32, 32)
end
#-------------
def refresh
self.contents.clear
for i in 0...$game_system.questlog.count
quest = $game_system.questlog.quests[i]
y = i*32
self.contents.draw_html(4, y, 150, 32, quest.title)
end
end
#------------
def update
super
if self.active and @item_max > 0 and @index >= 0
if Input.repeat?(Input::DOWN) and
(Input.trigger?(Input::DOWN) or @index < @item_max - 1)
$game_system.se_play($data_system.cursor_se)
@index = (@index + 1) % @item_max
end
if Input.repeat?(Input::UP) and
(Input.trigger?(Input::UP) or @index > 0)
$game_system.se_play($data_system.cursor_se)
@index = (@index - 1 + @item_max) % @item_max
end
end
update_cursor_rect
end
end
#===========
class Scene_Map
def call_questlog
$game_temp.questlog_calling = false
$game_player.straighten
$scene = Scene_Questlog.new
end
end
#===========
class Game_System
attr_accessor :questlog
alias questlog_init initialize
def initialize
questlog_init
@questlog = Questlog.new
end
end
#===========
class Game_Temp
attr_accessor :questlog_calling
alias questlog_init initialize
def initialize
questlog_init
@questlog_calling = false
end
end
#========================
class Scene_Load < Scene_File
# if a game that does not yet contain the questlog is loaded
# a new (empty) questlog instance is created
alias questlog_read_save_data read_save_data
def read_save_data(file)
questlog_read_save_data(file)
$game_system.questlog = Questlog.new if $game_system.questlog.nil?
end
end
zum Lesen den Text mit der Maus markieren

Anti-Lag:
Spoiler

#======================================
# ¦ Anti Event Lag Script
#======================================
# By: Near Fantastica
# Date: 12.06.05
# Version: 3
# Addon by Rabu
#======================================
# Addon: Auch Events werden upgedatet die ausserhalb des range?-Bereichs
# liegen, aber als erste Event-Zeile einen "comment"-Befehl beinhalten.
# Also Events will be updated, that have a "Comment"-command
# in the first line of the event - (inspired by Rataime)
#======================================
# ¦ 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
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 $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
#===== Änderung / Modification- Rabu ==========
if in_range?(event) or event.trigger == 3 or event.trigger == 4 or (event.list!=nil and event.list[0].code == 108)
#==============================================
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)
#===== Änderung / Modification- Rabu ==========
if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4 or (sprite.character.list!=nil and sprite.character.list[0].code == 108)
#==============================================
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
zum Lesen den Text mit der Maus markieren

AMS:
Spoiler

#======================================
# ¦ Anti Event Lag Script
#======================================
# By: Near Fantastica
# Date: 12.06.05
# Version: 3
# Addon by Rabu
#======================================
# Addon: Auch Events werden upgedatet die ausserhalb des range?-Bereichs
# liegen, aber als erste Event-Zeile einen "comment"-Befehl beinhalten.
# Also Events will be updated, that have a "Comment"-command
# in the first line of the event - (inspired by Rataime)
#======================================
# ¦ 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
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 $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
#===== Änderung / Modification- Rabu ==========
if in_range?(event) or event.trigger == 3 or event.trigger == 4 or (event.list!=nil and event.list[0].code == 108)
#==============================================
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)
#===== Änderung / Modification- Rabu ==========
if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4 or (sprite.character.list!=nil and sprite.character.list[0].code == 108)
#==============================================
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
zum Lesen den Text mit der Maus markieren

4

Dienstag, 4. Januar 2011, 23:47

Schätze Balkenskript, aber bau die doch mal nacheinander aus und schau so, welches Skript bzw welche Kombination den "Fehler" verursacht. Vielleicht ist es auch nur ein "Feature" z.B. vom Balkenskript.

hordie

Ankömmling

  • »hordie« ist der Autor dieses Themas

Motto: Zum Erfolg gibt es keinen Lift, man muss die Treppe nehmen.

  • Nachricht senden

5

Freitag, 7. Januar 2011, 10:23

Selbst nur mit dem Questlog 3.0, HTML und der zusätzlichen Option im Menü (kann ich auf keinen Fall entbehren) befindet sich das Bild des Helden noch immer in der Mitte.
Ich würde gerne wissen, mit welchem Befehl, in einem Script, ich die normale Position des Bildes wiederherstellen kann.

Yuber

Seher

Motto: Die Welt zu beherrschen.

  • Nachricht senden

6

Freitag, 7. Januar 2011, 11:46

Hast du das Problem denn auch wenn du alle Scripts entfernst?

Zitat

Ich würde gerne wissen, mit welchem Befehl, in einem Script, ich die normale Position des Bildes wiederherstellen kann.
Die Position der Battler Grafik bestimmst du in Sprite_Battler Zeile 127-129.

Ruby Quellcode

1
2
3
4
# Set sprite coordinates
	self.x = @battler.screen_x
	self.y = @battler.screen_y
	self.z = @battler.screen_z
Nur noch selten hier.

'Til now, I always let people walk all over me!
From now on, if anyone makes fun of me, I'll kill 'em! Just like that!

hordie

Ankömmling

  • »hordie« ist der Autor dieses Themas

Motto: Zum Erfolg gibt es keinen Lift, man muss die Treppe nehmen.

  • Nachricht senden

7

Freitag, 7. Januar 2011, 18:45

Wenn ich alle scripts entferne hab ich irgendeine fehlermeldung zum questlog ?! :(

Zitat

Die Position der Battler Grafik bestimmst du in Sprite_Battler Zeile 127-129.

Ruby Quellcode

1
2
3
4
# Set sprite coordinates
	self.x = @battler.screen_x
	self.y = @battler.screen_y
	self.z = @battler.screen_z



und wie kann ich die verändern? z.B das battler.screen_x

snoopi

Rekrut

Motto: Der Beste Kampf - ist der, der Nie geführt wurde!

  • Nachricht senden

8

Sonntag, 16. Januar 2011, 18:50

Bei dir ist aber nicht zufällig einfacht die Battler-Grafik unsichtbar grösser als du denkst?

Ich glaube nämmlich nicht, dass es an einem deiner Skripts liegt, somal ich sie selbst auch verwende ;)

Wenn du also sonst nichts verändert hast, würde ich vielleicht die Grarfik mal abchecken, und schauen, dass du die auch wirklich bis zur gewünschten Stelle zuschneidest! ^^
Bild

Social Bookmarks