PDA

View Full Version : I'm very new to this, so I don't know what I'm doing.


Epierc32
24th Jul 2020, 9:08 PM
I'm trying to make an override for the NanoCan Touchless Trash Can so that it can give money again. The recent patch completely disabled getting money from it.

What is the string for earning money?

I've never made mods before so.... if someone could link me to a tutorial, that would be great.

jamofjars
3rd Aug 2020, 1:32 PM
I'm trying to make an override for the NanoCan Touchless Trash Can so that it can give money again. The recent patch completely disabled getting money from it.

What is the string for earning money?

I've never made mods before so.... if someone could link me to a tutorial, that would be great.

Good news is that it's not to hard (I mocked one up, and it seems to be working fine), so I figured I'd explain how to go about it. Not sure if you still need the help, but it might be useful for the future, and it's still an issue in game (I tested), so yeah.

In short, the loot which runs when you drag something into the can which adds the money (97144, loot_LiveDrag_PutInTrashcanHitech) doesn't have a value in it anymore. No idea when EA decided to remove it, but alas it doesn't. So it's fairly solveable.
You simply need to replace where it has the "money_loot" section with this

<V t="money_loot">
<U n="money_loot">
<V n="amount" t="literal">
<U n="literal">
<T n="value">10</T>
</U>
</V>
<E n="subject">LotOwners</E>
<L n="tests">
<L>
<V t="test_set_reference">
<T n="test_set_reference">229195<!--testSet_Venue_Residential_Allow_LiveDragTarget--></T>
</V>
</L>
</L>
</U>
</V>


Afaik, the money gets added when you throw away the stuff normally, so it's only the live-drag stuff which you need to worry about.

Since you're new I'll explain how I did it:

To start with, use something like Sims 4 Studio to create a clone of the trash can. This will just be for reference, so you can find out what you need to edit.
With that object, there will be somewhere that you can find the Tuning and the TuningID for that object. In this case, it was 14989, object_trashcan_hitech. Find and extract that tuning, since you're gonna need to look into that.

Under that tuning, you'll first see the "live_drag_target" stuff, which will be for when you drag something into the can from live mode, this is what it looks like in this case

<V n="live_drag_target" t="enabled">
<U n="enabled">
<L n="drop_tests_and_actions">
<U>
<L n="actions">
<T>97144<!--loot_LiveDrag_PutInTrashcanHitech--></T>
</L>
<T n="destroy_live_drag_object">True</T>
<E n="drop_type">TRASHCAN</E>
<L n="test_set">
<V t="state">
<U n="state">
<E n="operator">NOTEQUAL</E>
<T n="value">15351<!--Trashcan_Hitech_Active--></T>
<E n="who">LiveDragTarget</E>
</U>
</V>
<V t="state">
<U n="state">
<V n="fallback_behavior" t="always_pass" />
<E n="operator">NOTEQUAL</E>
<T n="value">105868<!--RetailItem_ForSale_ForSale--></T>
</U>
</V>
</L>
</U>
</L>
</U>
</V>


In this case, we care about the loot which is running when you drop something in, so find and extract the tuning for 97144, loot_LiveDrag_PutInTrashcanHitech.

<L n="loot_actions">
<V t="state_change">
<U n="state_change">
<T n="state_value">15351<!--Trashcan_Hitech_Active--></T>
<V n="subject" t="participant">
<E n="participant">LiveDragTarget</E>
</V>
</U>
</V>
<V t="money_loot">
<U n="money_loot">
<E n="subject">LotOwners</E>
<L n="tests">
<L>
<V t="test_set_reference">
<T n="test_set_reference">229195<!--testSet_Venue_Residential_Allow_LiveDragTarget--></T>
</V>
</L>
</L>
</U>
</V>
</L>


In this loot, there will be the "money_loot" section which I mentioned earlier. Next step would be to grab the Tuning Descriptors (TDescs) from the Forums:
https://forums.thesims.com/en_US/categories/technical-discussions
And also grab Scumbumbo's TDesc Browser, cos dear lord you do not want to have to read those by hand:
https://modthesims.info/t/555233

Now, under Actions > LiveDragLootActions, you'll find the information for the "money_loot", where you need to add the amount which is added each time the loot runs.

<V t="money_loot">
<U n="money_loot">
<V n="amount" t="literal">
<U n="literal">
<T n="value">10</T>
</U>
</V>
<E n="subject">LotOwners</E>
<L n="tests">
<L>
<V t="test_set_reference">
<T n="test_set_reference">229195<!--testSet_Venue_Residential_Allow_LiveDragTarget--></T>
</V>
</L>
</L>
</U>
</V>


Copy this loot over to a new package file, and add the edits in that I mentioned earlier. (New package, so that only the things you edit get over overridden, not other stuff that you left the same, no need to include that).

As with everything, drop it into your Mods folder, check it works. You should be good, assuming you did what I did, since it seemed to work in my game.


Hopefully that helps and makes sense. Let me know if you have any questions, I'm not an amazing modder by any stretch, but I can do a decent amount.