Post by bblahq on Aug 13, 2022 9:49:53 GMT -5
Hi, I created a RandomWeightedLoot with a list of actions to choose from (all with the same weight). The actions all create a random reward object from a list of weighted objects but when I test play my object that calls this weightloot, no object is created. Shouldn't this work? If I call directly one of the action tuning called by the randomweightedloot in my gameplay object I get an object rewarded. I want a random choice of object rewards based on random chosen action.
example of my randomweightedloot action:
<?xml version="1.0" encoding="utf-8"?>
<I c="RandomWeightedLoot" i="action" m="interactions.utils.loot" n="LootRewardsWeighted" s="13242509447193920000">
<L n="random_loot_actions">
<U>
<V n="action" t="actions">
<T n="actions">14113096321471100000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
<U>
<V n="action" t="actions">
<T n="actions">16116556426546370000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
<U>
<V n="action" t="actions">
<T n="actions">17133292199639780000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
<U>
<V n="action" t="actions">
<T n="actions">17216766523716820000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
</L>
</I>
example of one of the called action (each action is different, this one returns crystals another returns metals etc) :
<?xml version="1.0" encoding="utf-8"?>
<I c="LootActions" i="action" m="interactions.utils.loot" n="loot_ObjectReward_xxx" s="14113096321471100000">
<L n="loot_actions">
<V t="object_rewards">
<U n="object_rewards">
<V n="notification" t="enabled">
<V n="enabled" t="literal">
<U n="literal">
<V n="text" t="single">
<T n="single">0xFEFC4B38<!--Check your Sim's inventory to see what crystal minerals they received--></T>
</V>
</U>
</V>
</V>
<L n="object_rewards">
<U>
<T n="quantity">2</T>
<L n="reward_objects">
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28732<!--collectCrystalSmGEN_01_orangeTopaz (Orange Topaz)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28733<!--collectCrystalSmGEN_01_peach (Peach)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28735<!--collectCrystalSmGEN_01_sapphire (Sapphire)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28729<!--collectCrystalSmGEN_01_emerald (Emerald)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28747<!--collectCrystalMedGEN_01_rose (Rose)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28750<!--collectCrystalMedGEN_01_turquoise (Turquoise)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
</L>
</U>
</L>
</U>
</V>
</L>
</I>
example of my randomweightedloot action:
<?xml version="1.0" encoding="utf-8"?>
<I c="RandomWeightedLoot" i="action" m="interactions.utils.loot" n="LootRewardsWeighted" s="13242509447193920000">
<L n="random_loot_actions">
<U>
<V n="action" t="actions">
<T n="actions">14113096321471100000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
<U>
<V n="action" t="actions">
<T n="actions">16116556426546370000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
<U>
<V n="action" t="actions">
<T n="actions">17133292199639780000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
<U>
<V n="action" t="actions">
<T n="actions">17216766523716820000</T>
</V>
<U n="weight">
<T n="base_value">3</T>
</U>
</U>
</L>
</I>
example of one of the called action (each action is different, this one returns crystals another returns metals etc) :
<?xml version="1.0" encoding="utf-8"?>
<I c="LootActions" i="action" m="interactions.utils.loot" n="loot_ObjectReward_xxx" s="14113096321471100000">
<L n="loot_actions">
<V t="object_rewards">
<U n="object_rewards">
<V n="notification" t="enabled">
<V n="enabled" t="literal">
<U n="literal">
<V n="text" t="single">
<T n="single">0xFEFC4B38<!--Check your Sim's inventory to see what crystal minerals they received--></T>
</V>
</U>
</V>
</V>
<L n="object_rewards">
<U>
<T n="quantity">2</T>
<L n="reward_objects">
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28732<!--collectCrystalSmGEN_01_orangeTopaz (Orange Topaz)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28733<!--collectCrystalSmGEN_01_peach (Peach)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28735<!--collectCrystalSmGEN_01_sapphire (Sapphire)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28729<!--collectCrystalSmGEN_01_emerald (Emerald)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28747<!--collectCrystalMedGEN_01_rose (Rose)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
<U>
<L n="reward">
<V t="specify_definition">
<U n="specify_definition">
<T n="definition">28750<!--collectCrystalMedGEN_01_turquoise (Turquoise)--></T>
</U>
</V>
</L>
<T n="weight">1</T>
</U>
</L>
</U>
</L>
</U>
</V>
</L>
</I>