Quest Editor

For all talk about quests. Creating, testing, bugs, and development progress.
User avatar
TheLacus
Posts: 684
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Syntax highlighting

Post by TheLacus » Sat Sep 15, 2018 2:36 pm

Jay_H wrote:
Fri Sep 07, 2018 7:52 pm
Trying to use the "named" parameter when defining a quest NPC produces red underlines. Here's an example:

Code: Select all

Person _crow_ named The_Crow faction The_Crow male
Are you sure you can use named and faction at the same time? My understanding is that individual npcs are already their own factions, in fact you are using The_Crow for both. I believe faction value is just ignored here, but correct me if i'm wrong :)
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

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

Re: Syntax highlighting

Post by Hazelnut » Sat Sep 15, 2018 4:29 pm

Yes you can specify both, in fact in this case it has to otherwise the faction which is an individual doesn't match correctly because it should have a name. I was just reading how the Person class worked, so I am assuming it's implemented correctly.

FYI I advised Jay how to get this working here: https://forums.dfworkshop.net/viewtopic ... 049#p15049

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

Re: Syntax highlighting

Post by TheLacus » Wed Sep 19, 2018 6:53 pm

Hazelnut wrote:
Sat Sep 15, 2018 4:29 pm
Yes you can specify both, in fact in this case it has to otherwise the faction which is an individual doesn't match correctly because it should have a name. I was just reading how the Person class worked, so I am assuming it's implemented correctly.

FYI I advised Jay how to get this working here: https://forums.dfworkshop.net/viewtopic ... 049#p15049
Thank you for your answer Hazelnut, but i'm not able to put in practice what you said. In the link you posted, Jay_H changed Person _crow_ faction The_Crow to Person _crow_ named The_Crow faction The_Crow. From what i read in the Person definition interpreter, this means that factionData is set by SetupIndividualNPC() instead of SetupFactionAllianceNPC(); it looks like factionAlliance is simply not stored if a name is found. What am i missing?
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

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

Re: Syntax highlighting

Post by Hazelnut » Wed Sep 19, 2018 9:08 pm

Hmm, in that case we will have to wait for Interkarma to weigh in as this is his code and I don't really understand it.

When I advised Jay it was after diagnosing that the code in QuestResourceBehaviour.DoClick() where it tests if the faction is an individual and then in ClickAllIndividualNPCs(int factionID) it gets person resources from active quests, checking person.IsIndividualNPC which only returns true if the parsing caused Person.SetupIndividualNPC() to be called. This is only called when the person line contains a name. It does look like the faction is simply unneccessary so maybe my advice should have been to replace it to give:

Person _crow_ named The_Crow male

This may be incorrect logic but that's what's currently there, and my advice to Jay was simply from reading the code and thus could have been wrong. Was just trying to help and reduce Interkarma's workload.

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

Re: Syntax highlighting

Post by Interkarma » Wed Sep 19, 2018 9:35 pm

Individual NPCs are of type 4 in their faction data. They have unique sprites and appear in quests with the name defined in FACTION.TXT. Examples are "King Gothryd" and "Lady Brisienna". These NPCs are usually found automatically in their home location (e.g. Gothryd is in Daggerfall Castle) but can be moved or placed specifically for a quest (e.g. Lady Brisienna is placed to random tavern).

Faction Alliance NPCs are random NPCs generated at runtime. Their faction data defines themed male and female sprites to be shown when placed by a quest and they receive a random name. Most factions entries define flat data and could be used as a faction NPC. For example, it lets you place a member of the Thieves Guild somewhere as part of a TG quest and their sprite will look appropriately shady. Same concept for merchants, nobles, etc.

My understanding is that individual NPCs and faction NPCs are mutually exclusive. When setting up a Person resource, my code will prioritise individual NPCs over faction NPCs, you can't use both at once. In this case, the following should be all that's needed to use The Crow in a quest.

Code: Select all

Person _crow_ named The_Crow
I didn't look too deeply at Jay's original problem, I'm sorry. By the time I read the thread he seemed happy the problem was solved so I just moved on.

You're likely correct Hazelnut that something else is going on around the click itself. I'd need to look back at the original issue again. And thank you, your help is always appreciated. :)

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

Re: Syntax highlighting

Post by Hazelnut » Wed Sep 19, 2018 10:54 pm

Thanks for the explanation, I think that TheLacus is correct and these are mutually exclusive - my mistake.

Jay, can you change that person definition again and check it works?

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

Re: Syntax highlighting

Post by Interkarma » Wed Sep 19, 2018 10:55 pm

I just posted more information to that bug report. I think it was just the usage of "give pc _reward_". This action always opens a message box with QuestComplete text.

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

Re: Syntax highlighting

Post by Jay_H » Wed Sep 19, 2018 11:01 pm

Hazelnut wrote:
Wed Sep 19, 2018 10:54 pm
Jay, can you change that person definition again and check it works?
Yep, just "named The_Crow" is enough, and it works fine in TheLacus' editor. We'll go with this simple iteration then.
Try over 120 all-new quests in the first Daggerfall Unity Quest Pack.

User avatar
Binarynova
Posts: 6
Joined: Sat Feb 17, 2018 3:47 am

Re: Syntax highlighting

Post by Binarynova » Thu Sep 20, 2018 4:03 pm

I did a search through this topic, and I see that it kind of came up, but I didn't see like a definitive answer or a download, so I just wanted to ask, is there a way to get this functionality in Atom.io?

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

Re: Syntax highlighting

Post by Hazelnut » Thu Sep 20, 2018 4:07 pm

I figured out how to do this at one point but I didn't get around to documenting it. I tried what I could remember with a more recent release and it didn't work. I spent 0 time trying to figure out why. I can give you the info I can recall if you fancy working it out and reporting back. I may get around to doing this myself (I did intend to) but it wont be for a while.

Post Reply