Name Game Switch & Variable RG
The Scripting Tool
by Kyonides
Introduction
This script was made for all of the RGSS based RPG Makers available out there!
Are you bored of getting a Game Switch or a Game Variable by using a Number that's easy to forget?
Don't worry about! I've got the perfect solution for you!
Use the script posted below and you'll be able to set or access its contents scriptwise.
It has several script calls you can manage at any given moment.
Take in consideration that my script is not for everyone, especially not for novice game developers!
The Script
Code:
# * Name Game Switch & Variable RG * #
# Scripter : Kyonides Arkanthes
# 2023-06-27
# * Basic Scripting Tool * #
# * Not Intended for use by Novice Game Developers * #
# * Never use Old Save Files! * #
# Please set a Game Switch or Game Variable Name before calling its get method.
# $game_switches.set("Name", ID)
# $game_switches.set("Name", ID, true)
# $game_switches.get("Name") - Identical to on?
# $game_switches.on?("Name") - Identical to get
# $game_switches.names #=> Lists All Names Used So Far
# $game_switches.total_names #=> Returns Hash Size
# $game_variables.set("Name", ID)
# $game_variables.set("Name", ID, 100)
# $game_variables.get("Name")
# $game_variables.names #=> Lists All Names Used So Far
# $game_variables.total_names #=> Returns Hash Size
module NameGameSV
def get(name)
data_id = @names[name]
@data[data_id]
end
def set(name, data_id, value=NAMES_DEFAULT)
@names[name] = data_id
@data[data_id] = value
end
def clear_names
@names = {}
end
def total_names
@names.size
end
attr_reader :names
end
class Game_Switches
include NameGameSV
NAMES_DEFAULT = false
alias :kyon_name_gs_gv_gm_swi_init :initialize
def initialize
kyon_name_gs_gv_gm_swi_init
clear_names
end
alias :on? :get
end
class Game_Variables
include NameGameSV
NAMES_DEFAULT = 0
alias :kyon_name_gs_gv_gm_var_init :initialize
def initialize
kyon_name_gs_gv_gm_var_init
clear_names
end
end
Terms & Conditions
Free for use in any game.
Due credit is optional.
That's it!
"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