[go: up one dir, main page]

0% found this document useful (0 votes)
10 views4 pages

Message

Ghghg

Uploaded by

Silvia Roatti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

Message

Ghghg

Uploaded by

Silvia Roatti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

=begin

LISA Definitive Edition Status Descriptions v4


-by AAA

Gives status effects descriptions just like in Shitinitive Edition


Put a <Desc: TEXT> in your status' notes and replace the "TEXT" with
whatever you wish, if it doesn't have the <Desc: TEXT> thing in it's
notes it will not show it up.

Number of states can be limited, as well as if they should show status


descriptions on enemies.

UPDATE: Now works with colored text, variables, AND ICONS!

With love and hate by AAA :D


=end

module STATES_DESCRIPTIONS
MAX_STATE_COUNT_SHOWN = 0 #set to 0 or bellow to show all possible states

SHOW_STATE_DESCRIPTIONS_FOR_ENEMIES = true
end

class Game_Battler
def get_states
return @states
end
end

class Window_Status_Effect_Desc < Window_Base #future AAA please don't remove this
part of the script you always fuck it up by removing this part to try and trim it
down just a few lines you retard
def initialize
super(-standard_padding, -standard_padding, 544, 416)
self.z = 130
self.opacity = 0
end

def kILL
contents.clear
end

def refresh(actor)
contents.clear

visible_states = []
actor.get_states.each do |current_state_id|
if $data_states[current_state_id].status_note_description
visible_states.push($data_states[current_state_id])
break if STATES_DESCRIPTIONS::MAX_STATE_COUNT_SHOWN ==
visible_states.length()
end
end
visible_states = ["KILL 600"] if visible_states == []

offset = (line_height+8)*(visible_states.length() - 1) - standard_padding


draw_background_colour_status_name(220 - offset)
draw_status_message(220 - offset)
draw_background_colour_statuses(250 - offset,visible_states.length())
if visible_states == ["KILL 600"]
draw_single_status(250 - offset,nil)
else
placement_y = 250 - offset
visible_states.each do |current_state_to_draw|
draw_single_status(placement_y,current_state_to_draw)
placement_y += line_height+8
end
end
end

def draw_background_colour_status_name(y)
rect = Rect.new(0, y, (contents.width)/3, line_height+4)
back_colour1 = Color.new(0, 0, 0, 192)
back_colour2 = Color.new(0, 0, 0, 0)
contents.gradient_fill_rect(rect, back_colour1, back_colour2)
end

def draw_status_message(y)
reset_font_settings
contents.font.size = 18
contents.font.italic = true
text = "Status"
draw_text(16, y, contents.width - 12, line_height+4, text)
reset_font_settings
end

def draw_background_colour_statuses(y,numb_of_states)
rect = Rect.new(0, y, (contents.width)/3, (line_height+8)*numb_of_states)
back_colour1 = Color.new(0, 0, 0, 192)
back_colour2 = Color.new(0, 0, 0, 0)
contents.gradient_fill_rect(rect, back_colour1, back_colour2)
end

def draw_single_status(y,status)
reset_font_settings
if status
draw_icon(status.icon_index,8,y+3,true)
contents.font.size = 14
draw_text(36, y-3, contents.width - 12, line_height+4, status.name)
contents.font.size = 10
draw_text_ex(36, y+12, status.status_note_description)
else
contents.font.size = 14
draw_text(16, y+2, contents.width - 12, line_height+4, "None")
end
reset_font_settings
end

def draw_text_ex(x, y, text)


text = convert_escape_characters(text)
pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
process_character(text.slice!(0, 1), text, pos) until text.empty?
end

def process_draw_icon(icon_index, pos)


bitmap = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
target = Rect.new(pos[:x], pos[:y]+5, 12, 12)
contents.stretch_blt(target, bitmap, rect)
pos[:x] += 12
end
end

class Scene_Battle
alias create_all_windows_status_description create_all_windows
def create_all_windows
create_all_windows_status_description
@window_status_effect = Window_Status_Effect_Desc.new unless
@window_status_effect
end

alias start_actor_command_selection_status_description
start_actor_command_selection
def start_actor_command_selection
show_status_descs(BattleManager.actor)
start_actor_command_selection_status_description
end

alias start_party_command_selection_status_description
start_party_command_selection
def start_party_command_selection
start_party_command_selection_status_description
hide_status_descs
end

alias start_confirm_command_selection_status_description
start_confirm_command_selection
def start_confirm_command_selection
start_confirm_command_selection_status_description
hide_status_descs
end

alias turn_start_status_description turn_start


def turn_start
hide_status_descs
turn_start_status_description
end

alias on_confirm_cancel_status_description on_confirm_cancel


def on_confirm_cancel
on_confirm_cancel_status_description
show_status_descs(BattleManager.actor)
end

alias on_actor_ok_status_description on_actor_ok


def on_actor_ok
on_actor_ok_status_description
show_status_descs(BattleManager.actor)
end

alias on_actor_cancel_status_description on_actor_cancel


def on_actor_cancel
on_actor_cancel_status_description
show_status_descs(BattleManager.actor)
end
alias on_enemy_ok_status_description on_enemy_ok
def on_enemy_ok
on_enemy_ok_status_description
show_status_descs(BattleManager.actor)
end

alias on_enemy_cancel_status_description on_enemy_cancel


def on_enemy_cancel
on_enemy_cancel_status_description
show_status_descs(BattleManager.actor)
end

def show_status_descs(enemy_for_whom_we_show_states)
@window_status_effect.refresh(enemy_for_whom_we_show_states) if
enemy_for_whom_we_show_states && @window_status_effect
end

def hide_status_descs
@window_status_effect.kILL if @window_status_effect
end

alias select_enemy_selection_status_description select_enemy_selection


def select_enemy_selection
select_enemy_selection_status_description
if STATES_DESCRIPTIONS::SHOW_STATE_DESCRIPTIONS_FOR_ENEMIES
show_status_descs(@enemy_window.enemy)
else
hide_status_descs
end
end
end

if STATES_DESCRIPTIONS::SHOW_STATE_DESCRIPTIONS_FOR_ENEMIES
class Window_BattleEnemy
def cursor_right(*args)
super(*args)
SceneManager.scene.show_status_descs(enemy)
end
def cursor_left(*args)
super(*args)
SceneManager.scene.show_status_descs(enemy)
end
end
end

class RPG::State
def status_note_description
if @note =~ /<Desc: (.*)>/i
return $1
else
return nil
end
end
end

You might also like