Guest ffabris Posted May 7, 2016 Posted May 7, 2016 Ok good... additive works best, for my purposes: add on whatever inflation I apply, to anything applied by other mods, or manually. Follow-up questions: Presumably if this is new mod, then I have no use for the "oldModName" param in the function call, right? Are there functions to set calculation_type and inflation_type? Doesn't seem so. Is there a fast way to remove all applied transforms? Support for muscles? Though that may be specific to some bodies, like SAM. Dunno. In RaceMenu, I see forearm, calf, and a few others that alter muscle size (or perhaps just scale the node in 2 of the 3 directions).
qotsafan Posted May 7, 2016 Author Posted May 7, 2016 Ok good... additive works best, for my purposes: add on whatever inflation I apply, to anything applied by other mods, or manually. Follow-up questions: Presumably if this is new mod, then I have no use for the "oldModName" param in the function call, right? Are there functions to set calculation_type and inflation_type? Doesn't seem so. Is there a fast way to remove all applied transforms? Support for muscles? Though that may be specific to some bodies, like SAM. Dunno. In RaceMenu, I see forearm, calf, and a few others that alter muscle size (or perhaps just scale the node in 2 of the 3 directions). Yes, "oldModName" is only needed to remove old transformation node scales. calculation_type and inflation_type are set via my mcm menu by the user. At the moment no, the best way would be to inflate the node with 0. If I am missing any nodes, please tell me, I will add nodes by demand.
Guest ffabris Posted May 7, 2016 Posted May 7, 2016 Btw, thank you for the fast replies! Very much appreciated! Missing nodes ... I don't know the internal names. They show for me in RaceMenu, but I cannot find them in the source. Muscles are not vital for me, but rather a "nice to have", so I'll hunt more later on. I have looked in source for SAM, XPMSE and RaceMenu, but not found anything. I'll look again. That's all for the moment. Jumping back into quest scripting. I'll have another go at SLIP once you update.
qotsafan Posted May 7, 2016 Author Posted May 7, 2016 Btw, thank you for the fast replies! Very much appreciated! Missing nodes ... I don't know the internal names. They show for me in RaceMenu, but I cannot find them in the source. Muscles are not vital for me, but rather a "nice to have", so I'll hunt more later on. I have looked in source for SAM, XPMSE and RaceMenu, but not found anything. I'll look again. That's all for the moment. Jumping back into quest scripting. I'll have another go at SLIP once you update. Yeah, finding the nodes, you would have to basically look at a whole bunch of nif files, the ones I have got, are the ones I have found so far. About the update, apparently loverslab considers me uploading some kind of threat, so I'm not sure, when I will be able to upload.
qotsafan Posted May 7, 2016 Author Posted May 7, 2016 How odd! Ask Ashal about it. I am, I have sent him a pm.
Guest ffabris Posted May 7, 2016 Posted May 7, 2016 Oh I almost forgot .... please consider using JsonUtil to make settings persist across new games. (Settings only, of course, not accumulated inflation values.) Yes, I guess I am a pest.
jackjackjohn Posted May 7, 2016 Posted May 7, 2016 This mod is a great idea! Anxiously waiting soulgem over 3 support, then i'll definitely give it a go. Currently struggling with exactly what this helps with, PSQ and Estrus Chaurus and SGO 3 all fighting for control.
qotsafan Posted May 8, 2016 Author Posted May 8, 2016 Oh I almost forgot .... please consider using JsonUtil to make settings persist across new games. (Settings only, of course, not accumulated inflation values.) Yes, I guess I am a pest. No, not at all, that is actually a good idea. This mod is a great idea! Anxiously waiting soulgem over 3 support, then i'll definitely give it a go. Currently struggling with exactly what this helps with, PSQ and Estrus Chaurus and SGO 3 all fighting for control. PSQ and Estrus Chaurus and SGO 3 shouldn't actually be fighting, since they all use NiOverride. My mod makes sure that all mods use the same scaling technique, but does the scaling slightly different than NiOverride does and provides an mcm menu, with values, options, toggles, etc. Soulgem Oven 3 should be compatible with my mod, since my mod also uses NiOverride, patch on hold at the moment.
jackjackjohn Posted May 8, 2016 Posted May 8, 2016 Oh I almost forgot .... please consider using JsonUtil to make settings persist across new games. (Settings only, of course, not accumulated inflation values.) Yes, I guess I am a pest. No, not at all, that is actually a good idea. This mod is a great idea! Anxiously waiting soulgem over 3 support, then i'll definitely give it a go. Currently struggling with exactly what this helps with, PSQ and Estrus Chaurus and SGO 3 all fighting for control. PSQ and Estrus Chaurus and SGO 3 shouldn't actually be fighting, since they all use NiOverride. My mod makes sure that all mods use the same scaling technique, but does the scaling slightly different than NiOverride does and provides an mcm menu, with values, options, toggles, etc. Soulgem Oven 3 should be compatible with my mod, since my mod also uses NiOverride, patch on hold at the moment. I'll give it a shot then
Guest ffabris Posted May 8, 2016 Posted May 8, 2016 \o/ update. :-) Glad you got the upload issue sorted, whatever it was. I'll reintegrate into my mod, then test, see how it goes.
Guest ffabris Posted May 8, 2016 Posted May 8, 2016 OK, confused ... ;/ Function to the remove the certain node by key from the actor kActor: the actor to remove the node from modName: the keyword you chose for your mod (has to be unique and with blanks in between words, since this is needed for my mcm menu) sKey: the respective key for the node to be removed index (optional): the index of the node in the "slif_node_list", which is the same as the one in the "slif_key_list" you can get the node like this: StorageUtil.StringListGet( none, "slif_node_list", index) you can get the key like this: StorageUtil.StringListGet( none, "slif_key_list", index) example: StorageUtil.StringListGet( none, "slif_node_list", 0) = "NPC L Breast" StorageUtil.StringListGet( none, "slif_key_list", 0) = "slif_left_breast" (see the SLIF_Menu script for the whole lists) /; Function RemoveNodeScale(Actor kActor, string modName, string sKey, string node = "") global There is no index param, but instead a node ... how is that different from key? Basically what I want is a function which will revert any scaling I applied. Also, in SetNodeScale (which I am not calling directly, but...), why does a value of 1.0 remove all scaling?
qotsafan Posted May 8, 2016 Author Posted May 8, 2016 OK, confused ... ;/ Function to the remove the certain node by key from the actor kActor: the actor to remove the node from modName: the keyword you chose for your mod (has to be unique and with blanks in between words, since this is needed for my mcm menu) sKey: the respective key for the node to be removed index (optional): the index of the node in the "slif_node_list", which is the same as the one in the "slif_key_list" you can get the node like this: StorageUtil.StringListGet( none, "slif_node_list", index) you can get the key like this: StorageUtil.StringListGet( none, "slif_key_list", index) example: StorageUtil.StringListGet( none, "slif_node_list", 0) = "NPC L Breast" StorageUtil.StringListGet( none, "slif_key_list", 0) = "slif_left_breast" (see the SLIF_Menu script for the whole lists) /; Function RemoveNodeScale(Actor kActor, string modName, string sKey, string node = "") globalThere is no index param, but instead a node ... how is that different from key? Basically what I want is a function which will revert any scaling I applied. Also, in SetNodeScale (which I am not calling directly, but...), why does a value of 1.0 remove all scaling? Yeah, the documentation for index is wrong (copy-paste I guess ) example: sKey = "slif_left_breast" node = "NPC L Breast" keys are defined by my mod nodes are defined by NetImmerse/NiOverride for each node there is a respective key A value of 1.0 removes the scaling, since 1.0 is the default value of NiOverride. Please take a look at: SexLab Inflation Framework Documentation All you need is there. Some functions are public, but are not meant to be used public, except if you know what you are doing.
Guest ffabris Posted May 8, 2016 Posted May 8, 2016 example: sKey = "slif_left_breast" node = "NPC L Breast" keys are defined by my mod nodes are defined by NetImmerse/NiOverride for each node there is a respective key Aha ok ... since everywhere else you only need the SLIF key, I was confused that this function needs that extra param. Please take a look at: SexLab Inflation Framework Documentation All you need is there. Some functions are public, but are not meant to be used public, except if you know what you are doing.[/color] Heh - I've been reading that all along.
Guest ffabris Posted May 8, 2016 Posted May 8, 2016 OK, seems to be working ... I think. I am getting far less inflation (in additive mode) than I would expect, based on the same values and calling NI directly. Though I use AddNodeTransformScale() 0.9.1a beta gives this, many times, in log: [05/08/2016 - 03:47:23PM] Error: Static function IsValidNodeForGender not found on object slif_main. Aborting call and returning None stack: [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeTextOption() - "SLIF_Menu.psc" Line 1004 [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeOption() - "SLIF_Menu.psc" Line 990 [SLIF_Menu (4E000800)].SLIF_Menu.OnPageReset() - "SLIF_Menu.psc" Line 926 [SLIF_Menu (4E000800)].SLIF_Menu.SetPage() - "SKI_ConfigBase.psc" Line 865 [SKI_ConfigManagerInstance (18000802)].SKI_ConfigManager.OnPageSelect() - "SKI_ConfigManager.psc" Line 148 [05/08/2016 - 03:47:23PM] warning: Assigning None to a non-object variable named "::temp91" stack: [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeTextOption() - "SLIF_Menu.psc" Line 1004 [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeOption() - "SLIF_Menu.psc" Line 990 [SLIF_Menu (4E000800)].SLIF_Menu.OnPageReset() - "SLIF_Menu.psc" Line 926 [SLIF_Menu (4E000800)].SLIF_Menu.SetPage() - "SKI_ConfigBase.psc" Line 865 [SKI_ConfigManagerInstance (18000802)].SKI_ConfigManager.OnPageSelect() - "SKI_ConfigManager.psc" Line 148 The Values and Sliders panel in MCM shows no values at all. Might be related to the above?
qotsafan Posted May 8, 2016 Author Posted May 8, 2016 OK, seems to be working ... I think. I am getting far less inflation (in additive mode) than I would expect, based on the same values and calling NI directly. Though I use AddNodeTransformScale() 0.9.1a beta gives this, many times, in log: [05/08/2016 - 03:47:23PM] Error: Static function IsValidNodeForGender not found on object slif_main. Aborting call and returning None stack: [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeTextOption() - "SLIF_Menu.psc" Line 1004 [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeOption() - "SLIF_Menu.psc" Line 990 [SLIF_Menu (4E000800)].SLIF_Menu.OnPageReset() - "SLIF_Menu.psc" Line 926 [SLIF_Menu (4E000800)].SLIF_Menu.SetPage() - "SKI_ConfigBase.psc" Line 865 [SKI_ConfigManagerInstance (18000802)].SKI_ConfigManager.OnPageSelect() - "SKI_ConfigManager.psc" Line 148 [05/08/2016 - 03:47:23PM] warning: Assigning None to a non-object variable named "::temp91" stack: [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeTextOption() - "SLIF_Menu.psc" Line 1004 [SLIF_Menu (4E000800)].SLIF_Menu.AddNodeOption() - "SLIF_Menu.psc" Line 990 [SLIF_Menu (4E000800)].SLIF_Menu.OnPageReset() - "SLIF_Menu.psc" Line 926 [SLIF_Menu (4E000800)].SLIF_Menu.SetPage() - "SKI_ConfigBase.psc" Line 865 [SKI_ConfigManagerInstance (18000802)].SKI_ConfigManager.OnPageSelect() - "SKI_ConfigManager.psc" Line 148The Values and Sliders panel in MCM shows no values at all. Might be related to the above? Ah, my mistake, since I removed IsValidNodeForGender from SLIF_Main, but didn't change in SLIF_Menu, will be resolved asap, sorry for any inconvenience. Edit: Should now be resolved.
Guest ffabris Posted May 9, 2016 Posted May 9, 2016 Sorry to be a pain, I really am. But ... SLIF_Main.Inflate() wants keys in the form slif_* SLIF_Main.GetNodeScale() doesn't understand those and instead wants NINODE_* SLIF_Main.RemoveNodeScale() wants both types. I need to call GetNodeScale() so I can see what the current scale is to increment it, since Inflate(), even in additive mode, isn't adding to the existing scale, but just setting it to the passed value. (eg, If belly scale is 1.5, and I inflate by 1.5, the result is 1.5, not 3.0.) However, SLIF_Main.GetNodeScale always returns 1.0. I added this as the first line in the function: Debug.Trace("SLIF_Main:GetNodeScale - Node:" + node + " modName:" + modName + " Gender:" + gender as string + " Perspective:" + perspective as string) and this at the end, right before "return 1.0" Debug.Trace("SLIF_Main:GetNodeScale - returning default... problem") Test run .... [05/08/2016 - 08:30:27PM] PJ_Config:OIC_InflateBellyBy2 - Inflate x 2 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:Pearl_Juice Gender:0 Perspective:-1 [05/08/2016 - 08:30:27PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - returning default... problem So far so good, I expect that the first time, before I inflate. It continues, then I inflate again: [05/08/2016 - 08:30:27PM] PJ_Utils.GetNodeScale - SLIF:1.000000 [05/08/2016 - 08:30:27PM] PJ_Utility:DeltaBellySize - new currentscale:2.500000 [05/08/2016 - 08:30:27PM] PJ_Utils:SetNodeScale - Node:NPC Belly Value:2.500000 [05/08/2016 - 08:30:27PM] SLIF_Main: Inflation starttime: 88.475998 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:SexLab Inflation Framework.esp Gender:0 Perspective:-1 [05/08/2016 - 08:30:27PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - returning default... problem [05/08/2016 - 08:30:27PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:27PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:27PM] SLIF_Main: Inflating: Dick, value: 2.500000, currentValue: 2.500000, oldValue: 1.000000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:27PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:27PM] SLIF_Main: Inflation endtime: 88.595001 [05/08/2016 - 08:30:37PM] PJ_Config:OIC_InflateBellyBy2 - Inflate x 2 [05/08/2016 - 08:30:37PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:Pearl_Juice Gender:0 Perspective:-1 [05/08/2016 - 08:30:37PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:37PM] SLIF_Main:GetNodeScale - returning default... problem [05/08/2016 - 08:30:37PM] PJ_Utils.GetNodeScale - SLIF:1.000000 [05/08/2016 - 08:30:37PM] PJ_Utility:DeltaBellySize - new currentscale:2.500000 [05/08/2016 - 08:30:37PM] PJ_Utils:SetNodeScale - Node:NPC Belly Value:2.500000 [05/08/2016 - 08:30:37PM] SLIF_Main: Inflation starttime: 98.820000 [05/08/2016 - 08:30:37PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:SexLab Inflation Framework.esp Gender:0 Perspective:-1 [05/08/2016 - 08:30:37PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:38PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:38PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:38PM] SLIF_Main: Inflation endtime: 98.906998 In other words, no matter what approach I try, I cannot inflate beyond a certain point. (Btw, the actor is always valid: PlayerRef; "Dick" is the name of the player character). I am starting to regret having started this mod. :-|
qotsafan Posted May 9, 2016 Author Posted May 9, 2016 Sorry to be a pain, I really am. But ... SLIF_Main.Inflate() wants keys in the form slif_* SLIF_Main.GetNodeScale() doesn't understand those and instead wants NINODE_* SLIF_Main.RemoveNodeScale() wants both types. I need to call GetNodeScale() so I can see what the current scale is to increment it, since Inflate(), even in additive mode, isn't adding to the existing scale, but just setting it to the passed value. (eg, If belly scale is 1.5, and I inflate by 1.5, the result is 1.5, not 3.0.) However, SLIF_Main.GetNodeScale always returns 1.0. I added this as the first line in the function: Debug.Trace("SLIF_Main:GetNodeScale - Node:" + node + " modName:" + modName + " Gender:" + gender as string + " Perspective:" + perspective as string)and this at the end, right before "return 1.0" Debug.Trace("SLIF_Main:GetNodeScale - returning default... problem")Test run .... [05/08/2016 - 08:30:27PM] PJ_Config:OIC_InflateBellyBy2 - Inflate x 2 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:Pearl_Juice Gender:0 Perspective:-1 [05/08/2016 - 08:30:27PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - returning default... problemSo far so good, I expect that the first time, before I inflate. It continues, then I inflate again: [05/08/2016 - 08:30:27PM] PJ_Utils.GetNodeScale - SLIF:1.000000 [05/08/2016 - 08:30:27PM] PJ_Utility:DeltaBellySize - new currentscale:2.500000 [05/08/2016 - 08:30:27PM] PJ_Utils:SetNodeScale - Node:NPC Belly Value:2.500000 [05/08/2016 - 08:30:27PM] SLIF_Main: Inflation starttime: 88.475998 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:SexLab Inflation Framework.esp Gender:0 Perspective:-1 [05/08/2016 - 08:30:27PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:27PM] SLIF_Main:GetNodeScale - returning default... problem [05/08/2016 - 08:30:27PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:27PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:27PM] SLIF_Main: Inflating: Dick, value: 2.500000, currentValue: 2.500000, oldValue: 1.000000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:27PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:27PM] SLIF_Main: Inflation endtime: 88.595001 [05/08/2016 - 08:30:37PM] PJ_Config:OIC_InflateBellyBy2 - Inflate x 2 [05/08/2016 - 08:30:37PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:Pearl_Juice Gender:0 Perspective:-1 [05/08/2016 - 08:30:37PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:37PM] SLIF_Main:GetNodeScale - returning default... problem [05/08/2016 - 08:30:37PM] PJ_Utils.GetNodeScale - SLIF:1.000000 [05/08/2016 - 08:30:37PM] PJ_Utility:DeltaBellySize - new currentscale:2.500000 [05/08/2016 - 08:30:37PM] PJ_Utils:SetNodeScale - Node:NPC Belly Value:2.500000 [05/08/2016 - 08:30:37PM] SLIF_Main: Inflation starttime: 98.820000 [05/08/2016 - 08:30:37PM] SLIF_Main:GetNodeScale - Node:NPC Belly modName:SexLab Inflation Framework.esp Gender:0 Perspective:-1 [05/08/2016 - 08:30:37PM] NiOverride Plugin Version: 6 NiOverride Script Version: 6 [05/08/2016 - 08:30:38PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:38PM] SLIF_Main: Dick, currentValue: 2.500000, value: 2.500000, sKey: slif_belly, modName: Pearl_Juice [05/08/2016 - 08:30:38PM] SLIF_Main: Inflation endtime: 98.906998In other words, no matter what approach I try, I cannot inflate beyond a certain point. (Btw, the actor is always valid: PlayerRef; "Dick" is the name of the player character). I am starting to regret having started this mod. :-| You don't need to call either SLIF_Main.GetNodeScale() or SLIF_Main.RemoveNodeScale(), those are used internal and will only respond for the Node Scaling Key "SexLab Inflation Framework.esp" You can get the value you are inflating with this: StorageUtil.GetFloatValue(kActor, modName + sKey, value (optional default value)) All values are stored like this and there is only one Node Transform Scale from "SexLab Inflation Framework.esp". NiOverride.AddNodeTransformScale(kActor, perspective, gender, node, modName, value) is only ever called with the modName "SexLab Inflation Framework.esp" Please look at the example at the bottom of this page: SexLab Inflation Framework Documentation
Guest ffabris Posted May 9, 2016 Posted May 9, 2016 Oh. Sorry. I guess I'm used to a "Get" function being available for every "Set" (inflate, in this case) - especially since you have to keep track of inflation values, because "additive" mode doesn't actually add. So I saw a "Get" and have been trying to use it. My mistake.
qotsafan Posted May 9, 2016 Author Posted May 9, 2016 Oh. Sorry. I guess I'm used to a "Get" function being available for every "Set" (inflate, in this case) - especially since you have to keep track of inflation values, because "additive" mode doesn't actually add. So I saw a "Get" and have been trying to use it. My mistake. No problem, it's a bit confusing I know, but I can't make those functions private due to Papyrus being Papyrus, I would have had to set up the mod differently and it is, like it is now I could refer GetNodeScale to StorageUtil.GetFloatValue(), but that wouldn't make much sense since it would be easier to just use StorageUtil.GetFloatValue() instead. Here is a broken down to only the left breast key example, for (hopefully) easier understanding: Actor kActor = Game.GetPlayer() String modName = "Milk Mod Economy" String oldModName = "MilkModEconomy" float value = (some_algorithm) as float String left_breast_key = "slif_left_breast" int first_person = 0 (first-person, see perspective-variable) float breast_min = 1.0 float breast_max = 6.0 if (slif_installed) int gender = SLIF_Main.GetGender(kActor, gender) float left_breast = StorageUtil.GetFloatValue(kActor, modName + left_breast_key, value) float left_breast_min = StorageUtil.GetFloatValue(kActor, modName + left_breast_key + "_min", breast_min) float left_breast_max = StorageUtil.GetFloatValue(kActor, modName + left_breast_key + "_max", breast_max) SLIF_Main.inflate(kActor, modName, left_breast_key, left_breast, gender, first_person, oldModName, left_breast_min, left_breast_max) endIf Things like gender and perspective are not necessarily needed to set and you could just let my mod handle them, the result would look like this for a new mod. Except you want to specifically set a value for a specific gender and/or perspective. (oldModName also not needed in case you are not adding a new transform scale yourself or are removing it yourself) SLIF_Main.inflate(kActor, modName, sKey, value, -1, -1, "", min_value, max_value)
Guest ffabris Posted May 9, 2016 Posted May 9, 2016 I think I've got it finally. Just need to test the reset part (I want users to be able to clear all inflations quickly, if they get unhappy with the visual effect). But yes it is confusing. "Additive" mode threw me, since it doesn't add. Maybe call it something else? "Replace mode"? "Absolute mode"? Dunno. Also, since you have Inflate (aka SetInflateValue), you could also have GetInflateValue: float Function GetInflateValue(Actor anActor, string modName, string key, etc etc etc) return StorageUtil.GetFloatValue(anActor, ModName + key, etc etc etc) EndFunction Tad more friendly to modders, maybe? ;-) OK...4-5hrs spent trying to figure this out (I blame senility! Yes, that's my excuse!), now maybe I can get back to the mod itself.
qotsafan Posted May 9, 2016 Author Posted May 9, 2016 I think I've got it finally. Just need to test the reset part (I want users to be able to clear all inflations quickly, if they get unhappy with the visual effect). But yes it is confusing. "Additive" mode threw me, since it doesn't add. Maybe call it something else? "Replace mode"? "Absolute mode"? Dunno. Also, since you have Inflate (aka SetInflateValue), you could also have GetInflateValue: float Function GetInflateValue(Actor anActor, string modName, string key, etc etc etc) return StorageUtil.GetFloatValue(anActor, ModName + key, etc etc etc) EndFunctionTad more friendly to modders, maybe? ;-) OK...4-5hrs spent trying to figure this out (I blame senility! Yes, that's my excuse!), now maybe I can get back to the mod itself. "Additive" mode threw me, since it doesn't add. Maybe call it something else? "Replace mode"? "Absolute mode"? Dunno. additive means, that values set by different mods are added, "some_mod" sets the value to 1.5, "some_other_mod" sets it to 2.0, result 3.5 StorageUtil.GetFloatValue(anActor, ModName + key, etc etc etc) there is no etc etc etc, StorageUtil.GetFloatValue() is just: StorageUtil.GetFloatValue(anActor, ModName + key, value) value is only the default value, if no value was set with: StorageUtil.SetFloatValue(anActor, ModName + key, value) The default for StorageUtil.GetFloatValue() is 0, so if you call StorageUtil.GetFloatValue() like this: StorageUtil.GetFloatValue(anActor, ModName + key) If there is no value set, the result will be 0. Making an extra function would only change the plus with a comma, but I may make GetNodeScale() fail-save.
Guest ffabris Posted May 9, 2016 Posted May 9, 2016 additive means, that values set by different mods are added, "some_mod" sets the value to 1.5, "some_other_mod" sets it to 2.0, result 3.5 Ok. there is no etc etc etc, StorageUtil.GetFloatValue() is just: [sigh] I know ... it was a (failed) attempt at humor. Making an extra function would only change the plus with a comma, but I may make GetNodeScale() fail-save. OK. It just looks cleaner. Check out SexLab code, it has tons of one line function to make things more legible. Anyway, never mind.
qotsafan Posted May 9, 2016 Author Posted May 9, 2016 additive means, that values set by different mods are added, "some_mod" sets the value to 1.5, "some_other_mod" sets it to 2.0, result 3.5 Ok. there is no etc etc etc, StorageUtil.GetFloatValue() is just: [sigh] I know ... it was a (failed) attempt at humor. Making an extra function would only change the plus with a comma, but I may make GetNodeScale() fail-save. OK. It just looks cleaner. Check out SexLab code, it has tons of one line function to make things more legible. Anyway, never mind. The idea of this mod was, that you mainly have to call SLIF_Main.inflate() and be done with it. The only other things you would have to do, is: 1. Getting the values (value, min, max), if you need them and are not already calculating them yourself. 2. Unregistering the actor (for your mod only) if you don't need him/her anymore, which can also be done manually via my mcm menu.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now