Ho provato a ricercare per il web ma non sono riuscito a trovare una soluzione valida quindi ho deciso di rivolgermi direttamente a degli scripter... il mio problema è che il menù di samo the thief 1.1 mi crea conflitto con l'inserimento dei nomi, ovvero quando chiamo l'evento e cambio nome mi crasha ogni cosa allora ho cercato di risalire al problema è ho trovato che il problema è all'interno dell'Advanced Text effect contenuto nello script del menù... però una volta trovato il problema non riesco a risolvere il conflitto... quindi chiedo aiuto sperando che qualcuno mi illumini sulla faccenda e che riesca a trovare una soluzione al problema raggirando in qualche modo grazie questo è la parte di script interessata
=begin[/b]
[b]Advanced Text Effects(ATE) V1.1 by Samo, the thief.[/b]
[b]This script will evitate you doing your methods of special drawing text manually.
You will be able to do an outline, a shadow, and something else, by only putting
when you draw the text:
(x,y,width,height,str,align,method)
Name Description Type
x x coordinate Integer
y y coordinate Integer
width width Integer
height height Integer
str string Integer
align alignment: Integer
Like in Micro Word
0 Left, 1 Medium,
2 Right.
method The Method That String
will indicate
what we want.
Look Down for a List.
In a Normal window, a draw_text with outline should be like this:[/b]
[b]self.contents.draw_text(60,45,120,32,"Thanks Outline Script! Now i look Better!", 1, 'outline')[/b]
[b]List of Methods:[/b]
[b]'outline'
'Shadow Wide'
'Shadow Small'
'Selected Item'
'Light Bisel'
'Small Bisel'
'Medium Bisel'[/b]
[b]This also comes with a message system(if you don't like it, just erase the part
of Window_Mesagge)[/b]
[b]The message System Works in this Way. There are especial Characters that will
define the type of effect to apply. Just put them, they will appear invisible:[/b]
[b]~ No method is used in the message. It makes special characters appear.
@ Outline
# Small Shadow
$ Big Shadow
% Selected Item
^ Light Bisel
& Small Bisel
* Medium Bisel
` Text is Drawn Normally, text effects can appear in the message.
=end[/b]
[b]class Bitmap
#-----------------------------------------------------------------------
alias samo_outline_bitmap_draw_text draw_text #Alias of original Draw_text
#------------------------------------------------------------------------
def draw_text(x, y, width, height, str, align = 0, method = 'normal')
if method == 'outline'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color= Color.new(50,50,50) #Color Black
samo_outline_bitmap_draw_text(x - 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y+1, width, height, str, align)
samo_outline_bitmap_draw_text(x , y-1, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
if method == 'Shadow Wide'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color = Color.new(0,0,0,75)
samo_outline_bitmap_draw_text(x +12, y + 4, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
if method == 'Shadow Small'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color = Color.new(0,0,0,175)
samo_outline_bitmap_draw_text(x +3, y + 3, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
if method == 'Selected Item'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color= Color.new(120,255,120,225)
samo_outline_bitmap_draw_text(x - 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y+1, width, height, str, align)
samo_outline_bitmap_draw_text(x , y-1, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
if method == 'Light Bisel'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color= Color.new(0,0,0,255)
samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y+1, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
if method == 'Small Bisel'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color= Color.new(0,0,0,255)
samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y+1, width, height, str, align)
font.color= Color.new(125,125,125,255)
samo_outline_bitmap_draw_text(x - 1, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y-1, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
if method == 'Medium Bisel'
r = font.color.red #Takes the original color of the window by numbers
g = font.color.green
b = font.color.blue
a = font.color.alpha
font.color= Color.new(0,0,0,255)
samo_outline_bitmap_draw_text(x + 2, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y+2, width, height, str, align)
samo_outline_bitmap_draw_text(x + 2, y+2, width, height, str, align)
font.color= Color.new(125,125,125,255)
samo_outline_bitmap_draw_text(x - 2, y, width, height, str, align)
samo_outline_bitmap_draw_text(x , y-2, width, height, str, align)
samo_outline_bitmap_draw_text(x - 2, y-2, width, height, str, align)
font.color = Color.new(r,g,b,a) #Returns teh color no to normal
samo_outline_bitmap_draw_text(x - 1, y - 1, width, height, str, align) #draw the text without outline
end
if method == 'normal'
samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline
end
end
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
end[/b]
[b]class Sprite_Timer < Sprite
#--------------------------------------------------------------------------
def update
super
self.visible = $game_system.timer_working
if $game_system.timer / Graphics.frame_rate != @total_sec
self.bitmap.clear
@total_sec = $game_system.timer / Graphics.frame_rate
min = @total_sec / 60
sec = @total_sec % 60
text = sprintf("%02d:%02d", min, sec)
self.bitmap.font.color.set(255, 255, 255)
self.bitmap.draw_text(0,0,88,48, text, 1, true)
end
end
end[/b]
[b]#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------[/b]
[b]class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect.x,rect.y,rect.width,rect.height, @commands[index])
end
end[/b]
[b]#==============================================================================
# ■ Window_PartyCommand
#------------------------------------------------------------------------------[/b]
[b]class Window_PartyCommand < Window_Selectable
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(160 + index * 160 + 4, 0, 128 - 10, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect.x,rect.y,rect.width,rect.height, @commands[index], 1)
end
end[/b]
[b]# Delay Method
def delay(seconds)
for i in 0...seconds # * 1
sleep 0.01
Graphics.update
end
end[/b]
[b]#wait method
def wait(frames)
return true if frames == 0
if Graphics.frame_count % (frames) == 0
return true
end
end[/b]
[b]#========================================
#■ Game_Map
#--------------------------------------------------------------------------
# Setting functions for the Map
#========================================
class Game_Map[/b]
[b]def name
$map_infos[@map_id]
end
end
non so se il finale serva però ho copiato tutto per sicurezza...
chiunque mi risolva l'errore sarà un grande! Grazie
Question
Pech
Ho provato a ricercare per il web ma non sono riuscito a trovare una soluzione valida quindi ho deciso di rivolgermi direttamente a degli scripter... il mio problema è che il menù di samo the thief 1.1 mi crea conflitto con l'inserimento dei nomi, ovvero quando chiamo l'evento e cambio nome mi crasha ogni cosa allora ho cercato di risalire al problema è ho trovato che il problema è all'interno dell'Advanced Text effect contenuto nello script del menù... però una volta trovato il problema non riesco a risolvere il conflitto... quindi chiedo aiuto sperando che qualcuno mi illumini sulla faccenda e che riesca a trovare una soluzione al problema raggirando in qualche modo grazie questo è la parte di script interessata
=begin[/b] [b]Advanced Text Effects(ATE) V1.1 by Samo, the thief.[/b] [b]This script will evitate you doing your methods of special drawing text manually. You will be able to do an outline, a shadow, and something else, by only putting when you draw the text: (x,y,width,height,str,align,method) Name Description Type x x coordinate Integer y y coordinate Integer width width Integer height height Integer str string Integer align alignment: Integer Like in Micro Word 0 Left, 1 Medium, 2 Right. method The Method That String will indicate what we want. Look Down for a List. In a Normal window, a draw_text with outline should be like this:[/b] [b]self.contents.draw_text(60,45,120,32,"Thanks Outline Script! Now i look Better!", 1, 'outline')[/b] [b]List of Methods:[/b] [b]'outline' 'Shadow Wide' 'Shadow Small' 'Selected Item' 'Light Bisel' 'Small Bisel' 'Medium Bisel'[/b] [b]This also comes with a message system(if you don't like it, just erase the part of Window_Mesagge)[/b] [b]The message System Works in this Way. There are especial Characters that will define the type of effect to apply. Just put them, they will appear invisible:[/b] [b]~ No method is used in the message. It makes special characters appear. @ Outline # Small Shadow $ Big Shadow % Selected Item ^ Light Bisel & Small Bisel * Medium Bisel ` Text is Drawn Normally, text effects can appear in the message. =end[/b] [b]class Bitmap #----------------------------------------------------------------------- alias samo_outline_bitmap_draw_text draw_text #Alias of original Draw_text #------------------------------------------------------------------------ def draw_text(x, y, width, height, str, align = 0, method = 'normal') if method == 'outline' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color= Color.new(50,50,50) #Color Black samo_outline_bitmap_draw_text(x - 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y+1, width, height, str, align) samo_outline_bitmap_draw_text(x , y-1, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end if method == 'Shadow Wide' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color = Color.new(0,0,0,75) samo_outline_bitmap_draw_text(x +12, y + 4, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end if method == 'Shadow Small' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color = Color.new(0,0,0,175) samo_outline_bitmap_draw_text(x +3, y + 3, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end if method == 'Selected Item' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color= Color.new(120,255,120,225) samo_outline_bitmap_draw_text(x - 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y+1, width, height, str, align) samo_outline_bitmap_draw_text(x , y-1, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end if method == 'Light Bisel' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color= Color.new(0,0,0,255) samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y+1, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end if method == 'Small Bisel' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color= Color.new(0,0,0,255) samo_outline_bitmap_draw_text(x + 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y+1, width, height, str, align) font.color= Color.new(125,125,125,255) samo_outline_bitmap_draw_text(x - 1, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y-1, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end if method == 'Medium Bisel' r = font.color.red #Takes the original color of the window by numbers g = font.color.green b = font.color.blue a = font.color.alpha font.color= Color.new(0,0,0,255) samo_outline_bitmap_draw_text(x + 2, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y+2, width, height, str, align) samo_outline_bitmap_draw_text(x + 2, y+2, width, height, str, align) font.color= Color.new(125,125,125,255) samo_outline_bitmap_draw_text(x - 2, y, width, height, str, align) samo_outline_bitmap_draw_text(x , y-2, width, height, str, align) samo_outline_bitmap_draw_text(x - 2, y-2, width, height, str, align) font.color = Color.new(r,g,b,a) #Returns teh color no to normal samo_outline_bitmap_draw_text(x - 1, y - 1, width, height, str, align) #draw the text without outline end if method == 'normal' samo_outline_bitmap_draw_text(x, y, width, height, str, align) #draw the text without outline end end #----------------------------------------------------------------------- #----------------------------------------------------------------------- end[/b] [b]class Sprite_Timer < Sprite #-------------------------------------------------------------------------- def update super self.visible = $game_system.timer_working if $game_system.timer / Graphics.frame_rate != @total_sec self.bitmap.clear @total_sec = $game_system.timer / Graphics.frame_rate min = @total_sec / 60 sec = @total_sec % 60 text = sprintf("%02d:%02d", min, sec) self.bitmap.font.color.set(255, 255, 255) self.bitmap.draw_text(0,0,88,48, text, 1, true) end end end[/b] [b]#============================================================================== # ■ Window_Command #------------------------------------------------------------------------------[/b] [b]class Window_Command < Window_Selectable #-------------------------------------------------------------------------- #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect.x,rect.y,rect.width,rect.height, @commands[index]) end end[/b] [b]#============================================================================== # ■ Window_PartyCommand #------------------------------------------------------------------------------[/b] [b]class Window_PartyCommand < Window_Selectable #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(160 + index * 160 + 4, 0, 128 - 10, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect.x,rect.y,rect.width,rect.height, @commands[index], 1) end end[/b] [b]# Delay Method def delay(seconds) for i in 0...seconds # * 1 sleep 0.01 Graphics.update end end[/b] [b]#wait method def wait(frames) return true if frames == 0 if Graphics.frame_count % (frames) == 0 return true end end[/b] [b]#======================================== #■ Game_Map #-------------------------------------------------------------------------- # Setting functions for the Map #======================================== class Game_Map[/b] [b]def name $map_infos[@map_id] end endnon so se il finale serva però ho copiato tutto per sicurezza...
chiunque mi risolva l'errore sarà un grande! Grazie
Edited by PechLink to comment
Share on other sites
13 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now