Welcome to
Mod The Sims
Online: 1817
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 10 (Who?), Viewed: 19027 times.
Search this Thread
Old 23rd Feb 2015, 2:25 AM DefaultDebug Display and Dump Object Information (D3OI) #1
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


Updated - Nov 13, 2018 - Minor changes for Python 3.7.0 update.

Updated - Nov 25, 2017:
  • Added Probe menu choice - insert custom code and reload
  • Added d3oi_reload console command to reload the script in game
  • Fixed interactions in package to use ImmediateSuperInteractions as CommandSuperIntearction class no longer exists
Original Post:
I swore I wouldn't mod this weekend, but it was a boring Sunday and I'd had this idea and wanted to see what I could do with it. The result should be a fairly useful tool for TS4 modders, especially object modders and script modders. I started off just wanting the ability to shift-click an item to see what it's was, and it sort of took off from there. Based the dump output on some of the code in one of the normally unusable Maxis testing commands.

This adds an Object Info pie menu with Display and Dump to File actions. These are debug mode commands, so you'll need clown's enable advanced debug/cheat interactions script mod. Then you can shift-click any item (or even sim) in the game and display basic information to a notification dialog, or dump more information about that object to a file than you could probably find useful.

This isn't fancied up for distribution, it's just a basic package in a folder with a script in a script subfolder. Should run as long as you have script mods enabled. Object data will get dumped into a file named "D3OI_dump.txt" in the same folder as the script file.

The display version just outputs the objects class name, it's id number, and it's guid (instance id) in hex and decimal.

The info dumped to a file is REALLY long, so here's an example in a spoiler...

Hopefully folks will find this useful and maybe expand on what it can do from here.
Download - please read all instructions before downloading any files!
File Type: rar D3OI.rar (6.4 KB, 362 downloads) - View custom content
Last edited by scumbumbo : 13th Nov 2018 at 7:52 PM. Reason: Updated for Python 3.7.0 update
6 users say thanks for this.
[ Click here to view a longer list ]
Old 23rd Feb 2015, 2:41 AM #2
azoresman
Instructor

Join Date: Dec 2011
Posts: 539
Thanks: 2259 in 21 Posts
9 Achievements


Debugging tools yummy .
Testing on the go. I want to see the insides of some stuff.
Thank you .

Edit: For some reason it's not outputting de dump file, neither on screen.
Ill check it later the possible cause after looking at the code.

Edit: Looks like Mega pregnancy script bumps heads with this one and neither work.
Last edited by azoresman : 24th Feb 2015 at 8:19 PM. Reason: Update
Old 24th Feb 2015, 10:44 PM #3
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


Quote:
Originally Posted by azoresman
Edit: Looks like Mega pregnancy script bumps heads with this one and neither work.


That's odd, they don't share any code at all and it's working on my machine. Anyone else seeing issues?
Old 26th Feb 2015, 8:28 PM #4
azoresman
Instructor

Join Date: Dec 2011
Posts: 539
Thanks: 2259 in 21 Posts
9 Achievements


Quote:
Originally Posted by scumbumbo
That's odd, they don't share any code at all and it's working on my machine. Anyone else seeing issues?


I'll have to check if it's any other script conflicting, I'll let you know. Taking one by one until it works.
There are several Debug commands not working for me since last patch. Maybe my game is bugged and needs repair.
I'll see how to solve this later if I get a chance. Thanks again @scumbumbo.
Old 27th Feb 2015, 2:42 AM #5
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


@azoresman, don't know if you realized I didn't really say, but that's just a loose script with a package file, it has to be unzipped to a folder in Mods. So the package should end up in Mods\D3OI and the .py script in Mods\D3OI\Scripts
Old 27th Feb 2015, 11:33 AM #6
azoresman
Instructor

Join Date: Dec 2011
Posts: 539
Thanks: 2259 in 21 Posts
9 Achievements


Quote:
Originally Posted by scumbumbo
@azoresman, don't know if you realized I didn't really say, but that's just a loose script with a package file, it has to be unzipped to a folder in Mods. So the package should end up in Mods\D3OI and the .py script in Mods\D3OI\Scripts


Hi @scumbumbo !
Yes I know and now I found several things that I need to redo . I don't see anything wrong in your script.
I had changed (added) elements to the element list, In the early days of the SIMS4 and forgot it. (at the end of the list added 16 more entries.)
Mods that I've done and need to redo cos they went borked by the changes in the code.
When I have the time I'LL come back.
Thanks again.
Old 12th Feb 2016, 5:12 PM #7
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


Simple patch to d3oi.py to supply the object definition ID when displaying the object info in game. Add lines between the guid64 output and the actual notification display call:
Code:
    output += "guid64: 0x{:016x}\n        ({} dec)\n".format(obj.guid64, obj.guid64)
    if hasattr(obj, 'definition'):
        output += "objd: 0x{:016x}\n        ({} dec)\n".format(obj.definition.id, obj.definition.id)
    D3OI_show_notification(output)
Old 25th Nov 2017, 9:59 AM #8
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


I've updated this with some new stuff and fixed the interactions in the XML for compatibility with the latest game patches. See the first post above for the update info and to download the file.

Note that the enable debug cheats mod is out of date, but Weerbesu has posted an updated version in the feedback for the mod:
http://modthesims.info/download.php...244#post5215244
Old 13th Nov 2018, 7:58 PM #9
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


Updated for Python 3.7.0
Old 29th Mar 2019, 5:01 PM #10
funhammy
Test Subject

Join Date: Mar 2019
Posts: 21
Thanks: 257 in 7 Posts
4 Achievements


does this still work?
Old 29th Mar 2019, 11:06 PM #11
scumbumbo
Original Poster

Alchemist

Join Date: May 2012
Posts: 2,617
Thanks: 48707 in 92 Posts
22 Achievements


Quote:
Originally Posted by funhammy
does this still work?

Yes, should be working. There's some minor "tweak" style corrections that could be made to the XML package, but they don't affect functionality at all, so I haven't prioritized those fixes at all.
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.