Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Name Game Switch & Variable RG
#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 494 01-08-2024, 03:48 AM
Last Post: kyonides
   Variable Extraction Generator DerVVulfman 0 2,550 07-20-2020, 06:58 PM
Last Post: DerVVulfman
   Switch Extraction Generator DerVVulfman 1 3,060 06-19-2020, 03:43 AM
Last Post: DerVVulfman
   DoubleX RMVXA Variable Pointers DoubleX 0 3,681 06-01-2015, 03:45 PM
Last Post: DoubleX
Photo  Map Tileset Changer during the game Narzew 1 5,787 05-06-2013, 09:18 PM
Last Post: Narzew
   DerVVulfman's Game Data Sneak DerVVulfman 2 6,698 04-04-2013, 03:50 AM
Last Post: DerVVulfman
   Mr.Mo ABS Game Log Window JayRay 0 4,798 10-30-2012, 06:54 AM
Last Post: JayRay
   Limit Breaker - breaks game limits Narzew 1 5,778 10-09-2012, 10:35 AM
Last Post: MetalRenard
   In game Tone change ! Grimimi 1 4,738 10-09-2012, 01:31 AM
Last Post: Samven
   1 Save Slot / AutoLoad Saved Game kyonides 1 5,997 07-09-2010, 08:38 AM
Last Post: Kread-EX



Users browsing this thread: