Git Product home page Git Product logo

Comments (9)

JayH2971 avatar JayH2971 commented on July 17, 2024 1

User sends this save file:
SAVE31__Q0C20Y02_Generic_Knightly_Order_quest_text.zip

from daggerfall-unity.

KABoissonneault avatar KABoissonneault commented on July 17, 2024 1

Alright, adding the male attribute seems to have done it. That, or I'm very lucky. I'll get a PR put together and submit it for review.

Actually, looking at FACTION.TXT, it seems intended for knights to have a female sprite.

		#368
		type: 2
		name: The Knights of the Dragon
		rep: 0
		summon: -1
		region: 18
		power: 20
		flags: 0
		ally: 371
		face: -1
		race: 3
		flat: 334 16
		flat: 182 45
		sgroup: 7
		ggroup: 9
		minf: 5
		maxf: 40

Note the two flat fields. Person.GetFlatDetailsString shows that male will pick flat1, and female will pick flat2 (or individuals will always pick flat1).
Flag 182.45 is indeed the one shown in your screenshot.
image

So I don't think there's any issues with your test, it's just that knight ladies don't have a distinct guard sprite.

from daggerfall-unity.

Interkarma avatar Interkarma commented on July 17, 2024

Interesting the quest still found a location to compile. Did user provide a save?

from daggerfall-unity.

KABoissonneault avatar KABoissonneault commented on July 17, 2024

Reposting my findings while investigating for #2589

I just ran the test in DOS. I made a save with 50 reputation with the Glenmoril Witches and went to the NPC in front of the Thieves Guild to ask for quests.

I first tried in Daenia, and could never get this quest. I did have a few "gave the quest to some spellsword" type messages, which usually occurs when a quest fails to resolve. Maybe I needed to be in a region with a knight order.

When I tried again in Daggerfall, I did eventually land on it.

image

image

This is indeed a knightly guard... of the Totambu knight order, not Daggerfall.

The NPC did look like a guard at the site.

image

Seems to me like the solution to this issue is that Knightly_Guard should resolve to a random knight order, not the local one. This would fix the problem for regions without a knight order.

from daggerfall-unity.

John-Leitch avatar John-Leitch commented on July 17, 2024

Looks like I was misguided in my first attempt. Definitely interested in fixing this (and possibly contributing more to the project as I come to understand it), so bear with me as I ask some dumb questions.

My first inclination is to find a way to solve this without a hardcoded list of knight order ids. I've stepped through the QRC/QBN parser to familiarize myself with it, and have a relatively good understanding of what's going on there. Looking at adjacent cases in Person.GetFactionTypeFactionID, it seems the FactionFile.FactionTypes.KnightlyGuard case could return a randomized faction similar to those that return Person.GetRandomFactionOfType. However, there's no faction type specific to the knight order, so that solution won't work verbatim.

Looking at FACTION.TXT, I'm not really seeing anything distinct that would allow the knight orders to be safely projected into a collection. Am I overlooking something, or is there no easy way around working with a hardcoded collection of knight order ids?

from daggerfall-unity.

KABoissonneault avatar KABoissonneault commented on July 17, 2024

I think hardcoding the knight orders is fine for now. Unlike temples, knight orders are not properly assigned a "knightly order" type in FACTION.TXT.
Whenever a quest requests "Knightly_Guard", DaggerfallWorkshop.Game.Questing.Person.GetFactionTypeFactionID should return one of the 10 default knightly orders, instead of 844 as it does right now.

This may affect other quests. For example, K0C30Y03 "A Noble's Debts" has a branch if you have a reputation above 10 with the Knightly_Guard NPC. The fix would probably be a good thing, since it's unlikely that anyone has good rep with Generic Knight Order. Q0C20Y02 is probably the only quest that named the faction of the guard, though.

@JayH2971 Do you ever use Knightly_Guard in your quests? Do you foresee anything bad from changing this?

from daggerfall-unity.

John-Leitch avatar John-Leitch commented on July 17, 2024

For the purpose of testing, I updated the FactionFile.FactionTypes.KnightlyGuard case in Person.GetFactionTypeFactionID with some code to return a knight order id:

                case FactionFile.FactionTypes.KnightlyGuard:
                    var knightOrderIds = new[] { 368, 413, 410 };
                    var randomKnightOrder = knightOrderIds[UnityEngine.Random.Range(0, knightOrderIds.Length)];
                    return randomKnightOrder;

In some cases, this resulted in an NPC similar to what you observed in the original:

image

image

However, most of the time it did not:

image

image

Reading through Person.SetResource, Person.SetupFactionTypeNPC, etc., it's not immediately apparent how the sprites are chosen. Is the behavior I'm observing intended?

Also, saw you responded just now. Looking through the quests, I believe Q0C20Y02 is the only that resolves the faction name, assuming ==symbol_ is the only syntax that does so. I did see =symbol_ used for Knightly_Guard--not sure what that does.

from daggerfall-unity.

KABoissonneault avatar KABoissonneault commented on July 17, 2024

Does it help if you change the Person declaration in Q0C20Y02.txt to

Person _other_ factiontype Knightly_Guard male remote

I'm thinking maybe this is a faction type that only supports male NPCs.

I think we have some gender issues with NPCs still. We've had a big refactor not that long ago from Ferital here: #2145. We might have to go and make all the Knightly_Guard persons male.

Honestly I wish I knew how this sprite selection worked, worth investigating

from daggerfall-unity.

John-Leitch avatar John-Leitch commented on July 17, 2024

Alright, adding the male attribute seems to have done it. That, or I'm very lucky. I'll get a PR put together and submit it for review.

from daggerfall-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.