PC at _place_ do _task [Dungeon Exteriors]

For all talk about quest development - creation, testing, and quest system.
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Interkarma »

Nice! I'll work on this over the next day or so. Thanks for your patience as I came to grips with what you were after.

User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Jay_H »

If implemented, this'll open a lot of potential for quests :D I'm imagining some already!

User avatar
Kamer
Posts: 583
Joined: Mon Mar 05, 2018 9:26 pm

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Kamer »

Yea, might even be able to check when the player isn't at any place at all.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Interkarma »

Good idea! Fits in with this perfectly.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Interkarma »

I'm working on this one today. I've had a while to think about how this should function, and feel it's important to be distinct from "pc at" as you need a trigger not a toggle in this situation. The syntax will look like the following:

Code: Select all

when pc enters exteriorLocationType
when pc exits exteriorLocationType
You can use any of the exterior types from "Quests-Places", including anywhere. This will allow you to set up wilderness detection as well. Once you dig into it, you should be able to create some powerful outcomes from simple scripts.

Code: Select all

labyrinth
keep
ruin
graveyard
coven
farmhome
wealthyhome
poorhome
tavernhome
templehome
cult
city
hamlet
village
anywhere
I'm still working through the implementation so it might be a couple of days away. I'll post an example when I can to show how flexible it can be.

User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Jay_H »

This sounds excellent. One thing I'll mention is that when I was testing quests back in September, I tried using a "pc at" condition at one of the domed outdoor shrines, the little blue insignificant ones on the world map. For some reason I couldn't get "pc at" to function at them. It was way too soon to report it as a bug and I'm still not bothered with it, so I just wanted to mention that in case you run into the same problem.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Interkarma »

Thank you Jay. Can you remember which exterior type you were using for them? I'll need to check my mapping in the Quests-Places table. From memory, they are of the type "cults".

User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Jay_H »

I actually managed to save a copy of it, luckily enough. IIRC the problem was with both cult and templehome, but I can't remember clearly. That's just what my notes about it said.

Actually, it was with cult. Templehome was functional IIRC.

User avatar
Kamer
Posts: 583
Joined: Mon Mar 05, 2018 9:26 pm

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Kamer »

Great news. This is gonna cut down the quests lines to almost nothing and give so many more outcomes. I can have sieges work then way I need them to now. I can't thank you enough.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: PC at _place_ do _task [Dungeon Exteriors]

Post by Interkarma »

This is on git now and will be in next round of builds. Here's an example of use.

Code: Select all

---- Example quest to track entering "home" location types or wilderness
---- Start from console: 'startquest __demo20"

Quest: __DEMO20


QRC:

QuestLogEntry:  [1010]
%qdt
  You must find any home location
and also explore the wilderness.


QBN:

---- Quest startup
log 1010 step 0

variable _atAnyHome_
variable _inWilderness_

---- Clear wilderness var when entering any location type
---- Also re-arms exit anywhere task so it can fire again
_entersAnywhere task:
	when pc enters anywhere
	clear _inWilderness_
	clear _exitsAnywhere_

---- Set wilderness var when exiting any location type
---- Also re-arms enters home task so it can fire again
_exitsAnywhere_ task:
	when pc exits anywhere
	setvar _inWilderness_
	clear _atAnyHome_
	clear _entersAnywhere_
	clear _entersAnyHome_
	
---- Set home var when entering any "home" location type
_entersAnyHome_ task:
	when pc enters farmhome
	when pc enters wealthyhome
	when pc enters poorhome
	when pc enters tavernhome
	when pc enters templehome
	setvar _atAnyHome_
Start the above quest from console using "startquest __demo20". It shows how to do wilderness detection using "when pc enters anywhere" and "when pc exits anywhere". Note how the tasks clear each other to re-arm trigger.

There's also an _entersAnyHome_ task that fires when player enter any "home" location. If you have the quest debugger open, you will see the variable states switch on/off as you cross back and forth over the location boundary line.


In this first screenshot, player is in a normal town. They are technically somewhere, but it's neither a home nor wilderness.
in-town.JPG
in-town.JPG (28.82 KiB) Viewed 3826 times

In the second screenshot, player is in wilderness.
in-wilderness.JPG
in-wilderness.JPG (27.68 KiB) Viewed 3826 times

Finally, the player has entered a home-type location.
any-home.JPG
any-home.JPG (25.57 KiB) Viewed 3826 times

With careful re-arming and no end conditions, you could build a quest that performed all kinds of actions based on where player is in world. Because this is a trigger (not a toggle) you can stack them up underneath the parent task and any one of them will trigger the task. You just have to re-arm task as in example above. But this gives you the power to choose exactly when and how the task is shut down or re-armed.

Post Reply