03-02-2019, 10:16 AM
(This post was last modified: 03-05-2019, 09:53 AM by kyonides.
Edit Reason: Changed Script Calls
)
A Not So Hidden Upgrade Followed by an Addition!
Err, I guess people like Melana will find it curious that I am posting a new reply here. Well, I have got my reasons. This dark morning has witnessed something interesting, I have upgraded HiddenChest's Ruby version to 2.6.1! I do believe it is a good one and I hope your game projects end up proving my point later on. From now on you should use the x64-msvcrt-ruby260.dll instead of the old one if you are developing your game on a 64 bit OS. Actually I also uploaded a Linux binary file I could test on Kubuntu without any issues.
As a tiny, little, minimal surprise I have included an easter egg as well! Nah, it is not such a thing! To be honest with you, guys, it is another little scripting tool. It is called the Scripts module and its purpose is to store script names or symbols in an array to let you take control over what scripts you have included in your game project. Normally you would not feel the need to keep such a feature. Even so whenever you use a Constant to store a value like a boolean testing for a defined Constant or method, RGSS might not find it or will tell you it is not there just because it has not been loaded. It could happen if a script is placed below the other one, even if there is not supposed to be a specifc order to make them work together. In such cases you could use the Scripts module methods to make sure RGSS will always be right about another script's good or evil presence. It is way better than using a $global variable for the same purposes.
Scripts Module Script Calls
Scripts[:script_name] = []
or if it depends on other scripts
Scripts[:script_name] = [:other_script1, :other_script2]
It lets you store the script name or symbol. You can place it anywhere in your script editor except below the Main script.
Scripts[:script_name]
Returns all of its dependencies as an array.
print Scripts.names
You print all of the script names at once.
print Scripts.dependencies
You print all of the script names at once.
Scripts.include?(:script_name)
You double check if the script name has been included. It should be especially useful as part of any if statement (a condition preceded by an if keyword).
"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