Mutagen-Modding / Mutagen

A .NET library for analyzing, creating, and manipulating Bethesda mods
GNU General Public License v3.0
114 stars 31 forks source link

Add Condition granularity to Fo4 #411

Open Noggog opened 1 year ago

Noggog commented 1 year ago

Skyrim has classes per function, which helps proper formlink enumeration. Need to give Fo4 the same treatment

Noggog commented 1 year ago

I went through all the conditions in this list https://ck.uesp.net/wiki/Condition_Functions and opened them in the CK at the same time. There I checked which parameters are used and double checked which types they have as the types that were imported from xEdit weren't always correct.

Elscrux commented 1 year ago

^ That's for Skyrim, for Fallout 4 we have this list https://falloutck.uesp.net/wiki/Category:Condition_Functions, but that one doesn't help as much, so the cross-referencing will mostly be in the CK or in the xEdit definition I'd imagine https://github.com/TES5Edit/TES5Edit/blob/dev-4.1.5/Core/wbDefinitionsFO4.pas.

It's also worth mentioning that I also converted all integer/float values into an enum if that's applicable. And I always named the unused parameters this way if they weren't already: FirstUnusedIntParameter, FirstUnusedStringParameter. That makes it easy to see which fields are relevant in case you want to use reflection on them. (I did that already for my CK replacement tool)