Forum Discussion
I also experienced this, and I think I have worked out what is going on.
The loot_Statistic_Breakage_DewCollector mentioned in the error has a buff test which checks for a couple of buffs using the Actor sim as the subject (Actor is the default value for the subject in this case which is why it is not shown in the tuning itself):
<L n="tests"> <L> <V t="buff"> <U n="buff"> <V n="whitelist" t="enabled"> <L n="enabled"> <T>345177<!--buff_muEvent_Cursed_AfterDestroy--></T> <T>345176<!--buff_Role_muEvent_Cursed--></T> </L> </V> </U> </V> </L> </L>
This is a problem, because this action is fired periodically by the object directly in this bit of tuning (present in both the object_Utilities_Water_Production_DewCollector and object_Utilities_Water_Production_DewCollector_HighQuality XMLs):
<U> <T n="key">15385<!--Upgrade_Generic_LockBrokenness_NotStarted--></T> <U n="value"> <V n="periodic_loot" t="apply_new_value"> <U n="apply_new_value"> <L n="periodic_loots"> <U> <T n="frequency_interval">15</T> <T n="initial_delay">15</T> <L n="loots_to_apply"> <T>235984<!--loot_Statistic_Breakage_DewCollector--></T> </L> </U> </L> </U> </V> </U> </U> <U> <T n="key">15386<!--Upgrade_Generic_LockBrokenness_Partial--></T> <U n="value"> <V n="periodic_loot" t="apply_new_value"> <U n="apply_new_value"> <L n="periodic_loots"> <U> <T n="frequency_interval">15</T> <T n="initial_delay">15</T> <L n="loots_to_apply"> <T>235984<!--loot_Statistic_Breakage_DewCollector--></T> </L> </U> </L> </U> </V> </U> </U>
Because of this, no Sims are directly associated with this loot when it is fired, so the game has no way of knowing which Sim Actor is supposed to refer to (unlike if the loot were to be fired by a sim doing an interaction), so it treats it as NoneType and errors out as a result (giving the 'NoneType' object has no attribute 'has_buff') error. A simple way around this is to instead check any instanced Sims on the lot for the buff, like this:
<L n="tests"> <L> <V t="buff"> <U n="buff"> <T n="apply_whitelist_on_individual_basis">False</T> # this is needed such that only 1 instanced sim needs to have the buff instead of all instanced sims for the test to pass <E n="subject">AllInstancedSims</E> <V n="whitelist" t="enabled"> <L n="enabled"> <T>345177<!--buff_muEvent_Cursed_AfterDestroy--></T> <T>345176<!--buff_Role_muEvent_Cursed--></T> </L> </V> </U> </V> </L> </L>
- 2 years ago
My game is throwing last exception files at me. Something is broken with this object.
Exception when applying action <StatisticSetMinOp: commodity_Object_Brokenness minimum> for loot <class 'sims4.tuning.instances.loot_Statistic_Breakage_DewCollector'> (AttributeError: 'NoneType' object has no attribute 'has_buff')
About The Sims 4 Bug Reports - Archive
Recent Discussions
- 6 hours ago
- 8 hours ago