Jump to content

iamzip

Members
  • Content Count

    11
  • Joined

  • Last visited

About iamzip

  • Rank
    Member

Recent Profile Visitors

146 profile views
  1. Well, after trying about 250 iterations of slotMask and none of them affecting the face / head, and considering what updatetintmaskcolors does to the overlay colors, I think I'm just going to leave skin change options out for now.
  2. I'm looking for the best way to dynamically apply skin tints to the player. I've come across two ways that seem to work, the first is Game.SetTintMaskColor followed by Game.UpdateTintMaskColors(), and the second is through NiOverride's AddSkinOverrideInt. Using the Game functions works reliably, however calling it too many times in rapid succession seems to screw up everything else I have going on, which is dynamically updating colors on overlays. In trying to move away from the Game functions I'm having difficulty figuring out the skin overrides. The function I'm using in NiOverride is: Function AddSkinOverrideInt(ObjectReference ref, bool isFemale, bool firstPerson, int slotMask, int key, int index, int value, bool persist) native global I understand everything in here except for slotMask. I can't seem to find a table for what value to use per body area and my experimentation so far has yielded very mixed results. I initially tried using the body parts from the CK, so 32 for body, etc, but that didn't work. I've found a ton of numbers that will change skin tone of the body slot with armor and the feet slot with armor. These are also kind of odd because with some of them if you're not wearing armor in that slot then it moves to another slot and changes that slot's skin. I have yet to find a number that changes the hands slot first, with armor. With no armor on at all then some slotMasks will update all slots except face. I also have not been able to find a way to change the face tint at all. So my questions are, am I going in the wrong direction pursuing the NiOverride function here? Does anybody have a list of slotMasks that I can use to hone in on the ones I need? Is there a way to update the face tint in a similar way? Looking through NiOverride there's a way to revert head overlays, but no function I've seen that changes the head overlay in the first place.
  3. That explains it, I was under the impression the data would be available at any of the animation events, didn't occur to me to try earlier hooks. Thank you. And for the logic, looks like some of my functions were entirely wrong. Frustration
  4. I'm working on a mod that as one of my options tracks some very basic sex data, specifically the number of "people" and the number of "creatures" the player has encounters with. On its face it seems like it should be really easy but I can't seem to get any variation of scripting to work. I started referencing the SexLabFramework script using Hook animation events and getcontroller, which looks like this: However at the end of any event it triggers but the number is always 0 for numActors and creaturecount. I even tried copying other people's script segments that used the deprecated code, which looked like this: But this still doesn't result in anything but 0s in the output. Could somebody point me to what I'm missing? Barring this for some reason, is there a basic stat in SexLab that I could poll instead of tracking it myself? Thank you for any help.
  5. Thank you for this, once I wrap my head around this stuff it should clean things up a lot.
  6. For posterity, in case somebody else has too many MCM options for states, after some research and digging through a few scripts I was able to get all of my options using the MCM events and without resorting to OID spam. Updated script attached, significantly reduced line count too. I agree on JContainers and now that I have a better handle on scripting I might go back and see if I can implement that, but when I first looked into them I couldn't make sense of how they worked. Also totally agree on not splitting MCMs, I have so many in my LO already I don't feel my stuff is so important that it should take 2 slots. zao_menu_script.psc
  7. One of the workarounds in the linked thread has promise, using while loops in the events to use getstate() as If gates instead of as actual states. Every script I looked at to try to understand how to do what I'm trying defined each state rather than using while loops so it didn't occur to me to treat the MCM events just like any other event. I'm going to give that a shot when I get time.
  8. https://forums.nexusmods.com/index.php?/topic/6111118-splitting-mcm-menu-into-multiple-smaller-scripts/page-1 I found this in my search, given the number of options I'm presenting I suspect this is my issue, despite the error messages not matching. I'll have to give the listed solution an attempt once I figure out the optionID method.
  9. If I try to add the script it says: script "zao_menu_script" had errors while loading, it will not be added to the object. If I try editing it in an already attached quest it says: Error encountered while attempting to reload the script. If I then remove a few of the state definitions it starts working again. In either case it compiles fine.
  10. I actually an not using the CK to write or comple either, and even compiling in the CK works ok when I checked that. The issue comes up when I try to attach or edit an already attached instance of the script, I get the error saying the script failed somehow and won't be attached. I've tried offloading some of the non-state functions but adding more states for the MCM still causes the error to pop up. Is there a limit on how many states I can set up in a single script? And is it possible to offload state definitions to a sub script?
  11. I'm working on my first scripted mod, dynamically altering racemenu overlay colors based on a variety of selectable factors, and I'm running into an issue. My MCM script is getting huge and I've hit some kind of limit when adding all the state option definitions. I get to a point where if I add more lines of code, or maybe character limit, I get an error in the CK saying that the script was unable to load, even though it compiles fine. Am I missing something about a character limit or a lines of code limit somewhere? Is it possible to offload state definitions to secondary scripts? For reference I've attached what I have so far for the MCM script. Thank you for any help, I'm very new to scripting. zao_menu_script.psc
×
×
  • Create New...