Jump to content

Open Community  ·  99 members

7 Days To Die

Add new quests to trader without overriding existing ones


Turbero

Recommended Posts

Hello, dev peeps.

 

I'm creating a mod with new quests and challenges I'd like to create. Creating a new challenge found in world lore was a "challenge" ;-) and I made it. Unfortunately a quest is still resisting to my charm. I can configure the quest in the mod, load it in the game and then use the "givequest" command successfully.

 

For example, this adds a custom quest "custom_quest_1" with the same template as the tier1_fetch (just different id):

<configs>
	<append xpath="/quests">
		<quest id="custom_quest_1">
			<property name="name_key" value="quest_tier1_fetch"/>
			<property name="subtitle_key" value="quest_fetch_subtitle"/>
			<property name="description_key" value="quest_fetch_description"/>
			<property name="icon" value="ui_game_symbol_quest"/>
			<property name="repeatable" value="true"/>
			<property name="category_key" value="challenge"/>
			<property name="difficulty" value="medium"/>
			<property name="difficulty_tier" value="1"/>
			<property name="offer_key" value="quest_tier1_fetch_offer"/>
			<property name="statement_key" value="quest_fetch_statement"/>
			<property name="response_key" value="quest_fetch_response"/>
			<property name="login_rally_reset" value="true"/>

			<property name="completiontype" value="TurnIn"/>
			<property name="completion_key" value="quest_fetch_completion"/>

			<objective type="RandomPOIGoto">
				<property name="phase" value="1"/>
			</objective>

			<objective type="RallyPoint">
				<property name="phase" value="2"/>
			</objective>

			<objective type="FetchFromContainer">
				<property name="phase" value="3"/>
				<property name="quest_item_ID" value="1"/>
				<property name="item_count" value="1"/>
				<property name="default_container" value="cntFetchQuestSatchel"/>
			</objective>

			<objective type="POIStayWithin">
				<property name="phase" value="3"/>
				<property name="radius" value="25"/>
			</objective>

			<objective type="ReturnToNPC">
				<property name="phase" value="4"/>
			</objective>

			<objective type="InteractWithNPC">
				<property name="phase" value="4"/>
			</objective>

			<reward type="Exp" value="3750"/>
			<reward type="Item" id="casinoCoin" value="560"/>
		</quest>
	</append>
</configs>

And then I type "givequest custom_quest_1" and I get it in my quest log.

 

But I would like this quest to be offered by the trader. Given that all trader quests are under the xpath quests/quest_list in quests.xml I tried my best shot with this after the append in my previous snippet:

<append xpath="/quests/quest_list[@id='trader_quests']">
<quest id="custom_quest_1"/>
</append>

But I ALWAYS end up getting

NullReferenceException: Object reference not set to an instance of an object

in red colors in the console when I talk to the trader and the trader menu never shows up anymore. So I have to remove these snippets to make them work again.

 

I am blocked sadly :sad: Did anybody ever add a new quest successfully to the trader?

 

Many thanks for your thoughts!

Edited by Turbero
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...