Also note it's incompatible with TTW, since TTW has this already implemented since a long time. The scripts are on the doors, or in dialogues. I had to use a gamemode script with a frame delay to get it to work correctly when restoring your items. You can also use the quest script to save the array and it will be save persistent. You can use what I did in TTW if you like, just give credit.
Didn't know that, since I don't use TTW. I'll have to give that a look, thanks for the heads up.
I was looking at the "WriteArrayToFile" function provided by JIP LN, but I can't seem to get it to work. The script is already run by a quest, do you know how to get the quest to save the array? Sorry, I'm brand new to modding, only started yesterday.
The "SaveHotkeys" function that I used says it saves the variables to the array specified after the function is called, but as near as I can tell this isn't the case; it saves them some other way that I can't find. That isn't a problem, I found another way to save hotkeys to an array, except that the "RestoreHotkeys" function has the same syntax, with the array you're calling from listed after the function is called (RestoreHotkeys arrHotkeys), but it's not doing that, and I have no idea why.
I am doing it like this from the appropriate scripts to save the hotkeys
let TTWGenericHandler.arHotkeys := SaveHotkeys
when I need to restore them in the TTWGenericHandler gamemode script I have the following, and I do set TTWGenericHandler.iRestoreHotkeys to 1 in whichever script needs to trigger the restoration.
; Restore Hotkeys
if iRestoreKeys set iRestoreKeys to 0 if arHotkeys ScriptWait 1 RestoreHotkeys arHotkeys let arHotkeys := ar_null endif endif
Thanks a ton for that, I got it working with the manual save, still trying to figure out the automatic saves. I'll credit you in the description when I post the next update.
Update: Unfortunately, while that does work for keeping hotkeys saved manually after game shutdown, it completely breaks the automatic saving feature. Unless someone wants to take over the mod and make it work themselves, it's going to have to stay as is; I'm a student and don't have a ton of time to spend fiddling with the script to make it work. Thank you very much for trying to help, I'm just too inexperienced a modder to make any more advanced functions work. If you or anyone else think you can make it work and would like to take over the mod, I'd be happy to pass it on as long as I'm credited as the original author.
I can just copy my stuff out of TTW since I already altered all the dialogue, casino and the fort scripts. I was offering up to you since you uploaded it already as a mod. ;)
It would be great to have this integrated into such a popular mod, I only made a standalone version because one didn't exist for FNV on the Nexus that works properly. In my opinion, the more people that get to use a script like this, the better. It looks like you've done quite a bit of work on Unofficial Patch NVSE, would you be able to integrate it into the patch? Or should I reach out to Void and see if he's interested?
Not a problem, I couldn't believe there wasn't something like this on the Nexus already. I'm going to try to make it so the script activates automatically when you enter/exit the casinos, but I'm still working on it.
23 comments
EDIT: I stand corrected, as of June 2021 the mod indeed still works
I love this community.
I was looking at the "WriteArrayToFile" function provided by JIP LN, but I can't seem to get it to work. The script is already run by a quest, do you know how to get the quest to save the array? Sorry, I'm brand new to modding, only started yesterday.
let TTWGenericHandler.arHotkeys := SaveHotkeys
when I need to restore them in the TTWGenericHandler gamemode script I have the following, and I do set TTWGenericHandler.iRestoreHotkeys to 1 in whichever script needs to trigger the restoration.
; Restore Hotkeys
if iRestoreKeys
set iRestoreKeys to 0
if arHotkeys
ScriptWait 1
RestoreHotkeys arHotkeys
let arHotkeys := ar_null
endif
endif
It does work, hope it helps.
Update: Unfortunately, while that does work for keeping hotkeys saved manually after game shutdown, it completely breaks the automatic saving feature. Unless someone wants to take over the mod and make it work themselves, it's going to have to stay as is; I'm a student and don't have a ton of time to spend fiddling with the script to make it work. Thank you very much for trying to help, I'm just too inexperienced a modder to make any more advanced functions work. If you or anyone else think you can make it work and would like to take over the mod, I'd be happy to pass it on as long as I'm credited as the original author.