MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

[Script Mod] enable advanced debug/cheat interactions

by clown Posted 13th Sep 2014 at 8:19 PM - Updated 13th Sep 2014 at 11:53 PM by leefish
858 Comments / replies (Who?) - 6 Feedback Posts, 3 Thanks Posts
Picked Upload! This is a picked upload! It showcases some of the best talent and creativity available on MTS and in the community.
This mod is a small script that patches a function in the maxis game code to enable additional debug cheats. It also always enable cheats without needing to use the testingcheats command.
The python source is included as it provides an example of how to replace methods and functions in the maxis code.
I do not guarantee that the mod won't break with future updates of the game or that I'll be able to be arsed to fix it. But hey, you have the source :p

Unlike the original less than subtle method of modifying python33.dll to force the __debug__ variable to true, this one doesn't seem to be suffering from any game breaking side effect (at least it didn't during my extremely thorough 20 seconds test of getting a sim to fish and then successfully cancelling it).

Installation: put the zip file in your Mods directory. The zip also contains the .py source.
Make sure that script mods are enabled in game options.

Update: Now doesn't require to use the testingcheats console command.

Below is the original post describing the original less than satisfactory python dll editing method, in case someone is interested for some reason:



So I was looking into the decompiled python code and I noticed that a lot of interesting things are enabled when the global __debug__ variable is set to true.

It turns out that it is a builtin python variable normally set by python when run in non-optimized mode. Sims 4 helpfully ships python as a separate DLL from the main binary, so we can easily do some good ole hex editing of the code in that dll to force this variable to be set.

Steps:
1. Get HxD (http://mh-nexus.de/en/hxd/).
1. Locate your sims 4 directory, which should be something something Origin Games/The Sims 4
2. Go into the Game/Bin directory.
3. Make a backup copy of Python33.dll
4. Launch HxD
5. Drag and drop Python33.dll into HxD
6. Press ctrl+f to bring up the search dialog
7. In "datatypes", select "hex-values"
8. In "search for", enter "0f45fd57"
9. The four bytes "0F 45 FD 57" will be highlighted. Click on the "45".
10. type "44", so that those bytes now read "0F 44 FD 57"
11. Save

Restart the game.

In the game a bunch of new debug interactions should now be available by shift clicking on sims, objects or directly on the lot, allowing to manipulate traits, emotions, spawn sims, break things, start fires etc.
They are always available without having to enter testingcheats true in the console, until you restore the original Python33.dll file.

Doing this is also probably a useful step towards enabling the commands to reload scripts on the fly. There are lots of console commands that are flagged as debug only, but even after doing the above they don't seem to work. This will need more investigation.
Type: Other

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 4
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
EnableDebugCheats.zip

Size: 2.6 KB · Downloads: 204,960 · 13th Sep 2014
2.6 KB 204,960 13th Sep 2014
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:
1. Download: Click the File tab to see the download link. Click the link to save the .rar or .zip file(s) to your computer.
Read the upload description for installation instructions. If nothing else is specified, do the following:
2. Extract: Use WinRAR (Windows) to extract the .package file(s) (if included, ts4script as well) from the .rar or .zip file(s).
3. Cut and paste the .package file(s) (if included, ts4script as well) into your Mods folder
  • Windows XP: Documents and Settings\(Current User Account)\My Documents\Electronic Arts\The Sims 4\Mods\
  • Windows Vista/7/8/8.1: Users\(Current User Account)\Documents\Electronic Arts\The Sims 4\Mods\

Need more information?
  • Anyone can use both .rar and .zip files easily! On Windows, use WinRAR.
  • If you don't have a Mods folder, just make one.
  • Mod still not working? Make sure you have script mods enabled
 
858 Comments / Replies (Who?) - 556 Feedback Posts, 268 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 35 of 35
Lab Assistant
#851 Old 8th Sep 2019 at 2:04 AM
Quote:
Originally Posted by deblake60
I get a 404 error page when I try to click on the links provided? Does anyone know if they work with the update on (9/5/2019)?

Post #814
Post #830
But I doubt they work, it didn't work for me with the new update (welpplssome1updatethemod)

Feel free to add me on The Sims 3 and to send me in-game gifts. ^^
You can also find me on The Sims Forums, but inactive.
Test Subject
#852 Old 23rd Nov 2019 at 12:55 AM Last edited by richilye : 23rd Nov 2019 at 1:38 AM.
Unfortunately it doesn't seem to work as of update 1.58 (Discover University), all my sims stay static in place and don't do anything until the game decides to crash.
I guess it needs to be updated now, probably because the new University expansion has some cheats of it's own that might be conflicting.

Also, Python33.dll got changed to Python37.dll and the "0f45fd57" hex value does not seem to exist in this one, will need to find the newer one and change it.

Edit: You can use MCCC to enable the debug commands, when in the MCCC menu go into [MCCC Settings ---> Notification/Console/Menu Settings ---> Console Command Settings ---> Debug Command in Cheats] Enable that and restart the game, ti's also a good idea to keep testingcheats enabled so it auto enabled every time you start the game, else it won't work, after enabling them, restart the game.
Test Subject
#853 Old 9th Dec 2019 at 7:48 AM Last edited by kuncen : 9th Dec 2019 at 9:04 AM.
I can't add active sims career like secret agent, culinary, etc to my inactive sims anymore.
via Left Click sims > Cheat sims info > Add Career

My goal is assign them career (not NPC career) without switching household.
Test Subject
THANKS POST
#854 Old 28th Jan 2020 at 3:48 PM
Awesome
Field Researcher
THANKS POST
#855 Old 10th Apr 2020 at 12:23 PM
Today my game was struggling since a recent update. My sims wouldnt do anything and when I clicked on objects, or on the ground, or on sims, no menu appeared for me to click on options. I delete the pregnancy mega mod, simocide, enable debug cheats, and autnomous repairs, and my game started working again. Not 100% sure which of those was conflicting but they're all pretty old mods so all could have been guilty. It's a shame, I enjoyed those mods.
Test Subject
THANKS POST
#856 Old 25th Apr 2020 at 1:34 PM
Confirming this isn't working with v1.60. No menus at all would pop up when I clicked on anything, not even my sim! Thanks to @richilye for the tip with MCCC!
Lab Assistant
#857 Old 29th Apr 2020 at 12:45 AM
Quote:
Originally Posted by richilye
Edit: You can use MCCC to enable the debug commands, when in the MCCC menu go into [MCCC Settings ---> Notification/Console/Menu Settings ---> Console Command Settings ---> Debug Command in Cheats] Enable that and restart the game, ti's also a good idea to keep testingcheats enabled so it auto enabled every time you start the game, else it won't work, after enabling them, restart the game.


I was about to post the same thing, but you beat me to it. MCCC is a brilliantly versatile mod for the game.

WHAT I IF TOLD
YOU

THAT YOU READ
THE FIRST LINE WRONG?

GARGA BLARG BLARG!!!
Test Subject
#858 Old 1st May 2020 at 7:28 PM
Unfortunately it stopped working i'm so sad
Field Researcher
#859 Old 4th Jun 2020 at 2:50 PM
Quote:
Originally Posted by Tenkei
Confirming this isn't working with v1.60. No menus at all would pop up when I clicked on anything, not even my sim! Thanks to @richilye for the tip with MCCC!
Quote:
Originally Posted by mandydonzela
Unfortunately it stopped working i'm so sad

Make sure you download this one uploaded by scumbumbo on page 33.

http://modthesims.info/download.php...120#post5466120
Page 35 of 35