Jump to content

Recommended Posts

Posted

Btw... I got tired of naming my variables by number back in college when I was taking Assembly Language and working with registers.

 

Where's mah goddamn flying cars Bruce?!

 

I want variable names. You want variable names. The neighbor's kid down the street who throws rocks at your cat wants variable names.

 

What do you want them to look like?

 

And... keep in mind... I can change the pre-built scripts easily enough if a whole new variable style is chosen, but remember you (and everyone else) will have to change too... meaning if we go from $12, $g87  to BANANAS_maxVelocity, BANANAS_maxTaxRate, it's likely going to give a few folks heartburn. 

 

So... I'm willing to hear some wild suggestions but I'll put out an idea I had.

 

Variable "Names"

Right now, you get stuff like $42 because originally it was just $1-$9, and the code reflected that. So when I slipped in the enhancement to make that go to $1-$2147483647 (I think that's right... 32 bit signed int in Papyrus script yeah?), I just let it go to... bigger numbers. And then I added globals. I don't regret it, but I do regret just slapping a 'g' in there. Wasted opportunity.

 

Also, keep in mind that right now every value... every single thing... is strings. You set something to a number? I stashed a string copy of that int. or float. or whatever. Actors are treated specially. Again, it simplifies things a lot, works pretty well, but also has some implications. At one point I had thought about introducing actual variable types but I felt like that might go overboard.

 

So now I mostly just want to no longer have to just use numbers. My idea?

 

$'varname.

 

So you would have code like:

 

set   $'datafile   "../sl_triggers/commandstore/pet_collar_game"

json_getvalue   $'datafile  int add 1
set  $'incrementValue  $$

json_getvalue   $'datafile  int base 0
set  $'baseValue  $$

if  $'incrementValue < 0   badIncrementValue
if  $'baseValue < 1  badBaseValue

 

The single-quote is completely unutilized currently in SLTScript, so it's a decent candidate (yes, I just slipped that in there, thank you for noticing). And of course that would mean that a global would just be $g'everyoneCanSeeMe and so on.

 

What do you think?

Posted (edited)
7 hours ago, hextun said:

Btw... I got tired of naming my variables by number back in college when I was taking Assembly Language and working with registers.

 

Where's mah goddamn flying cars Bruce?!

 

I want variable names. You want variable names. The neighbor's kid down the street who throws rocks at your cat wants variable names.

 

What do you want them to look like?

 

And... keep in mind... I can change the pre-built scripts easily enough if a whole new variable style is chosen, but remember you (and everyone else) will have to change too... meaning if we go from $12, $g87  to BANANAS_maxVelocity, BANANAS_maxTaxRate, it's likely going to give a few folks heartburn. 

 

So... I'm willing to hear some wild suggestions but I'll put out an idea I had.

 

Variable "Names"

Right now, you get stuff like $42 because originally it was just $1-$9, and the code reflected that. So when I slipped in the enhancement to make that go to $1-$2147483647 (I think that's right... 32 bit signed int in Papyrus script yeah?), I just let it go to... bigger numbers. And then I added globals. I don't regret it, but I do regret just slapping a 'g' in there. Wasted opportunity.

 

Also, keep in mind that right now every value... every single thing... is strings. You set something to a number? I stashed a string copy of that int. or float. or whatever. Actors are treated specially. Again, it simplifies things a lot, works pretty well, but also has some implications. At one point I had thought about introducing actual variable types but I felt like that might go overboard.

 

So now I mostly just want to no longer have to just use numbers. My idea?

 

$'varname.

 

So you would have code like:

 

set   $'datafile   "../sl_triggers/commandstore/pet_collar_game"

json_getvalue   $'datafile  int add 1
set  $'incrementValue  $$

json_getvalue   $'datafile  int base 0
set  $'baseValue  $$

if  $'incrementValue < 0   badIncrementValue
if  $'baseValue < 1  badBaseValue

 

The single-quote is completely unutilized currently in SLTScript, so it's a decent candidate (yes, I just slipped that in there, thank you for noticing). And of course that would mean that a global would just be $g'everyoneCanSeeMe and so on.

 

What do you think?

 

I've had named global vars on my list of things to bother you with for a while 😭, so my stance is yes thank you very much. Would that be specifically for the globals while locals remain numbered?

 

EDIT: Oi when did you slip 'sl_getprop' in there? Neat, I've been needing that as well.

Edited by MannySauce
Posted
1 hour ago, MannySauce said:

 

I've had named global vars on my list of things to bother you with for a while 😭, so my stance is yes thank you very much. Would that be specifically for the globals while locals remain numbered?

 

EDIT: Oi when did you slip 'sl_getprop' in there? Neat, I've been needing that as well.

 

I think there were a couple of functions that were already defined by Fotogen that just weren't documented? As I was going through adding documentation notation I added it for those as well. The documentation should now align 100% with the implemented functionality.

 

I am intending for variable names in all scopes, local, global, etc.

 

The only single reason I haven't charged forward with the obvious "just let us use strings after the $" was because of globals. I put a 'g' in there which pollutes the namespace. What I *should* have done is used a different prefix altogether. Like $ for local and @ for global or something.

 

The only thing stopping me is perhaps invalidating existing scripts. And I can't imagine there are that many with globals.

 

So... next question...

 

For the community: If you would like to use "real" variable names like '$nextTick' and the like, would you be willing to switch to using something like '@globalvarname' (i.e. '@' to denote global variables)? This would mean that any script currently using a global would need to be edited because it would suddenly be treated like a local variable.

Followup: If you do not know what I mean by "globals" and have never put a 'g' in your variable names (i.e. $g2), you can safely ignore this.

 

I would like a clean break and honestly, unless I get a clamoring here begging me not to switch, I think I'll make the jump. That is to say, globals would no longer be identified as $g<number> but instead by @<varname>, while $<varname> remains for locals. <varname> would still be able to just be a number but you would also be able to make it a word or what have you.

Posted

Does this version work with SL P+?

Posted
2 hours ago, ShinyNewDagger said:

Does this version work with SL P+?

 

I'm like 99.9999% sure it does, but I'm going to go have a walk, have a bite, and then have a look.

Posted
3 hours ago, ShinyNewDagger said:

Does this version work with SL P+?

 

I can confirm it works with SLP+.

 

I installed it on a copy of Masterstroke 2.2.0.4 which uses SLP+ 2.11.8. I set up Begin/Orgasm/End events and received all of them. I also ran a test of a couple of the SL API calls that also worked. It's not a comprehensive test, as I am still working on regression tests, but I am confident that you will get most/all of what you want from SLT with SLP+.

 

Spoiler

image.thumb.png.bba45ffd5a07e5faf53f0f39fa494276.png

 

Posted

Can't seem to get either the keymap trigger or the top of the hour triggers to fire, tried running them with the preloaded cast light spells and just a simple msg notify command to test and not getting anything. only debug message in the console is 332.929993: libraries pre-cached in sl-trigger-internal. happening on both v114 and v115.

Posted

Just out of curiosity, has anyone tried using SexLab triggers to trigger a skooma effect from Skyrim on Skooma?  I've no doubt the script to force drink skooma works but I'm wondering if triggering it immediately at the end of a sex act causes any SexLab cleanup scripts to misfire?  I'm just looking for a lighter version of Skooma Whore and a reason to go on Skooma trips =P

Posted
5 hours ago, Mauler158 said:

Can't seem to get either the keymap trigger or the top of the hour triggers to fire, tried running them with the preloaded cast light spells and just a simple msg notify command to test and not getting anything. only debug message in the console is 332.929993: libraries pre-cached in sl-trigger-internal. happening on both v114 and v115.

 

Is this part of a modlist? I have Nefaram and Masterstroke already installed (though of course, versions may vary), so I could perhaps get a test setup.

 

A few questions:

- Was this on a new save or existing save?

  - If a new save, I would like to get more details (e.g. modlist if using one, otherwise Skyrim version, SKSE version etc.)

- If an existing save, did you have an older version of sl_triggers already installed (113 or prior)?

  - If you had an older version, please try a new save. I've had problems with labelling savegame compatibility.

- If you did not have an older version already installed on the existing save.

  - Would you mind trying a new save in this scenario as well? 

 

As I've mentioned before, I keep several modlists up for me to be able to test on: SexLab P+/Skyrim 1.6.1170 (Masterstroke 2.2.0.4 (testing)), SexLab/1.5.97 (Nefaram 15.4.1 (testing)/15.4.2 (personal)), and Skyrim Modding Essentials (no SexLab), and I now try to make sure it comes up both in fresh games, after a save, and from an update from the previous version. Tedious, and I haven't completed automation of everything, so it's possible I missed something.

 

I'm sorry it's not working out of the box for you. I use the Keymapping myself to do a lot of the core testing so it seems like something has really borked up fundamentally. Do let me know how the troubleshooting steps go.

Posted
1 hour ago, hextun said:

 

Is this part of a modlist? I have Nefaram and Masterstroke already installed (though of course, versions may vary), so I could perhaps get a test setup.

 

A few questions:

- Was this on a new save or existing save?

  - If a new save, I would like to get more details (e.g. modlist if using one, otherwise Skyrim version, SKSE version etc.)

- If an existing save, did you have an older version of sl_triggers already installed (113 or prior)?

  - If you had an older version, please try a new save. I've had problems with labelling savegame compatibility.

- If you did not have an older version already installed on the existing save.

  - Would you mind trying a new save in this scenario as well? 

 

As I've mentioned before, I keep several modlists up for me to be able to test on: SexLab P+/Skyrim 1.6.1170 (Masterstroke 2.2.0.4 (testing)), SexLab/1.5.97 (Nefaram 15.4.1 (testing)/15.4.2 (personal)), and Skyrim Modding Essentials (no SexLab), and I now try to make sure it comes up both in fresh games, after a save, and from an update from the previous version. Tedious, and I haven't completed automation of everything, so it's possible I missed something.

 

I'm sorry it's not working out of the box for you. I use the Keymapping myself to do a lot of the core testing so it seems like something has really borked up fundamentally. Do let me know how the troubleshooting steps go.

Me reading your installation instructions about incompatibility with the old mod would've saved us both time, apologies.

Posted
1 minute ago, Mauler158 said:

Me reading your installation instructions about incompatibility with the old mod would've saved us both time, apologies.

 

No worries. I'm glad to know the answer, though if you're considering a new run through, consider this version. *slaps the hood* this baby can fit.. scripts.. in it... and stuff.. *cough*... *dies a horrible meme death*

Posted

This is great work. Thanks for updating and maintaining this. I've yet to test this thoroughly but I'm glad you're officially/unofficially updating this mod.

I've used a jerry-rigged version for myself. but it was more minor fixes for personal use rather a overhaul like you did but I wanted to mention one thing:

 

On 4/30/2025 at 5:12 PM, hextun said:

 

About Performance:

Effort has been made to avoid scripts from stressing the system more than necessary, but there are still limitations. Each script will be run on an Actor in game (the Player or an NPC). Any one Actor can have no more than 10 scripts running on them at one time. Scripts can be long-running if you make them so, so be careful not to let things run away.

 

About this part, I've added a Utility.Wait(0.1) inside my personal edit and that seems to have overcome the 10 script limit and I've stopped running into the "Too many effects on this Actor" console spam even with more than 10 scripts/checks firing off a single actor.

 

Int Function getNextCSpell(Actor _actor)
	Int idx
	
	idx = 0
	While idx < customEffects.Length
		If !_actor.HasMagicEffect(customEffects[idx])
			Return idx
		EndIf
		idx += 1
		Utility.Wait(0.1) ;was added here
	EndWhile
	
	Return -1
EndFunction

Was my edit in the old version if you wanted to add it to your version here to get around the limit. Maybe incorporating something similar here would benefit?

Posted
3 hours ago, Mushano said:

This is great work. Thanks for updating and maintaining this. I've yet to test this thoroughly but I'm glad you're officially/unofficially updating this mod.

I've used a jerry-rigged version for myself. but it was more minor fixes for personal use rather a overhaul like you did but I wanted to mention one thing:

 

About this part, I've added a Utility.Wait(0.1) inside my personal edit and that seems to have overcome the 10 script limit and I've stopped running into the "Too many effects on this Actor" console spam even with more than 10 scripts/checks firing off a single actor.

 

Int Function getNextCSpell(Actor _actor)
	Int idx
	
	idx = 0
	While idx < customEffects.Length
		If !_actor.HasMagicEffect(customEffects[idx])
			Return idx
		EndIf
		idx += 1
		Utility.Wait(0.1) ;was added here
	EndWhile
	
	Return -1
EndFunction

Was my edit in the old version if you wanted to add it to your version here to get around the limit. Maybe incorporating something similar here would benefit?

 

Thank you for the compliment!

 

First off, always glad to see a fellow coder willing to dip their fingers in for personal modding fun! I have a few personal copies of mod edits myself. Given how very recently I've gotten into modding Skyrim vs. how long I've played it vs. how long I've been programming, I'm more than a little irked not to have gotten here sooner.

 

Second, thank you for the edit. I also dislike the limit. As it happens that particular edit is a little out of date. The current limit (probably since.. v111?) is actually 30, since I reconfigured the pools. And while in context 30 is much bigger than 10, it is still a limit. So while it would still be impactful, it is a little less of a requirement now.

 

I like the simple elegance of tossing in the Utility.Wait(0.1) to give scripts a chance to finish up before giving up on nabbing an available effect to slot in. I honestly had punted the problem given the larger pool, but you raise a good point in that it shouldn't just be an error, dropped on the floor.

 

I think, however, that instead I'll look into turning the command requests into a proper queue, per Actor, and then when an Actor has emptied the pool, their command would just get pushed back on. Have to balance the possibility of starvation but since this is on a per Actor basis I don't see that as a problem. And if you routinely find yourself running 30 scripts at a time on your Actors... I mean... damn... cool! I guess... I would love to see how that would look. :) 

Posted

Everything has been working wonderful now after the few patches.

Got some nice RP events going on.

But still looking to do a few I'm not sure how to make myself. Maybe someone can help?

 

For SLSO, I'd like an event that (randomly) increases victims pleasure in a scene.

Explanation: Mostly with SLSO victim gains almost no pleasure at all. With Hakkey tweaks there is a mechanic where "mind broken" aggressor can make victims pleasure forcefully increase. I'm looking to make something similar, but more random, since the Hakkey state turn on pretty consistently at the same time every time. I'd like similar event but more randomness, so mostly victim pleasure stays as SLSO vanilla, but would randomly every once a while have NPC forcefully rub victim into orgasm.

 

Cheers for the mod!

Posted
11 hours ago, PenBoozerX said:

Everything has been working wonderful now after the few patches.

Got some nice RP events going on.

But still looking to do a few I'm not sure how to make myself. Maybe someone can help?

 

For SLSO, I'd like an event that (randomly) increases victims pleasure in a scene.

Explanation: Mostly with SLSO victim gains almost no pleasure at all. With Hakkey tweaks there is a mechanic where "mind broken" aggressor can make victims pleasure forcefully increase. I'm looking to make something similar, but more random, since the Hakkey state turn on pretty consistently at the same time every time. I'd like similar event but more randomness, so mostly victim pleasure stays as SLSO vanilla, but would randomly every once a while have NPC forcefully rub victim into orgasm.

 

Cheers for the mod!

 

So it's funny you mention that. I had been working on adding that and some other things. Now I have a reason to release v116:

 

    Savegame compatible with v115
    enhancement: added jsonutil and storageutil functions as wrappers around PapyrusUtil scripts of the same name
    enhancement: minor performance tuning (restructured sequence of certain built-in lookups)
    enhancement: more documentation, both on the wiki and in .txt file form with the mod
    enhancement: added osla_* functions as wrappers around OSLAroused_ModInterface
    enhancement: added slso_bonus_enjoyment function

 

With v116 you get:

- PapyrusUtil access (excluding Form and list related functionality) for StorageUtil and PapyrusUtil; so you can directly interact with the same PapyrusUtil objects with the same features as any scripted mod

- OSLAroused functions; wrappers around the OSLAroused_ModInterface: includes functions for getting and setting an actor's arousal, arousal multiplier, and so on

- SLSO function: slso_bonus_enjoyment <actor> <enjoyment amount>

 

So to test this last one, I decided that my poor little spunk addicted Dovahkiin gets EXTREMELY excited when someone pops a load into her. So I used the following trigger and script.

On SLSO Separate Orgasm

Player: Partner Player

Gender: Male

Chance: 100

 

Script:

; add some exposure/arousal

; she gets worked up
slso_bonus_enjoyment $player 30
; and more aroused
osla_modify_arousal $player 30.0

; and he gets a stamina boost
av_restore $self Stamina 15

 

Also, also... and this may be more of a "SexLab Survival" thing, but the solution currently uses sl_triggers_internal.GetActiveMagicEffectsForActor()... I really like the idea of the Compulsive Sex option in SLS but hate that the Input.TapKey() bug poses a problem. Thing is, that TapKey() just throws the event back on (in a normal working scenario) at which point, on the next cycle the event is handled, it calls (for the specific key the Compulsive Sex option checks for), Game("Stamina"). Now, ordinarily this would be a problem because without dipping out of Papyrus and into SKSE plugins you can't get access to currently running ActiveMagicEffects in a meaningful way, so you wouldn't be able to call a function directly. The TapKey() approach was the best available workaround without, again, using a plugin.

 

But *with* the plugin, I can, when it's time to start compulsive sexing, go fetch the ActiveMagicEffects, iterate until I find the one that is the SLSO_SpellGameScript, and then just keep calling Game("Stamina"), commenting out Input.TapKey() and being able to safely let my Dovahkiin get mind broken.

 

If anyone is interested I can provide this as a patch... just not sure... it's such a niche cross-section. Anyway, let me know.

Posted

@hextun

Remembered a Trigger, I'v ehad for a while, it adds one to the bodyweight when triggered. I use it so sex changes bodies over time - I have slim to curvy for females and slim to bodybuilder for males. Should be easy to create a -1 version as well:

 

{
    "cmd" :
    [
        ["actor_body", "$player", "GetWeight"],
        ["set", "$1", "$$"],
    ["inc", "$1", "1"],
        ["actor_body", "$player", "setWeight", "$1"]
    ]
}

 

One I would like to get working is a bodyscale changer as well so heights can be changed with triggers. Any ideas?

 

I have also found something with the Top of the Hour trigger. It looks like one check is made for all triggers and everything within that fires. E.g. I created five triggers with a 1% chance to trigger and all of them triggered at the same time. Could be set so a separate check is made for each?

Posted
29 minutes ago, ebbluminous said:

@hextun

Remembered a Trigger, I'v ehad for a while, it adds one to the bodyweight when triggered. I use it so sex changes bodies over time - I have slim to curvy for females and slim to bodybuilder for males. Should be easy to create a -1 version as well:

 

{
    "cmd" :
    [
        ["actor_body", "$player", "GetWeight"],
        ["set", "$1", "$$"],
    ["inc", "$1", "1"],
        ["actor_body", "$player", "setWeight", "$1"]
    ]
}

 

One I would like to get working is a bodyscale changer as well so heights can be changed with triggers. Any ideas?

 

I have also found something with the Top of the Hour trigger. It looks like one check is made for all triggers and everything within that fires. E.g. I created five triggers with a 1% chance to trigger and all of them triggered at the same time. Could be set so a separate check is made for each?

 

I'll check on that ToH bug. Sounds like a simple fix.

 

I believe there is a console command, setscale. So for now, absent a directly SLTScript API call, you could use:

 

`set $1 0.98`

`console "player.setscale " $1`

 

I see that in Creation Kit, ObjectReference, and by extension Actor, have a SetScale() function. I could look into expanding the available function set against the base actors as another activity.

Posted (edited)
38 minutes ago, hextun said:

 

I'll check on that ToH bug. Sounds like a simple fix.

 

I believe there is a console command, setscale. So for now, absent a directly SLTScript API call, you could use:

 

`set $1 0.98`

`console "player.setscale " $1`

 

I see that in Creation Kit, ObjectReference, and by extension Actor, have a SetScale() function. I could look into expanding the available function set against the base actors as another activity.

So that will set to a specific value. What about adding/subtracting each time? e.g. a .1 change on each trigger? If possible to have a limit to how far it goes.

 

The thinking is for male character to work with the weight change to go from short and weedy to tall and buff, and for females to become a curvy shortstack...

Edited by ebbluminous
Posted (edited)
47 minutes ago, ebbluminous said:

So that will set to a specific value. What about adding/subtracting each time? e.g. a .1 change on each trigger? If possible to have a limit to how far it goes.

 

The thinking is for male character to work with the weight change to go from short and weedy to tall and buff, and for females to become a curvy shortstack...

 

So, this is the API you/I have to work with via Papyrus script, meaning anything in SLTScript, for the most part, will only have access to this (i.e. from your SetScale perspective, because it's a member of ObjectReference): https://ck.uesp.net/wiki/ObjectReference_Script and in particular here is SetScale: https://ck.uesp.net/wiki/SetScale_-_ObjectReference and there is a GetScale as well: https://ck.uesp.net/wiki/GetScale_-_ObjectReference

 

Unlike something like an Actor Value, which is defined with a known base value and tracks the base separately from modifications (added via modav), scale just appears to be a property that can be changed. 

 

Via console, of course, there is no 'getscale'. But I can add this sort of stuff pretty trivially (i.e. basic wrappers around getters/setters for known objects like Actors and Quests) into additional functions to call.

 

EDIT: So yeah, I'll look to add Set/GetScale on the next release (e.g. actor_getscale/actor_setscale) and also have a look to see if I can't easily script my way into generating a bunch of the missing getter/setters. Might be worth splitting the function libraries out for that as that page is getting pretty long, too.

Edited by hextun
edited to add
Posted
9 minutes ago, hextun said:

 

So, this is the API you/I have to work with via Papyrus script, meaning anything in SLTScript, for the most part, will only have access to this (i.e. from your SetScale perspective, because it's a member of ObjectReference): https://ck.uesp.net/wiki/ObjectReference_Script and in particular here is SetScale: https://ck.uesp.net/wiki/SetScale_-_ObjectReference and there is a GetScale as well: https://ck.uesp.net/wiki/GetScale_-_ObjectReference

 

Unlike something like an Actor Value, which is defined with a known base value and tracks the base separately from modifications (added via modav), scale just appears to be a property that can be changed. 

 

Via console, of course, there is no 'getscale'. But I can add this sort of stuff pretty trivially (i.e. basic wrappers around getters/setters for known objects like Actors and Quests) into additional functions to call.

 

EDIT: So yeah, I'll look to add Set/GetScale on the next release (e.g. actor_getscale/actor_setscale) and also have a look to see if I can't easily script my way into generating a bunch of the missing getter/setters. Might be worth splitting the function libraries out for that as that page is getting pretty long, too.

You are the hero we need :D

Posted

Decided to sit down and redo my old, bloated commands that check every single race against player partner to buff/debuff/add/remove/whatever, and uh, can this just be condensed down to this now?:

 

actor_race $partner "SL"
    set $1 $$
call $1

 

and then just have a collection of .inis for each race?

Posted

I´m having a problem with a custom damage/mage regen ini.

 

Having sex with any creature always results in the upper "race" chosen , in this case it skips to giantdamage

 

What I´m doing wrong ?


Script is called in the partner.

 

actor_race $self "SL"  
set $20 $$
msg_notify "  Race 20: " $20

if $20 = "Dragons"   Giantdam
if $20 = "FlameAtronach"   Giantdam

if $20  = "DwarvenSpiders"   Bigdam
if $20  = "DwarvenBallistas"   Bigdam
if $20  = "DwarvenSpheres"   Bigdam
if $20  = "DwarvenCenturions"   Bigdam
if $20  = "Trolls"   Bigdam
if $20  = "Giants"   Bigdam
if $20  = "Horses"   Bigdam
if $20  = "Deers"   Bigdam
if $20  = "Bears"   Bigdam
if $20  = "Mammoths"  Bigdam
if $20  = "Dremoras"  Bigdam
if $20  = "StormAtronach"  Bigdam
if $20  = "Seekers"  Bigdam
if $20  = "Werewolves"  Bigdam
if $20  = "LargeSpiders"  Bigdam
if $20  = "GiantSpiders"  Bigdam
if $20  = "Lurkers"  Bigdam
if $20  = "IceWraiths"  Bigdam
if $20  = "FrostAtronach"  Bigdam
if $20  = "Lurkers"  Bigdam
if $20  = "ChaurusReapers"  Bigdam
if $20  = "Cows"  Bigdam

if $20  = "Ashhoppers"  Meddam
if $20  = "Goats"  Meddam
if $20  = "Chaurus"  Meddam
if $20  = "ChaurusHunters"  Meddam
if $20  = "Draugrs"  Meddam
if $20  = "Dogs"  Meddam
if $20  = "DragonPriests"  Meddam
if $20  = "Deers"  Meddam
if $20  = "Wisps"  Meddam
if $20  = "Spriggans"  Meddam
if $20  = "WispMothers"  Meddam
if $20  = "Spiders"  Meddam
if $20  = "VampireLords"  Meddam
if $20  = "Slaughterfishes"  Meddam
if $20  = "Skeevers"  Meddam
if $20  = "Mudcrabs"  Meddam
if $20  = "Gargoyles"  Meddam
if $20  = "Netches"  Meddam
if $20  = "Horkers"  Meddam
if $20  = "Sabrecats"  Meddam
if $20  = "Hagravens"  Meddam
if $20  = "Boars"  Meddam
if $20  = "BoarsAny"  Meddam
if $20  = "Canines"  Meddam

goto Normdam

[Giantdam]
set $9 5
goto calc

[Bigdam]
set $9 3
goto calc

[Meddam]
set $9 2
goto calc

[Normdam]
set $9 1
goto calc

 

[calc]
msg_notify "  Multiplier " $9
rnd_int 50 150
set $4 $$ * $9
av_restore $player Magicka $4
msg_notify "  Magicka " $4

av_get $player Health
msg_notify "  Health " $$
set $5 $$
set $6 $$ - 1

rnd_int 2 10
set $7  $$ * $9

if $7 < $5 damage
if $7 >= $5 finaldamage

[damage]
av_damage $player Health $7
msg_notify " Damage " $7
goto End

[finaldamage]
av_damage $player Health $6
msg_notify " Damage " $6
osla_set_arousal $player 0.0
goto End


[End]
av_get $player Health
set $10 $$
if $10 >= 1 Noheal
av_restore $player Health 1
goto End

[Noheal]

 

Posted (edited)
57 minutes ago, c_harlock125 said:

I´m having a problem with a custom damage/mage regen ini.

 

Having sex with any creature always results in the upper "race" chosen , in this case it skips to giantdamage

 

What I´m doing wrong ?


Script is called in the partner.

 

actor_race $self "SL"  
set $20 $$
msg_notify "  Race 20: " $20

if $20 = "Dragons"   Giantdam
if $20 = "FlameAtronach"   Giantdam

if $20  = "DwarvenSpiders"   Bigdam
if $20  = "DwarvenBallistas"   Bigdam
if $20  = "DwarvenSpheres"   Bigdam
if $20  = "DwarvenCenturions"   Bigdam
if $20  = "Trolls"   Bigdam
if $20  = "Giants"   Bigdam
if $20  = "Horses"   Bigdam
if $20  = "Deers"   Bigdam
if $20  = "Bears"   Bigdam
if $20  = "Mammoths"  Bigdam
if $20  = "Dremoras"  Bigdam
if $20  = "StormAtronach"  Bigdam
if $20  = "Seekers"  Bigdam
if $20  = "Werewolves"  Bigdam
if $20  = "LargeSpiders"  Bigdam
if $20  = "GiantSpiders"  Bigdam
if $20  = "Lurkers"  Bigdam
if $20  = "IceWraiths"  Bigdam
if $20  = "FrostAtronach"  Bigdam
if $20  = "Lurkers"  Bigdam
if $20  = "ChaurusReapers"  Bigdam
if $20  = "Cows"  Bigdam

if $20  = "Ashhoppers"  Meddam
if $20  = "Goats"  Meddam
if $20  = "Chaurus"  Meddam
if $20  = "ChaurusHunters"  Meddam
if $20  = "Draugrs"  Meddam
if $20  = "Dogs"  Meddam
if $20  = "DragonPriests"  Meddam
if $20  = "Deers"  Meddam
if $20  = "Wisps"  Meddam
if $20  = "Spriggans"  Meddam
if $20  = "WispMothers"  Meddam
if $20  = "Spiders"  Meddam
if $20  = "VampireLords"  Meddam
if $20  = "Slaughterfishes"  Meddam
if $20  = "Skeevers"  Meddam
if $20  = "Mudcrabs"  Meddam
if $20  = "Gargoyles"  Meddam
if $20  = "Netches"  Meddam
if $20  = "Horkers"  Meddam
if $20  = "Sabrecats"  Meddam
if $20  = "Hagravens"  Meddam
if $20  = "Boars"  Meddam
if $20  = "BoarsAny"  Meddam
if $20  = "Canines"  Meddam

goto Normdam

[Giantdam]
set $9 5
goto calc

[Bigdam]
set $9 3
goto calc

[Meddam]
set $9 2
goto calc

[Normdam]
set $9 1
goto calc

 

[calc]
msg_notify "  Multiplier " $9
rnd_int 50 150
set $4 $$ * $9
av_restore $player Magicka $4
msg_notify "  Magicka " $4

av_get $player Health
msg_notify "  Health " $$
set $5 $$
set $6 $$ - 1

rnd_int 2 10
set $7  $$ * $9

if $7 < $5 damage
if $7 >= $5 finaldamage

[damage]
av_damage $player Health $7
msg_notify " Damage " $7
goto End

[finaldamage]
av_damage $player Health $6
msg_notify " Damage " $6
osla_set_arousal $player 0.0
goto End


[End]
av_get $player Health
set $10 $$
if $10 >= 1 Noheal
av_restore $player Health 1
goto End

[Noheal]

 

 

In the if statements where you check for race, try swapping the = out with &=

Edited by MannySauce
Posted
1 hour ago, MannySauce said:

Decided to sit down and redo my old, bloated commands that check every single race against player partner to buff/debuff/add/remove/whatever, and uh, can this just be condensed down to this now?:

 

actor_race $partner "SL"
    set $1 $$
call $1

 

and then just have a collection of .inis for each race?

 

Kinda looks that way, yeah. :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   1 member

×
×
  • Create New...