nilead Posted February 4, 2022 Posted February 4, 2022 Ive been fiddling around SL themed set bonuses/maluses recently, butchering Extra Armor Effects mod in the process. Cant script a hello world, but thankfully results can be mostly achieved by just screwing around with effects and conditions. Some stuff is fairly obvious (SLAX keywords, SLIF factions, SLS/ToH magic effects etc). However, a big one is to use SL skill as input for buffs/debuffs and i dont see an obvious way to do so. Is there a way to get players SL skill without scripting, and if so - how would i go about it if i knew what i was doing?
s3ngine Posted February 6, 2022 Posted February 6, 2022 Greetings, you correctly deduced that there is no direct way to use SL skill data in effect conditions (that I know of, mind you), as SL skill data is stored and accessed via SexlabUtil.dll native papyrus functions. Here is how I would approach the subject in a simple way: -) Create a simple quest with a script attached. -) Said script reads the players SL skill data at regular intervals (say, once every day, or every couple of ingame-hours, or every time a SL animation ends) and forwards the data to a GlobalVariable. -) This GlobalVariable is then used in your effect conditions to determine which effect is active at the given skill level. An example: I am not entirely familiar with SL skill data, but let's just assume the player has a vaginal proficiency of 5. You read the value 5 from the SL skill data and write it to a GlobalVariable named, for instance, nileadPlayerSLSkillVaginal (clunky, but I think you get the idea, name it something recognizable and unique). This GlobalVariable is then used in your effects conditions in this manner: Effect 1 is applied if nileadPlayerSLSkillVaginal < 5, effect 2 is applied if nileadPlayerSLSkillVaginal >= 5, and so on. If this sounds like something you would like to look into, do let me know. I am sure I can give you some pointers for how to start. Regards, s3ngine
nilead Posted February 6, 2022 Author Posted February 6, 2022 17 minutes ago, s3ngine said: Here is how I would approach the subject in a simple way: -) Create a simple quest with a script attached. -) Said script reads the players SL skill data at regular intervals (say, once every day, or every couple of ingame-hours, or every time a SL animation ends) and forwards the data to a GlobalVariable. -) This GlobalVariable is then used in your effect conditions to determine which effect is active at the given skill level. ... If this sounds like something you would like to look into, do let me know. I am sure I can give you some pointers for how to start. Regards, s3ngine Thanks for your reply. I do indeed get more and more perplexed as i experiment, so i would love some pointers. With that said, ive never really read CK documentation and go about it just bashing things together and looking if it works. Some conditions work oddly, some dont work, wich isnt helped by my utter lack of understanding of what is going on behind the scenes. Base mod structure seems intuitive: a script gives player perk, perk applies spell type effects based on conditions specified for each. Yet practical implementation went sideways fast: Implementing a keyword-based "commando" effect proved easy. Trying to set magic effect as condition failed, adding keyword to said effect and using "magiceffecthaskeyword" kinda wroked, but not really, since while it correctly checks for it to get the buff, it does not ever seem to ever check if said effect is gone. Questions, questions. When are those conditions checked? Obviously, on equip/unequip. Any other events? Timer? All in all - it looks like ill have to do it properly, i.e. from scratch. While i do appreaciate your offer, most of my questions are tied to "Havent read the documentation before settling to do something" syndrom, commongly knows as being a fuckwit. Dont think you could cure that. If you could, however, point me towards guide(s) you imagine would be within metal capacity of averagely bright lobster - it would probably help.
s3ngine Posted February 7, 2022 Posted February 7, 2022 Greetings again, I suppose a good place to start would be here: https://www.creationkit.com/index.php?title=Category:Papyrus To be honest, I don't know if this guide is any good, I never used it consistently. I mostly learned things by looking at how others did it. Probably not the best way to go about it, so ignore that ^^ Also, I never actually used the Creation Kit. I only use TES5Edit, as I find it far easier to use. Again, my personal choice. I suggest you take a look at the guide, and if a specific topic troubles you, feel free to come back here. Still, I'd like to adress your question about when conditions are checked. First off, it differs from case to case: -) Conditions within MagicEffect (MGEF) records are checked only once, on apply. It does not matter if the MGEF is applied by a spell (SPEL) or an Object Effect (ENCH). Say you have a spell with a MGEF. The MGEF condition equates to false, so it is not applied to the target. Only once the spell gets removed and reapplied is the condition checked again. -) Spell (SPEL) or Object Effect (ENCH) records can apply conditions to their individual MagicEffects (MGEF). This is different from the above, where the condition is defined in the MGEF record itself. This difference is significant, as conditions on every MGEF within a SPEL or ENCH record are checked every second. -) Conditions in Perk records (PERK) are something I am not entirely familiar with. Perks can have many different condition sets, which adhere to different entities (i.e. Target, Subject). The time of evaluation also differs based on what type if PERK it is. If the PERK operates on a specific Entry Point, then the conditions are checked once the Entry Point is triggered. An example: The perks in the mod Trade and Barter check their conditions whenever you open a barter menu, since their Entry Point is set to "Mod Buy/Sell Prices". At least, this is my understanding. Again, if you have a specific case you would like to solve, perhaps we can reach a solution together. Regards, s3ngine
nilead Posted February 12, 2022 Author Posted February 12, 2022 On 2/7/2022 at 7:15 PM, s3ngine said: Again, if you have a specific case you would like to solve, perhaps we can reach a solution together. Well, if your offer is still open - ive completed the initial bunch, and now looking to go a bit further Several questions did come up: 1st is a rather simple one - edding multiple effects to a single spell seem to cause it to appear sevral times in active effects tab. How do i avoid it, beyond creating redundant duplicates of X+Y? 2nd is the difficult one - ive returned original question, and immediately resorted to trying to steal others work. In this case - poked around SLSO, since i run it anyway. It appears to have its MCM stored in a .json. Wich means its hypoteticly possible to make a denial effect as a drawback, assuming something as trivial as changing 1 to 0 can be done to it. Trivail, yet i have no idea how to go aboit it. 3rd - same SLSO provides source scripts i can rummage through There appears to be almost everything id need, assuming i could use it. Issue is i have no idea how. It modifies SL scrits, and provides helpfull descriptions so that its readable by muggle. Snippet corresponding to recording skills: Spoiler RecordSkills() string[] Tags = Animation.GetRawTags() ; IsType = [1] IsVaginal, [2] IsAnal, [3] IsOral, [4] IsLoving, [5] IsDirty, [6] HadVaginal, [7] HadAnal, [8] HadOral IsType[1] = Females > 0 && (Tags.Find("Vaginal") != -1 || Tags.Find("Pussy") != -1) IsType[2] = Tags.Find("Anal") != -1 || (Females == 0 && Tags.Find("Vaginal") != -1) IsType[3] = Tags.Find("Oral") != -1 IsType[4] = Tags.Find("Loving") != -1 IsType[5] = Tags.Find("Dirty") != -1 Even having a woking slso sctipt before me, that makes use of those, i dont yet see how id turn those into useable input for spell effects.
s3ngine Posted February 23, 2022 Posted February 23, 2022 Greetings, sorry for my late reply, been away from the game for a while. Let's see: 1) There is a flag in a MagicEffect record which should say something like "Hide in UI" (not sure how it looks in CK, I only use TES5Edit). This causes the MagicEffect not to be shown. Note that this could mean that ALL effects under the same spell are not shown either. Not sure about that, but I had that happen to me before. 2) Hmm, I am not sure I understand your intent here. So you would like to change a value stored in SLSOs .json file? Doable, I am sure, but quite complicated to setup, since you have to de-serialize and re-serialize the .json file. Also, for what purpose would you change a value in the .json file? I thought you needed a criterion for a spell? 3) This particular snippet seems to handle the recording of skills. I think you should take a look at the file sslConfigMenu.psc (comes with SexLab), at the function SexDiary(). This function handles the display of the PCs sex skills in SexLabs MCM. Take a look at the functions called in this function. This is where I would start at least. Regards, s3ngine
Recommended Posts
Archived
This topic is now archived and is closed to further replies.