Out of sheer curiosity I wonder if it is possible to have a script, let's say one that adds ATB to battle, but only have it activate after a certain point in the game, like by having a switch turn on or something triggers the effect and boom now the game system has more depth, just wondering
Activate a script mid-game
RPG Maker XP SupportYes, it is possible, many old RMXP scripts had conditions for a switch defined at the beginning of the code so that the developer could anti-activate or disable it when convenient.
mind sending me an example so that I can see how it works ?
Disable/Enable Message System with switch
Disable/Enable Message System with switch
forum.chaos-project.com
It says it's for VX Ace, does the DISABLE_SWITCH command work on XP as well ?
Maybe you are not familiar with programming languages, because this is not a command, it is an RGSS variable.
In the line that checks the SWITCH, he used it by calling the variable that is in the module, that is, this way the developer does not need to look for in the SCRIPT where to define the numerical ID:
If you don't use this, the game developer will need to find the line, which is 906, and modify the numeric ID to the desired value, for example "$game_switches[100]".
For the record I never learned RGSS, I'm just going by logic.
In the line that checks the SWITCH, he used it by calling the variable that is in the module, that is, this way the developer does not need to look for in the SCRIPT where to define the numerical ID:
If you don't use this, the game developer will need to find the line, which is 906, and modify the numeric ID to the desired value, for example "$game_switches[100]".
For the record I never learned RGSS, I'm just going by logic.
Yeah I'm fairly new to programming, I only know the big basis of GodotScript and Haxe ahahah, thanks a lot for the detailed explaination I'll try to apply what I learned tonight on my project, I'll ket you know if it worked thanks a lot
First, you can never disable an entire script while the engine is running, only functions of a script and only if they were prepared to be disabled.
Think of it like working on the engine of your car. You cannot do it while driving on the highway at 50 km per hour, but if someone installed a switch in the cockpit then you can turn that to change something while driving.
However, like with installing a switch in your car it will only work if the one doing the install knows what he/she is doing.
For example if the script makes changes to the savefiles to save its own data, then you need to keep those changes no matter what is switched - which means you cannot have the switch over the entire scripßt but only over part of the script.
If you would make the switch over the entire script, the savefiles would become incompatible the second the switch turns off the part that modifies the savefiles.
Think of it like working on the engine of your car. You cannot do it while driving on the highway at 50 km per hour, but if someone installed a switch in the cockpit then you can turn that to change something while driving.
However, like with installing a switch in your car it will only work if the one doing the install knows what he/she is doing.
For example if the script makes changes to the savefiles to save its own data, then you need to keep those changes no matter what is switched - which means you cannot have the switch over the entire scripßt but only over part of the script.
If you would make the switch over the entire script, the savefiles would become incompatible the second the switch turns off the part that modifies the savefiles.
yeah but an ATB script doesn't really do that, does it ?
If you are referring to the "XRXS_BP 3" Script, probably created by Fukuyama, even in the original language you would notice that there is no configuration that relates to the use of the game's SWTICHES.
Probably no one thought that someone would want to change the battle style in the middle of the player's journey.
It's not a complicated thing to include, but I really don't know the license to use these old SCRIPTS, or if they are on some kind of list of abandoned codes so that users can create modifications and distribute them here, which could still imply restrictions on creation of commercial games.
Maybe some older member knows better, in my opinion it's a gray area. I recommend opening a topic to request modification if no one knows how to clarify, the worst that can happen is that it will be locked by the moderator.
Probably no one thought that someone would want to change the battle style in the middle of the player's journey.
It's not a complicated thing to include, but I really don't know the license to use these old SCRIPTS, or if they are on some kind of list of abandoned codes so that users can create modifications and distribute them here, which could still imply restrictions on creation of commercial games.
Maybe some older member knows better, in my opinion it's a gray area. I recommend opening a topic to request modification if no one knows how to clarify, the worst that can happen is that it will be locked by the moderator.
That is precisely the script in question yes, I do not think that whichever license it uses is *that* important since all that I'm doing is merging two games together to be played back to back as a singular experience rather than two executables. These games were made in 2004 and 2006 by a french kid who 10 years later released them to the public as bad but fun novelties to be played by whoever cares enough to download them.
The only coding difference between the two is this very script and I think it'd be very cool to see it change midgame as soon as you reach the second game's start, I don't even plan on distributing the game to the masses, just a handful of friends and myself, so that's why I don't think changing a few lines of code to have a cool surprise is going to be breaking any major rule or gentleman agreement to not edit any script, but I respect your coding integrity, I raise my hat to you my friend
The only coding difference between the two is this very script and I think it'd be very cool to see it change midgame as soon as you reach the second game's start, I don't even plan on distributing the game to the masses, just a handful of friends and myself, so that's why I don't think changing a few lines of code to have a cool surprise is going to be breaking any major rule or gentleman agreement to not edit any script, but I respect your coding integrity, I raise my hat to you my friend
wrong
the licence is the most important part of any resource, since it really is all that prevent that work from being stolen out of games.
Yeah okay I phrased it wrong, of course it's very important and necessary with code to avoid theft, I fully get that, I just meant that in my current context : adding a cool gameplay-style transition to get my friends off guard when I put them through what is quite possibly the worst rpg of france, well does it really matter if three lines of code are changed in a 20 year old script that has been abandonned eons ago ? Either way, I found a way to load the script midway WITHOUT editing the code by using text files and common events, so in the end I respect the licensing deal anyway
This forum does not support editing someone else's game without permission. Closing.
Original thread: https://forums.rpgmakerweb.com/threads/activate-a-script-mid-game.169719/