Name Game Switch & Variable XP
#1
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! Grinning 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 Sculptor 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. Gamer
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.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

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! Laughing + Tongue sticking out

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
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   VARIABLE ENEMY HP & SP DerVVulfman 0 830 06-14-2024, 07:18 PM
Last Post: DerVVulfman
   Variable Extraction Generator DerVVulfman 0 3,123 07-20-2020, 06:58 PM
Last Post: DerVVulfman
   Switch Extraction Generator DerVVulfman 1 3,720 06-19-2020, 03:43 AM
Last Post: DerVVulfman
Photo  Map Tileset Changer during the game Narzew 1 6,410 05-06-2013, 09:18 PM
Last Post: Narzew
   DerVVulfman's Game Data Sneak DerVVulfman 1 7,453 04-03-2013, 08:42 PM
Last Post: Taylor
   Mr.Mo ABS Game Log Window JayRay 0 5,365 10-30-2012, 06:54 AM
Last Post: JayRay
   Limit Breaker - breaks game limits Narzew 1 6,387 10-09-2012, 10:35 AM
Last Post: MetalRenard
   1 Save Slot / AutoLoad Saved Game kyonides 1 6,720 07-09-2010, 08:38 AM
Last Post: Kread-EX
   Card Game Data Structure Trickster 5 11,426 12-09-2009, 06:38 PM
Last Post: Trickster
   Variable-Based Battle Themes v1.1 PK8 1 7,251 11-27-2009, 07:29 PM
Last Post: explocion200



Users browsing this thread: 1 Guest(s)