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

Question regarding quests.xml mod

Darkxenoth

New member
Hey, I've been testing making quests that require you to kill zombies. I've figured out a way to make it applicable to any zombie, without having to specify a certain zombie type to kill (i.e. zombieArlene or zombieSteve); however, I ran into some confusion when trying to move on to requiring you to kill feral zombies instead of any regular zombie.

<objective type="EntityKill" entity_tags="zombie" value="5" phase="1"/>
<objective type="EntityKill" entity_tags="feral" value="5" phase="1"/>


The first line is the objective I used for simply killing any zombie, the second line being what I changed it to in attempting to target ferals... but it doesn't seem to function differently.?.

I used the first line in one quest, jumped into a test game, spawned random zombies and killed them - worked as expected (regular, feral, radiated, even dogs all counted as it's simply looking for the 'zombie' tag). I then made a separate quest where I used the second line, spawned in random zombies to kill, and they all seemed to count still - I've checked entityclasses.xml and basic zombies don't have the 'feral' tag as far as I can find; hence my confusion.

Anyone know, or have an idea, why the second line of code above isn't excluding regular zombies? Any idea what I would use to make it only work for ferals?

 
Even further confused... I tried changing the tag to 'animal', and it still somehow thinks I'm wanting to kill zombies (though it did count actual animals such as chickens, boar, wolves). Here's the new test I did...

Code:
<quest id="arkxTestQuest3">
			<property name="name" value="arkxTestQuest3" param1="name"/>
			<property name="subtitle" value="Food Time" param1="name"/>
			<property name="description" value="Kill some animals." param1="offer"/>
			<property name="icon" value="ui_game_symbol_quest"/>
			<property name="category_key" value="quest"/>
			<property name="offer" value="arkxTestQuest3Offer" param1="offer"/>
			<property name="repeatable" value="false" />
			<property name="add_to_tier_complete" value="false" />
			<property name="shareable" value="false" />
			
			<objective type="EntityKill" entity_tags="animal" value="5" />
			
			<reward type="Exp" value="500" />
		</quest>
 
I am not in front of my personal computer right now, but check the challenges - at least for the animals issue you are seeing.  If I am remembering correctly, there was at least one challenge that tracked all animal kills so you can see the structure that is setup for that challenge.

Also make sure your changes are actually being loaded into the game.  I once made changes and jumped into the game to find them not working, only to figure out that I forgot to save the file after I made the changes so it was still using the last file I had samed.

 
That's the problem... I'm literally using the same structure as the 'Kill Animals' challenge(s); or at least as close as I can since quests.xml doesn't allow for objective type being 'KillByTag'.

-edit- Just noticed while testing, apparently my initial quest to kill zombies can be completed by killing animals...

<quest id="arkxTestQuest">
<!-- simple little quest requiring you to kill any 10 zombies with the Primitive Bow -->
<property name="name_key" value="arkxTest_quest" param1="name"/>
<property name="subtitle_key" value="arkxTest_quest" param1="name"/>
<property name="description_key" value="arkxTest_quest_offer" param1="offer"/>
<property name="icon" value="ui_game_symbol_quest"/>
<property name="repeatable" value="false"/>
<property name="category_key" value="quest"/>
<property name="offer_key" value="arkxTest_quest_offer" param1="offer"/>
<property name="add_to_tier_complete" value="false"/>
<property name="shareable" value="false"/>

<requirement type="Quests.Requirements.RequirementHolding" id="gunBowT0PrimitiveBow" phase="1"/>
<objective type="EntityKill" entity_tags="zombie" value="10" phase="1"/>

<reward type="Exp" value="1000"/>
<reward type="Item" id="gunBowT1WoodenBow" value="1" />
<reward type="Item" id="ammoArrowIron" value="200" />
<reward type="Quest" id="arkxTestQuest2" />

</quest>






I feel like I'm missing something, but I can't figure it out.

 
Last edited by a moderator:
So I decided to brute force it, basically, by listing out every possible animal I wanted it to count... but now I'm wondering if there's a way to change how it displays the objective. Currently it shows the objective as 'Kill Stag x/2', despite it actually working with any edible animal. I thought adding a target_name_key would work, but it didn't change anything...

Code:
<quest id="arkxTestQuest3">
			<property name="name" value="arkxTestQuest3" param1="name"/>
			<property name="subtitle" value="Food Time" param1="name"/>
			<property name="description" value="Kill some animals." param1="offer"/>
			<property name="icon" value="ui_game_symbol_quest"/>
			<property name="category_key" value="quest"/>
			<property name="offer" value="Can you hunt?" param1="offer"/>
			<property name="repeatable" value="false" />
			<property name="add_to_tier_complete" value="false" />
			<property name="shareable" value="false" />
			
			<objective type="EntityKill" id="animalStag,animalDoe,animalRabbit,animalChicken,animalWolf,animalBear,animalBearSmall,animalSnake,animalMountainLion,animalCoyote,animalBoar" target_name_key="xuiAnimals" value="2"/>
			
			<reward type="Exp" value="500" />
		</quest>
 
I've used something like

<objective type="EntityKill" id="Raider" value="20" phase="1">
<property name="target_tags" value="bandit"/>
</objective>


to do set specific targets. And in this case, the id is what the objective will display. So this objective would show as Kill Raider in game. So you could change the id to Animals and change the target_tags to match tags on whatever animals you want to count and that should do what you want. I used this in A21, hopefully still works in 1.0. Haha.

 
Hey, thanks for the response. I got it working, though I ended up using an 'objective_name_key' property with an added localization. I thought that the id had to be the entity name in entityclasses.xml and since it had multiple it just displayed the first one... are you saying I could set id to whatever I wanted displayed, as long as I included a 'target_tags' property with correct tags?

What I ended up with:

Code:
			<objective type="EntityKill">
				<property name="needed_count" value="3" />
				<property name="target_tags" value="animal" />
				<property name="objective_name_key" value="arkxQuestKillAnimalsKey" />
			</objective>
 
Did you perhaps try the new objective type KillByTag?

    <challenge name="killZombies" title_key="challengeKillZombies" icon="ui_game_symbol_challenge_adv_survival_kill_zombies" group="AdvancedSurvival"
    short_description_key="challengeKillZombiesShort" description_key="challengeKillZombiesDesc"
    reward_text_key="challenge_reward_500xp" reward_event="challenge_reward_500">
        <objective type="KillByTag" entity_tags="zombie" target_name_key="xuiZombies" count="5"/>
    </challenge>



Hey, thanks for the response. I got it working, though I ended up using an 'objective_name_key' property with an added localization. I thought that the id had to be the entity name in entityclasses.xml and since it had multiple it just displayed the first one... are you saying I could set id to whatever I wanted displayed, as long as I included a 'target_tags' property with correct tags?

What I ended up with:

Code:
			<objective type="EntityKill">
				<property name="needed_count" value="3" />
				<property name="target_tags" value="animal" />
				<property name="objective_name_key" value="arkxQuestKillAnimalsKey" />
			</objective>

 
New question... is there something about this quest I've coded that would cause the game to freeze every time I try to access my quest tab?

Code:
	<quest id="arkxModQuestReset">
		<property name="name" value="Reset" param1="name"/>
		<property name="subtitle" value="Reset" param1="name"/>
		<property name="description" value="Reset" param1="offer"/>
		<property name="icon" value="ui_game_symbol_quest"/>
		<property name="repeatable" value="true"/>
		<property name="category_key" value="quest"/>
		<property name="offer" value="Reset" param1="offer"/>
		<property name="add_to_tier_complete" value="false"/>
		<property name="shareable" value="false"/>
		
		<objective type="EntityKill" phase="1">
			<property name="needed_count" value="1" />
			<property name="target_tags" value="zombie" />
			<property name="objective_name_key" value="arkxModQuestKillZombiesKey" />
		</objective>
		
		<reward type="Exp" value="100"/>
		<reward type="Quest" id="arkxModQuestKillZombies" />
	</quest>
	<quest id="arkxModQuestKillZombies">
		<property name="name" value="Kill Zombies" param1="name"/>
		<property name="subtitle" value="Kill Zombies" param1="name"/>
		<property name="description" value="If you want to survive, you're going to have to kill zombies." param1="offer"/>
		<property name="icon" value="ui_game_symbol_quest"/>
		<property name="repeatable" value="true"/>
		<property name="category_key" value="quest"/>
		<property name="offer" value="Don't let them get you." param1="offer"/>
		<property name="add_to_tier_complete" value="false"/>
		<property name="shareable" value="false"/>
		
		<objective type="EntityKill" phase="1">
			<property name="needed_count" value="5" />
			<property name="target_tags" value="zombie" />
			<property name="objective_name_key" value="arkxModQuestKillZombiesKey" />
		</objective>
		<reward type="Exp" value="500" phase ="1"/>
		<objective type="EntityKill" phase="2">
			<property name="needed_count" value="15" />
			<property name="target_tags" value="zombie" />
			<property name="objective_name_key" value="arkxModQuestKillZombiesKey" />
		</objective>
		<reward type="Exp" value="750" phase ="2"/>
		<objective type="EntityKill" phase="3">
			<property name="needed_count" value="30" />
			<property name="target_tags" value="zombie" />
			<property name="objective_name_key" value="arkxModQuestKillZombiesKey" />
		</objective>
		<reward type="Exp" value="1000" phase ="3"/>
		<objective type="EntityKill" phase="4">
			<property name="needed_count" value="50" />
			<property name="target_tags" value="zombie" />
			<property name="objective_name_key" value="arkxModQuestKillZombiesKey" />
		</objective>
		<reward type="Exp" value="1500" phase ="4"/>
		<objective type="EntityKill" phase="5">
			<property name="needed_count" value="100" />
			<property name="target_tags" value="zombie" />
			<property name="objective_name_key" value="arkxModQuestKillZombiesKey" />
		</objective>
		<reward type="Exp" value="3000" phase ="5"/>
		
		<reward type="Exp" value="2000"/>
		<reward type="Item" id="resourceRepairKit" value="2" />
		<reward type="Quest" id="arkxModQuestReset" />
	</quest>
 
Back
Top