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?) - 14 Feedback Posts, 10 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,959 · 13th Sep 2014
2.6 KB 204,959 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 4 of 35
Test Subject
DELETED POST
14th Sep 2014 at 4:32 PM
This message has been deleted by yolanda8604.
Test Subject
THANKS POST
#76 Old 14th Sep 2014 at 6:07 PM
Mods like this are why I love this community. Thank you.
Lab Assistant
#77 Old 14th Sep 2014 at 6:25 PM
do i have to do the steps? cause this mod not working for me when i unzip it but there is two in there so which one do i need to unzip in Oder to work?
Test Subject
THANKS POST
#78 Old 14th Sep 2014 at 6:50 PM
Hola podrías hacer un mod para no tener que escribir todo el rato testingcheats true es que es muy cansado eso,perdona por no escribir en ingles es que no se y el traductor lo hace mal,muy buenos trabajos
Test Subject
#79 Old 14th Sep 2014 at 7:12 PM
Quote:
Originally Posted by Gellenduo
do i have to do the steps? cause this mod not working for me when i unzip it but there is two in there so which one do i need to unzip in Oder to work?


As it says in the updated description, you don't unzip anything. Just drop the zip file into your "Documents\Electronic Arts\The Sims 4\Mods" folder. Also, you have to make sure "Script Mods" is checked in the Settings of your game. If it isn't, you will have to check it and restart.

Hope this helps.
Test Subject
THANKS POST
#80 Old 14th Sep 2014 at 7:29 PM Last edited by synysterxdave : 14th Sep 2014 at 7:30 PM. Reason: wrong post reason
i dont know whats going on but i've dropped the .zip in my mods folder and started up the sims 4 with scripts enabled in the options menu but im still not able to shift click sims and get the new debug options
Test Subject
THANKS POST
#81 Old 14th Sep 2014 at 8:28 PM Last edited by Reinette : 14th Sep 2014 at 11:11 PM.
I really appreciate your work, but I play the spanish version of the game and I noticed that some options are missing. I guess it is a translation issue. Is there any thing I can do? Thanks.

Edit: I've also noticed that modified relationships still remain the same after the modification via de option mod when you see at them in the relationship panel.
Test Subject
#82 Old 14th Sep 2014 at 8:30 PM
Quote:
Originally Posted by synysterxdave
i dont know whats going on but i've dropped the .zip in my mods folder and started up the sims 4 with scripts enabled in the options menu but im still not able to shift click sims and get the new debug options


You still need to set testingcheats to true. Press Shift + C, type testingcheats true then Shift + LMB on the desired thing and it should pop up.
Test Subject
THANKS POST
#83 Old 14th Sep 2014 at 9:07 PM
i have did everything correct and even typed in testingcheats i still dont get all the options just the basic ones
Test Subject
#84 Old 14th Sep 2014 at 9:20 PM
Quote:
Originally Posted by jinxhoney1113
I had to remove the thing, which sucks because the mod itself worked. The problem I had was that once my sim started an action, there was no way to cancel said action. So if it wasn't a short term action they never stopped. It's to bad too. I really loved this mod.


Hi
Sorry for my English,
I have the same problem, German version.

Thanks for the mod
Test Subject
THANKS POST
#85 Old 14th Sep 2014 at 10:35 PM
This is awesome, thank you!
Test Subject
THANKS POST
#86 Old 14th Sep 2014 at 10:36 PM
thanks man.

Mods like this are why I love this community
Test Subject
#87 Old 14th Sep 2014 at 10:39 PM
im not sure why, but even though all the debug commands are available for use when I shift click, but for altering needs (ie. disable household need decay), I still need to put in testingcheats on command for it to have effect.
Test Subject
#88 Old 14th Sep 2014 at 10:59 PM
Quote:
Originally Posted by nightinparis
im not sure why, but even though all the debug commands are available for use when I shift click, but for altering needs (ie. disable household need decay), I still need to put in testingcheats on command for it to have effect.


Same here. :/
Turquoise Dragon
retired moderator
#89 Old 14th Sep 2014 at 11:47 PM
testingcheats true is needed to get the alter needs to work, although the option exists when you shift click the mailbox without typing it in.
Test Subject
#90 Old 15th Sep 2014 at 12:17 AM
If you're irritated from having to type it in so often, you can edit default.ini in the bin folder to set up your hotkeys. I made four my testingcheats on shortcut. :P
Test Subject
#91 Old 15th Sep 2014 at 12:36 AM
Quote:
Originally Posted by siuni
If you're irritated from having to type it in so often, you can edit default.ini in the bin folder to set up your hotkeys. I made four my testingcheats on shortcut. :P


What did you type to make it work?
Test Subject
THANKS POST
#92 Old 15th Sep 2014 at 1:49 AM
yeah this mod is ESSENTIAL for all you advance hardcore SIm Players! tired of always reactivating testincheats True?
this is for you!
Props to the uploader and all who helped make this possible and the people leaving feedback further helping
Test Subject
#93 Old 15th Sep 2014 at 2:07 AM
Quote:
Originally Posted by MaryVann
What did you type to make it work?


I believe you can just type (whatever hotkey you want to use) = testingcheats true under [GameplayKeys] in Default.ini.
Test Subject
#94 Old 15th Sep 2014 at 2:15 AM
Quote:
Originally Posted by The Star Treker
I believe you can just type (whatever hotkey you want to use) = testingcheats true under [GameplayKeys] in Default.ini.


I tried that but it didn't work.
Test Subject
#95 Old 15th Sep 2014 at 2:36 AM Last edited by The Star Treker : 15th Sep 2014 at 2:58 AM.
Quote:
Originally Posted by MaryVann
I tried that but it didn't work.


Yeah it didn't work for me either but it looks like it almost work I open the console window when I click on my hotkey where I put in testingcheats true shows up but it says it's invalid or unknown command. Oh maybe you need to add | after = and a space between like the other hotkeys above try that.

Like this:

[GameplayKeys]
tilde = |clock.toggle_pause_unpause
zero = |clock.toggle_pause_unpause
one = |clock.setspeed one
two = |clock.setspeed two
three = |clock.setspeed three
four = |testingcheats true

[Edited] It finally work! :D
Test Subject
#96 Old 15th Sep 2014 at 3:09 AM Last edited by MaryVann : 15th Sep 2014 at 3:19 AM.
Quote:
Originally Posted by The Star Treker
Yeah it didn't work for me either but it looks like it almost work I open the console window when I click on my hotkey where I put in testingcheats true shows up but it says it's invalid or unknown command. Oh maybe you need to add | after = and a space between like the other hotkeys above try that.

Like this:

[GameplayKeys]
tilde = |clock.toggle_pause_unpause
zero = |clock.toggle_pause_unpause
one = |clock.setspeed one
two = |clock.setspeed two
three = |clock.setspeed three
four = |testingcheats true

[Edited] It finally work! :D


That's exactly what I had but it didn't work for me and still doesn't.

[Edited] Apparently my KB decided to stop working while in game. This does work when my KB decides it wanted to work again. Thanks so much for the help!
Test Subject
#97 Old 15th Sep 2014 at 3:28 AM
Quote:
Originally Posted by MaryVann
That's exactly what I had but it didn't work for me and still doesn't.

[Edited] Apparently my KB decided to stop working while in game. This does work when my KB decides it wanted to work again. Thanks so much for the help!


You're welcome! Now we don't have to type anything except clicking. I even add the Money cheat (with maximum amount) as a hotkey as well.
Test Subject
THANKS POST
#98 Old 15th Sep 2014 at 4:17 AM
i found that sometimes it can be case sensitive so i always have to put testingcheats True if i put true it wont do it unless its 'True' hope this helps/ it was a problem for me till i thought it was prolly case sensitive adn tried the capital T
Test Subject
THANKS POST
#99 Old 15th Sep 2014 at 5:28 AM
YES! Thank you so much! :D
Page 4 of 35