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

Start action if quest failed

Dos

Refugee
Hi Guys,

I would like to start an action if a quest has failed.
The current situation is that the quest is simply canceled.

Unfortunately, I have not found a solution in the forum or on Google for it.

Do any of you have any ideas how I can solve this?

Thx

 
Hi,
no one an idea?

Maybe I have to clarify what I'm about.

You are currently starting a quest and have to kill all zomies in an area. But you are not allowed to leave the area.

If you can do that, you get a reward.

But I want the following:
If you leave the area, (for example) different groups of zombies appear.

So
Action 1 (go to the area)
Action 2 (kill everyone but don't leave the area) -> if failed, then spawn
Action 3 (Return to Joe)
Action 4 -> reward

 
I'm replying just to let you know that at least one person looked into it.

I'm pretty sure this is not possible with XML alone. It is not easy with custom C# code, either. I just looked at the code, and it doesn't seem to provide any way to hook into a quest failure.

If you want to make this possible, I think you'll have to create a Harmony hook. It would probably be on the Quest.MarkFailed method, and from looking at the code, would probably have to prefix that code.

But that's about where my expertise ends. And if you don't already know what I'm talking about, then you probably won't be able to learn enough to implement it before A20 drops, and changes everything anyway.

Sorry to be the bearer of bad news... Hopefully I'm wrong, and just missed something that someone else can spot.

 
I'm replying just to let you know that at least one person looked into it.

I'm pretty sure this is not possible with XML alone. It is not easy with custom C# code, either. I just looked at the code, and it doesn't seem to provide any way to hook into a quest failure.

.....


Hello khzmusik,

Thank you for your very good and detailed answer.
Unfortunately, I had just as much feared it, but still hoped that I had overlooked something.
Unfortunately, that also means for me that I have to come up with a new concept for my "story mode", as that was currently mandatory.

In case you care.
The plan was:

The player is left to himself much later and he gets a fixed goal to survive.

At the beginning he gets detailed information about what happened and why he is there.
Then he receives consecutive milestones that he has to achieve (Craft forge, craft workbench, craft x cobblestone ...).

In the meantime, he is supplied with further information via airdrops, so that this also has more meaning for the game.

The player must have reached the milestones by day 70.
If he has done that, he gets a few points for perks as a reward and he can then build free and do what he wants.
If he has not managed to do that, waves of zombies keep coming until he dies and he receives a very strong debuff and no reward. I would even have liked to have him start all over again.

But I already have a thought how I can possibly get around it. Just take a look.

PS: sorry for the google translation 😉

 
Last edited by a moderator:
There is probably another way to do that.

If the player succeeds on these "special" quests, then set a cvar saying the quest is completed.

When day 70 arrives, immediately fail all active "special" quests. This means their cvars are not set.

Also on day 70, check to see if all the cvars are set. If not, then activate waves of zombies as you described. You don't need to hook into quest failures, just check if the cvars are all set.

For starting over, you could use Khaine's ResetPlayerDMT modlet:







I also have a "dead is mostly dead" modlet, which is similar, but it doesn't "start over" so much as "start  a new character." (It doesn't remove skill points, and gives you items upon respawn that are scaled to your game stage). If you're interested in that instead, it is here: https://gitlab.com/karlgiesing/7d2d-a19-modlets/-/tree/master/khzmusik_Mostly_Dead_DMT

 
Last edited by a moderator:
...actually never mind my last comment. For some reason I thought you could use triggered effects when completing a quest, and that's where I thought you could set a cvar. This does not seem to be the case.

 
Back
Top