"pc at any" doesn't handle duplicate entries

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Jay_H
Posts: 3660
Joined: Tue Aug 25, 2015 1:54 am
Contact:

"pc at any" doesn't handle duplicate entries

Post by Jay_H »

Question for Kab / anyone else who helped deliver the new quest actions to 0.11.4:

I'm working on RLQ and my initialization quest uses this at startup:

Code: Select all

--   Quest start-up:
    pc at any tavern set _taverned_
    pc at any fighters set _taverned_
My intention is to make sure anyone inside a Fighters Guild or a tavern can't trigger the quest event. However, only any Fighters Guild triggers _taverned_ and not any tavern. I had to change it to

Code: Select all

--   Quest start-up:
    pc at any fighters set _fightered_
    pc at any tavern set _taverned_
to get the tavern to properly activate _taverned_ with it.

My question is whether this is a known limitation, or whether there's a purpose behind it.

User avatar
TheLacus
Posts: 1354
Joined: Wed Sep 14, 2016 6:22 pm

Re: "pc at any" doesn't handle duplicate entries

Post by TheLacus »

pc at starts a task if condition is true and stops it if condition evaluates to false; if you have multiple conditions they just keep fighting each other unless they are both true or false at the same time.

I think this kind of action is confusing (even for someone with experience writing quests) and TEMPLATE would be easier if it was entirely driven by triggers for this kind of checks. But this is an addition to an action inherited from classic and that's just how it works.

User avatar
Hazelnut
Posts: 2865
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: "pc at any" doesn't handle duplicate entries

Post by Hazelnut »

I hit the same issue when making Mountain Rumors, but it's quite easy to use a variable for each and then "when var1 or var2" on a task. (I used and but you want or I think)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: "pc at any" doesn't handle duplicate entries

Post by Jay_H »

TheLacus wrote: Thu Jun 17, 2021 2:46 pm pc at starts a task if condition is true and stops it if condition evaluates to false; if you have multiple conditions they just keep fighting each other unless they are both true or false at the same time.
Ah, that's an excellent explanation. Thank you. I can deal with it then, it's no problem. I was just wondering if it was an oversight or if that's how it would act.
Hazelnut wrote: Thu Jun 17, 2021 3:23 pm I hit the same issue when making Mountain Rumors, but it's quite easy to use a variable for each and then "when var1 or var2" on a task. (I used and but you want or I think)
Yeah, at this point it was just to shorten the quest script a little, but I'm totally fine with doing that. I didn't know how much work it would take behind the scenes to change this.

User avatar
Kab the Bird Ranger
Posts: 70
Joined: Tue Feb 23, 2021 12:30 am

Re: "pc at any" doesn't handle duplicate entries

Post by Kab the Bird Ranger »

People have already answered this, but I'll mention that this extension to "pc at" (like almost all my other 0­.11.4 actions) was developed for this mod: https://www.nexusmods.com/daggerfallunity/mods/203

It can be a reference for how it can be used.

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

Re: "pc at any" doesn't handle duplicate entries

Post by Jay_H »

Oh, it's completely fine. You should see the kind of limitations I had to write QP1 under, when we didn't even have all of the vanilla quest actions :D I'm happy figuring out a way to make things work with the quest script, there's one way or another to get it done.

Post Reply