01-01-2022, 04:32 AM
(This post was last modified: 01-02-2022, 08:15 AM by kyonides.
Edit Reason: Half Baked Menu Script
)
KExpSkills XP
by Kyonides Arkanthes
by Kyonides Arkanthes
Introduction
This would be KPartyActors XP's skill menu if I ever finish it.
So far it only sports a face or battler or character and an EXP book.
Code:
# * KExpSkills XP
# Scripter : Kyonides Arkanthes
# 2022-01-02
# Requires: KPartyActors XP
# Use EXP to buy a preset list of skills at the custom skill shop.
# * Script Call * #
# $scene = ExpSkill::Scene.new(ActorIndex)
module ExpSkill
SCENE_BACKDROP = ""
EXP_BOX_X = 8
EXP_BOX_Y = 440
EXP_BOX_X_MARGIN = 52
EXP_BOX_BACKDROP = "exp box"
EXP_BOX_FONT_COLOR = [255, 255, 255]
AVATAR_X = 8
AVATAR_Y = 8
@picture_mode = :face
extend self
attr_accessor :picture_mode
class Box
def initialize(sx, sy, margin)
@margin_x = margin
@sprites = []
@sprites << @backdrop = Sprite.new
@sprites << @points_box = Sprite.new
@backdrop.x = sx
@backdrop.y = sy
@points_box.x = sx + @margin_x
@points_box.y = sy
end
def draw_backdrop(name, exp)
@backdrop.bitmap = b = RPG::Cache.picture(name)
@points_box.bitmap = Bitmap.new(b.width - @margin_x, b.height)
draw_exp(exp)
end
def draw_exp(exp)
bm = @points_box.bitmap
bm.clear
r, g, b = EXP_BOX_FONT_COLOR
bm.font.color.set(r, g, b)
bm.draw_text(0, 0, bm.width - 4, bm.height, exp.to_s, 2)
end
def dispose
@sprites.each do |sprite|
sprite.bitmap.dispose
sprite.dispose
end
end
end
module RPG::Cache
def self.face(filename) load_bitmap("Graphics/Faces/", filename) end
end
class Spriteset
def initialize(actor)
@backdrop = Sprite.new
@backdrop.bitmap = RPG::Cache.title(SCENE_BACKDROP)
@points_box = Box.new(EXP_BOX_X, EXP_BOX_Y, EXP_BOX_X_MARGIN)
@points_box.draw_backdrop(EXP_BOX_BACKDROP, actor.exp)
@avatar = Sprite.new
@avatar.x = AVATAR_X
@avatar.y = AVATAR_Y
a = actor
case ExpSkill.picture_mode
when :battle, :battler
@avatar.bitmap = RPG::Cache.battler(a.battler_name, a.battler_hue)
when :char, :character
@avatar.bitmap = RPG::Cache.character(a.character_name, a.character_hue)
when :face
@avatar.bitmap = RPG::Cache.face(a.character_name)
end
@sprites = [@backdrop, @avatar]
end
def dispose
@points_box.dispose
@sprites.each do |sprite|
sprite.bitmap.dispose
sprite.dispose
end
end
end
class Scene
def initialize(pos=0)
@index = pos
@total = $game_party.actors.size
@actor = $game_party.actors[pos]
@learnings = @actor.class_learnings
end
def main
@stage = :main
@spriteset = Spriteset.new(@actor)
Graphics.transition
while @stage
Graphics.update
Input.update
update
end
Graphics.freeze
@spriteset.dispose
end
def update
case @stage
when :main
update_main
end
end
def change_actor(n)
return $game_system.se_play($data_system.buzzer_se) if @total == 1
$game_system.se_play($data_system.cursor_se)
pos = (@index + n) % @total
$scene = Scene.new(pos)
@stage = nil
end
def update_main
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return @stage = nil
elsif Input.trigger?(Input::L)
return change_actor(-1)
elsif Input.trigger?(Input::R)
return change_actor(1)
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
end
end
end
end
This script's terms & conditions are the same as the main script's.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE