User:Alfwyn/Sandbox

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

CSList Errata[edit]

Stuff I can't fix immediately, but don't want to forget

  • SR ARMO: doesn't know about new BOD2 field and shows wrong values for DB armors fixed, but try to get rid of warning about "multiple instances of value" (caused by writing same value from either BODT or BOD2 field).
    • Non-playable flag for armor using the BOD2 field is not shown. Best way to merge two definitions into one?
  • SR Value for Aetherial Staff is wrong, cost/use is not listed, seems to be a problem with the enchantment value calculation formula here
    • CSList calls "Enchantment Cost" enchantvalue_raw and "Ench Amount" enchantcost_raw, confusion stems from here - usually those two values are either the same or it is auto-calc (and values not used), so errors are rare
  • OB INFO records only show the last reply (NAM1, NAM2), but there are often multiple of them in a record.
  • OB CREA autcalc flag ("PC Level Offset" flag in CS) is unreliable, set for Wraith which has static 400hp.
    • obread.inc: flag is at 0x10 here, but it should probably be 0x80 (CREA).
  • MW MISC record, "unsellable" flag at offset 12 should probably be offset 8, field is only 12 bytes long.
  • MW LEVI each/all flags are swapped (wrong in mw_esm.txt). At least wiki documented lists and cs disagree with cslist.
  • MW Spells listed for NPC_ is not what is found ingame. Compare Edwinna Elbert (checked ingame) with CSList - where do those additional spells come from? (auto-calc adds those spells in the cs)
  • MW Scripts seem to be from an old version, TribunalMain is not what CS shows
  • Internal: Weapon/Armor gold values are mis-calculated if updated at the same time as magic effects. Not that severe since no new add-ons/updates are expected, but should be kept in mind.
  • Search: Better handling of cases with more than 50 results needed.
  • Reading in Data: csread.inc:3528 "iconv('Windows-1252', 'UTF-8'" - but SSE data is already UTF-8, needs way to detect input charset
  • Spurious record "has previously been modified" notices - various different reasons which will have to be tackled individually. Will be much more visible with SSE data added.
    • Several instances where unused bits changed and should be properly ignored (WEAP.CRDT, NPC_.PRKR, RACE.VNAM)
    • order of named arguments for scripts are changed around - should probably treated as unordered
      • RACE.(ATKD/ATKE) should be treated unordered too - get switched around between classic and SSE
    • lookup tables (like book/skillbook/spellbook) are not resolved before comparing with old data
  • _finish_first_db() doesn't seem to be called after a fileread, resulting in number of records displayed on overview page being wrong; workaround for now: run the update on the DB manually

Parsing Fun[edit]

Just a bit of rambling about things encountered parsing the game files.

Skyrim[edit]

IMAD records contain a field starting with a null-character, naive parsing may be thrown off here. Several other fields in the record start with an un-printable character.

Oblivion[edit]

Shivering Isles was just patched into Oblivion.esm, making it hard to identify what was changed.

Morrowind[edit]

Strings are often not null-terminated, the field length has to be taken into account to properly extract them.

Quest for unique record IDs[edit]

While newer games have a formID to uniquely identify records, MW has no such thing. Many records starting with a NAME field containing the editor ID. But this is not unique, and there are several clashes. Record type together with that ID is a start.

SSCR have the identifying NAME as second field, unlike all the other records. Then again since NAME is the id of a SCPT record, the ID should probably be the string found in the first field (DATA, long decimal number as string).

CELL records contain multiple NAME fields, only the first is the ID. Many CELLS have an empty string as ID.

SCPT records have no NAME field, the ID can be found in the 32 first bytes of the SCHD field.

INFO record NAME fields contain the dialogue text, the INAM field is used for referring to them. But that ID is not unique across DIAL groups. DIAL ID plus INAM can be used.

SKIL and MGEF records have no NAME field, the INDX field contains a unique number.

UESP Mediawiki stuff[edit]

  • preSaveTransform() in SiteCustomCode_body.php is dead code - among other stuff it used to transform (while editing) links like [[foo]] to [[{{NAMESPACE}}:foo|foo]] and changed [[ns:title, v1|]] to [[ns:title, v1|title, v1]] instead of [[ns:title, v1|title]] (mainly for book titles). It gets "registered" as $wgHooks['ParserDuringPreSaveTransform'] which does exactly nothing. There seems to be no good way to add that in a way so it doesn't get lost every time MW is updated.
    • adapting to use InternalParseBeforeLinks hook?