PC at _place_ not Working

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Kamer
Posts: 583
Joined: Mon Mar 05, 2018 9:26 pm

PC at _place_ not Working

Post by Kamer »

Trying to get the _meetup_ task to work but it just doesn't. No errors are present, and I have no reason to believe it isn't bugged.
The quest is being written with TheLacus' VisualCodeStudio quest editor.


Spoiler!
QBN:
Place _meetup_ local tavern <--------Place to meet. Originally was a house, but changed to a tavern to see if the house's weren't working.
Place _bank_ local bank

Clock _meeting_ 00.00:01

Foe _meetingRogue_ is Rogue
Foe _meetingThief_ is Thief

Person _mainman_ factionType Thieves_Den

-- Quest start-up:
start timer _meeting_
say 1010
log 2000 step 0

_ally_ task:
daily from 00:00 to 23:59
change foe _meetingRogue_ infighting true
change foe _meetingThief_ infighting true
restrain foe _meetingRogue_
restrain foe _meetingThief_
clear _ally_

_atmeeting_ task:
pc at _meetup_ set _meetingfoes_ saying 1020 <--------------------------Doesn't trigger.


_meetingfoes_ task:
create foe _meetingRogue_ every 0 minutes 3 times with 100% success
create foe _meetingThief_ every 0 minutes 3 times with 100% success


_meeting_ task:
place npc _mainman_ at _meetup_

_heistoffer_ task:
clicked npc _mainman_
say 1030
prompt 1040 yes _yes_ no _no_

_yes_ task:
say 1060
say 1070
say 1080
say 1090
end quest

_no_ task:
say 1050
end quest

_task_ task:
end quest

Here is the quest file:
BE_BANKHEIST.rar
(2.11 KiB) Downloaded 134 times

theJF
Posts: 69
Joined: Wed Dec 26, 2018 10:34 am

Re: PC at _place_ not Working

Post by theJF »

have you tried putting the line that doesn't trigger in the quest start-up section instead of in its own task?

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

Re: PC at _place_ not Working

Post by Interkarma »

Yep, what theJF said. "pc at place" is just an action to switch another task/var on or off. It doesn't start its own parent like a trigger. It needs to be placed in a task that's already running by the time player reaches that place. The startup task is a good spot for this action in most quests.

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

Re: PC at _place_ not Working

Post by Kamer »

I see. If it helps, I get a lot of quest actions from here: Quest Stuff

Some of the examples they give sound like they are used to start their parent.
I thought so cause most like that start off with "when".

Code: Select all

Locating the PC in the game world

Sometimes you want to take some action when the PC arrives at a particular quest location.

    pc at aPlace do aTask
    when pc at aPlace
    when pc not at aPlace
    pc at anNPC do aTask
    when pc at anNPC
    when pc not at anNPC

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

Re: PC at _place_ not Working

Post by Interkarma »

Tipton's documentation is a bit out of step with TEMPLATE 1.11. There's no "when pc at", etc. used anywhere in the classic game or ever decompiled by TEMPLATE 1.11.

But you can still create an indirect trigger that's basically "when pc at". This is mainly useful if you want to combine the player arriving with some other logic, e.g. player must arrive at night. Here's a snippet:

Code: Select all

QBN:

Place _target_ remote tavern

-Quest startup - this will continuously raise/lower _atTarget_ flag when player is/isn't at tavern
pc at _target_ set _atTarget_

-This variable is raised when player at target tavern and lowered when player not at target tavern
variable _atTarget_

-This task is raised during daytime hours and lowered at night
_daytime_ task:
	daily from 05:00 to 19:00

-Trigger this task when player in tavern and it's nighttime
_playerArrivedAtNight_ task:
when _atTarget_ and not _daytime_
The best learning tool is to hunt through the classic quests and see how they do things, rather than absorb Tipton's docs directly. They're a good starting point, but there's a lot of missing/inaccurate info there too.

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

Re: PC at _place_ not Working

Post by TheLacus »

This is something i had in mind for a while, do you believe it could help if IsTriggerCondition and IsAlwaysOnTriggerCondition properties are exposed as in screenshots below?

trigger.jpg
trigger.jpg (14.37 KiB) Viewed 3272 times
alwaysOnTrigger.jpg
alwaysOnTrigger.jpg (23.41 KiB) Viewed 3272 times

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

Re: PC at _place_ not Working

Post by Interkarma »

I think that's a really clear and concise way to clarify the behaviour. Your Quest Editor is hands down the best way to write quest script, and little details like this will absolutely help.

imsobadatnicknames
Posts: 371
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: PC at _place_ not Working

Post by imsobadatnicknames »

_
Kamer wrote: Sun Feb 28, 2021 4:24 pm Trying to get the _meetup_ task to work but it just doesn't. No errors are present, and I have no reason to believe it isn't bugged.
The quest is being written with TheLacus' VisualCodeStudio quest editor.
Idk if you already found the way to fix this on your own, but nothing was actually wrong with the syntax int he quest, however the problem is that you put "pc at _meetup_ set _meetingfoes_ saying 1020" inside another task called _atmeeting_, which never gets activated. That's a problem because that means the quest is compltely unaware of the "activate the _meetingfoes_ task when player arrives at _meetup_" instruction until the task that the "pc at" condition is inside of gets activated.

You're esentially telling the game to _perform the _meetingfoes_ task when the player arrives at _meetup_ but ONLY if the task _atmeeting_ has already been performed, and there's nothign in your quest to trigger _atmeeting_

Basically, moving "pc at _meetup_ set _meetingfoes_ saying 1020" from "_atmeeting_ task:" to the quest startup should do the trick.

You can see this behavior in action in the classic quest o0a0aL00 (the Thieves Guild initiation quest), which has the following section:

Code: Select all

_readletter_ task:
	pc at _mansion_ set _S.02_ 
	start timer _traveltime_ 
	log 1010 step 0 
Which means that the player's arrival at _mansion_ will trigger the _S.02_ task (which spawns the three hostile mages) but ONLY if the player has already triggered the _readletter_ task by reading the thieves guild letter, if the player goes there before triggering _readletter_, the _S.02_ task won't trigger and the mages will not spawn (this is presumably to prevent the foes from appearing for no apparent reason if the player happens to accidentally wander into the house without having read the letter first).
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

Post Reply