• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

XML - is there a way to have a Challenge repeat or determine the current progress of a Challenge

JoeSloeMoe

Active member
As far as I can tell from the game's code, Challenges are one way. Is anyone aware of a mechanism to have Challenges repeat once completed?

An alternative would be if there was a way to read the progress of a current Challenge. I see some code to apply a Challenge point to a player:

<triggered_effect trigger="onSelfAction2End" action="AwardChallenge" challenge_stat="drinkwater" count="1"/>


but see nothing to be able to determine the current progress count.

cheers

 
Are you familiar with the Wild West overhaul? In that they have a series of challenges that have you kill 25, 50, 75, 100 and 250 zombies, then it starts back again at 25 and repeats infinitely. I think that is similar to what you are asking. If so, I've noticed a line in the code that could be a clue, but I am still just learning myself. The line I saw is as follows:

<property name="repeatable" value="true"/>




Hope this helped 🙂

 
Thanks JimManDude - that helps a lot. If I fiddle with this successfully I'll now be able to add the Bartering Skill to https://community.7daystodie.com/topic/35052-hybrid-learn-by-use-action-skills-xml-modlet/ 

If so, I've noticed a line in the code that could be a clue, but I am still just learning myself.

Hope this helped 🙂


You are quite correct, searching for clues is the way to approach 7DTD xml coding for sure, and I would add that we all start knowing nothing so you are in good company :)

Cheers

 
Are you familiar with the Wild West overhaul? In that they have a series of challenges that have you kill 25, 50, 75, 100 and 250 zombies, then it starts back again at 25 and repeats infinitely. I think that is similar to what you are asking. If so, I've noticed a line in the code that could be a clue, but I am still just learning myself. The line I saw is as follows:

<property name="repeatable" value="true"/>




Hope this helped 🙂


The Wild West mod doesnt have a Challanges.xml file - did you mean a different mod? Am wondering if you could post the expanded code so I have an idea of the context. e.g. Which object does the 'repeatable'property gets attached to. I put the porperty in the challenge, it parsed ok with no errors or warnings and ran but it didnt seem to do anything.

cheers

 
It was in the quests.xml file. I had hoped quests and challenges might work similar.   As I am finding out, there may be more than one file to get it working properly. I will dig in to it a little further tomorrow, but for now, here is one part of the repeatable quest:

Code:
<quest id="quest_eliminatezombies100">
	<property name="offer_key" value="Accept this bounty quest to 'cure' the infected settlers. There are multiple stages which continuosly loop. Cure 25 for 1000 Liberty Coins, 50 for 5000 XP, 75 for 3000 Liberty Coins, 100 for 10000 XP, and 250 for 2 Skill. Start all over again." />       
    <property name="name_key" value="100 Infected Settlers" />
	<property name="subtitle_key" value="100 Infected Settlers" />
	<property name="description_key" value="Accept this bounty quest to 'cure' the infected settlers. There are multiple stages which continuosly loop. Cure 25 for 1000 Liberty Coins, 50 for 5000 XP, 75 for 3000 Liberty Coins, 100 for 10000 XP, and 250 for 2 Skill. Start all over again." />
	<property name="icon" value="ui_game_symbol_zombie"/>
	<property name="repeatable" value="true"/>
	<property name="add_to_tier_complete" value="false"/>
	<property name="category_key" value="quest"/>
	<property name="difficulty" value="easy"/>
	<property name="shareable" value="false"/>
		
			<objective type="EntityKill" id="SnowWendigo,zombieArlene,zombieArleneFeral,zombieArleneRadiated,zombieBiker,zombieBikerFeral,zombieBikerRadiated,zombieBoe,zombieBoeFeral,zombieBoeRadiated,zombieBurnt,zombieBurntFeral,zombieBurntRadiated,zombieBusinessMan,zombieBusinessManFeral,zombieBusinessManRadiated,zombieBusinessManRadiatedGunslinger,zombieDarlene,zombieDarleneFeral,zombieDarleneRadiated,zombieDemolition,zombieFatCop,zombieFatCopFeral,zombieFatCopRadiated,zombieFatHawaiian,zombieFatHawaiianFeral,zombieFatHawaiianRadiated,zombieFemaleFat,zombieFemaleFatFeral,zombieFemaleFatRadiated,zombieFemaleFatBarker,zombieFemaleBigFatBarker,zombieJanitor,zombieJanitorFeral,zombieJanitorRadiated,zombieJoe,zombieJoeFeral,zombieJoeRadiated,zombieLab,zombieLabFeral,zombieLabRadiated,zombieLumberjack,zombieLumberjackFeral,zombieLumberjackRadiated,zombieLumberjackRadiatedAxe,zombieMaleHazmat,zombieMaleHazmatFeral,zombieMaleHazmatRadiated,zombieMarlene,zombieMarleneFeral,zombieMarleneRadiated,zombieMoe,zombieMoeFeral,zombieMoeRadiated,zombieMutated,zombieMutatedFeral,zombieMutatedRadiated,zombieNurse,zombieNurseFeral,zombieNurseRadiated,zombiePartyGirl,zombiePartyGirlFeral,zombiePartyGirlRadiated,zombieSkateboarder,zombieSkateboarderFeral,zombieSkateboarderRadiated,zombieSoldier,zombieSoldierFeral,zombieSoldierRadiated,zombieMolotovSoldierFeral,zombieGrinBomb,zombieSpider,zombieSpiderFeral,zombieSpiderRadiated,zombieSpiderFeralFireGlider,zombieSteve,zombieSteveCrawler,zombieSteveCrawlerFeral,zombieSteveCrawlerRadiated,zombieSteveFeral,zombieSteveRadiated,zombieTomClark,zombieTomClarkFeral,zombieTomClarkRadiated,zombieUtilityWorker,zombieUtilityWorkerFeral,zombieUtilityWorkerRadiated,zombieWight,zombieWightFeral,zombieWightRadiated,zombieWightFeralGunslinger,zombieWightRadiatedGunslinger,zombieYo,zombieYoFeral,zombieYoRadiated" value="100"/>
	
	<reward type="Exp" value="10000"/>
	<reward type="Quest" id="quest_eliminatezombies250">
			<property name="chainquest" value="false"/>
	</reward>	
	</quest>
 
Yeah, unfortunately Challenges and Quests have different mechanisms.

No worries, I appreciate your help - the issue I have is very specific to Challenges though.

Will keep fiddling.

Cheers

 
I have been unable as of yet to get anything to work like I think you want. Ive tried several different variants and while they all parsed with no errors, did not give any results. That said, allow me to run this by you.

Using the Zombie Slayer challenges to test with, (i'll use BigMama in this instance):

In the challenges.xml, I see that there is a reward_event triggered for killing 50 Big Mama zombies of any type (normal, feral or radiated):

<challenge name="killBigMama" title_key="challengeKillBigMama" icon="ui_game_symbol_zombie" group="Zombies"
    short_description_key="challengeKillBigMamaShort" description_key="challengeKillBigMamaDesc"
    reward_text_key="challengeKillRewardMods" reward_event="reward_bigmama_zombie_slayer">
        <objective type="Kill" entity_names="zombieFemaleFat,zombieFemaleFatFeral,zombieFemaleFatRadiated" count="50"/>
    </challenge>



    
The above code refers to the reward located in an action_sequence node in gameevents.xml

<action_sequence name="reward_bigmama_zombie_slayer">
    <property name="action_type" value="Game" />
    <action class="AddQuest">
      <property name="quest" value="quest_reward_bigmama_zombie_slayer" param1="quest" />
      <property name="notify" value="false" />
    </action>
  </action_sequence>



  
 Which then adds the quest from the quests.xml which also lines out the rewards for completing the challenge which you collect from the trader.         
 
 

<quest id="quest_reward_bigmama_zombie_slayer" template="challengegroup_reward_homesteading">
    <variable name="name" value="zombie_slayer_name_big_mama" />
    <variable name="subtitle" value="zombie_slayer_subtitle_big_mama" />
    <variable name="description" value="zombie_slayer_desc" />
    <variable name="completion" value="zombie_slayer_completion" />
    <!-- Challenge Rewards are localized. Update challengeKillRewardMods if this list is changed. -->
    <reward type="Exp" value="10000" />
    <reward type="Item" id="modGunCrippleEm" ischosen="true" isfixed="true" value="1" />
    <reward type="Item" id="modGunSoundSuppressorSilencer" ischosen="true" isfixed="true" value="1" />
    <reward type="Item" id="modGunShotgunTubeExtenderMagazine" ischosen="true" isfixed="true" value="1" />
    <reward type="Item" id="modGunDrumMagazineExtender" ischosen="true" isfixed="true" value="1" />
    <reward type="Item" id="modGunMeleeRadRemover" ischosen="true" isfixed="true" value="1" />
  </quest>



  
 At this point, I'm not familiar with all the possible reward types, nor could I find anything relating to challengeKillRewardMods as stated in the comment of the above code,  but I feel if you can find a reward type that can target the particular challenge and reset the count to '0' (in this instance), that may allow the challenge to be repeatable? Does that make sense? 

Anyway, I wish you good luck in your endeavor. 

 
"At this point, I'm not familiar with all the possible reward types, nor could I find anything relating to challengeKillRewardMods as stated in the comment of the above code,  but I feel if you can find a reward type that can target the particular challenge and reset the count to '0' (in this instance), that may allow the challenge to be repeatable? Does that make sense? "

Yeah, thats the crux of it basically, trying to get the challenge to repeat in some way but so far I've not found a way to reset, repeat or read the challenge count.

Cheers

 
Back
Top