lessloveless Posted May 22, 2021 Posted May 22, 2021 I went ahead and put this on the unofficial Reddit also here. Devious Desires Post 2. state: complete. (dont use post 1 and expect this to work for Devious Desires) In case you guys want it I've attached the AU3 file and a compiled EXE to this post. Download the EXE if you dont want Autoit. Download the AU3 if you have autoit or just want to use that version. Code below. ;implementations ;------------------------- #include <Constants.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <file.au3> #include <WinAPIFiles.au3> #RequireAdmin $alreadysetmod = FileExists ("C:\streamerlocation.ini") if $alreadysetmod = 0 then $MODPACKAGEFILELOCATION = Inputbox ("", "Input your exact package location"&@crlf&"Example: c:\blah\blah\blah\blah.package") IniWrite ("C:\streamerlocation.ini", "general", "modlocation", $MODPACKAGEFILELOCATION) EndIf if $alreadysetmod = 0 Then $GAMEEXECUTABLELOCATION = Inputbox ("", "Input your exact game executable location"&@crlf&"Example: c:\blah\blah\blah\ts4_x64.exe") IniWrite ("C:\streamerlocation.ini", "general", "gamelocation", $GAMEEXECUTABLELOCATION) EndIf $MODPACKAGEFILELOCATION = IniRead ("C:\streamerlocation.ini", "general", "modlocation", "incorrect path input") $GAMEEXECUTABLELOCATION = IniRead ("C:\Streamerlocation.ini", "general", "gamelocation", "incorrect path input") $streamon = FileExists ($modpackagefilelocation) if $streamon = "1" Then $streamon = "enabled" Else $streamon = "disabled" EndIf $yesorno = MsgBox (4+262144, "The Sims 4: Streamer Mode Launcher", "Would you like to start The Sims 4 with Streamer Mode Enabled?"&@crlf&@crlf&"Current Status: "&$streamon) if $yesorno = "6" then $yesorno = "yes" Else $yesorno= "no" EndIf if $yesorno = "yes" then if $streamon = "disabled" then FileMove($modpackagefilelocation & ".disabled.notenabled.dontloadthis", $modpackagefilelocation) Run ($gameexecutablelocation) Else Run ($gameexecutablelocation) EndIf EndIf if $yesorno = "no" then if $streamon = "enabled" then Filemove($modpackagefilelocation, $modpackagefilelocation & ".disabled.notenabled.dontloadthis") Run ($gameexecutablelocation) Else Run ($gameexecutablelocation) EndIf EndIf Exit Just couldnt find one of these for the life of me. Sims 4 Streamer Mode Launch.au3 Sims 4 Streamer Mode Launch.exe
lessloveless Posted May 24, 2021 Author Posted May 24, 2021 Patch notes: TLDR: Issues fixed. Spoiler Edit: Update .002, I did not have a devious variable set due to me using a more direct script that did not require it (Since I know where all my files are). This was fixed. Edit: Download and compile completed. Both attached here. If you want the autoit version you can either copy the code or use the script here. If you dont want autoit I've attached the compiled exe version. Edit: Downloads removed, in script testing I caught a couple variables that were off, fixing now. Edit: Update .003, i had various things wrong while lazily making, all are fixed. Script should now work properly. Download & Installation: (install wherever you want.) Copy the code below into a notepad, save it as an .au3 file. OR Download the Script if you dont wanna copy and paste into a notepad. OR Download the EXE if you dont wanna install autoit. If you were using the version from post 1, delete c:\streamerlocation.ini to prompt for new locations. Warning: Keep your save's separated. I have no idea what happens if you start removing and re-adding devious desires to a save. As such I would not recommend constantly giving and taking it away, from a save. Rather, have 1 safe save, 1 devious save. If you launch with devious, load into your devious save. if you launch without, launch into your safe save. Warning note: This is streamer mode independent. Streamer mode can be toggled at will on any save. In case of Anti-Virus False Positive: Spoiler My system's Malwarebytes installation recently flagged the executable as a "Machine Learning" bit of malware. The code you see below is a direct compile. Autoit does not trigger any flags by itself. If you get this, you can either Add the executable to a whitelist, or install autoit and download the script. This code is written very simply on purpose so you can see what its doing. Where you see "msgbox" its making a message box. The 262144 tells it to stay on top of other windows. The 4 tells it to be a Yes/No box. The 0 tells it to be an "okay" box. Filemove just moves a file from one location, to another, with exact names. I am using this to change the extension or .package or whatever, to .dontloadthis or something else, that way, "The Sims 4", cant understand the file, and does not load it when the game launches. Note: You might find the lazy, uncaring-ish nature of this post to be odd and put you off. I made this simply because I play this game with my Girlfriend and sometime show things to friends on discord. My Girlfriend sometimes has family members around, and we cannot be displaying some extreme sex act on screen without an annoying conversation happening. For those moments we have streamer mode now. And we don't when we're alone as intended. I then changed small bits of my script to request for the various locations of files I don't know about, like where your mods are where you installed your game. That means this script will work with a legitimate or not legitimate copy of this freakishly expensive game as I figure that's not up to me. Devious desires toggle was a side project that came about on a whim so I could test that mod without interrupting me and my Girlfriend's current save files to see if there was anything inside of that project that made the game more realistic, as that is our goal for the game. I say all of this, to say these files were never for you. If you don't want a file like this, complaining about that to me isn't doing anything. I'm sharing this because I couldn't find something like it when I was looking around, and I'm sure some others out there are in the same boat. In that same vein you twitter raging over devious desires to me does nothing either. Paranoia note: This script does not care what feature you have installed, as long as its part of the base download. It will check on every launch, if you have the milk farm, kinky, pets, or dirty play packages. It wont touch whats not there, and it will keep checking in case you remove one. It should not fail if you remove these files because your not into the kink you installed. Let me know if this works for you, if you encounter a bug and I've got time I'll plop in a fix and update it. Simple script so its no trouble. ;implementations ;------------------------- #include <Constants.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <file.au3> #include <WinAPIFiles.au3> #RequireAdmin $alreadysetmod = FileExists ("C:\streamerlocation.ini") if $alreadysetmod = 0 then $MODPACKAGEFILELOCATION = Inputbox ("", "Input your exact package location"&@crlf&"Example: c:\blah\blah\blah\blah.package") IniWrite ("C:\streamerlocation.ini", "general", "modlocation", $MODPACKAGEFILELOCATION) EndIf if $alreadysetmod = 0 Then $GAMEEXECUTABLELOCATION = Inputbox ("", "Input your exact game executable location"&@crlf&"Example: c:\blah\blah\blah\ts4_x64.exe") IniWrite ("C:\streamerlocation.ini", "general", "gamelocation", $GAMEEXECUTABLELOCATION) EndIf if $alreadysetmod = 0 Then $DeviousLocation = Inputbox ("", "Input the folder Devious Desires is installed to"&@crlf&"Example: c:\blah\blah\blah\deviousdesires\"&@crlf&"make sure there is a final \ at the end.") $DeviousfeaturesLocation = Inputbox ("", "Input the folder Devious Desires features are installed to"&@crlf&"Example: c:\blah\blah\blah\deviousdesires_features\"&@crlf&"make sure there is a final \ at the end.") IniWrite ("C:\streamerlocation.ini", "general", "deviouslocation", $deviouslocation) IniWrite ("C:\streamerlocation.ini", "general", "deviousfeatureslocation", $deviousfeatureslocation) EndIf $MODPACKAGEFILELOCATION = IniRead ("C:\streamerlocation.ini", "general", "modlocation", "incorrect path input") $GAMEEXECUTABLELOCATION = IniRead ("C:\Streamerlocation.ini", "general", "gamelocation", "incorrect path input") $devlocal = IniRead ("C:\Streamerlocation.ini", "general", "deviouslocation", "incorrect path input") $devlocalfeat = IniRead ("C:\Streamerlocation.ini", "general", "deviousfeatureslocation", "incorrect path input") $streamon = FileExists ($modpackagefilelocation) $devious = FileExists ($devlocal & "deviousdesires.package") if $devious = "1" then $devious = "enabled" Else $devious = "disabled" EndIf if $streamon = "1" Then $streamon = "enabled" Else $streamon = "disabled" EndIf $yesorno = MsgBox (4+262144, "The Sims 4: Streamer Mode Launcher", "Would you like to start The Sims 4 with Streamer Mode Enabled?"&@crlf&@crlf&"Current Status: "&$streamon) if $yesorno = "6" then $yesorno = "yes" Else $yesorno= "no" EndIf $deviousornot = MsgBox (4+262144, "The Sims 4: Streamer Mode Launcher", "Would you like to start The Sims 4 with Devious Desires Enabled?"&@crlf&@crlf&"Current Status: "&$devious&@crlf&@crlf&"Warning: Due to the complex nature of this package It is not recommended to load a save that is already using Devious Desires via some method, without Devious Desires being installed as this can cause corruption."&@crlf&@crlf&"Be Devious, But Safe") if $deviousornot = "6" then $deviousornot = "yes" Else $deviousornot = "no" EndIf if $deviousornot = "no" Then if $devious = "enabled" Then Filemove ($devlocal&"deviousdesires.package", $devlocal&"deviousdesires.package"&".dontloadthis") Filemove ($devlocal&"deviousdesires.ts4script", $devlocal&"deviousdesires.ts4script"&".dontloadthis") Filemove ($devlocal&"deviousdesires_wickedwhims_loader.config", $devlocal&"deviousdesires_wickedwhims_loader.config"&".dontloadthis") Filemove ($devlocal&"deviousdesires_wickedwhims_loader.ts4script", $devlocal&"deviousdesires_wickedwhims_loader.ts4script"&".dontloadthis") $milkfarmE = FileExists ($devlocalfeat&"deviousdesires_milk_farm.package") $milkfarmD = FileExists ($devlocalfeat&"deviousdesires_milk_farm.package"&".dontloadthis") $dirtyplayE = Fileexists ($devlocalfeat&"deviousdesires_dirty_play.package") $dirtyplayD = FileExists ($devlocalfeat&"deviousdesires_dirty_play.package"&".dontloadthis") $kinkyE = FileExists ($devlocalfeat&"deviousdesires_kinky.package") $kinkyD = FileExists ($devlocalfeat&"deviousdesires_kinky.package"&".dontloadthis") $petsE = FileExists ($devlocalfeat&"deviousdesires_pets.package") $petsD = FileExists ($devlocalfeat&"deviousdesires_pets.package"&".dontloadthis") if $milkfarmE Or $milkfarmD = "1" then Filemove ($devlocalfeat&"deviousdesires_milk_farm.package", $devlocalfeat&"deviousdesires_milk_farm.package"&".dontloadthis") EndIf if $dirtyplayE Or $dirtyplayD = "1" then Filemove ($devlocalfeat&"deviousdesires_dirty_play.package",$devlocalfeat&"deviousdesires_dirty_play.package"&".dontloadthis") EndIf if $kinkyE or $kinkyD = "1" Then Filemove ($devlocalfeat&"deviousdesires_kinky.package", $devlocalfeat&"deviousdesires_kinky.package"&".dontloadthis") EndIf if $petsE or $petsD = "1" Then Filemove ($devlocalfeat&"deviousdesires_pets.package", $devlocalfeat&"deviousdesires_pets.package"&".dontloadthis") EndIf EndIf EndIf if $deviousornot = "yes" Then if $devious = "disabled" Then Filemove ($devlocal&"deviousdesires.package"&".dontloadthis", $devlocal&"deviousdesires.package") Filemove ($devlocal&"deviousdesires.ts4script"&".dontloadthis", $devlocal&"deviousdesires.ts4script") Filemove ($devlocal&"deviousdesires_wickedwhims_loader.config"&".dontloadthis", $devlocal&"deviousdesires_wickedwhims_loader.config") Filemove ($devlocal&"deviousdesires_wickedwhims_loader.ts4script"&".dontloadthis", $devlocal&"deviousdesires_wickedwhims_loader.ts4script") $milkfarmE = FileExists ($devlocalfeat&"deviousdesires_milk_farm.package") $milkfarmD = FileExists ($devlocalfeat&"deviousdesires_milk_farm.package"&".dontloadthis") $dirtyplayE = Fileexists ($devlocalfeat&"deviousdesires_dirty_play.package") $dirtyplayD = FileExists ($devlocalfeat&"deviousdesires_dirty_play.package"&".dontloadthis") $kinkyE = FileExists ($devlocalfeat&"deviousdesires_kinky.package") $kinkyD = FileExists ($devlocalfeat&"deviousdesires_kinky.package"&".dontloadthis") $petsE = FileExists ($devlocalfeat&"deviousdesires_pets.package") $petsD = FileExists ($devlocalfeat&"deviousdesires_pets.package"&".dontloadthis") if $milkfarme or $milkfarmd = "1" Then Filemove ($devlocalfeat & "deviousdesires_milk_farm.package"&".dontloadthis", $devlocalfeat&"deviousdesires_milk_farm.package") EndIf if $dirtyplaye or $dirtyplayd = "1" Then Filemove ($devlocalfeat&"deviousdesires_dirty_play.package"&".dontloadthis", $devlocalfeat&"deviousdesires_dirty_play.package") EndIf if $kinkye or $kinkyd = "1" Then Filemove ($devlocalfeat&"deviousdesires_kinky.package"&".dontloadthis", $devlocalfeat&"deviousdesires_kinky.package") EndIf if $petse or $petsd = "1" Then Filemove ($devlocalfeat&"deviousdesires_pets.package"&".dontloadthis", $devlocalfeat&"deviousdesires_pets.package") EndIf EndIf EndIf if $yesorno = "yes" then if $streamon = "disabled" then FileMove($modpackagefilelocation & ".disabled.notenabled.dontloadthis", $modpackagefilelocation) Run ($gameexecutablelocation) Else Run ($gameexecutablelocation) EndIf EndIf if $yesorno = "no" then if $streamon = "enabled" then Filemove($modpackagefilelocation, $modpackagefilelocation & ".disabled.notenabled.dontloadthis") Run ($gameexecutablelocation) Else Run ($gameexecutablelocation) EndIf EndIf Exit Sims 4 Streamer Mode Launch With Devious Desires.exe Sims 4 Streamer Mode Launch With Devious Desires.au3
lessloveless Posted May 24, 2021 Author Posted May 24, 2021 For those who would like to edit this script to do more but don't know how autoit or any of the code works, OR, youd just like to write this code from scratch yourself, I've put an explainer below in spoilers to get you to the point you could write this whole script yourself. Just copy my "Implementations" section including the #include's and put it at the top, as what those do is essentially give you the below commands, or give them enhanced functionality. All the ones I used come with the Autoit base installer and did not come from a custom source, so you wont need to download anything extra. Spoiler Essentially, this is what all the code does from the top. $blah = "blah" This can be anything and be called anything, just has to begin with a dollarsign, even a command below. If the command runs properly, the "Return value" will be the value of $blah. when you want to use this value, just call its $ as seen in the spoiler example below. Example: Spoiler Say you set $blah to C:\streamerlocation.ini File exists ($blah) will check if that file exists on your system, without you having to type out the location, and return a 1 or a 0, if you gave it a variable. File exists ("FILE") <- checks if a file exists and returns a 1 if yes, or 0 if no. If this was $blah and the file exists on your system, then $blah = "1". iniwrite ("LOCATION YOU WANT INI FILE, "Section 1 in the ini file, can be anything", "Section 2 in the ini file, can be anything", "What you are putting in the inifile") Example: Spoiler iniwrite ("c:\streamerlocation.ini", "blah", "my moms butt", "is super big") The above will create or alter an ini file at c:\streamerlocation.ini. It creates or alters the "blah" section and adds a "my moms butt" section. This section will now have a value of "is super big" iniread ("Location of INI file", "Section 1 to pull data from", "Section 2 (where your iniwrite data is)", "Value to return if nothing is found") Example: Spoiler $blah = iniread ("c:\streamerlocation.ini", "blah", "my moms butt", "nice cock") Its best to set this to a variable, otherwise its a useless command, so i put that in the example. This will look through the file "C:\streamerlocation.ini" for a section blah. If the section is found it then looks for the section "My moms butt". as in the above example, if "My moms butt"'s value is "is super big" then $blah = "is super big". If the "My moms butt" section is not found, then $blah = "nice cock" Inputbox ("title of window", "Text in window") <- This brings up a text box that you can type into. Example: Spoiler Inputbox ("Hello", "Type world") will popup a box the user can type into called "Hello" that says "Type world". The return value will be what the user typed. msgbox (4 or 0+262144, "title of window", "Text in window") <- this a message box that contains text. use 4 if you want a yes no box. use 0 if you want an okay box. +262144 tells the window to remain ontop of any other window. Example: Spoiler msgbox (4+262144, "Hey", "Sup") <- this will produce a yes no window called "Hey" that says "Sup" in the window. Yes returns "6", no returns "7" to the variable if you set one. If "THIS" (and/or "THIS") then DO THIS DO THIS AFTER DO THIS Else (or if its NOT "THIS" or "THIS") DO THIS THEN DO THIS THEN DO THIS endif Example: Spoiler If $Blah = "your moms butt" then Msgbox (0+262144, "Hey", "Nice Butt") Else Msgbox (0+262144, "Hey", "Nice Cock.") endif. Filemove ("THE EXACT LOCATION WITH FILE NAME", "THE EXACT LOCATION TO MOVE TO AND WHAT YOU WANT THE EXACT FILE NAME") Example: Spoiler Filemove ("C:\mymomsbutt.package", "C:\mymomsbutt.package.nicecock") <-This will move the file C:\mymomsbutt.package" to the same location its already in, and rename the file to "C:\mymomsbutt.package.nicecock" which in The Sims 4 renders it unreadable. Exit <- Terminates the program. Run ("THE FILE TO RUN") <- this launches a program with whatever rights you gave autoit. #RequireAdmin <- This makes Autoit Require admin rights, or it will close instantly. This is needed if you are filemove'ing to a location that needs admin rights. Autoit runs its code from Top to Bottom. Any attempt to circumvent this will result in an eventual "cyclical loop" error. Instead there are many ways of performing whatever task you want, though if you need additional interaction outside of what this script does you will need additional includes at the top to interact. Such as creating your own GUI, and there are programs out there that let you design the UI and output the code for Autoit and the includes you need. Sometimes you might need Includes you dont have, and you can grab those from the Autoit forums. Just make sure if its called something sketchy like "Mymomsbutt.au3" to look through its code and make sure it isnt emailing whatever data it finds to some asshole in another country. If it is, just remove the lines you find that do that. If you need help writing a script thats more advanced than this just let me know and if its not too crazy ill respond. . Sometimes the easier solution is routing Autoit to launch a different script written in like batch or python as they perform the task without a billion lines of code. For example, if you needed one, you could create a The Sims 4 Launcher with a GUI that allows you to save "Presets" of mods in ini files on a folder in your system, and load the same "Presets" based on what you select when launching the game. You could then implement a feature that dir scans your mod's folder and returns files to an "Array" that go more than a single folder deep. You could then place these files into custom named folders in your mods directory that are not this way, essentially fixing a very common "user" mod installation error.. This was just never the intention for me making this script.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.