PDA

View Full Version : Finding Maxis string and object IDs


plasticbox
21st Feb 2016, 1:57 PM
This is how to find the IDs of a string or an object definition, like when you want to use an existing object for a tuning mod (say as a prop or as a reward) or to manually clone something -- there are several ways to do that:


0. Knowing where your game files are:

Your game files live in Program Files (x86)\Origin Games\The Sims 4\ or Program Files\Origin Games\The Sims 4\ depending on what OS you have (and assuming your OS speaks English). For users with different system languages this will be slightly different but I guess you can figure that out.

When you know what EP an object is from, it ought to be sufficient to search that one game package in s4pe. When you need to search multiple packages at once, you can use Cmar’s TS4 Package Searcher (http://modthesims.info/download.php?t=573139).


1. Finding the ID of an in-game string:



Open ..\The Sims 4\Data\Client\Strings_ENG_US.package (or whichever language you have the game installed in) in s4pe (https://github.com/s4ptacle/Sims4Tools/releases) -- this contains all of the localised in-game text and the keys the game uses to find them
Copy and paste the entire thing from the preview into your text editor (optionally, save it somewhere so that if you do this more often, you won't have to copy it again)
Search that text file for the text you want; it will turn up something like "0x7C6D0F9B: Trusty Companion TV" -- that hex value is the internal ID of this string. You can use that e.g. to find an object by its localised in-game name (see below), or if you want to use an existing Maxis string for a tuning mod (since that will be available in whichever language a user has their game installed in, not only in those languages you happen to speak yourself).



2. Finding the ID of an object

By its in-game name:



Find the ID of the object's name as above (e.g. 0x7C6D0F9B for the "Trusty Companion TV")
Open ..\The Sims 4\Data\Client\ClientFullBuild0.package, Tools > Search, paste your string ID in the top field and set the filter to "COBJ 0x319E4F1D" (just type "cob" into the filter box, you don't need to scroll)
This will now list all of the COBJ (Catalog entry) resources that contain this key, i.e. all colour variants of that object. Doubleclick to go there or use the "Go To" button. The actual object definitions (OBJD) have the same IDs (so if all you need is the IDs, you can copy them all from the search window with the "Copy TGIs" button); you can sort the resource list by ID if you want by clicking on "Instance" at the top.


This works the same way for everything that has a catalog component (with a name that shows in game), like walls, floors, columns and so on -- just filter for CWAL, CFLR, CCOL etc when searching (or don't use a filter, but then the search will take longer).

For objects from SPs/EPs you would find them in the respective EP packages, like ..\The Sims 4\EP02\ClientFullBuild0.package. Note that most COBJ resources and some OBJDs in FullBuild0 are outdated; the current ones will live in DeltaBuild0 (so if you want to copy the entire thing, copy it from there). But if you only need the ID you can get that from FullBuild0 just the same (which will contain all of them, not just the updates); the IDs do not change.


By internal name:



If you have a good guess what the internal name of an object would be, you can also search for that (or a part of it) and filter for OBJD. Same as above, Tools > Search. Strings need to go in quotes and are case dependant ("woodwork" is not the same as "Woodwork"; if you want to find both, use "oodwork"). This will give you a list of all OBJD resources containing that string.


http://thumbs2.modthesims2.com/img/1/7/8/2/8/2/MTS_plasticbox-1605570-search.JPG


With D3OI:



Get D3OI from this thread (http://modthesims.info/t/549155) (Debug Display and Dump Object Information -- a script that can dump information to a file from in-game), start your game, click on the object you want and use the "Dump to File" option.
This will give you a text file with a ton of information on that object, among other things its ID (where it says "definition").


See here (http://modthesims.info/showthread.php?p=4969532#post4969532) for more info; also see this post (http://modthesims.info/showthread.php?p=4970839#post4970839) for how to put the ID into a notification in-game (so you don't need to dump to file):

http://thumbs2.modthesims2.com/img/7/4/0/1/8/2/5/MTS_scumbumbo-1603100-Capture.JPG


By catalog tag or anything else:



If you don't know the name of an object but one of the tags it is using (say World objects), or want to know the IDs of all objects containing a specific tag (like all trees), you can also search COBJ for a tag -- just enter the tag you want and proceed as above.
A full list of tags is available here (https://github.com/s4ptacle/Sims4Tools/blob/develop/s4pi.Resource.Commons/S4_03B33DDF_00000000_D89CB9186B79ACB7.xml) for example if you don't have it extracted yourself (this should always be up to date; it's the tag tuning from the most recent game version that s4pe is also using to display tags). Note that the tuning lists the tags in decimal, not hex.


http://thumbs2.modthesims2.com/img/1/7/8/2/8/2/MTS_plasticbox-1605574-search_tags.JPG