Custom quest support

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

Re: Custom quest support

Post by Jay_H »

No, you can only pre-define a number for that. You could set multiple ones using "pick one of" to make it a little more varied, but you can't choose a random number from X to Y.

User avatar
harbinger451
Posts: 183
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Custom quest support

Post by harbinger451 »

I assumed as much, but thanks for the confirmation.
Image

User avatar
harbinger451
Posts: 183
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Custom quest support

Post by harbinger451 »

I have another question ... more a problem really.
As part of my Prostitutes and Lovers Quest Pack I want to add a quest that makes the prostitutes in the game always proposition the player when clicked while the quest is open. Using the "faction aFaction available" and "repute with anNPC exceeds nn do aTask" conditions and the "start quest" action.

Here's the QBN section I've come up with so far:

Code: Select all

QBN:

Person _qgiver_ group Questor

Clock _delayend_ 01.00:00

--Quest start-up:
    start timer _delayend_
    log 1010 step 0

_prostitute5_ task:
    faction The_Prostitutes available
    repute with _qgiver_ exceeds 60 do _choice1_

_prostitute4_ task:
    faction The_Prostitutes available
    repute with _qgiver_ exceeds 45 do _choice2_

_prostitute3_ task:
    faction The_Prostitutes available
    repute with _qgiver_ exceeds 30 do _choice3_

_prostitute2_ task:
    faction The_Prostitutes available
    repute with _qgiver_ exceeds 15 do _choice4_

_prostitute1_ task:
    faction The_Prostitutes available
    repute with _qgiver_ exceeds 00 do _prostitution1_

_choice1_ task:
    pick one of _prostitution5_ _prostitution4_ _prostitution3_ _prostitution2_

_choice2_ task:
    pick one of _prostitution4_ _prostitution3_ _prostitution2_ _prostitution1_

_choice3_ task:
    pick one of _prostitution3_ _prostitution2_ _prostitution1_

_choice4_ task:
    pick one of _prostitution2_ _prostitution1_

_prostitution5_ task:
    start quest PROST005
    clear _prostitute5_
    clear _prostitute4_
    clear _prostitute3_
    clear _prostitute2_

_prostitution4_ task:
    start quest PROST004
    clear _prostitute4_
    clear _prostitute3_
    clear _prostitute2_
    clear _prostitute1_

_prostitution3_ task:
    start quest PROST003
    clear _prostitute3_
    clear _prostitute2_
    clear _prostitute1_

_prostitution2_ task:
    start quest PROST002
    clear _prostitute2_
    clear _prostitute1_

_prostitution1_ task:
    start quest PROST001
    clear _prostitute1_

_qgiverclicked_ task:
    clicked npc _qgiver_

_delayend_ task:
    when _qgiverclicked_
    prompt 1011 yes _yes_ no _no_

_yes_ task:
    give pc nothing
    remove log step 0
    log 1012 step 1
    end quest

_no_ task:
    say 1003
    remove log step 0
    log 1013 step 1
    end quest
The quest startup works fine, as do the tasks from the _qgiverclicked_ task that make up the end of the quest. Everything else inbetween does not work.. I know that all the quests that are called with the "start quest" action work fine in their own right, but I can't get them to work via this quest.

Are there any obvious mistakes I've made? Or is it just that the prostitutes aren't a fully functioning faction?

Any insights or suggestions will be gratefully recieved.
Image

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

Re: Custom quest support

Post by Jay_H »

You're trying things that are beyond my experience, so I can't offer much. I put your quest file into VS Code and got this:

Image

Tipton wrote:
Checking faction availability
when aFaction is available
This condition checks whether the specified faction is available for assignment as a questor in an upcoming quest that the present quest would like to schedule. nnn is either a faction number, or the proper name of a faction. See the Person command for the complete list of factions.
This condition is triggered by the player clicking the mouse on an NPC sprite associated with the specific faction in the game world.

The main quest monitors the availability of NPCs connected with the main story before attempting to schedule a new subplot. The player triggers this check by clicking on the NPC sprite that corresponds to the specified faction.

Some permanent NPCs play a role in several different subplots. To avoid inadvertently scheduling a new subplot which uses a permanent NPC in a starring role while the same NPC is already starring in an active quest, the monitor quest checks whether the desired NPC is free at the moment, to schedule their entrance in the upcoming subplot.
Changing it to the "when... is" format removed the problems in VS Code for me.

User avatar
harbinger451
Posts: 183
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Custom quest support

Post by harbinger451 »

Yeah, I tried that already. I tried it again just in case, but the quest doesn't even seem to start running at all with "when The_Prostitutes is available" in place of "faction The_Prostitutes available". I'll keep testing it to see if it runs, but I'm close to giving up on it ever working properly.

I've tried every combination of the "faction available" and the "repute at least" conditions mentioned in Donald Tipton’s documentation, but I can't seem to get any of them to work with this quest. The quest starting and closing properly is the most I've been able to get it to do, and that only with the way its presented above, but it never actually schedules any of the other quests its supposed to. That's why I was wondering if it was a result of The_Prostitutes not being a proper faction.

Thanks for having a look at it though.
Image

User avatar
harbinger451
Posts: 183
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Custom quest support

Post by harbinger451 »

Okay, I've got another quest related question for you. When declaring a quest related place at the beginning of the QBN section ... Place _temple_ remote temple ... for example, would select a random temple in the current region. Is there a way of specifying a type of temple, like The House of Dibella as a quest location?
Image

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

Re: Custom quest support

Post by Hazelnut »

Not currently, but it may be really very easy to add. Try adding this dibella entry into StreamingAssets/Tables/Quests-Places.txt

Code: Select all

...
temple,             0, 14, 0
dibella,             0, 14, 29
tavern,             0, 15, 0
...
Then use

Code: Select all

Place _temple_ remote dibella
I think that should work, let me know - it's just theory. However you would really need to ensure the quest was only offered in regions where Dibella temples exist, otherwise the quest setup will fail. Not sure how you would ensure that because it depends on a lot more context about what you're doing.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
harbinger451
Posts: 183
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Custom quest support

Post by harbinger451 »

Okay, thanks for that. That gives me something to to work toward when I'm expanding the script in my mod for the next update (I'm also trying to make prostitutes in taverns always offer certain prostitution quests when clicked).

RE sacred prostitution,, though at the moment I've got it so non-members are pointed to "travelling" missionaries of Dibella that can be in any temple ... it would be really useful if I can make it so you are sent to an actual temple of Dibella rather than a random temple - any problems caused by there not being a House of Dibella in the region may mean I have have to abandon that idea.. We'll see.
Image

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

Re: Custom quest support

Post by imsobadatnicknames »

Update on my Populated Buildings mod.
Hazelnut doesn't seem to have found a solution as of yet, but I SORTA managed to get it working, but not quite. If I manually start the PBMASTER quest through the console (instead of trying to start it through the PB-STARTUP quest), it kinda works, so I guess I could fix that by simply getting rid of PB-Startup and just initialize PBMASTER as soon as the game starts. However, it only seems to spawn NPCs at armories, like this one:

Image

So I did a little more digging around with the console. There's 6 quests in the folder which control the spawn of NPCs inside buildings. PBA, which spawns NPCs inside armories, PBAP, which spawns NPCs inside apothecaries, PBB, which spawns NPCs inside bookstores, PBC, which spawns NPCs inside clothing shops, PBG, which spawns NPCs inside guilds, and PBW which spawns NPCs inside weapon shops. When you enter a town, PBMASTER is supposed to start all of these, however it was only starting PBA. So I tried to start all of them manually through the console and only PBA seems to be working correctly. If I try to start any of the other ones I get a message telling me the quest ID could not be found:

Image

I have no idea why, as I checked the Quest IDs and filenames multiple times and everything seems to be in order. I honestly have no idea what's going on. I gues I'm gonna try to write a new one for a different type of building and see if it has the same issue.

So... yeah. I'm kinda happy that at least PART of the mod seems to be working, but I'm left with more questions than answers.
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

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

Re: Custom quest support

Post by Jay_H »

Sometimes the quest format is strict enough that it bugs out with certain errors. If you can post the files, someone might be able to see.

Also, the startquest console command only works on quests inside /StreamingAssets/Quests. It can't read from Questpacks.

Post Reply