Name Game Switch & Variable VX + ACE
#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
   Switch Tags kyonides 1 1,323 01-08-2024, 03:48 AM
Last Post: kyonides
   DoubleX RMVXA Variable Pointers DoubleX 0 4,259 06-01-2015, 03:45 PM
Last Post: DoubleX
   DerVVulfman's Game Data Sneak DerVVulfman 0 186 04-04-2013, 03:50 AM
Last Post: DerVVulfman
   In game Tone change ! Grimimi 1 5,374 10-09-2012, 01:31 AM
Last Post: Samven
   Arcade Game System WIP computerwizoo7 0 5,271 03-25-2010, 01:20 PM
Last Post: computerwizoo7
   Variable-Based Battle Themes v1.1 PK8 0 253 11-24-2009, 11:35 PM
Last Post: PK8
   [split] Variable Swap [Snippet] PK8 0 204 11-15-2009, 08:49 PM
Last Post: PK8
   Switch Swap [Snippet] PK8 0 227 11-14-2009, 05:23 AM
Last Post: PK8
   [Unsupported] Game Strings (Streamline dialogue!) PK8 3 9,508 09-15-2009, 11:28 PM
Last Post: Wyatt



Users browsing this thread: 1 Guest(s)