Jump to content

Recommended Posts

Posted

How would you even get a license event from SLS if it isn't installed? That won't ever happen.

 

Could you make the time of day "impact" on sleep deprivation an easy-to-change global, so for characters that have odd sleep patterns that are consistent, they can use sleep deprivation features but scale that down a LOT? Doesn't seem important enough to be in the MCM though.

 

If it's already a global, maybe add the name of it to the tooltip?

Posted
29 minutes ago, Lupine00 said:

How would you even get a license event from SLS if it isn't installed? That won't ever happen.

Think you misread. Corsayr is currently Game.GetFormFromFiling the 'ValidUntil' global variables. Which was my concern. 

Edit: I believe the code snippet is part of a periodic update. Not code run on a modevent. Which is where the confusion is I think. 

29 minutes ago, Lupine00 said:

Could you make the time of day "impact" on sleep deprivation an easy-to-change global,

It's hard coded into the needs script atm. 

Do you mean the 'amplitude' of the various conditions or the time of day?

 

Good to see you again btw ;)

Posted

Hi maybe you can help me, BW went to bed I think and I am stuck

 

Spoiler

This line (and others like it)

 

        SLS_bCrimeNotNude = (((Game.GetFormFromFile(0x49301, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

 

are giving me this error (and others like it)

 

Compiling "SLAdventures_DLCAndModCompScript"...
C:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\SLAdventures_DLCAndModCompScript.psc(205,2): variable SLS_bCrimeNotNude is undefined
C:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\SLAdventures_DLCAndModCompScript.psc(205,2): type mismatch while assigning to a none (cast missing or types unrelated)

 

205,02 is like the space before the SLS_bCrimeNotNude
 

 

Posted

SLS_bCrimeNotNude is undefined. It doesn't have a type - Int/float/bool. 

 

I'd guess it's meant to be Bool SLS_bCrimeNotNude = (((Game.GetFormFromFile(0x49301, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

Posted
3 minutes ago, Monoman1 said:

SLS_bCrimeNotNude is undefined. It doesn't have a type - Int/float/bool. 

 

I'd guess it's meant to be Bool SLS_bCrimeNotNude = (((Game.GetFormFromFile(0x49301, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

Ill try that thanks!

 

Posted

okay one more problem this one is in the Crime laws script

 

Spoiler

These errors and others like it 

 

Starting 1 compile threads for 1 files...
Compiling "SLAdventures_CrimeLawsScript"...
C:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\SLAdventures_CrimeLawsScript.psc(53,41): a property cannot be used directly on a type, it must be used on a variable
C:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\SLAdventures_CrimeLawsScript.psc(53,101): SLS_bCrimeNotNude is not a function or does not exist
C:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\SLAdventures_CrimeLawsScript.psc(53,101): cannot call the member function SLS_bCrimeNotNude alone or on a type, must call it on a variable

 

on this line (and others like it)

 

            && ((SLAdventures_DLCAndModCompScript.bSLSIsLoaded == False) || (SLAdventures_DLCAndModCompScript.SLS_bCrimeNotNude() == False)) \ 

 

 

The bCrimeNotNude is the line from the DLCandModCompScript we fixed before

 

The 41 and 101 slots are the Orange decimals

 

Posted
14 minutes ago, Corsayr said:

okay one more problem this one is in the Crime laws script

Is SLAdventures_DLCAndModCompScript the name of a script? 

 

You can't really do that because that script can be attached to more than one object. So you need to tell it which object the script is attached to. (Which instance of the script). Usually you do this by declaring it as a property at the top of the script. 

 

SLAdventures_DLCAndModCompScript Property DLCAndModCompScript Auto

 

And fill in the property in the properties window. This creates a variable (DLCAndModCompScript) which is pointing to a script on a particular object. And it is of type SLAdventures_DLCAndModCompScript. 

 

Then the line becomes:

 

&& ((DLCAndModCompScript.bSLSIsLoaded == False) || (DLCAndModCompScript.SLS_bCrimeNotNude() == False)) \ 

 

Or at least I think that's what's wrong. Hard to know for sure without the full scripts. 

Posted
4 minutes ago, Monoman1 said:

Is SLAdventures_DLCAndModCompScript the name of a script? 

yes

 

it used to be DLCModsComp but it said that was undefined

Posted
21 hours ago, Corsayr said:

If it helps here are the scripts as is right now

Having looked at it the implementation is a bit... messy. I mean no offense by that. Confusion is the enemy when it comes to scripting. When you get confused you (and I have done this too many times to count) start to make things even more complex than they need to be. Bolting more stuff on and adding more confusion in the process. 

 

So I changed it to use the StUtil variables. Now this means it'll only work with SLS 0.628+ but there's no checking globals, GetFormsFromFiles and thus no need to check if SLS is installed. The simpler the better when it comes to scripting in my experience, within the scope of what needs to be done. So I've commented out some stuff that I don't think is necessary anymore. Namely the checking is SLS installed and the function LoadFormsSLS. You'd have to run that by Teutonic though to see if that's ok because I don't know if they're used in other scripts. 

 

So then the checks are changed from:

&& ((SLAdventures_DLCAndModCompScript.bSLSIsLoaded == False) || (SLAdventures_DLCAndModCompScript.SLS_bCrimeNotNude() == False)) \ 

 

to:

StorageUtil.GetIntValue(None, "_SLS_HasValidClothesLicence", Missing = -2) == 0

 

If you're getting into scripting then I'd have to say PapyrusUtil is probably THE most useful thing I've ever used in Skyrim scripting. Always keep Putil in mind as it's immensely useful. 

 

<snip>

 

I haven't compiled these because I don't have the rest of the scripts to hand. 

 

PS. Sorry. I'm kind of like the guy that comes in and wipes all the chalk off the board like an asshole. 

Posted
10 minutes ago, Monoman1 said:

PS. Sorry. I'm kind of like the guy that comes in and wipes all the chalk off the board like an asshole. 

So in the DLCandModComp script you left all the function stuff, does it really still need that?

 

Spoiler

Function LoadFormsSLS()

    If (bSLSIsLoaded == True)

        Bool SLS_bCrimeNotNude = (((Game.GetFormFromFile(0x49301, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeSkimpyOutfit = (((Game.GetFormFromFile(0xD09E8, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeArmored1 = (((Game.GetFormFromFile(0x43648, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeArmored2 = (((Game.GetFormFromFile(0x49300, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeCoveredInCum = (((Game.GetFormFromFile(0xD09E8, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeArmed = (((Game.GetFormFromFile(0x43649, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeHasWeapons = (((Game.GetFormFromFile(0x43649, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeOutAtNight = (((Game.GetFormFromFile(0xD09E7, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeNotCollared = (((Game.GetFormFromFile(0xD1A27, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

        Bool SLS_bCrimeUsedMagic = (((Game.GetFormFromFile(0x43647, SLS) as GlobalVariable).GetValue()) > (Utility.GetCurrentGameTime()))

    Else

    EndIf


EndFunction 

 

 

Posted
1 minute ago, Corsayr said:

So in the DLCandModComp script you left all the function stuff, does it really still need that?

Should be commented out. Between

:/

/;

 

Posted
13 minutes ago, Corsayr said:

ahh I see

Oh and I should have commented out: 

Bool Property bSLSIsLoaded = False Auto Hidden 

 

as it is unused. (in these scripts at least)

Posted
3 hours ago, Monoman1 said:

Ah I rarely have much interest in carving up mod features. Sorry. 

No worries, I'm happy with SL Survival. My main point is that the trauma feature is awesome :)

Posted

okay those did compile so yay!

 

Quick question, so you undid with the edit out ; marking all the changes I made so there should be no actual changes to the SLAdventures_DLCAndModCompScript, is that correct?

Posted
27 minutes ago, Monoman1 said:

Should be commented out. Between

:/

/;

 

for real when I first went through it my first reaction was you were winking and saddened by my code... ?

Posted
4 minutes ago, Corsayr said:

is that correct?

Ah well I'm not sure what changes you made so you should give it a decent look-over. 

3 minutes ago, Corsayr said:

for real when I first went through it my first reaction was you were winking and saddened by my code... 

Haha :)

Comment block. 2nd most useful thing after Putil. 

Posted

In theory at least this should be a very popular patch because it gives both mod users something they have actually been asking for

 

It gives SLAdv users an enforcement mechanism ALA when you go into a town that requires you to be naked someone comes up and physically takes your clothes from you.

 

and it gives SLS users continuity between the license system and the criminal justice system. 

 

 

Posted

Everything appears to be working so testers can try this new version let it overwrite the last version of course 

 

SLS license to SLA crime patch.7z

 

Sorry,

Installation instructions:

Unzip into the SL Adventures Script folder. Let it overwrite. 

 

 

Refresher on what to be testing from the original post

Spoiler

The best way to test this is to Set these laws in SLAdv

Nudity is inverted illegal: So it is a crime to wear clothes

Skimpy clothing is illegal to wear

covered in cum is illegal

wearing armor is illegal

carrying weapons is illegal (either equipped or in inventory your choice the script will be an exception for both)

using magic is illegal

being out at night is illegal (you should make sure the settings for the night in SLAdve and the curfew hours in SLS are the same in their MCMs)

Being collared inverted so NOT wearing a collar is illegal

 

With a clothing license, you will not be fined for being naked.

 

With an Armor or Bikini license, you will not be fined for wearing armor

 

With a whore license you will not be fined for being covered in cum or wearing skimpy outfits.

 

With a weapon license, you will not be fined for equipped weapons or having them in your inventory.

 

With a magic license, you will not be fined for using magic. 

 

and a Curfew license will prevent you from getting fined for being out at night.

 

If you have a freedom license you will not be charged for not wearing a collar.

 

Posted
4 minutes ago, Monoman1 said:

That's a bit generous ;)

 

Looking forward to it. 

I'm feeling generous 

 

The Freedom license does something now, so there is that. ?

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
×
×
  • Create New...