-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle template NPCs #90
Comments
Looking back at some existing mods and some of the few remaining false positive warnings in the dev branch actually give more of a clue. Two examples that have come up are the Gormlaith offshoots ( I believe this confirms the hypothesis: a templated NPCs head parts, and facegen file, should be identical to the template. They should be excluded from view, and be given a copy of the template's face attributes and facegen in the patch/res-merge process. |
Each build check is now independent, and implements an interface so that an IoC container can inject them all into a build checker as a list/enumerable. Checks have also been rewritten to use the new analysis system, and not have any generic parameters. The facegen check in particular now compares head parts and produces virtually no false positives - the only ones remaining are template NPCs, to be handled in #90. A few minor features may be missing and labeled as todos. #26 #37 #50 #64
This has a simple solution in concept, but is actually turning out to be rather more nuanced in practice, because it is possible for plugins to change where a template points, and some plugins actually do (OBIS for one, and I wouldn't be surprised if USSEP or other mega-patches did as well). It's not common, but it happens. From a usability point of view, it would be best to hide templated, trait-inheriting NPCs. Face choices aren't really meaningful for them, and they clutter up the list. On the other hand, it's not possible to predict with any certainty who the conflict winner will be after the "source mods" used in EasyNPC are disabled, if the default selection for these template NPCs is hidden from the app itself. Just because OBIS is in the load order now, doesn't mean it will be (or that something else won't override it) when the mod is activated. On the other other hand, it's stupid to include override records in the EasyNPC mod at all when they won't do anything useful, it would be preferable to leave this up to the modder and his load order... but then we run the risk of an inconsistent facegen. I'm not exactly sure what the right answer is yet. Really want to remove useless choices and clutter from the UI, but not sure if it's possible to deterministically resolve the facegen without requiring users to choose at least the default plugin. And this isn't even considering the scenario of plugins "de-templatifying" an NPC and turning it standalone, which is probably game-breaking in itself, but I'm not surprised by anything anymore. Maybe it's possible to use an heuristic method to determine the proper, implied default plugin for a templated NPC, using some or all of the following:
Doesn't feel exactly right, but the only alternative that springs to mind including all of these in the UI, and I guess trying to provide some visual cues. But even in the UI, any visual cues are actually dependent on whichever plugin is currently selected as the default, so this may end up making things even more confusing. Time to sleep on it. |
To add insult to injury, I thought of another corner case, which is a face plugin changing a non-templated NPC (or non-trait-inheriting NPC) to use a trait-inheriting template, and depending on that behavior i.e. by not providing a facegen. I think that is sort of handled by simply producing a warning and treating it as a missing facegen, since the merge won't take the template setting from the overhaul. But if any mods actually do this, it could result in confusing behavior. |
Here's what I'm thinking after a short break:
Not nearly as simple as I'd hoped, but I think the behavior should not be too confusing, and will considerably cut down on the bloat. |
I've also just noted that templates can be recursive, i.e. NPC template referencing another NPC with a template pointing to... etc. I'm not sure how the actual game is supposed to behave with multiple layers of trait inheritance and don't want to spend the whole day testing it, so for now I'm just going to assume that it only applies to the specific NPC that inherits traits. If its target also inherits traits and doesn't have a facegen... then the lowest-level one simply won't end up with a facegen, no difference between EasyNPC output and original input. |
The important information right now is the target key (obviously), the target type (if it's not an NPC, then the templated NPC shouldn't have any facegens), and whether or not it inherits traits (i.e. facegens). #90
This prevents editing any face attributes in the UI, and shows prominent messaging that they are templated. Also ignores these in most build checks and build tasks. A few tweaks are still needed for edge cases. #90
First observed in #61 by commenter llyarc:
This is referring to NPCs with a
TPLT
reference. I have to admit to being a little confounded over how this is supposed to work, and it probably needs some testing in game.Inspection of existing records, such as the ones based on
EncSoldierImperialTemplate
, show that the templated NPCs don't use the same head parts, and might not even be the same race.Looking at the wiki page, I believe the magic ingredient is the template flag "Use Traits". This is described, partially as:
My initial hypothesis is that even though such NPCs may specify their own race, head parts, and so on, these are supposed to be ignored by the game in favor of the template.
Most templated NPCs do not specify Traits, such as the one above, but there are those that do, such as the
EncThalmor
based templates.If the hypothesis is correct, then these NPCs should be hidden from view in EasyNPC, and ignored in any saved profiles. However, when generating the actual merge, their records, facegens and facetints do still need to be copied, but there are no choices for them, they must be exact copies of the template.
Emphasis on hypothesis, I won't implement any of this until I can determine if that's the actual mechanic.
The text was updated successfully, but these errors were encountered: