06-30-2005, 01:05 PM
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given.
No support is given.
INSTRUCTIONS
Make a new script above main
What it does: It makes the Stutse text moveble and if u want gives a color to every status.... 98% Credt to MoMoMo
Code:
#===============================================================
# Actor state indication active conversion
# Scripted by MoMoMo
# Translation Mr. DJ, fix Japanese text by Mr. DJ
#===============================================================
# When fighting when the state of the actor becomes plural,
# It reaches the point where state name is indicated in every time consecutively.
# Every in order to avoid the renewal of the status window of the frame
# Being to make the sprite for state indication anew
# The person who fumbles the indication of Window_BattleStatus adjustment is necessary.
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#weird translation, what it really does is changing the status text to a colorstatus text and makes the Text Moveble
class Window_BattleStatus < Window_Base
STATE_DRAW_FRAME = 20 # Indicatory frame interval
STATE_DRAW_X = 160 # Distance between actor #You PROBEBLY NEED to change this
STATE_DRAW_Y = 96 # The state the Y-coordinate which is indicated
STATE_DRAW_COLOR_USE = true # Whether or not letter color setting is made effective
#--------------------------------------------------------------------------
# â—? Letter color setting of state
# actor : Actor
# text : Drawing character string
#--------------------------------------------------------------------------
def state_font_color(actor, text)
if STATE_DRAW_COLOR_USE
color = normal_color
case text
when "[Normal]" #translated Normality
color = normal_color
when "[Death]" #translated agressive failure
color = knockout_color
when "[Stun]"
color = normal_color
when "[Poison]"
color = Color.new(128, 255, 128, 255)
when "[Dizzy]" #translated Dazzaldinezz
color = Color.new(255, 255, 128, 255)
when "[Silence]"
color = Color.new(160, 160, 160, 255)
when "[Confused]"
color = Color.new(200, 255, 140, 255)
when "[Sleep]"
color = Color.new(64, 64, 200, 255)
when "[Paralyzed]"
color = Color.new(128, 255, 255, 255)
when "[Weak]","[Clumsy]","[Delayed]","[Enfeebled]" #tranlated: ????, Cram Gee, Delay, Fee Bull
color = Color.new(128, 128, 128, 255)
when "[Sharpen]","[Barrier]","[Resist]","[Blink]"
color = Color.new(128, 128, 255, 255)
end
else
# When STATE_DRAW_COLOR_USE is false, processing of colors (only dead with red drawing)
color = actor.hp == 0 ? knockout_color : normal_color
end
@state_sprite.bitmap.font.color = color
end
attr_accessor :state_count
alias window_battlestatus_state_draw_initialize initialize
def initialize
window_battlestatus_state_draw_initialize
# Drawing up the counter for state indication
@state_count = 0
# Drawing up the sprite for state indication
@state_sprite = Sprite.new(self.viewport)
@state_sprite.bitmap = Bitmap.new(self.width - 32, self.height - 32)
@state_sprite.x = self.x + 16
@state_sprite.y = self.y + 16
@state_sprite.z = self.z + 2
# Refreshing the sprite for state indication
state_draw_refresh
end
alias window_battlestatus_state_draw_dispose dispose
def dispose
window_battlestatus_state_draw_dispose
# Opening the sprite for state indication
@state_sprite.dispose
end
#--------------------------------------------------------------------------
# â—? State character string compilation for drawing
# actor : Actor
# width : Width ahead drawing
# need_normal : Whether or not [ normal ] is active (true / false)
#--------------------------------------------------------------------------
def make_battler_state_text(battler, width, need_normal)
# Acquiring the width of the parenthesis
brackets_width = self.contents.text_size("[]").width
# Drawing up the character string of state name
text = ""
# Actually arrangement compilation of the state which is indicated
show_state = []
for i in battler.states
if $data_states[i].rating >= 1
show_state.push($data_states[i].name)
end
end
# When arrangement of the indicatory state is the sky, "[ it makes normal ]"
if show_state.size == 0
if need_normal
text = "[Normal]"
else
text = ""
end
else
# Setting the state which it corresponds to count to the character string
text = show_state[(@state_count / STATE_DRAW_FRAME) % show_state.size]
# The parenthesis is attached
text = "[" + text + "]"
end
# The character string which you complete is returned
return text
end
def state_draw_refresh
# The character string which you complete is returned
@state_count += 1
# Not to be state renewal interval, if the first renewal time is not, it does not renew
return if @state_count % STATE_DRAW_FRAME != 0 and @state_count != 1
@state_sprite.bitmap.clear
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * STATE_DRAW_X + 4
if @level_up_flags[i]
@state_sprite.bitmap.font.color = normal_color
@state_sprite.bitmap.draw_text(actor_x, STATE_DRAW_Y, 120, 32, "LEVEL UP!")
else
text = make_battler_state_text(actor, 120, true)
state_font_color(actor, text)
@state_sprite.bitmap.draw_text(actor_x, STATE_DRAW_Y, 120, 32, text)
end
end
end
def draw_actor_state(actor, x, y, width = 120)
# The dummy because usual draw_actor_state is not made to execute
end
end
class Scene_Battle
alias scene_battle_state_draw_update update
def update
# Renewing state indication to every update
@status_window.state_draw_refresh
scene_battle_state_draw_update
end
end
i mean that u can place it anywhere on screen with any font any size any color