RGSS3 Regedit Modifying - script call error

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Original script:
Trying to set the value of DWORD values in-game (0 or 1) and it's not working; think I'm messing up the value format on the reg.set line. Script call:
Code:
reg = Registry.new()
reg.open(:HKEY_CURRENT_USER, "Software\Enterbrain\RGSS3")
reg.set("PlayMusic", 0)
value = reg.get("PlayMusic")
reg = nil; GC.start
What's the specific format needed for that reg.set command? The documentation for this line of code starts at line 76 or so in the script but I'm still a bit confused. (Working off of rough google auto-translations for this script.)
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
281
Reaction score
106
First Language
English
Primarily Uses
RMXP
Code:
> reg.open:(HKEY_CURRENT_USER, "Software\\Enterbrain\\RGSS3")
Code:
reg.open:(HKEY_CURRENT_USER, "Software\Enterbrain\RGSS3")
Perhaps you forgot to escape your backslash characters?
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Code:
> reg.open:(HKEY_CURRENT_USER, "Software\\Enterbrain\\RGSS3")
Code:
reg.open:(HKEY_CURRENT_USER, "Software\Enterbrain\RGSS3")
Perhaps you forgot to escape your backslash characters?
Still getting an error popup.
Code:
reg = Registry.new()
reg.open(:HKEY_CURRENT_USER, "Software\\Enterbrain\\RGSS3")
reg.set("PlayMusic", 0)
value = reg.get("PlayMusic")
reg = nil; GC.start
upload_2019-7-14_23-52-54.png
For reference, this one (modifying ButtonAssign values) seems to work fine:
Code:
reg = Registry.new()
reg.open(:HKEY_CURRENT_USER, "Software\\Enterbrain\\RGSS3")
reg.set("ButtonAssign", [0] * 25)
value = reg.get("ButtonAssign")
reg = nil; GC.start
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
281
Reaction score
106
First Language
English
Primarily Uses
RMXP
Trying it myself, I found that neither works; both can return that same error message. Sometimes it manages to work if I catch the error and spam the Enter key enough. I dug a little deeper and have narrowed it down to the .to_ansi calls it makes, notably in the open and query methods. Removing them ensured 100% success in my calls.

Now the annoyance is that this will still not get you what you want. I've actually explored this topic before:
https://forum.chaos-project.com/index.php/topic,15959.msg196896.html#msg196896
In short, changing the registry value won't suddenly enable the player's Game.exe to play music.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Trying it myself, I found that neither works; both can return that same error message. Sometimes it manages to work if I catch the error and spam the Enter key enough. I dug a little deeper and have narrowed it down to the .to_ansi calls it makes, notably in the open and query methods. Removing them ensured 100% success in my calls.

Now the annoyance is that this will still not get you what you want. I've actually explored this topic before:
https://forum.chaos-project.com/index.php/topic,15959.msg196896.html#msg196896
In short, changing the registry value won't suddenly enable the player's Game.exe to play music.
For some reason, this now happens:
Code:
reg = Registry.new()
reg.open(:HKEY_CURRENT_USER, "Software\\Enterbrain\\RGSS3")
reg.set("PlayMusic", 0x1, :REG_DWORD)
value = reg.get("PlayMusic")
reg = nil; GC.start
SceneManager.exit
upload_2019-7-15_4-2-49.png

On my end, if I modify the ButtonAssign value and force-close the game immediately afterwards, once I re-open it, the values are applied to the game and show up properly in the F1 menu. It's strange to hear that the ButtonAssign script call gave you any errors...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top