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?) - 12 Feedback Posts, 11 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,888 · 13th Sep 2014
2.6 KB 204,888 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 2 of 35
Test Subject
THANKS POST
#26 Old 13th Sep 2014 at 9:33 PM
Awesome
Field Researcher
#27 Old 13th Sep 2014 at 10:14 PM
This is great, thank you. I hated always having to re-enable testingcheats.

One problem I'm having with it though is that I can no longer disable need decay, as well as filling the household's needs. These cheats don't work for me with the mailbox, or with shift clicking the individual sim. Otherwise, everything else works great.

あなたはすてきですよ。あいしてる
Test Subject
THANKS POST
#28 Old 13th Sep 2014 at 10:24 PM
This is awesome, thank you. Definitely a great cheat mod. A lot easier than have to type in every cheat.
Test Subject
#29 Old 13th Sep 2014 at 10:27 PM
I love it but -- Cheat Need, while still there, seems to no longer work.
Test Subject
#30 Old 13th Sep 2014 at 10:39 PM
I did everything right, but it's not working... no mods will work in my game for some reason,... help?
Test Subject
#31 Old 13th Sep 2014 at 10:40 PM
I uploaded this to the \Documents\Electronic Arts\The Sims 4\Mods folder, enabled script mods, aaand...nothing. It doesn't even show up under the mods listing. Am I just oblivious and doing something wrong?
Test Subject
#32 Old 13th Sep 2014 at 10:43 PM
Quote:
Originally Posted by colossusxgl
I uploaded this to the \Documents\Electronic Arts\The Sims 4\Mods folder, enabled script mods, aaand...nothing. It doesn't even show up under the mods listing. Am I just oblivious and doing something wrong?


Disregard, I figured it out. I was unpacking the zip file and uploading like with other games. Didn't read far enough to see that I needed to just put the zip file in the mods folder. *doh*
Test Subject
#33 Old 13th Sep 2014 at 10:47 PM
Quote:
Originally Posted by colossusxgl
Disregard, I figured it out. I was unpacking the zip file and uploading like with other games. Didn't read far enough to see that I needed to just put the zip file in the mods folder. *doh*

OH! I did the same thing haha
Test Subject
#34 Old 13th Sep 2014 at 10:55 PM
I just tested it. Yeah the "Need" cheat still shows up but doesn't work. I'm sure you can fix it though. Can you add the "Money" cheat too? It's the only cheat I notice that's not included. And I don't know if you added the Modify Relationship (Positive and Negative Friendship/Romance) cheat from -50 to 50.
Test Subject
THANKS POST
#35 Old 13th Sep 2014 at 11:52 PM
I tested it out: Moving from screen to screen I still have to enter 'testingcheats true' to get the needs cheats to work. I am also experiencing a problem with not being able to get my sim to stop an action, such as play the guitar or dance. I have to force reset my sim through the cheats options to make him/her stop.
Lab Assistant
THANKS POST
#36 Old 13th Sep 2014 at 11:56 PM
Thanks for this. One issue though, on community lots I can't enter in buy/build mode
Theorist
THANKS POST
#37 Old 14th Sep 2014 at 12:11 AM
Thanks for this
Test Subject
Original Poster
#38 Old 14th Sep 2014 at 12:32 AM
Yeah, so that mod was just a hasty hack (which didn't even start as a mod but as a modding of a dll with an hex editor). I just posted it on the forums more as an example and as something that could help people wanting a cheat mod. You know, something better than nothing but not meant to be a quality product.

I never meant it to have the quality, testing and polish of a proper mod. I basically just had a more or less useful file I wanted to share because I thought it could be of use to some.

The site moderators went ahead and turned my thread about some half-assed experimental mod into some official download without my consent.

I hope they're willing to fix the issues and provide the support that it now deserve because I'm certainly not going to, or ever intended to. I just meant to explore modding and share what little I discovered for what little while I'm going to play this game before losing interest.
Forum Resident
THANKS POST
#39 Old 14th Sep 2014 at 12:45 AM
THANK YOU, I was getting so tired of having to type in testingcheats true all the time!! Haven't tested it yet, but LOVE it anyway!!!
Test Subject
THANKS POST
#40 Old 14th Sep 2014 at 12:51 AM
Thank you so much for this! Even though you didn't intend it as a "proper mod", I really appreciate the start you've made for others - should really really help my aggravation with this game.
Test Subject
THANKS POST
#41 Old 14th Sep 2014 at 1:06 AM
haven't tried it yet but how does the relationship cheat work? I did find the cheat codes to edit the relationships for adults but it won't allow for children.... I think that is really the only kinda cheat I'm in need of at this moment.
Pettifogging Legalist!
retired moderator
#42 Old 14th Sep 2014 at 1:11 AM
@clown , you did post "feel free to upload it yourself" -- so we did.

Quote:
Originally Posted by clown
Sorry, I work crazy overtime 6 days a week these days and can't really be bothered with internet bureaucracy on what little free time I have.

[ edit by pbox: Link removed, see next / first post ]

Get it before the link is removed, feel free to upload it yourself if you want.


^^

The fact that you're not going to support it is stated pretty clearly in post #1 -- you're not obliged to change/fix/edit/update anything you don't want to.

So yeah .. there are basically two options: either post it on this site -- but then it needs to be an actual upload -- or not post it here. But we can't have everyone post "uploads-that-aren't-really-uploads" in the Create forums -- that is simply not what the Create section is for.

If you don't want this to be available, just delete your first post and it'll be gone -- or if you want, we could change the thread owner to this account so it's not under your name any more. Please reply here or PM Leefish, me or Srikandi on how to proceed if you need us to do anything.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#43 Old 14th Sep 2014 at 1:36 AM
All right it did everything you said, put the zip file in mods folder, activated the option scripts mods, i can see the mod in the mod lists under script mods, now when i shift click something, nothing... so if the mod is in the list being recognized and working... why is not working??
Test Subject
#44 Old 14th Sep 2014 at 2:04 AM
Quote:
Originally Posted by hhhjjkkk
All right it did everything you said, put the zip file in mods folder, activated the option scripts mods, i can see the mod in the mod lists under script mods, now when i shift click something, nothing... so if the mod is in the list being recognized and working... why is not working??



See the post above you.
Lab Assistant
DELETED POST
14th Sep 2014 at 2:13 AM
This message has been deleted by Hayran. Reason: a
Lab Assistant
DELETED POST
14th Sep 2014 at 2:14 AM
This message has been deleted by Hayran. Reason: sda
Test Subject
THANKS POST
#45 Old 14th Sep 2014 at 2:24 AM
after some extensive testing and playing, yes this mod works well if installed exactly as the description instructions state.
the alter/chat-moods- make all happy and disable needs decay seems to be bugged or just not working
and you cannot cancel current activitys as stated in the comments above,
a known way to resolve this issue is to click on the object your interacting with and do reset.
this was just released so im sure and as we are all hopefull that these issues can be fixed and updated for us to further enjoy
Test Subject
THANKS POST
#46 Old 14th Sep 2014 at 3:02 AM
Thanks for sharing your mod. I'm just one of many players who appreciate not having to manually enable the debug cheats via the console every time that I play or change lots.
Test Subject
THANKS POST
#47 Old 14th Sep 2014 at 3:35 AM
absolutely wonderful
Only bug now is that alter needs no longer works. At least for me. Idk for anyone else.
Lab Assistant
#48 Old 14th Sep 2014 at 3:41 AM
Quote:
Originally Posted by RarelyUniquePerson
after some extensive testing and playing, yes this mod works well if installed exactly as the description instructions state.
the alter/chat-moods- make all happy and disable needs decay seems to be bugged or just not working
and you cannot cancel current activitys as stated in the comments above,
a known way to resolve this issue is to click on the object your interacting with and do reset.
this was just released so im sure and as we are all hopefull that these issues can be fixed and updated for us to further enjoy


You need to download the mod not follow the editing instructions, the mod fixed the problem with canceling actions.
Page 2 of 35