|
Post by Flerb on Feb 2, 2018 3:41:39 GMT -5
I'm working on a complex xml mod this week. While fine tuning it I need to see the values of hidden commodities/statistic values running in the background. For now I'm using the sim/show info mod, but it requires scanning a list of 60 to 80 items until I find mine buried arbitrarily in the list.
|
|
|
Post by Flerb on Jan 28, 2018 17:50:45 GMT -5
hey everyone, I noticed a bug in my mod, i just don't know my way around the XML well enough to fix it.
Basically, these automatic scars are designed to decay over time using a statistic. When the decay runs down to 0 it triggers a "loot action on removal" which clears the buffs/traits and replaces them with healed traits/buffs. But it only triggers the removal while a sim is on the active lot. When sims are off screen, the decay still runs to 0 but it gets stuck there without triggering the removal. Is there a way to force it to trigger the removal if it's at zero, like a less than or equal function? or perhaps initializing it with a higher value than zero so it can decay? Here's the xml as is
<?xml version="1.0"?> <I c="Commodity" i="statistic" m="statistics.commodity" n="Flerp_scarredtrait_Loot_comm" s="12778294151255613560"> <T n="_default_convergence_value">0</T> <T n="_time_passage_fixup_type">FIXUP_USING_TIME_ELAPSED</T> <U n="arrow_data"> <T n="negative_double_arrow">-20</T> <T n="negative_single_arrow">-1</T> <T n="negative_triple_arrow">-30</T> <T n="positive_double_arrow">20</T> <T n="positive_single_arrow">1</T> <T n="positive_triple_arrow">30</T> </U> <T n="auto_satisfy_curve_random_time_offset">1728</T> <T n="decay_rate">1</T> <U n="initial_tuning"> <T n="_use_auto_satisfy_curve_as_initial_value">False</T> <T n="_use_stat_value_on_init">True</T> <T n="_value">1728</T> </U> <T n="max_value_tuning">1728</T> <T n="min_value_tuning">0</T> <L n="states"> <U> <U n="buff"> <V n="buff_reason" t="enabled"> <T n="enabled">0xC30E9123</T> </V> <T n="buff_type">15513148231618139955<!--Flerp_asd_Loot_severetimer--></T> </U> <T n="value">0</T> </U> </L> </I>
|
|
|
Post by Flerb on Dec 22, 2017 18:24:36 GMT -5
|
|
|
Post by Flerb on Dec 17, 2017 21:51:59 GMT -5
i'm just not sure, some other combinations I tried like 33 33 33 resulted in strange unexpected behaviors. I didn't write it down, but I have a tally sheet where some combination resulted in 50 50 0. in short I could only figure it doesn't seem to read the traits linearly from top to bottom. However much progress has been made this week I might be able to update the mod tonight! thanks again for your help!
|
|
|
Post by Flerb on Dec 15, 2017 0:42:36 GMT -5
yep the format from the fruitcake works! I never saw that because it's named rando not 'random' which i had searched for. I also was looking at the xml that assigns random buffs to moody teens and children which appears to use a weighted system.
weird behavior with the chances plus black lists: with two traits and two chances it was clear enough to set the first trait to 50% and the next to 100% to result in a 50-50 chance, but when it comes to 3+ traits I cannot seem to comprehend how it's calculating the chance percentages. For example, setting the chances as 33, 50, then 100 resulted in ~45% ~15% ~40% in game (after 20 trials).... Other settings resulted in similarly weird results in game. Setting them to 33%, 33%, then 100% finally seems to result in an exact even 1/3 chance for all 3 traits. I'd assume the pattern continues so for 4 traits 25, 25, 25, 100.
here's the code for anyone interested:
<V t="trait_add"> <U n="trait_add"> <U n="chance"> <T n="base_chance">33</T> </U> <L n="tests"> <L> <V t="trait"> <U n="trait"> <L n="blacklist_traits"> <T>15771698387283226715<!--Flerb_scarredtrait_Trait_left100--></T> <T>15922850084989543648<!--Flerb_scarredtrait_Trait_right100--></T> <T>17134930008162446762<!--Flerb_scarredtrait_Trait_Full100--></T> </L> </U> </V> </L> </L> <T n="trait">15922850084989543648<!--Flerb_scarredtrait_Trait_right100--></T> </U> </V> <V t="trait_add"> <U n="trait_add"> <U n="chance"> <T n="base_chance">33</T> </U> <L n="tests"> <L> <V t="trait"> <U n="trait"> <L n="blacklist_traits"> <T>15771698387283226715<!--Flerb_scarredtrait_Trait_left100--></T> <T>15922850084989543648<!--Flerb_scarredtrait_Trait_right100--></T> <T>17134930008162446762<!--Flerb_scarredtrait_Trait_Full100--></T> </L> </U> </V> </L> </L> <T n="trait">15771698387283226715<!--Flerb_scarredtrait_Trait_left100--></T> </U> </V> <V t="trait_add"> <U n="trait_add"> <U n="chance"> <T n="base_chance">100</T> </U> <L n="tests"> <L> <V t="trait"> <U n="trait"> <L n="blacklist_traits"> <T>15771698387283226715<!--Flerb_scarredtrait_Trait_left100--></T> <T>15922850084989543648<!--Flerb_scarredtrait_Trait_right100--></T> <T>17134930008162446762<!--Flerb_scarredtrait_Trait_Full100--></T> </L> </U> </V> </L> </L> <T n="trait">17134930008162446762<!--Flerb_scarredtrait_Trait_Full100--></T> </U> </V>
|
|
|
Post by Flerb on Dec 12, 2017 17:24:26 GMT -5
turns out the tests doesn't seem to work with adding traits. I may have a solution based on your first suggestion tho, I'll post it here if it works.
|
|
|
Post by Flerb on Dec 11, 2017 23:29:54 GMT -5
Excellent! Got it, adding tests was my next hunch before posting here, but I had only seen it with buffs. I'm going to be giving it a go soon.
|
|
|
Post by Flerb on Dec 11, 2017 15:55:28 GMT -5
Oh interesting thanks! I plan on having many more than 2 outcomes, perhaps as many as 12 (likely less). Do you know if this would this work in a nested fashion?
|
|
|
Post by Flerb on Dec 10, 2017 21:24:40 GMT -5
hey all, I'm putting together my first xml mod this weekend, figured out a lot of things by reverse engineering some other mods but i'm stuck. The goal is to override the "loot_Buff_Fire_Singed_HygieneDecrease" to automatically add my CAS burn scars skin detail to sims when they survive a fire. Here's my CAS modthesims.info/download.php?t=597048so far the following is working (i've been burning a lot of sims for science): The override action adds a visible trait > the trait gives the sim a hidden buff which changes the CAS skin detail to my scars. It actually works! this xml placed in the override IS also working to add the scars by chance, i.e. there's a 50% chance the sim gets the trait and CAS assigned: <V t="trait_add"> <U n="trait_add"> <T n="trait">15922850084989543648<!--trait_right100--></T> </U> <U n="chance"> <T n="base_chance">50</T> </U> </V> however, when I add another trait to the code, both traits are assigned according to the last chance, i.e. both traits are assigned 90% of the time, the first base_chance is ignored. <V t="trait_add"> <U n="trait_add"> <T n="trait">15922850084989543648<!--trait_right100--></T> </U> <U n="chance"> <T n="base_chance">0</T> </U> </V> <V t="trait_add"> <U n="trait_add"> <T n="trait">15771698387283226715<!--trait_left100--></T> </U> <U n="chance"> <T n="base_chance">90</T> </U> </V> perhaps I need to nest things differently? Or is there a tuning I can extract that shows an example of assigning traits by chance? Any ideas would be appreciated!
|
|
|
Post by Flerb on Dec 4, 2017 1:28:33 GMT -5
I've just run into the same problem, thanks!
|
|
|
Post by Flerb on Jul 5, 2017 16:20:40 GMT -5
fantastic! seems to be working again now, save one thing: the weapons: gun, knife, they do not appear in the sim's hands? again tested with no cc or mods. one of the best mods glad to have it working again Hello, the weapons should appear in the killer's hand when You perform any of the interactions that requires them. possible things that could cause this issue -Your game is not updated to the latest patch -Your game doesn't run smooth enough for the weapons to be loaded on time of the interaction. "This happens if Your game is running extremely slow" Thanks for the feedback. I'm on the latest patch, and run a GTX970, speed not a problem... since it seems ok for everyone else, it's obviously something on my system having trouble loading the weapon objects then. I'll tinker around. Thanks for all the work that has gone into this! I primarily use it to make the alien NPC sims have killer autonomy.
|
|
|
Post by Flerb on Jul 4, 2017 1:55:36 GMT -5
fantastic! seems to be working again now, save one thing: the weapons: gun, knife, they do not appear in the sim's hands?
again tested with no cc or mods. one of the best mods glad to have it working again
|
|
|
Post by Flerb on Jul 3, 2017 17:45:38 GMT -5
thanks for the update, I've been awaiting it! However with today's v1.3 update, the mod seems to be far more broken... :(
I tried it with no other CC or mods installed and the only interactions available are the new "mess up" and "disable reactions for". None of the other interactions show. When I use "mess up" the sims approach each other but no animation plays, yet their buffs do change and the one gets the blood texture on their face. Perhaps the package file was corrupted?
I'm on the latest sims 4 version 1.31
|
|
|
Post by Flerb on Jul 2, 2017 1:04:06 GMT -5
|
|