|
Post by perturbed on Mar 20, 2012 4:40:09 GMT
I have an NPC replacement script that uses a script, placed on imperial guards, to replace the vanilla guard with an improved guard if a Random100 roll exceeds 50, meaning that once I enter a cell with a guard in it, the guard has a 50% chance of spawning a new guard using a PlaceAtMe command, disabling itself, and then importantly, deleting its own reference from the construction set because I don't want their scripts to keep firing if they won't be around.
I've noticed that my new guards have disappeared from towns after I've been away for a while. I'm guessing this is the 72-hour bug, and caused by the fact that my new guards have no explicit references in the constuction set, but are instead placed by a script.
Is this a correct assessment, and if so can I fix the problem simply by checking "corpses persist" on the new guards, while getting rid of any of their corpses by using a "Disable command" triggered a fixed time after OnDeath == 1?
|
|
|
Post by Emma on Mar 20, 2012 9:51:06 GMT
I'm really rusty at Morrowind modding now, but your assumption that this is the 72 hour cleaning feature kicking in (I know we used to call it a "bug" but, really, it's more of an asset as it takes care of all ai-hickups). I'm not sure if "corpses persist" would be enough to fix the issue; have you considered using an activator instead? Also, don't you get a horrible lag when doing this on cell change? I remember we initially used cell change for enabling/disabling children of morrowind, but eventually decided that LOS worked a lot smoother, without any notable hiccups with cellchange, and without any major fps-hits. I think there is something I don't understand here, because from what I understand, every guard will eventually be replaced, and therefore I don't understand why you not simply put them in the cells and then enable them over time. (Again, I think it is something I'm missing and that your strategy probably is well thought out .
|
|
|
Post by blockhead on Mar 20, 2012 11:49:31 GMT
Been a while since I modded Morrowind (which is a shame) but aren't most guards actually instances of items on a leveled list? If you wanted a random mix of "regular" guards and your more powerful guards, maybe just add your guard to the existing leveled list object? This would probably work cleaner than messing about with scripts, though I expect this way would only take effect when starting a new game.
|
|
|
Post by perturbed on Mar 20, 2012 17:20:24 GMT
There is no leveled list for guards. The construction set editor simply places about 90 or so instances of a generic "imperial guard" throughout Morrowind. What I do is attach a script to this "imperial guard" that runs only once on each guard and gives a 50% probability of replacing it with a new guard having different stats and randomly generated faces and hairs. Once the script fires for the first time it will not fire again, so guards who do not replace themselves will not try again. This eliminates any cell change lag as each script on a guard (at most about 5 in a cell) only runs for a single frame and never runs again.
|
|