• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

bug with requirements in the Challenge system.

Sorry tried to post this in the bug report area but it would not allow me without using an app to submit a log and point to a YouTube clip that I don't have either and don't need for this as its simple to duplicate although will say this is for V2.4(b7).

I believe there is a bug in the Challenge system to do with adding requirements into either the effect group or passive effect that prevent them from working on a fresh spawn.

I am making a mod to allow me to use the challenge system to add some learn by doing back into our game that allows us to still use the crafting books as main way to level up (but going to make even harder to find), but if you kill enough things then you will still progress.

In my challenge I've added a passive effect so that once you kill enough things it adds to the CraftingTier of said weapon depending on if challenge progression is higher then the crafting progression. when I use the passive effect without any requirements it works fine. but as soon as I add a requirements to either the effect group or passive effect it appeared to stop working. but after a few test, I worked out it only stopped working in the first spawn of the game. If I was to exit the game and re-start then it works ok, even if I start a game and leave before doing anything and come straight back in it works from then on, just not on your initial spawn.

here is the code in case im doing something wrong.

<challenge name="BoneKnives_1" title_key="challengeLearnKnives" icon="meleeWpnBladeT0BoneKnife" group="BoneKnives" hint="challengeGroupBoneKnivesHint"
short_description_key="challengeLearnKnives" description_key="challengeBoneKnivesDesc"
reward_text_key="challenge_reward_BoneKnives" reward_event="challenge_reward_BoneKnives">
<objective type="KillByTag" entity_tags="zombie,animal" target_name_key="Zombies,Animals" killer_has_bufftag="BoneKifeEnabled" count="500"/>
<!--held="meleeWpnBladeT0BoneKnife"-->
<effect_group>
<passive_effect name="CraftingTier" operation="base_add" value="1" tags="meleeWpnBladeT0BoneKnife">
<!--<requirement name="CVarCompare" cvar="ProgressionKnives" operation="EQ" value="1" />-->
<!--<requirement name="ProgressionLevel" progression_name="craftingBlades" operation="LT" value="2"/>-->
</passive_effect>
</effect_group>
</challenge>

PS. on another thing in the code, it would be nice if held="meleeWpnBladeT0BoneKnife" worked in type="KillByTag" like it does in objective type="Harvest" to make it easier to say what to kill and with what.
 
You can just use dummy links in the bug reports when absolutely needed, but a log is super easy to use pastebin to link to. Video isn't always applicable, so can just use whatever link. Really not that hard to post a bug report.

Not really sure what you posted is a bug. Vanilla challenges do not use requirements like the ones you are trying to use. If anything, your post is more of a suggestion of a wanted feature.
 
this video from Fubar Prime is about modding the challenges.xml and specifically shows the use of using passive effects in them. this would take you to assume that passive effects and effect groups would work the same way and therefore be able to use requirements in them. although he doesn't use them in his video, they must still be ,meant to work same as elsewhere as they do work normally after you reload into the game.

 
Ah, gotcha. I honestly didn't know they could use them out of the box now. I'm so used to just using SCore for a lot of stuff.

So if you add the passives, then make a new game, it still doesn't work on first spawn? From what I've seen, while they have improved them, editing challenges almost always breaks them on an existing save.
 
yes. As I'm testing things I always use new games.

With this one, I created a game to test the passive effect without the requirements, achieved the award then accepted the challenge and the passive effect work fine.
Added the Requirements, deleted old game, created new game and tested. but passive did not work.
So, I removed one requirement and put the same code into a second challenge but moved the requirement to the effect group to see if it worked there. deleted old game and created new one. achieved rewards and accepted first achievement and passive didn't work again. forgot I put the one in field effect and left game. when looking at code remembered the field effect so reopened existing game to check and noticed that the passive effect on the first on was now working.

So did some more tests on that and it was constant that on a fresh spawn game they didn't work but as soon as I quit and came back in they worked. didn't matter when I quit and restarted even as soon as I first spawned, the requirement always worked from the point of the restart.
 
Back
Top