Jump to content

Best way to edit starting quest


Sorrowthief

Recommended Posts

In my mod I need to utilize and change the starting quest with my own as well as changing the tooltip pop ups. How are you guys doing this? Is there a way to xpath and overwrite the current quest with new changes or are you guys just editing the back up file with the new changes?

Link to comment
Share on other sites

You have two options, I'm thinking:

 

1) xpath all your changes in, adjusting each thing you want to change with a <set>

 

-or-

 

2) Use xpath to delete the first quest using a <remove>, and doing a <insertbefore> tag to include a new snippet quest.

 

Mind showing me how it would look using the set method on the first quest. Like if I wanted to change the pop up information to read something different and change the crafting ingredients?

Link to comment
Share on other sites

Mind showing me how it would look using the set method on the first quest. Like if I wanted to change the pop up information to read something different and change the crafting ingredients?

 

Fair warning, I didn't try these, so there may be subtle syntax errors, but should be correct

 

Sample Quest from Winter Project. The example that follows will be manipulating these values.

		<quest id="quest_BasicSurvival1" group_name_key="Oh my...." name_key="Oh, this isnt looking good. o.0 Not one bit." subtitle_key="Lets get started" description_key="Lets get started with your lessons!" icon="ui_game_symbol_book" category_key="quest">
			<action type="ShowTip" value="tutorialTipQuest01" />
			<action type="ShowTip" value="tutorialTipQuest02" />
			<objective type="FetchKeep" id="keystoneBlock" value="1" />
			<reward type="Item" id="pufferCoatGreen" value="200" />
			<reward type="Item" id="flannelShirtRed" value="100" />
			<reward type="Item" id="overalls" value="100" />
			<reward type="Item" id="gunHuntingRifle" value="100" />
			<reward type="Item" id="762mmBullet" value="25" />
			<reward type="Item" id="Cookies" value="2" />
			<reward type="Item" id="snowShovel" value="100" />
			<reward type="Quest" id="quest_BasicSurvival2" />
		</quest>

 

Here's how to adjust individual values:

 

<configs>
<config name="quests">
	<!-- Updates the second action, that has tutorialTipQuest02 as a value, and changes that value to tutorialTipQuest03 -->
	<!-- Read it like:  Under Quests, in a quest that has an ID of 'quest_BasicSurvival1', under the action that has the value -->
	<!-- attribute of 'tutorialTipQuest02', change that value to 'tutorialTipQuest03' -->
	<set xpath="/quests/quest[@id='quest_BasicSurvival1']/action[@value='tutorialTipQuest02']/@value">tutorialTipQuest03</set>

	<!-- Updates the number of cookies -->
	<set xpath="/quests/quest[@id='quest_BasicSurvival1']/reward[@id='Cookies']/@value">5</set>

	<!-- Inserts a new rewrd item called CandyCanes, after the reward item that matches the snowshovel -->
	<insertAfter xpath="/quests/quest[@id='quest_BasicSurvival1']/reward[@value='snowShovel']" >
		<reward type="Item" id="candyCanes" value="100" />
	</insertAfter>
</config>
</configs>

 

The other method is to completely re-rewrite it:

 

<configs>
<config name="quests">
	<!-- Removes the existing quest -->
	<remove xpath="/quests/quest[@id='quest_BasicSurvival1']" />

	<!-- Re-adds it with your changes -->
	<insertBefore xpath="/quests/quest[@id='quest_BasicSurvival2]" >
		<quest id="quest_BasicSurvival1" group_name_key="Oh my...." name_key="Oh, this isnt looking good. o.0 Not one bit." subtitle_key="Lets get started" description_key="Lets get started with your lessons!" icon="ui_game_symbol_book" category_key="quest">
			<action type="ShowTip" value="tutorialTipQuest01" />
			<action type="ShowTip" value="tutorialTipQuest02" />
			<objective type="FetchKeep" id="keystoneBlock" value="1" />
			<reward type="Item" id="pufferCoatGreen" value="200" />
			<reward type="Item" id="flannelShirtRed" value="100" />
			<reward type="Item" id="overalls" value="100" />
			<reward type="Item" id="gunHuntingRifle" value="100" />
			<reward type="Item" id="762mmBullet" value="25" />
			<reward type="Item" id="Cookies" value="2" />
			<reward type="Item" id="snowShovel" value="100" />
			<reward type="Quest" id="quest_BasicSurvival2" />
		</quest>
	</insertBefore>
</config>
</configs>

 

- - - Updated - - -

 

Ok that's probably true I think I'll just do it that way. The localization files are no fun with all that added language stuff in there either.

 

You could be over-thinking the localization files:

 

Localization
The localization files are merged with the games files

On the first line of the file you define which columns you include, if you do not include a column, all cells for that column will be empty during the merge.

For example, it is acceptable to have the following:


Key,English
MyKey,My Text

After the merge the injected row is in the format:


Key,Source,Context,Changes,English,French,German,Klingon,Spanish
MyKey,,,,My Text,,,,

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...