Start a Game With Script Disabled

This may be a dumb question that's been answered somewhere on the forums, but since I couldn't find it I figured I'd post about it.

Is it possible to start your game with a script inactive? I have made a regional based battle system, but need to have a health bar. However, I don't want the health bar visible except when in battle. Finding a health bar script isn't hard, i just need to know how to hide it at the start of the game.
I modified this section of Game_Actor to add a sound effect to slip damage outside of battle:

def perform_map_damage_effect $game_map.screen.start_flash_for_damage if not $game_party.in_battle Audio.se_play("Audio/SE/Poison") #TAG, SE added to slip damage endend 
Try using "if $game_party.in_battle" as the condition for the health bar to appear (basically the opposite of what I did).
I modified this section of Game_Actor to add a sound effect to slip damage outside of battle:

def perform_map_damage_effect $game_map.screen.start_flash_for_damage if not $game_party.in_battle Audio.se_play("Audio/SE/Poison") #TAG, SE added to slip damage endendTry using "if $game_party.in_battle" as the condition for the health bar to appear (basically the opposite of what I did).
The problem with that is my regional battle system is no different than if the player was outside of battle processing. Basically my battles use regions and player location to determine who gets hit. I used an ABS a while back that had a hide code, I'm just wonder if I could have it hidden at the beginning of the game.Then again, I might not understand what you are saying and you might be right
Okay, is there any way you can use a script to trigger a switch whenever your battles start?

$game_switches[x] == trueWhen your special battle processing ends, you'll want to turn the switch off if possible.
Use the scripted switch trigger as the condition for the health bar then. Will that work?


EDIT: Ack, maybe you only need one equal sign to set the switch in the script. I think two equal signs is more of an evaluation procedure, but you can pretty easily test it for yourself and see.
are you battles scripted or evented? A sample of your process would be helpful on where to hook the health meter showing. Of course there are HUDs that are activated with a switch. Here's one that is highly customizable and relies on a switch to be shown/hidden

http://www.rpgmakervxace.net/topic/347-reinorpg-hud/
Is it possible to start your game with a script inactive?
Only if the script itself has that function.
There are some scripts out there that are programmed in a way to check for a switch to activate or deactivate themselves.


Most of the scripts however are written to be permanently active, and then they can't start as "inactive" at all.


It is possible to rewrite a script so that it can be activated or deactivated, but that is NOT easy, it depends on the script and how it is organised.


If you post links to the scripts you want to be able to deactivate, then someone can check them and tell you how to rewrite them or if that is impossible to rewrite.


Or if it could be made to just "appear" to be deactivated, for example by switching the pictures for the bar between the real pictures and empty, transparent pictures.
Or if it could be made to just "appear" to be deactivated, for example by switching the pictures for the bar between the real pictures and empty, transparent pictures.
Ingenious. The old standby - outsmart the engine!
Only if the script itself has that function.

There are some scripts out there that are programmed in a way to check for a switch to activate or deactivate themselves.

Most of the scripts however are written to be permanently active, and then they can't start as "inactive" at all.

It is possible to rewrite a script so that it can be activated or deactivated, but that is NOT easy, it depends on the script and how it is organised.

If you post links to the scripts you want to be able to deactivate, then someone can check them and tell you how to rewrite them or if that is impossible to rewrite.

Or if it could be made to just "appear" to be deactivated, for example by switching the pictures for the bar between the real pictures and empty, transparent pictures.
Would that be possible with this HP Bar script?

http://www.rpgmakervxace.net/topic/347-reinorpg-hud/
Would that be possible with this HP Bar script?


http://www.rpgmakervxace.net/topic/347-reinorpg-hud/
Why didn't you read the configuration part of that script?
It already has a switch to activate/deactivate the HUD, no change needed.


But take this really IMPORTANT lesson:


Whenever you add a script, you MUST check the script's configuration section to see if it uses switches or variables, and then reserve and name those switches and variables to prevent bugs and incompatibilities in your game.


Most scripts that use variables or switches default to ID=1, and you need to change that to make sure that every script reacts to different switches and variables, and that none of those switches or variables are used ANYWHERE else in your game.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


When you are asking for help with ANYTHING related to a custom script, please post your question in the RGSSx Script Support forum, but most importantly TELL us what scripts you're using AND include links to them.


It's taken 9 posts (and 16 hours) to reach a solution, when the answer could have been given to you in the first reply if you had provided all the information initially 😉

Original thread: https://forums.rpgmakerweb.com/threads/start-a-game-with-script-disabled.25833/