prideslayer Posted June 8, 2012 Posted June 8, 2012 I've gone over a bunch of methods of setting actor properties, and haven't found any that seem to be both good, easy to implement, and persistent across saves. It occured to me however that spells do satisfy all of these features. I want to see what you other modders think of this approach, with a concrete example as a way of handling something simple that does need attention: actor sexual orientation. My thought right now is to create three spells: setActorStraight, setActorGay, setActorBi. The spells would have no actual effect of their own, but would persist on the actor indefinitely. Initially the actors would have no spell on them, meaning their preference is currently unassigned. Assigning the preference would be as simple as casting the spell on them, which would dispel any contrary spells, and then "just sit" there. Checking for orientation would be done with one to three calls to IsSpellTarget on the actor. This would work fine in dialog conditions as well, and is much simpler than the current formlist implementation. Spells on actors do persist across saves. So, thoughts on using this for orientation as well as other custom actor values and properties? I'm not aware of any performance issues of having a bunch of active spells, so long as they don't actually do anything in their gamemode or effectupdate scripts.
jaam Posted June 8, 2012 Posted June 8, 2012 It does provide with actor values attached to REF, where list are only practical with baseForm so that's a plus. On the other hand, I would be surprised if it does'nt have any effect on performance if generalized. Someone should test. (I can't this weekend I'm afraid). About list persistence, I seem to remember something in the FOSE or NVSE thread(s) about AddFormToFormList (vanilla) being persistent, where ListAddForm (NVSE) not. The actor value I would really need though are Reference as actor value. I haven't found any way to do it without a plugin.
Halstrom Posted June 8, 2012 Posted June 8, 2012 UmmI'm currently using spells to hold the scripts on pregnant NPC's and having trouble with the scripts reseting on them if tthey are away from the player, might be something I'm doing wrong, but something to checkout before jumping in to using them
prideslayer Posted June 8, 2012 Author Posted June 8, 2012 Hmm, thanks Halstrom. Hadn't thought that the engine might ditch them if they go 'out of range', but it could just be stopping and starting them, effectively pausing them while the target is far away. Jaam, both form functions should work fine. It's the object cloning and stuff that won't persist across saves IIRC, but I've been away for a while and may not be remembering. Assigning refs and other arbitrary values is something we all want, and in fact, the extender can already do this, right now. However, its data cannot persist across saves at present, because NVSE lacks the save/new/load hooks that OBSE has. I asked the NVSE team about this a while back and they said it was just never put in due to lack of demand, and that they were busy with SKSE at the moment. I asked again yesterday if they think they could find the time to get those hooks in place. Once they are in place, you will be able to use the existing NX array functions to store whatever you want to. The arrays are internally stored as maps (hashes in php/perl parlance) so any sort of key is acceptable, meaning you could use the refID as the key into the array, and store any values you want. I explain this in more detail in the extender thread.
jaam Posted June 8, 2012 Posted June 8, 2012 I remember your extension. I'm just not very optimistic about ianpatt availability... As for lists, I thought they all persisted until I found out that SexoutBrutalRapers list of unsafe cells got emptied on every game load! On the other hand, I think that SexoutOrientationExpress default NPC lists modification are persistent. Never took the time to do a "scientific" demonstration of my findings though. On the point raised by Halstrom: A) non scripted spells should persist. That can cover state actor value at least. object (and spell?) scripts are purposedly paused by the engine on "inactive" actors for optimisation purpose. The only scripts that are permanent are Quest script, which are horrible to use for actor value. The overall "perfect" solution are Prideslayer NX arrays, except they don't persist yet!
prideslayer Posted June 8, 2012 Author Posted June 8, 2012 Actually, to be honest, the NX situation is even worse than that. They don't persist across game restarts, which is the problem we all want solved. They DO persist across loads and saves, but not in the way you want. If you set one right now, and the player loads the game, it remains set to whatever it was before -- since I don't know they loaded a new game! So some of you nutty modders might have a use for that anyway.. you can set a state now, and three hours from now it will still be there, no matter how many saves, loads, and new characters the player has gone through during that session.. *facepalm*
KainsChylde Posted June 10, 2012 Posted June 10, 2012 They DO persist across loads and saves' date=' but not in the way you want. [/quote'] "Modder Prideslayer made headlines today, but not the good kind like you'd want." Mad props if you get the reference. And now back to your regularly scheduled thread.
prideslayer Posted June 10, 2012 Author Posted June 10, 2012 Before opening this, understand one thing: Adult Swim.
KainsChylde Posted June 10, 2012 Posted June 10, 2012 And yet another reason Prideslayer is one of the coolest mofo's on this site.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.