Mutagen-Modding / Mutagen.Bethesda.Analyzers

A project to diagnose and analyze the health of a mod or a load order
GNU General Public License v3.0
14 stars 4 forks source link

Leveled Lists containing improper target types #30

Open Elliebot-Z opened 3 years ago

Elliebot-Z commented 3 years ago

Sub-issue of #31

Noggog commented 3 years ago

Can you clarify this a bit? A single leveled list record needs to only have straight NPCs, or only have references to other LLists?

Elliebot-Z commented 3 years ago

For example an npc list should only contain npcs, or sublist chains that eventually terminate into an npc. Don't want the game to spawn an iron helmet as your big boss encounter, or put a live mudcrab in a merchant's inventory

Noggog commented 3 years ago

Haha, gotcha. I thought there were separate categories for LList types? There's explicit Leveled Item (LVLI) records vs Leveled NPC (LVLN)? Putting an NPC in a LVLI list would be the same naughtiness/type of error as setting an NPC's race to an Ingredient record, right?

If so, I might just upgrade this issue to be a more umbrella "FormLinks point to disallowed types" as this will be a more general error any record could have

Noggog commented 3 years ago

Although, to be fair, I do think it will be good to drill down to more specific instances of the umbrella errors. Yeah, any record FormID can point to a wrong target type, but maybe some mispoints are CTDs while others are harmless? So we can leave this issue as is and talk about the LList specific mismatches here

Elliebot-Z commented 3 years ago

No, this might just be an example of my memory failing me. I swear I remember seeing an explicit checking function for this sort of error, and therefore remember assuming it was an easy thing to create. I now can't find where I would've seen that, and also confirmed that xedit does not make it easy to create a mixed list.

Noggog commented 3 years ago

All good. It is a viable error to check for. Most respectable tools probably wouldn't allow a user to put an NPC into an item list.. but it's technically possible to see a mod doing that, so we should check