Custom quest support
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
Perfectly fine, this is sailing along right as I want it to This is exactly what I'd hope for to write quests. Thank you.
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
I'm writing a quest that asks the player to cast an Identify spell. It exists in Spells.std but for some reason the quest command isn't triggering:
_conv_ lights up but the spell doesn't light up _ident_. Is there some reason this spell effect wouldn't trigger it?
Full quest:
Code: Select all
_conv_ task:
clicked npc _client_
say 1010
cast Identify spell do _ident_
variable _ident_
Full quest:
Spoiler!
- Interkarma
- Posts: 7249
- Joined: Sun Mar 22, 2015 1:51 am
Re: Custom quest support
Looking at this again, issue is the "cast spell do" action is limited to matching effects from spells found in the classic Quests-Spells table. Unfortunately, Identify is not represented by this list. Here's the full table of supported spells.
https://github.com/Interkarma/daggerfal ... Spells.txt
I'll see what I can do to support any effect, even custom effects people might mod into game in future.
Edit: Adding new quest action "cast effectKey effect do aTask". This will support any single effect provided you know the effect key. Should also support modded effects down the road for big spell/quest supermods.
Update
I have implemented "cast effect do" quest action now and successfully played through your quest. This quest action is going to be much more flexible in any case and will support any effect added to the game.
The only change I had to make to your quest was updating line 135 to:
The "cast effect do" action will be in next round of builds. Jay, have a look through the effects code to find their key in the properties setup.
For example, in Destruction/ContinuousDamageHealth.cs the key is "ContinuousDamage-Health". You could use this in a quest like so:
https://github.com/Interkarma/daggerfal ... Spells.txt
I'll see what I can do to support any effect, even custom effects people might mod into game in future.
Edit: Adding new quest action "cast effectKey effect do aTask". This will support any single effect provided you know the effect key. Should also support modded effects down the road for big spell/quest supermods.
Update
I have implemented "cast effect do" quest action now and successfully played through your quest. This quest action is going to be much more flexible in any case and will support any effect added to the game.
The only change I had to make to your quest was updating line 135 to:
Code: Select all
cast Identify effect do _ident_
For example, in Destruction/ContinuousDamageHealth.cs the key is "ContinuousDamage-Health". You could use this in a quest like so:
Code: Select all
cast ContinuousDamage-Health effect do _kaboom_
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Custom quest support
I think my extension can help here, reusing the support for actions suggestions/diagnostics. The boring part is to make a list of all effect keys... may take some timeInterkarma wrote: ↑Wed Nov 21, 2018 6:39 am For example, in Destruction/ContinuousDamageHealth.cs the key is "ContinuousDamage-Health". You could use this in a quest like so:
Code: Select all
cast ContinuousDamage-Health effect do _kaboom_
EDIT
PacifyEffect and ElementalResistance use the name from ClassicEffects database, so this action breaks with localizations.
Code: Select all
string name = TextManager.Instance.GetText("ClassicEffects", subGroupTextKeys[variantIndex]);
vp.effectProperties.Key = string.Format("Pacify-{0}", name);
Last edited by TheLacus on Thu Nov 22, 2018 11:10 am, edited 3 times in total.
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
Cool! Great, thank you for looking into this!
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
I'm having some trouble with a quest that previously worked well. I think it has to do with mixing with Brisienna's quest.
I'm using a newly created character who went straight to the Mages Guild and is trying to do a quest. Any time I try this quest, it aborts quickly. I've attached a save file. Here's the gist:
1. I get the quest, which is to deliver a document to a remote city (saved).
2. I travel to the city. The quest has already aborted.
3. Player log says:
It's happened 3 times now, and I've used a different instance of the quest each time, albeit the same quest.
I'm using a newly created character who went straight to the Mages Guild and is trying to do a quest. Any time I try this quest, it aborts quickly. I've attached a save file. Here's the gist:
1. I get the quest, which is to deliver a document to a remote city (saved).
2. I travel to the city. The quest has already aborted.
3. Player log says:
This abort happens only after fast traveling to the quest location. I can visit other towns without aborting it.Assigned Person Mordane Buckinging to Building The Gaercroft Residence
(Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
[JHMG009] Error in quest follows. Terminating quest runtime.
(Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
Object reference not set to an instance of an object
It's happened 3 times now, and I've used a different instance of the quest each time, albeit the same quest.
- Attachments
-
- Aborting Quest.zip
- (115.61 KiB) Downloaded 141 times
- Interkarma
- Posts: 7249
- Joined: Sun Mar 22, 2015 1:51 am
Re: Custom quest support
I'll have a look over the weekend, thanks for letting me know.
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
I think some wires are crossed with regards to "city" and "village." I have a quest that runs when the PC enters a village:
This was originally for "city," but I tried going to a couple of large cities and _enter_ wouldn't light up. Then I changed it to "village," and Daggerfall City lit it up, as well as Penbrugh in the same region
I then copied the same quest material over for another, and then Daggerfall City was then a city and not a village. I forgot to save the mismatch and haven't been able to reproduce it.
Spoiler!
I then copied the same quest material over for another, and then Daggerfall City was then a city and not a village. I forgot to save the mismatch and haven't been able to reproduce it.
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
I now have a save to illustrate. The quest below is wired to trigger with a dungeon location, but it uses cities just as easily.
Spoiler!
- Attachments
-
- Location Mismatch.zip
- (85.52 KiB) Downloaded 141 times
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
I'm trying the "restore" action for the first time and running into some difficulty. This is the code:
During the _night_ task the NPC doesn't appear. Is there something else I should do to trigger it?
Code: Select all
-- Quest start-up:
place npc _nec_ at _nhome_
_day_ task:
daily from 5:30 to 20:00
hide npc _nec_
_night_ task:
when not _day_
restore npc _nec_