Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 1st Oct 2025 at 3:53 AM
Default Cloning Objects with new instance names
Hi, there.

My recent project i'm working on is tweaking some career events. More specifically the career events for the criminal career, which gives you extra money or extra items (called hotoffthetruck and sweetbonus). i already found the matching .xml (CareerEvents.xml) and changed it to other items.
My struggle at the moment is, that i want it to spawn some custom items. Particularly the custom Moneybags by ani, which spawn with a specific value and were made buyable in the buy menu.
I think I already found out, that the function, that is used to spawn these items use the instance name. The problem is: all these custom money bags from ani use the same instance name (HarvestMoneyBag).

I tried to change this instance Name by using S3PE and use the "Grid" button on the OBJD resource. But that didnt work. I guess, you need to change some other values as well, so that they match again. But i don't know which to change. I also tried using S3OC to clone the object with a new name, but it still uses the same instance name.
Changing the spawned object to HarvestMoneyBag gives me a MoneyBag, but just the standard one and with value 0 on top of that.

Furthermore, I'm not sure, whether the function that's used for generating the reward can find custom objects at all. Maybe that's the problem already, i couldnt rule that out yet. So any ideas, how to change the instance names correctly and whether the Core systems can actually search for custom objects?
Inventor
#2 Old 1st Oct 2025 at 11:51 PM
Typically, the game engine doesn't think about items in terms of words.

Rather, when an object is referenced in an XML- for example, PaintingAnimalGiraffe in CareerEvents- this gets translated into a hash. The FNV64 hash of PaintingAnimalGiraffe is 0x3E4A0F10ECB960AF.
For some items, that ID will be exactly the same as the OBJD Instance ID and it's easier to connect the dots that the game could query it that way.

But the OBJD ID for that item is 0x00000000000006E7 - naturally, somewhere else in the chain has to establish a relationship between that ID and those words.
And this is done with an NGMP resource - most of EA's objects are already in a master NGMP, which is why we can already reference this object by name.

NGMP can store multiple pairs similar to how a STBL can hold many strings.
Each name pair is made up of the hash and the instance ID of the object.

The solution being:
Choose a descriptive name for the object you want to use. For example, Ani10kMoneyBag.
In S3PE, go to Tools > FNV Hash, generate one for the name you choose, and copy it.

In a package, go to Resource > Add
Type should be NGMP and Group should be 0
The NGMP itself can have any unique name, so type that in and press FNV64 to give it an ID.
Then press OK.

Click on the NGMP, then Grid.
Select Data, then the three dots button.
Click Add, and paste in the NameHash section.
In Ani's package, copy the instance of the OBJD you want. Paste that in the Instance section of the new package.
OK > Commit

You can Add as many extra pairs as you need.

In your custom CareerEvents, you'll use the name you chose for the object in the reward node.
Now, this should work in most cases- but fair warning in advance that there probably are limitations. XMLs with hardcoded values, EA oversights, that kind of thing may be the case if it doesn't work.
Good luck!

thecardinalsims - Cardinal has been taken by a fey mood!
Test Subject
Original Poster
#3 Old 2nd Oct 2025 at 1:11 AM
Thanks for this easily understandable instruction. Worked like a charm!

I realize how much i still have to learn about the architecture of the Sims data
Back to top