In the recent update of my Black Horse Courier questmod, I use a timer to start one quest at a specific date. As the start date of a new game is always the same, this ensures that my intended date is correct.
Of course this only works if the questmod is used with a new game, where I set up everything in the beginning. But if it is used with an existing save game (by using the startquest console command), the timer simply counts from the current date. This will still start the quest, but on a different day than intended.
So it would be nice to be able to check if we have a specific date in quests.
Edit: If checking for a really specific date is too complex, something like the existing "daily" but for the day of years would be sufficient, too. For example:
In addition to the existing "daily" as in
_Evening_ task:
daily from 20:00 to 23:59
I'd also like something similar for the days in a year, like
_SummerSeason_ task:
day from 180 to 230
(days 180 to 230 in a year, which is roughly July to end of September)
or
_SummerSeason_ task:
month from 7 to 9
(months 7 to 9 / July to September).
Checking for specific date
- pango
- Posts: 3359
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Contact:
Re: Checking for specific date
I hoped "Wayrest Painting" (S0000017) would give some useful informations since it says "before end of next season", but it seems it's in fact not timed...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
Re: Checking for specific date
Yes, it is just a "soft" way of putting some urgency to that quest.
Would be cool if DFU's quest language could be enhanced to take such conditions into account. One could create lots of holiday-related quests this way, too.
Would be cool if DFU's quest language could be enhanced to take such conditions into account. One could create lots of holiday-related quests this way, too.
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Checking for specific date
Quest engine is driven by actions. Mods can defines new actions and register them with QuestMachine.RegisterAction(IQuestAction).
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
Re: Checking for specific date
So you mean I could define an equivalent to TEMPLATE's "daily from ... to ..." by programming some C# code?TheLacus wrote: ↑Sun Feb 14, 2021 3:09 pmQuest engine is driven by actions. Mods can defines new actions and register them with QuestMachine.RegisterAction(IQuestAction).
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Checking for specific date
Yes, that's been possible for ages. All of the quest actions I wrote, and some from DFIronman, were added to core DFU because they were generally useful. However they started life in mods.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
Re: Checking for specific date
Is there somewhere an example? (I think in your own mods, there's none, is it?)
While I have a basic understanding of C# syntax I'm no programmer. So I guess I will continue to focus on writing my quests themselves, and avoiding ideas which are not possible with default template language; I guess that time is better spent
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
Re: Checking for specific date
I read that code and it seems I have understood it enough to adjust it to my needs ... is it correct that I simply include a C# file with my action (based on the example) and then in my mod's main C# file I use the aforementioned RegisterAction method to "inform" DFU about my new actions?
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Checking for specific date
yes that's correct
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods