Guest Access
Go to page : 1, 2
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
@Ragnai ~ I threw in some shadow, now it looks really nice ^,^
@albertfish - still a work in progress
can't wait to make it stand alone...
oh and I changed the name
XAS NAME DROP
XAS SHADOW WORD POP V.2
in your events use the call script command
(3rd page bottom right list of events commands)
X = event_ID
for critical messaging:
for state messaging:
for plain messaging:
currently working on an XAS mini-map
but will get back to this one...so that I can make a module
for easy options: duration, font settings, animations, shadow, etc...
@albertfish - still a work in progress
can't wait to make it stand alone...
oh and I changed the name
XAS SHADOW WORD POP V.2
- Spoiler:
- Code:
=begin
XAS SHADOW WORD POP V.2
by gameface101
1-2-10
=end
class Sprite_Character < RPG::Sprite
alias name_drop_update update
def update
name_drop_update
if @character != nil and @character.damage != nil
damage(@character.damage, @character.critical, @character.state, @character.character_hue)
@character.damage = nil
@character.critical = false
@character.state = nil
@character.item = nil
end
end
end
class Game_Character
attr_accessor :damage
attr_accessor :critical
attr_accessor :state
attr_accessor :item
alias name_drop_initialize initialize
def initialize
@damage = nil
@critical = false
@state = nil
@item = nil
name_drop_initialize
end
end
class Bitmap
if !method_defined?("draw_text_original")
alias draw_text_original draw_text
end
def draw_text(x, y, width = 0, height = 0, str = "", align = 0)
last_color = font.color.dup
font.color = Color.new( 0, 0, 0,last_color.alpha)
case x
when Numeric
draw_text_original(x+1, y+1, width, height, str, align)
font.color = last_color
draw_text_original(x, y, width, height, str, align)
when Rect
rect = x
str = y
align = width
shadow_rect = x.dup
shadow_rect.x += 1
shadow_rect.y += 1
draw_text_original( shadow_rect, str, align)
font.color = last_color
draw_text_original( rect, str, align)
end
end
end
module RPG
class Sprite < ::Sprite
def damage(value, critical, state, item)
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "Arial Black"
bitmap.font.size = 24 #master font size
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text_original(-1, 12-1, 160, 36, damage_string, 1) # ??
bitmap.draw_text_original(+1, 12-1, 160, 36, damage_string, 1) # ???
bitmap.draw_text_original(-1, 12+1, 160, 36, damage_string, 1) # ??
bitmap.draw_text_original(+1, 12+1, 160, 36, damage_string, 1) # ??
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
bitmap.draw_text_original(0, 12, 160, 36, damage_string, 1) # ??
if critical
bitmap.font.size = 24 # critical header size
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text_original(-1, -1, 160, 20, "WARNING!", 1) # ??
bitmap.draw_text_original(+1, -1, 160, 20, "WARNING!", 1) # ??
bitmap.draw_text_original(-1, +1, 160, 20, "WARNING!", 1) # ??
bitmap.draw_text_original(+1, +1, 160, 20, "WARNING!", 1) # ??
bitmap.font.color.set(255, 55, 55)#red
bitmap.draw_text_original(0, 0, 160, 20, "WARNING!", 1) # ??
end
if state
bitmap.font.size = 24 # state header size
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text_original(-1, -1, 160, 20, "BONUS!", 1) # ??
bitmap.draw_text_original(+1, -1, 160, 20, "BONUS!", 1) # ??
bitmap.draw_text_original(-1, +1, 160, 20, "BONUS!", 1) # ??
bitmap.draw_text_original(+1, +1, 160, 20, "BONUS!", 1) # ??
bitmap.font.color.set(55, 255, 55)#green
bitmap.draw_text_original(0, 0, 160, 20, "BONUS!", 1) # ??
end
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - self.oy / 2
@_damage_sprite.z = 3000
@_damage_duration = 60#how long
end
end
end
in your events use the call script command
(3rd page bottom right list of events commands)
X = event_ID
for critical messaging:
- Code:
$game_map.events[X].critical = true
$game_map.events[X].damage =
"critical message"
for state messaging:
- Code:
$game_map.events[X].state = true
$game_map.events[X].damage =
"secret message"
for plain messaging:
- Code:
$game_map.events[X].damage =
"shadow word pop is COOL!"
currently working on an XAS mini-map
but will get back to this one...so that I can make a module
for easy options: duration, font settings, animations, shadow, etc...
Administrator
Show Signature
Active Member
Active Member
Active Member
profile
Legault123
profile
I really like this idea, is this discontinued or do you plan to make it better @GF ?
Active Member
Show Signature
Active Member
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
@Legault - I usually revisit my scripts to improve them as my RGSS improves. Once they are solid/stable I share them with the public. I still have a long ways to go learning Ruby so you can expect future versions.
@albertfish - ready when you are ^,^
@albertfish - ready when you are ^,^
Administrator
Show Signature
||||||||||
||||||||||
||||||||||
profile
supercow
profile
i also was waiting for this to be improved since it has a lot of potential,but i dont mind waiting, still need to do a lot of work, this just need be independent from xas or not
||||||||||
Show Signature
||||||||||
Go to page : 1, 2