"have item" with permanent items?

For all talk about quest development - creation, testing, and quest system.
User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: "have item" with permanent items?

Post by haloterm »

imsobadatnicknames wrote: Thu Oct 08, 2020 7:02 pm
haloterm wrote: Thu Oct 08, 2020 6:40 pm 27 years seemed long enough to me for a playthrough.

I don't know how to make a quest "really" infinite.
You can just not include an end condition
Really? I think I tried that, but the quest ended automatically. For example the following code snippet:

Code: Select all

Item _Newspaper_ letter used 1030

Clock _init_ 2.00:00 7.00:00

start timer _init_

_init_ task:
    get item _Newspaper_ saying 1020
The newspaper shall be given to the player in a timeframe between 2 and 7 ingame days, hence the "init" timer. If I remember correctly, the quest stops as soon as the "init" task is done, i.e. the player gets the item very shortly, but then the quests ends automatically (because the timer is up) and the item vanishes again.

That's why I use the following logic:

Code: Select all

Item _Newspaper_ letter used 1030

Clock _Infinity_ 10000.00:00
Clock _init_ 2.00:00 7.00:00

start timer _init_

_init_ task:
    get item _Newspaper_ saying 1020
    
_Infinity_ task:
This way, the item persists until the "infinity" timer is up, i.e. after 10000 ingame days (27 years).

Edit: Hm. I think I stand corrected and you are right. For testing, I removed my infinity timer, and the quest simply kept running. No idea why I added it earlier this year... Maybe at first I wanted to have just a shorter timer (so the newspaper disappears after a few ingame days), but then somehow I thought "a few days is way too early, maybe the player misses to read it and thus misses other quest opportunities" and that's why I cranked it up to such a long time... and then my memory faded until I continued work on my quests just a few days ago, now being convinced that the timer was actually needed to keep the item ... :lol: I'm getting old (... getting 40 next year).

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

Re: "have item" with permanent items?

Post by Hazelnut »

Well I think we all learned something. Good thread! :D

And almost 40 had better not be old, but guess it's all relative isn't it?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: "have item" with permanent items?

Post by haloterm »

Hazelnut wrote: Thu Oct 08, 2020 10:50 pm Well I think we all learned something. Good thread! :D

And almost 40 had better not be old, but guess it's all relative isn't it?
I was just kidding ;) Although I really noticed that 10, 15 years ago I was able to sit whole nights in front of my computer, programming stuff, and also learn new stuff. It's interesting that this has become more difficult over time. But I guess that's life :)

Post Reply