CountFuzzball Posted March 27, 2013 Share Posted March 27, 2013 Been trying to hack the 'Mesmetron and enslavement fixes' http://fallout3.nexusmods.com/mods/15795 mod. Dunno if the original author is around, so I figure I'd try and fix some bugs in it myself. I'm running into a problem though, in the scripteffectfinish block of the slavecollar script, if the enslaved npc runs to another cell while traveling to paradise falls, he gets transported directly to the slavehouse cell (pfallsslavehousemarker), which is all well and good: But, in the scripteffectupdate block, there's a check to see if the slave is in the pfallhouse cell for more than a day and then kills/moves him to another cell if he is. From what I've read, scripteffectstart/update/finish blocks only are run when the PC is in the same cell as the object itself.. now as the PC can't normally enter the slavehouse without killing/stealing from the slavers, the script would never get run (i think?). Any workarounds for this? In truth, I'm trying to fix this annoying bug where if i enslave a respawning npc, they respawn 24 hours later in their original place and run back to PF again, not sure if the above is related to it. :S I'll get some files/code snippets up soon. Link to comment Share on other sites More sharing options...
CountFuzzball Posted March 28, 2013 Author Share Posted March 28, 2013 (edited) But, in the scripteffectupdate block, there's a check to see if the slave is in the pfallhouse cell for more than a day and then kills/moves him to another cell if he is. From what I've read, scripteffectstart/update/finish blocks only are run when the PC is in the same cell as the object itself.. now as the PC can't normally enter the slavehouse without killing/stealing from the slavers, the script would never get run (i think?). Any workarounds for this? Ok, so after some googling and chatting in the chatroom, I came across this: http://cs.elderscrolls.com/index.php/Script_Processing, which I think answers my above question about scripteffect blocks. As for a workaround, the code itself in the scripteffectfinish block, if it's a generic npc (not any of the ones for the 'strictly business' quest), sends the npc to a marker object/reference in the PFallsSlaveHouse cell, so maybe creating a new marker in the Paradise Falls interior cell (with the slave pens/bar etc) and telling the npc to move there might just work too? At the very least, I guess, that cell might be visited more often by the player than the slavehouse cell (want to try and avoid a scenario of having like 10 npcs stuck in the slavehouse until the player visits it! But I might be making a mountain out of a molehill). I've also had a love/hate relationship with getting actions working at specific times, so I may just be impatient, but I can't seem to get the following to work (and this is in a scripteffectupdate block in the MS13CollarEffectScript): ; Only remove the slave once they've hung out in Paradise Falls for a day if arriveDay != 0 && ((( GameDaysPassed - arriveDay >= 1 && ( GameHour >= arriveHour))) || MS13Slaves.slaveArrived == 0) RemoveItem MS13Collar 1showmessage ADebugslave1 KILL ;DISABLE moveto FFEnclaveEncampmentMasterREF ;-- Just stash the body somewhere if/until they respawn ;CastImmediateOnSelf LaserDisintegrationFXSpell endif arriveDay and arriveHour are set to the game's current day and hour, but they don't seem to make the above code run. Could be due to the fact this is a new game, so gameDay is still 0 or something. :/ Edited March 28, 2013 by CountFuzzball Link to comment Share on other sites More sharing options...
CountFuzzball Posted March 29, 2013 Author Share Posted March 29, 2013 (edited) Ok, so I've narrowed this down to two main bugs in the script/engine. On a side note, I created a work around for the 'slave won't disappear' bug, so it looks like this: ; Only remove the slave once they've hung out in Paradise Falls for a day if MS13Slaves.arriveDay > 1 && getInCell PFallsSlaveHouse == 1 ;&& ((( GameDaysPassed - arriveDay >= 1 && ( GameHour >= arriveHour))) || MS13Slaves.slaveArrived == 0) RemoveItem MS13Collar 1 KILL ;DISABLE ;moveto FFEnclaveEncampmentMasterREF ;-- Just stash the body somewhere if/until they respawn ;CastImmediateOnSelf LaserDisintegrationFXSpell set doonce to 0; in case they respawn endif The moveto needs to be uncommented, but I'll get around to that when I've made sure this works exactly the way I want it to. Anyway, onto the 2 issues I'm having: 1. An enslaved NPC that leaves the cell a player is in (and unloads from memory) is supposed to be sent to the pfallsslavehouse afterwards, but if I sleep/wait for any time at all, and then go to the slavehouse, they simply don't appear no matter how long I wait, same thing happens if I visit Grouse. Respawning NPCs also have the strange habit of respawning after waiting, still with collar on and run off to PF again, if I'm in the same cell. :S The NPC, is assigned the package 'MS13TravelToParadiseFalls' and then assigned a package 'MS13Enslaved' (if they either leave the cell the player is in, or reach the slavehouse), which just has them wandering the slavehouse (is supposed to, but they sometimes leave, which could be a related bug). 2. Due to the way the scripteffectfinish is run when an enslaved npc leaves the current cell, a bunch of variables get changed and so it makes grouse think the player has caught 2 slaves and goes through his whole 'we got those slaves you sent us' speech again. :S Any help on this would be appreciated, been scratching my head about it over the past few days. Edited March 29, 2013 by CountFuzzball Link to comment Share on other sites More sharing options...
CountFuzzball Posted April 16, 2013 Author Share Posted April 16, 2013 (edited) 1. An enslaved NPC that leaves the cell a player is in (and unloads from memory) is supposed to be sent to the pfallsslavehouse afterwards, but if I sleep/wait for any time at all, and then go to the slavehouse, they simply don't appear no matter how long I wait, same thing happens if I visit Grouse. Respawning NPCs also have the strange habit of respawning after waiting, still with collar on and run off to PF again, if I'm in the same cell. :S The NPC, is assigned the package 'MS13TravelToParadiseFalls' and then assigned a package 'MS13Enslaved' (if they either leave the cell the player is in, or reach the slavehouse), which just has them wandering the slavehouse (is supposed to, but they sometimes leave, which could be a related bug). 2. Due to the way the scripteffectfinish is run when an enslaved npc leaves the current cell, a bunch of variables get changed and so it makes grouse think the player has caught 2 slaves and goes through his whole 'we got those slaves you sent us' speech again. :S Any help on this would be appreciated, been scratching my head about it over the past few days. Bump. Ok, after doing a bit of googling and lurking in the chatroom, I found that checking if the npc has arrived and then adding an item token when they have if they don't have it, solves the problem of constantly being given money by Grouse. 1 bug squished! Now the 'packages bug' can be pretty funny sometimes. Using my unwilling test subject, Mr. Burke, I've found the packages can be incredibly erratic at times for generic npcs. Case in point: I enslave Burke, let him leave my cell (and unload so he gets moved straight to the pfallsslavehouse cell) and I then traveled from Moriarty's Saloon to Megaton's entrance where Deputy Weld is and then player.coc to pfallsslavehouse, Burke is there running the enslavement package (as he should be). Now if I do the same thing, but wait an hour, Burke is no-where to be found in the slavehouse, but rather running about in the wasteland, doing his TravelToParadiseFalls package. The most annoying thing is that none of the other npcs for the strictly business quest exhibit this behaviour, they all stay put in the slavehouse (both quest and generic npcs apart from Red I think, use the same MS13Enslaved package to stay put in the slavehouse). By the logic of characters picking up other packages due to re-evaluation, even Susan Lancaster should be traveling back to Tenpenny Tower to go about her daily routine, but I can't tell why this isn't happening. Edited April 16, 2013 by CountFuzzball Link to comment Share on other sites More sharing options...
Recommended Posts