CODE
#ASCIIgod rename MP Vocab each class Lv:3
#
# a simpler MP rename script without the same function as the one in the net
#
# Lv:1 = Initial coding. Name Functions
# Lv:2 = choose from 2 characters or name
# Lv:3 = recoulor gauges depending on what you chooses
################################################################################
module ASCIIGOD
module RENAME_MP
#Format::Class_id => "name"
NAME_MP_CLASS =
{
1 => "Mana",
2 => "Tech",
3 => "Mana",
4 => "Mana",
5 => "Tech",
6 => "Mana",
7 => "Mana",
8 => "Mana",
9 => "Chi",
10 => "Tech",
11 => "Mana",
12 => "Power",
13 => "Power",
14 => "Rune",
15 => "Bond",
16 => "Sleight",
17 => "Sleight",
18 => "Sleight",
19 => "Mana",
20 => "Mana",
}
#Usage::1 = full name, 0 = abbreviation
TYPE_NAME = 0
#Format::Class_id => "abbreviation"
NAME_MP_CLASS_A =
{
1 => "Mp",
2 => "Tp",
3 => "Mp",
4 => "Mp",
5 => "Tp",
6 => "Mp",
7 => "Mp",
8 => "Mp",
9 => "Cp",
10 => "Tp",
11 => "Mp",
12 => "Pp",
13 => "Pp",
14 => "Rp",
15 => "Bp",
16 => "Sp",
17 => "Sp",
18 => "Sp",
19 => "Mp",
20 => "Mp",
}
GAUGE_COULOR_1 =
{
1 => 22,
2 => 24,
3 => 26,
4 => 28,
5 => 30,
6 => 32,
7 => 34,
8 => 36,
9 => 38,
10 => 40,
11 => 42,
12 => 44,
13 => 46,
14 => 48,
15 => 50,
16 => 22,
17 => 22,
18 => 22,
19 => 22,
20 => 22,
}
GAUGE_COULOR_2 =
{
1 => 23,
2 => 23,
3 => 23,
4 => 23,
5 => 23,
6 => 23,
7 => 23,
8 => 23,
9 => 23,
10 => 23,
11 => 23,
12 => 23,
13 => 23,
14 => 23,
15 => 23,
16 => 23,
17 => 23,
18 => 23,
19 => 23,
20 => 23,
}
end
end
class Window_Base
def draw_actor_mp(actor, x, y, width = 120)
draw_actor_mp_gauge(actor, x, y, width)
self.contents.font.color = system_color
case ASCIIGOD::RENAME_MP::TYPE_NAME
when 0
text = ASCIIGOD::RENAME_MP::NAME_MP_CLASS_A[actor.class.id]
when 1
text = ASCIIGOD::RENAME_MP::NAME_MP_CLASS[actor.class.id]
else
text = ASCIIGOD::RENAME_MP::NAME_MP_CLASS[actor.class.id]
end
self.contents.draw_text(x, y, 30, WLH, text)
self.contents.font.color = mp_color(actor)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, actor.mp, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, actor.mp, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxmp, 2)
end
end
def draw_actor_mp_gauge(actor, x, y, width = 120)
gw = width * actor.mp / [actor.maxmp, 1].max
gc1 = text_color(ASCIIGOD::RENAME_MP::GAUGE_COULOR_1[actor.class.id])
gc2 = text_color(ASCIIGOD::RENAME_MP::GAUGE_COULOR_2[actor.class.id])
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
end
end