Repository navigation
Changes you may notice
patch --namerefuses another mod's name. When the load order already holds a plugin with the--nameyou gave,patchused to leave that plugin out of the conflicts it fixes and write the patch under its name in--out, with only a note on stderr. Now it does that only for an older patch: a plugin whose author field issf-mod-check patch, which every patch has. Any other mod of that name stops the run with exit 2 andRESULT: CANNOT BUILD (--name <name> is another mod in the load order), and nothing is written. Pick another--name. This also applies to the default nameConflictPatch.esmwhen you give no--name; the RESULT line then reads(the patch's default name ConflictPatch.esm is another mod in the load order). When that plugin's header can't be read (another program has it open, or the file is damaged), the run stops with exit 2 and says the file can't be read, and nothing is written.find --where "<field> != <value>"no longer lists records that lack the field. A record whose kind has no such field now never matches, with any operator, as the README says. In 0.29.0,!=listed it. This matters for OMOD'sObjectModificationTargetName, which only some kinds of object mod have:--type OMOD --where "ObjectModificationTargetName != X"used to list every armor and weapon mod too.
What's new
find --stageslists a quest's stages, log entries and objectives. On a quest (QUST), in a load order or with--plugin, it prints every stage of the winning copy with its flags and log entries (text, note and conditions), then every objective with its flags, display text and targets. For each log entry with a stage fragment, it reads the compiled script and says which stages the fragment sets and which objectives it shows, completes or fails. Each objective lists the stages that change it. Scripts are looked for as loose files first, then in the load order's archives, last-loaded first (the game's order whenStarfieldCustom.inisetsbInvalidateOlderFiles=1). A call whose quest or number is only known while the game runs (a value picked on one branch of anif, or a number held in a property, for example) is listed as one sf-mod-check can't read, and a missing script is said plainly. Other objective calls (CompleteAllObjectives,FailAllObjectives,SetObjectiveSkippedand the like) are shown as written, for examplecalls CompleteAllObjectives(). With--plugin <archive>, the scripts the archive holds loose (.pex) are read too: a mod archive given tofind,overrides,summary,cellortextnow also has its loose compiled scripts unpacked. With--json, each match gains astageskey. Any other record type is refused with exit 2. README "A quest's stages and objectives" and AGENTS.md task 18 say what it reads and what it can't.find --fullpoints to the whole record. When the text tree stops at 2,000 lines, the last line now says to use--json --fullfor the whole record (up to 20,000 values), or--stageswhen the record is a quest.
Fixes
find --whereaccepts every fieldfindprints for the type. An OMOD'sDataName,MaxRankandLevelTierScaledOffsetwere refused as unknown, thoughfindprints them. A record that lacks the field doesn't match (see "Changes you may notice" for!=).- No false ONAM ERROR with light or medium masters.
gap,release'smutagen-gaprule,--gap-checkandedit's gap check compared a reference's FormID with the whole master list, so a plugin with light or medium masters had its own temporary references counted as a master's, and got an ONAM ERROR that counted them. Only full masters are counted now.
Example
Made-up plugins: SqBase.esm adds the quest SQ_FragQuest, whose stage fragments are in the made-up script SQ:QF_FragQuest (a loose .pex). SQ:QF_Missing isn't there:
sf-mod-check find SQ_FragQuest --stages --quiet
SQ_FragQuest [000802:SqBase.esm] QUST
defined in: SqBase.esm
winner: SqBase.esm
stages: 3 (from the winning copy in SqBase.esm)
stage 10
log entry 0: "Made-up stage 10."
fragment SQ:QF_FragQuest.Fragment_Stage_0010_Item_00: sets stage 20; shows objective 10
stage 20
log entry 0: "Made-up stage 20."
fragment SQ:QF_FragQuest.Fragment_Stage_0020_Item_00: sets stage 20 of SQ_Quest [000801:SqBase.esm]; completes objective 10
a call sf-mod-check can't read the value of: SetStage(StageProp) on self (the stage number is worked out while the game runs)
a call sf-mod-check can't read the value of: SetStage(::temp2) on self (the stage number is worked out while the game runs)
a call sf-mod-check can't read the value of: SetObjectiveFailed(10, True) on ::temp0 (the quest it runs on can't be told)
fragment SQ:QF_FragQuest.Fragment_Stage_0020_Item_03 (for log entry 3, which stage 20 doesn't have): can't be read: the script SQ:QF_FragQuest has no function Fragment_Stage_0020_Item_03
stage 30
log entry 0: "Made-up stage 30."
fragment SQ:QF_Missing.Fragment_Stage_0030_Item_00: can't be read: the script SQ:QF_Missing was not found
objectives: 1
objective 10: "Made-up fragment objective."
changed by stage 10 (log entry 0): shows it
changed by stage 20 (log entry 0): completes it
RESULT: FOUND 1 record (1 s)
Check each download against its .sha256 file.