For some reason this mod isn't working for me. The script shows up in the REFramework UI, I can interact with it and all that, but the hot spring still has everyone in it.
Has there been an update since the last release of this mod that would break it?
It's entirely possible. I'm aware they released some changes to NPCs in an attempt to mitigate they CPU issues they cause, it wouldn't surprise me if their alterations included changes to the spawning system, which could have effects on this mod. I haven't played since last June so I'm afraid I wouldn't know any details off the top of my head, it might be some time until I can take a look at it.
Would you be willing to try the 1.12 file and tell me if that has any effects?
I've taken a quick look at it and identified a few issues the game's updates have caused. The primary problem is that two of the three game methods the mod relied on to trigger functionality are no longer viable, one due to NPC optimizations, the other due to compiler optimizations.
I intend on coming back to it when I have more time available, but for now I've uploaded a quick 1.13 version that should prevent NPCs from being in the hot spring. This unfortunately lacks any of the whitelisting the 2.00+ version did while simultaneously being more performance-intensive than the 1.12 version, though it shouldn't be an issue for any computer that can run the game decently in the first place.
Is this supposed to despawn the random npcs that are already in the hotspring? I tried it, but i'm not sure how it is supposed to work, when i enter there are still the regular npcs, and only some of the whitelisted npcs appear.
I accidentaly entered the hot springs while the script was running and nobody spawned except my pawns. I read in the description that you should disable the script before entering, you do that from script runner tab, right? sorry i'm new to mods, I'm not sure when i need to enable it.
Also, are all white listed npcs supposed to spawn automatically together in the hot spring or is that up to chance? I would appreciate any help in clarifying, even step by step of when to disable it in order to make it work.
I've edited the description in an attempt to give further clarity on that part.
Leave the script enabled, ideally it should never be disabled. You can tell whether a script is enabled or disabled under the "ScriptRunner" tab of REFramework, enabled scripts will have their box checked.
When the script is running, its effect is that it will prevent NPCs from being present in the hot spring at all, leaving just you and your pawns. Whitelisted NPCs are able to bypass this and spawn regardless, but it does not guarantee their presence. They will only be there if they were there naturally.
The disclaimer in the description is due to the way the mod works. When you enter the hot spring, all NPCs in the spring not in the whitelist will have their spawning disabled. Their spawning is then re-enabled when you leave the hot spring. If the spring were to be entered with the mod turned on, then the mod turned off while in the spring and the spring exited, those NPCs would not have their spawning re-enabled. This is a potential game-breaking issue due to visiting NPCs. Theoretically, it should fix itself if the spring were re-entered and left due to a system I put in specifically to protect against behavior like this, but it's still better to instruct people not to do it since there does exist a risk.
hello. tried your mod. can't write anything into typebox. soon as i click the box, the box deactivates. clicking the typebox again, it deactivates again. if you need logs, i can give you, so plz tell me. yes, my reframework is up to date.
tell me if you want this to be in bugs section. i'll cut this whole thing and paste it into bugs section.
This is due to an REFramework bug. I've already submitted a report to the tool's developer so hopefully it's addressed in an upcoming build.
In the meantime, you may wish to downgrade to the Nightly802-bugfix build of REFramework for use with this mod, which was before this bug was introduced. It can be downloaded under the "Old Files" section of REFramework's DD2 page, found here.
I've messed with the newer builds of REFramework a bit more to learn what exactly triggers this behaviour. The new upload of this mod, 2.01, should be compatible with the newer REFramework Nightly878 build on Nexus, should you prefer to use that. It should also continue to work after the REFramework bug is addressed.
Would a change like this work? re.on_draw_ui(function() if imgui.tree_node("Private Hot Spring") then if imgui.tree_node("Whitelisting") then local changed, newText = imgui.input_text("##NPC_Whitelist_Input", inputTextBuffer, 256, imgui.InputTextFlags_EnterReturnsTrue) if changed then inputTextBuffer = newText end if imgui.button("Add to Whitelist") then if inputTextBuffer ~= "" then table.insert(config.spawhitelist, inputTextBuffer) json.dump_file(configfile, config) inputTextBuffer = "" end end
Idk, I suck at coding lol Speaking of, would you be able to alter your script so the NPC whitelist applies everywhere in the world, and not just in the spa?
I believe it would be functional, if that's what you're asking. There's a bit of excess, but in the end it looks like it would have the same result as the script in the current version with the exception of not allowing empty strings to be submitted to the whitelist, which this mod does currently allow (not for any particular reason, there's just no filter at all on the input, I'd like to add character name validation eventually as a nice QOL feature to detect typos but it's not a priority at the moment).
Technically yes, that could be done, though I don't think doing so would be a good idea given the differences in scale. I'm assuming this has to do with your mod request in the Modding Haven Discord, so I'll weigh-in there as I'd rather not cloud blackzro's inbox with notifications unrelated to their post.
There are a few obstacles to doing so, but the biggest is just not having a way to directly despawn certain NPCs. If I or someone else figures out a way of doing it then I'll come back to this.
Killing them is actually rather easy, there exists a function specifically for it. However, this leads to a pile of bodies in the water. It might be fine if this were a one-time thing, but in addition to the named NPCs the game often randomly generates NPCs to populate the hot spring. As a result, the pile of bodies would be a regular occurrence.
I've developed a few ideas on blocking individual NPC spawns, so hopefully a whitelist implementation will be coming soon.
Wow, just imagine running gold cheat codes with private hot springs and nude mods. Gotta love having an endless pocket like imperialistic opportunists even in a medieval fantasy world, depriving labourers of a well deserved relaxing experience when they need KEK
For all the perverts, remember to treat your AI servant with respect. Remember kids, FBI is ALWAYS watching you in the freest and best country in the world, of the whole world. Cheers
I really enjoy this but I was not aware it took all your pawns out as well so it was just me in there lol is there a way where it just gets rid of the random NPC's and leaves your pawns in the hot spring?
Pawns should be in the hot spring as well, I'm not sure what would prevent that from happening as it has not occurred to myself. This mod alters variable limits which determine how many NPCs can be spawned in, and shouldn't touch anything related to pawns.
If you're running any other mods, could you provide me a list?
You may also try the new version, 1.11. I wouldn't expect much difference as it functions the same basic way, but applies it in a more performance-friendly manner.
Possibly. There's no easy way of doing it and it would require a reverse-engineering of the function call that takes place when entering the spa. I personally play an all-female party, so it's not very high on my list. I may look into it in the future, but my primary focus in regards to this mod at the moment is understanding the spawn system with the goal of implementing the ability to whitelist NPCs.
30 comments
Has there been an update since the last release of this mod that would break it?
Would you be willing to try the 1.12 file and tell me if that has any effects?
I've taken a quick look at it and identified a few issues the game's updates have caused. The primary problem is that two of the three game methods the mod relied on to trigger functionality are no longer viable, one due to NPC optimizations, the other due to compiler optimizations.
I intend on coming back to it when I have more time available, but for now I've uploaded a quick 1.13 version that should prevent NPCs from being in the hot spring. This unfortunately lacks any of the whitelisting the 2.00+ version did while simultaneously being more performance-intensive than the 1.12 version, though it shouldn't be an issue for any computer that can run the game decently in the first place.
Thank you for the update.
I accidentaly entered the hot springs while the script was running and nobody spawned except my pawns. I read in the description that you should disable the script before entering, you do that from script runner tab, right? sorry i'm new to mods, I'm not sure when i need to enable it.
Also, are all white listed npcs supposed to spawn automatically together in the hot spring or is that up to chance? I would appreciate any help in clarifying, even step by step of when to disable it in order to make it work.
Leave the script enabled, ideally it should never be disabled. You can tell whether a script is enabled or disabled under the "ScriptRunner" tab of REFramework, enabled scripts will have their box checked.
When the script is running, its effect is that it will prevent NPCs from being present in the hot spring at all, leaving just you and your pawns. Whitelisted NPCs are able to bypass this and spawn regardless, but it does not guarantee their presence. They will only be there if they were there naturally.
The disclaimer in the description is due to the way the mod works. When you enter the hot spring, all NPCs in the spring not in the whitelist will have their spawning disabled. Their spawning is then re-enabled when you leave the hot spring. If the spring were to be entered with the mod turned on, then the mod turned off while in the spring and the spring exited, those NPCs would not have their spawning re-enabled. This is a potential game-breaking issue due to visiting NPCs. Theoretically, it should fix itself if the spring were re-entered and left due to a system I put in specifically to protect against behavior like this, but it's still better to instruct people not to do it since there does exist a risk.
tried your mod.
can't write anything into typebox.
soon as i click the box, the box deactivates. clicking the typebox again, it deactivates again.
if you need logs, i can give you, so plz tell me.
yes, my reframework is up to date.
tell me if you want this to be in bugs section. i'll cut this whole thing and paste it into bugs section.
In the meantime, you may wish to downgrade to the Nightly802-bugfix build of REFramework for use with this mod, which was before this bug was introduced. It can be downloaded under the "Old Files" section of REFramework's DD2 page, found here.
re.on_draw_ui(function()
Idk, I suck at coding lolif imgui.tree_node("Private Hot Spring") then
if imgui.tree_node("Whitelisting") then
local changed, newText = imgui.input_text("##NPC_Whitelist_Input", inputTextBuffer, 256, imgui.InputTextFlags_EnterReturnsTrue)
if changed then
inputTextBuffer = newText
end
if imgui.button("Add to Whitelist") then
if inputTextBuffer ~= "" then
table.insert(config.spawhitelist, inputTextBuffer)
json.dump_file(configfile, config)
inputTextBuffer = ""
end
end
Speaking of, would you be able to alter your script so the NPC whitelist applies everywhere in the world, and not just in the spa?
Technically yes, that could be done, though I don't think doing so would be a good idea given the differences in scale. I'm assuming this has to do with your mod request in the Modding Haven Discord, so I'll weigh-in there as I'd rather not cloud blackzro's inbox with notifications unrelated to their post.
Love this already, though.
There may be a way to apply 99999 damage to those specific NPCs.
I've developed a few ideas on blocking individual NPC spawns, so hopefully a whitelist implementation will be coming soon.
For all the perverts, remember to treat your AI servant with respect. Remember kids, FBI is ALWAYS watching you in the freest and best country in the world, of the whole world. Cheers
If you're running any other mods, could you provide me a list?
You may also try the new version, 1.11. I wouldn't expect much difference as it functions the same basic way, but applies it in a more performance-friendly manner.