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

Property "blockOnStart" for quests - is it even possible?

Hello everyone.

I tried to create my own small tasks that can add some variety to the game. And in the process I realized why there are so few of them). Well, I'll get straight to the point:

When adding a new task, there is indeed no property that will block the re-launch of the quest if the player has already launched it. This is a mechanic that is currently implemented for treasure maps. However, to my great regret, it does not work correctly and everything does not work as the player expects. I have heard about this problem for a long time and was surprised that it was not fixed, considering that fixing this error is a matter of 10 minutes. I reported and described the problem in the Bugs section.

When I started studying the issue, I realized that now this important and useful property is almost impossible to implement. All checks from buffs do not work because the following actions were disabled:

//onQuestStart, //Hook Up
//onQuestLocationReached, //Hook Up
//onQuestLocationLeft, //Hook Up
//onQuestCompleted, //Hook Up
//onQuestFailed, //Hook Up

Checks from the game event are also impossible, since the onQuest requirement also does not work (and it is completely unclear why). At the same time, this works:
<requirement class="OnQuest"/>

And it doesn't work:
<requirement class="OnQuest">
<property name="quest" value="NewQuestName" />
</requirement>

After many hours of trial and error, I realized that if you name any quest by analogy with treasure maps:
treasure_newquestname
then the blocking starts working, similar to cards. But here too there is a bug in the mechanics.

As a result, the issue remains open and unresolved.

QUESTION FOR TFP: How difficult is this and can we expect the addition of a property for "blockOnStart" tasks in the future. This will allow applying the basic mechanics to other tasks, without dancing with a tambourine?
 
Last edited:
If using an item to give the quest, like a treasure map, you can use cvars to block using the item again. Can either set one when the item is used and leave it so the item is basically a single use, or you could have the quest reset the cvar when completed so you can repeat the quest, just not while actively doing the quest.

Could likely do something similar with trader quests too, but would need to add the cvar stuff to dialogs.xml to hide the quest options. Would be a bit more work doing this.
 
If using an item to give the quest, like a treasure map, you can use cvars to block using the item again. Can either set one when the item is used and leave it so the item is basically a single use, or you could have the quest reset the cvar when completed so you can repeat the quest, just not while actively doing the quest.

Could likely do something similar with trader quests too, but would need to add the cvar stuff to dialogs.xml to hide the quest options. Would be a bit more work doing this.
How can I check a variable if the player died or cancelled the quest?
 
Hmm. You could reset the cvar on death if needed, if dying removes the quest. Not sure on canceling it, to be honest. If you want it able to be repeated, just not at the same time, you could kind of cheese it and have a buff reset the cvar after a certain amount of time. If they cancel the quest they would just have to wait a bit to start it again. Not the cleanest way, I know.
 
Back
Top