Leodriz Posted March 11, 2022 Share Posted March 11, 2022 Hi, First of I'm new to scripting with Creation Kit (SSE) and I'm serching the net for tips end examples. I have managed to get a few simple scripts to work and i move along with a slow pace. At the moment I´ld like to play around a bit with body morphs. More specifically I want to change the waist of an actor when equipping a corset. I found a few examples that uses nioverride.setMorphValue. However, when i try it i get the following messages from the compiler"D:\Sexlab\Stock Game\Data\Source\Scripts\temp\tokrSetBodytest.psc(9,2): variable nioverride is undefinedD:\Sexlab\Stock Game\Data\Source\Scripts\temp\tokrSetBodytest.psc(9,13): none is not a known user-defined type" I take this as if i don´t have the requiured bsa-files loaded in CK, or maybe that i need to define mi on variables. Problem is i can´t find any help on how to call functions from NiO or RaceceMenu or whatever is needed. I can´t find whad mods to use or what the commands in these mods are. Can anyone point me to a site with information about this? Or even give a few pointers on how to proceed?Maybe OnEquip isn't the best way to go either, but thats what i managed so far. Example of code belowI use RaceMenu and 3ba. Scriptname tokrSetBodytest extends ObjectReference float waist = 75.0 ;Comment (yeah, Ihave no ide what numbers are appropiate here) Event OnEquipped(Actor akActor) nioverride.setMorphValue(akActor, waist, "Waist")nioverride.setMorphValue(akActor, -waist*1.50, "WideWaistLine")nioverride.setMorphValue(akActor, -waist*1.50, "ChubbyWaist")nioverride.setMorphValue(akActor, -waist*2.00, "Back")nioverride.setMorphValue(akActor, -waist, "BigBelly") endEvent Link to comment Share on other sites More sharing options...
anjenthedog Posted March 11, 2022 Share Posted March 11, 2022 I don't know how, but you might get some insight from ABBA (source folder in the archive file) or one of the other existing mods that alters body settings based on an "external" stimulus. (download from Lovers lab, fwiw). ABBA doesn't adjust waist size afaik, but it adjusts several "racemenu-y" elements, so I expect the "mechanics" are the same in each case. ABBA's source contains just shy of 100 source files, so hopefully one will provide the answers you need. And specifically, as much as I can tell from the file names:ABBA_Morph.pscABBA_MorphMgr.pscABBA_PlayerClothScript.pscABBA_ButtUtil.psc But I'm just guessing best wishes. Link to comment Share on other sites More sharing options...
Leodriz Posted March 12, 2022 Author Share Posted March 12, 2022 I have tried looking at other scripts like that. Like Breast enlargement rings and Devious body alterations etc. I find a lot of scripts where they use NiOverride.xxxx, but nowhate can I see them defining or importing the NiOverride variable. :sad:They just put in a code much like i did like: -----Function ABBA_ApplyOverlay(Actor akTarget, Bool Gender, String Area, String OverlaySlot, String BuzzTexture, Float Alpha) GlobalString Node = Area + " [ovl" + OverlaySlot + "]"Float incrplus = (Alpha / 20)Float Current = 0.0If !NiOverride.HasOverlays(akTarget)NiOverride.AddOverlays(akTarget)EndIfNiOverride.AddNodeOverrideString(akTarget, Gender, Node, 9, 0, BuzzTexture, TRUE) ;textureNiOverride.AddNodeOverrideInt(akTarget, Gender, Node, 0, -1, 0, TRUE) ; emmisive colourNiOverride.AddNodeOverrideFloat(akTarget, Gender, Node, 1, -1, 1.0, TRUE) ; emmisive mult NiOverride.AddNodeOverrideFloat(akTarget, Gender, Node, 8, -1, Current, TRUE) ; alphaNiOverride.ApplyNodeOverrides(akTarget) While (Alpha > Current)NiOverride.AddNodeOverrideFloat(akTarget, Gender, Node, 8, -1, Current, TRUE);Utility.Wait(0.1)Current += incrplusEndWhile EndFunction------------ or----------if MCMValue.breast == 0setMorphValue(dba_Player, 0.0, "BreastsFantasy")setMorphValue(dba_player, 0.0, "BreastsSmall")setMorphValue(dba_player, 0.0, "BreastPerkiness")setMorphValue(dba_player, 0.0, "NippleLength")elsefloat breast = (breasttime * MCMValue.breast / 10000) ;slider muliplied by factionrank is maxed at 10000setMorphValue(dba_Player, breast, "BreastsFantasy")setMorphValue(dba_player, -breast, "BreastsSmall")setMorphValue(dba_player, breast*0.25, "BreastPerkiness")setMorphValue(dba_player, breast*0.5, "NippleLength")endif dba_player.setFactionRank(MCMvalue.dba_Breast, breasttime as int)if MCMValue.debuglogenabledDebug.trace("DBA: Breast morph set. Breasttime=" + breasttime)endif------------- (this one doesnt eaven have the NiOverride before the function setMorphValue)But nowhare can i find where they define or import NiOverride Link to comment Share on other sites More sharing options...
anjenthedog Posted March 15, 2022 Share Posted March 15, 2022 I lack the terms to explain properly (ie in direct "coder" language), but direct use of the NiOverride functions in your second example can be dependent on how the script is opened. One way, you have to call the module first and then refer to its included functions (your first example, a very traditional C language or Pascal tactic for addressing classes), and in the other you can just call the functions (lazy) as if they'd been declared in your script (your second example). I have no idea how that's accomplished in this code mash (Skyrim is what, C++, javascript, and a few others all mashed together?), but I used both in Ruby on Rails (situationally dependent use) in the past to handle various things, back before I left the programming world behind. Maybe do a widenet search for "<the language this is done in...> aliasing classes" or using whatever proper terms should be included(it looks sorta like C to me, or any number of other OO languages. It's all a blur to me) or "adding NiOverride to skyrim scripts" Also have a look at the source for NIOverride maybe? Sometimes the repos include 'how to use' and related docs that can reveal details I found this, which (*might provide some useful info...idk....guessing.) https://github.com/Rukan/Grimy-Skyrim-Papyrus-Source/blob/master/NiOverride.psc good luck! Link to comment Share on other sites More sharing options...
Recommended Posts