I've been trying to replicate something a bit like dumpster diving in TS3. I have a big pile of junk that acts like a trash can, and my sims can go rummaging in it (I changed the text to say 'Scavenge'). I'd like to be able to add extra drops as a way for my sims to get extra things they need when they have little money, like a dirty version of a tent or a broken radio they could repair. However, I'm struggling to work out how the game controls drops, and what I need to do to add additional ones.
I've given my junk pile custom tunings, and I know the game is reading these because I can make other changes to these scripts and see the impact in game. One of these is the 'Loot_Rummage_Trash' tuning which contains the following script:
<V n="object_rewards" t="rewardsdata_tuning">
<U n="rewardsdata_tuning">
<T n="quantity">5</T>
<L n="reward_objects">
<U>
<L n="reward">
<T>12071<!--Soc_Solo_NT_Horrified_Succeed_basic--></T>
</L>
</U>
<U>
<L n="reward">
<T>26906<!--AL_Compliment--></T>
</L>
</U>
<U>
<L n="reward">
<T>28778</T>
</L>
</U>
<U>
<L n="reward">
<T>30598<!--object_Collectible_Fossil_Bird--></T>
</L>
</U>
<U>
<L n="reward">
<T>30527<!--musicTrack_Piano_Romantic_Low_02--></T>
</L>
</U>
<U>
<L n="reward">
<T>22678</T>
</L>
</U>
<U>
<L n="reward">
<T>30601<!--object_Collectible_Fossil_Alien--></T>
</L>
</U>
The numbers appear to be the object ids of the named item, but some things are dropping in game that don't appear to be on the list. And some of these objects never seem to drop. I'm confused! And I've tried adding a variety of my own objects, like the tent, but I seem to be missing something?
A little bit of direction would be appreciated
@SimGuruModSquad? Thanks.
Comments
12071 for example is 0x2F27 = sculptTableFCRabbitCeramic_01_set1. You can find that out by searching Fullbuild0 for that ID (open Fullbuild0 in s4pe, put the ID in the "Instance" box at the bottom, tick the box in front, hit "Set", tick "Filter Active"). When you say "I've tried adding a variety of my own objects, like the tent", how exactly did you do that?
You don't get all of the items in a list; you get the quantity that's defined in "quantity". You can weight between the items in the list by adding a "weight" tag.
I see where I'm going wrong now, I was being extremely stupid and using the tuning IDs for the code. XD Sorry if I'm being very slow and not seeing the obvious, but where do I find the number for the object definition of the item? I can see that 'sculptTableFCRabbitCeramic_01_set' has '0x2F27' as its instance when I look at its object definition, but I can't figure out how to get from there to '12071'.
Edit: I got it! I convert the instance id from hexadecimal to decimal?
I'm only planning on having there be one drop at a time, I just left the existing items in there for now while I'm figuring things out. So I'll be changing the line '<T n="quantity">5</T>' back to 1. I only increased that while I was testing. It seems to be giving me 5 random items from across the list each time, not 5 of a single item.
Yes exactly. In the tuning that is given in decimal; in s4pe you see the instance in hexadecimal. It's the same number.
Yeah that's how it should work with the code you posted. Seems like everything is fine then .
If you need to figure out the object (not tuning) IDs of specific items you want, this post lists various ways to do that.
Do you happen to know if it's possible to specify a broken state of an object? So instead of a sink, they get a broken sink?