Jump to content

Fetch Quests Custom Container


Recommended Posts

Hi All,

 

Has been a little while since I did any modding in 7 Days but since my girlfriend is besotted with the game it has pulled me back into it!

I would like to create some quests that remain immersive but extend upon the current rather basic, yet still fun, quests that are currently built into the game.

If I remember correctly the list of quests obtainable from a trader is: Fetch, Clear, Fetch & Clear, Restore Power

 

This is what I would like to extend, quests give the game a huge boost and keep you playing for far longer, not to mention being able to direct a new sense of lore in your own spin-off creation to tie into the apocalyptic world we play in. So anyway, I have created a new quest, it works perfectly, I've added all the Localization.txt stuff in and it performs great, values work where they need to and you can complete the quest with no problems.

 

The only issue I have is, as the title states, I would like to change the default fetch container from being the Courier Satchel, this is important due to the nature of the quest. I believe I have Google'd this one to death, and tried to expel as much of my ability as possible into getting this to work but unless this is hard-coded into the game, I can't figure out how to change the container even despite creating my own container, checking it works as I can place it in-game and there is the option to search it, displaying a 6x2 grid of empty cells. This works. But the quest will ALWAYS spawn a Courier Satchel instead (which DOES contain the correct custom quest item).

 

I have tried changing the "default_container" to my own container, no luck. I have looked as deep into the XML files as possible but there isn't much helping us to see what's possible. Looking at the quests XML file there seems to be quite a lot of properties that could use some explaining so that we have some idea on what is actually happening with those settings.

 

What I have stumbled upon and not managed to get working is the 'blockplaceholders.xml' there are two nodes that caught my eye:

'cntQuestRandomLootHelper' and 'cntQuestNoPHRandomLootHelper'

 

These appear to assign the Courier Satchel (cntFetchQuestSatchel) however, I have tried to append my own container and this doesn't seem to work as the Courier Satchel has 'questtags' and I'm not sure how to assign these, or what they even do since they don't appear in the 'quests.xml' file or anywhere I've looked. When I've tried to set my 'questtags' to a value and then COPIED that valued and pasted it into the 'blocks.xml' file of my mod where my container is and setting the same value on the property 'ValidQuestTags' I get an error on loading saying 'EXC Requested value 'TSIQ_friend' was not found.' (The TSIQ_friend is the tag I was using, however, I have tried other unique things as well)

 

When I set this in my 'blockplaceholders.xml' to 'fetch' which is the same as the Courier Satchel uses then it works without throwing an error. So I'm not sure what I'm doing wrong, but perhaps this is the final piece of the puzzle??

 

 

I'd like to mention I have tweeted to the devs about this multiple times but never once had a response and I'm not sure on a good and legit way to get in touch?

 

Any ideas would be greatly appreciated and thank you very much :)

Thunder.

Link to comment
Share on other sites

3 hours ago, ThunderSn1per said:

Hi All,

 

Has been a little while since I did any modding in 7 Days but since my girlfriend is besotted with the game it has pulled me back into it!

I would like to create some quests that remain immersive but extend upon the current rather basic, yet still fun, quests that are currently built into the game.

If I remember correctly the list of quests obtainable from a trader is: Fetch, Clear, Fetch & Clear, Restore Power

 

This is what I would like to extend, quests give the game a huge boost and keep you playing for far longer, not to mention being able to direct a new sense of lore in your own spin-off creation to tie into the apocalyptic world we play in. So anyway, I have created a new quest, it works perfectly, I've added all the Localization.txt stuff in and it performs great, values work where they need to and you can complete the quest with no problems.

 

The only issue I have is, as the title states, I would like to change the default fetch container from being the Courier Satchel, this is important due to the nature of the quest. I believe I have Google'd this one to death, and tried to expel as much of my ability as possible into getting this to work but unless this is hard-coded into the game, I can't figure out how to change the container even despite creating my own container, checking it works as I can place it in-game and there is the option to search it, displaying a 6x2 grid of empty cells. This works. But the quest will ALWAYS spawn a Courier Satchel instead (which DOES contain the correct custom quest item).

 

I have tried changing the "default_container" to my own container, no luck. I have looked as deep into the XML files as possible but there isn't much helping us to see what's possible. Looking at the quests XML file there seems to be quite a lot of properties that could use some explaining so that we have some idea on what is actually happening with those settings.

 

What I have stumbled upon and not managed to get working is the 'blockplaceholders.xml' there are two nodes that caught my eye:

'cntQuestRandomLootHelper' and 'cntQuestNoPHRandomLootHelper'

 

These appear to assign the Courier Satchel (cntFetchQuestSatchel) however, I have tried to append my own container and this doesn't seem to work as the Courier Satchel has 'questtags' and I'm not sure how to assign these, or what they even do since they don't appear in the 'quests.xml' file or anywhere I've looked. When I've tried to set my 'questtags' to a value and then COPIED that valued and pasted it into the 'blocks.xml' file of my mod where my container is and setting the same value on the property 'ValidQuestTags' I get an error on loading saying 'EXC Requested value 'TSIQ_friend' was not found.' (The TSIQ_friend is the tag I was using, however, I have tried other unique things as well)

 

When I set this in my 'blockplaceholders.xml' to 'fetch' which is the same as the Courier Satchel uses then it works without throwing an error. So I'm not sure what I'm doing wrong, but perhaps this is the final piece of the puzzle??

 

 

I'd like to mention I have tweeted to the devs about this multiple times but never once had a response and I'm not sure on a good and legit way to get in touch?

 

Any ideas would be greatly appreciated and thank you very much :)

Thunder.

Let me confirm. You'd like to change the cntQuestRandomLootHelper model that appears in the editor POI and the in-game cntFetchQuestSatchel model that will appear somewhere in the POI when the fetch quest has been activated. A small edit for that file using a set replacement brings favourable results for a default model for the Quest Rally Marker.

 

    <set xpath="/blocks/block[@name='cntFetchQuestSatchel']/property[@name='Model']/@value">Entities/Quests/rally_pointPrefab</set>

 

20220808134709_1.thumb.jpg.7d6e44ce0744ea19a344b170d51a31a7.jpg

 

20220808134722_1.thumb.jpg.6341d1b0cc9f5728b4254bd36e7125b3.jpg

Link to comment
Share on other sites

8 hours ago, arramus said:

Let me confirm. You'd like to change the cntQuestRandomLootHelper model that appears in the editor POI and the in-game cntFetchQuestSatchel model that will appear somewhere in the POI when the fetch quest has been activated. A small edit for that file using a set replacement brings favourable results for a default model for the Quest Rally Marker.

 

    <set xpath="/blocks/block[@name='cntFetchQuestSatchel']/property[@name='Model']/@value">Entities/Quests/rally_pointPrefab</set>

 

20220808134709_1.thumb.jpg.7d6e44ce0744ea19a344b170d51a31a7.jpg

 

20220808134722_1.thumb.jpg.6341d1b0cc9f5728b4254bd36e7125b3.jpg

 

Fantastic, that's more progress than I have managed to make so far! This is replacing the default container during the Fetch quest I assume? I will test this out but I am looking to replace it entirely for my custom quest I have created, whereby the Courier Satchel also changes the name it uses, I am thinking I can repurpose the link you wrote to do something similar.

 

The actual plan is to have a custom quest that is pretty much identical to a Fetch quest but rather than just getting the satchel and supplies it enables us to create a narrative instead, so the satchel needs to change for something else and the supplies also need to change, I have easily changed the quest item, but it is changing the model and name of the Courier Stachel that is proving difficult. :)

 

For absolute clarity, I need to change the model/name only in my custom quest, not for ALL instances of

<objective type="FetchFromContainer">

ONLY for my quest, but both of them use this same objective. How would you add that as presumably the code

<set xpath="/blocks/block[@name='cntFetchQuestSatchel']/property[@name='Model']/@value">Entities/Quests/rally_pointPrefab</set>

Would be placed in 'blocks.xml' so how do we associate it with a specific quest?

 

Thank you very much, I am still learning XML and this is a great help! Wish I hadn't skipped over it learning all the other languages haha

Edited by ThunderSn1per
Clarity (see edit history)
Link to comment
Share on other sites

You are 

8 hours ago, ThunderSn1per said:

For absolute clarity, I need to change the model/name only in my custom quest, not for ALL instances of

<objective type="FetchFromContainer">

ONLY for my quest, but both of them use this same objective.

 

You are right, the change that Arramus suggested simply changes the model used by the existing quest satchel. It would change the appearance of all quest satchels used by all fetch and hidden cache quests.

 

What you want is possible but not at all easy, and would require new POIs. Here's why.

 

I guess you already looked at the block placeholders named "cntQuestRandomLootHelper" and "cntQuestNoPHRandomLootHelper". Those are the two block helpers used by POI designers. And as you can probably tell, what they do is choose the container to spawn according to quest tag.

 

Those quest tags are specified by the POI's "QuestTags" property in its XML file, and quest tags are enumerated values. You can't use any values other than the ones already used by the game. That's why you're getting an exception about an invalid quest tag value - it's trying to parse your string as a C# enum value that doesn't exist.

 

What this means is that if you try to add your custom quest satchel to those block placeholders, it would have to replace the one that's already being used by that quest tag - and it would be for all quests that use that quest tag, meaning all fetch quests. So it wouldn't be any better for you than Arramus' suggestion.

 

In order to use a custom quest container, you'd have to create your own block placeholder, along with a matching block (with the different model). You would then have to create or alter POIs so they use that placeholder, rather than the vanilla ones, for their fetch quests.

 

Of course, if this is multiplayer, then all clients would need their own copies of the POIs.

 

And another catch is that your quest could only go to those POIs. The vanilla "RandomPOIGoto" objective does not allow you to do this. SphereII has a mod called SCore that offers an objective that will allow this (I wrote it :) ), but it requires custom C# coding, and chooses POIs by a tag value (from its A20 "Tags" property, not its "QuestTags" property - those tags are strings so you can have custom tags).

 

All of this is a huge amount of work, and I don't know if it's worth it. You can already choose different items to fetch from the containers. (You may have figured this out, but they're defined in "quest_items" in quests.xml, and their "id" property is mapped to the objective's "quest_item_id" property.) That might be good enough for your purposes.

 

Hope that puts you on the right track.

 

(EDIT: Also, this should really be in the "Discussion and Requests" forum.)

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

10 hours ago, khzmusik said:

You are 

 

You are right, the change that Arramus suggested simply changes the model used by the existing quest satchel. It would change the appearance of all quest satchels used by all fetch and hidden cache quests.

 

What you want is possible but not at all easy, and would require new POIs. Here's why.

 

I guess you already looked at the block placeholders named "cntQuestRandomLootHelper" and "cntQuestNoPHRandomLootHelper". Those are the two block helpers used by POI designers. And as you can probably tell, what they do is choose the container to spawn according to quest tag.

 

Those quest tags are specified by the POI's "QuestTags" property in its XML file, and quest tags are enumerated values. You can't use any values other than the ones already used by the game. That's why you're getting an exception about an invalid quest tag value - it's trying to parse your string as a C# enum value that doesn't exist.

 

What this means is that if you try to add your custom quest satchel to those block placeholders, it would have to replace the one that's already being used by that quest tag - and it would be for all quests that use that quest tag, meaning all fetch quests. So it wouldn't be any better for you than Arramus' suggestion.

 

In order to use a custom quest container, you'd have to create your own block placeholder, along with a matching block (with the different model). You would then have to create or alter POIs so they use that placeholder, rather than the vanilla ones, for their fetch quests.

 

Of course, if this is multiplayer, then all clients would need their own copies of the POIs.

 

And another catch is that your quest could only go to those POIs. The vanilla "RandomPOIGoto" objective does not allow you to do this. SphereII has a mod called SCore that offers an objective that will allow this (I wrote it :) ), but it requires custom C# coding, and chooses POIs by a tag value (from its A20 "Tags" property, not its "QuestTags" property - those tags are strings so you can have custom tags).

 

All of this is a huge amount of work, and I don't know if it's worth it. You can already choose different items to fetch from the containers. (You may have figured this out, but they're defined in "quest_items" in quests.xml, and their "id" property is mapped to the objective's "quest_item_id" property.) That might be good enough for your purposes.

 

Hope that puts you on the right track.

 

(EDIT: Also, this should really be in the "Discussion and Requests" forum.)

 

Ah, understood. While this is, of course, not the news I was hoping for, this does help a lot and the explanation is even more helpful so I can't thank you enough.

 

I completely agree that this is likely a lot of work and instead I will hope the quest system is adjusted in future releases to accomodate this. As per currently the blockplaceholders only have a few block's declared so adjusting all this could become obsolete in as early as potentially the next Alpha release.

 

I have indeed adjusted the the quest items and adding to this is quite simple thank you, the only part of this customization that was missing was being able to change the default_container but that clearly needs to match up with the corresponding declarations in blockplaceholders, the POIs questtags etc.

 

I have some experience with C# and Unity so it's not out of the question but it's certainly outside the scope of efficiency currently. Let's wait and see what the next versions of the game produce, is there anywhere I can post a suggestion for these sort of things to the developers so that hopefully in the future changing the container COULD be as simple to extend this to other users that can't grasp more advanced "coding" but so they could also have the ability to create quests? :) EDIT: or if POIs where able to have their questtags edited in XML etc. just something that makes it more available to others people that might want to create some really interesting and unique storylines that could expand the game a lot.

 

Thank you again!!

Edited by ThunderSn1per (see edit history)
Link to comment
Share on other sites

40 minutes ago, ThunderSn1per said:

is there anywhere I can post a suggestion for these sort of things to the developers so that hopefully in the future changing the container COULD be as simple to extend this to other users that can't grasp more advanced "coding" but so they could also have the ability to create quests? :) EDIT: or if POIs where able to have their questtags edited in XML etc. just something that makes it more available to others people that might want to create some really interesting and unique storylines that could expand the game a lot.

It seems this area attracts suggestions right across the spectrum from basic tweaks for existing assets right up to complex overhaul features.

 

The individual POI xml's would certainly provide a lot of scope for highly customised individual POIs if that were opened up with custom made questing and settings in mind. What gifts we get given in one hand (A20 tiling system and tagging) can see other things taken from the other (specific Biome POI placement removed). It's unfortunate this hasn't been cumulative over time, but the Devs have mentioned Steam Workshop integration and that may infer more focus on community tools/modding kits.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...