User:DavidJCobb/Miscellany

< User:DavidJCobb
Revision as of 03:58, 20 March 2017 by imported>DavidJCobb (pruning, removing gamesas, etc)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

miscellanous information; outdated


ScriptingEdit

Changing a player's Speed Multiplier (SpeedMult)Edit

Changes to the player's Speed Multiplier actor value don't take effect unless you prompt the game engine to take notice. This issue applies to both scripted changes and changes triggered by a "Value Modifier" magic effect. There are two ways to force the game to actually use a changed SpeedMult:

  • Modify the player's inventory. Silently adding and then removing an item should do the trick.
  • Modify the player's carry weight actor value. Adding and then removing 0.1 works.

Issues with optional function argumentsEdit

When you compile a function with optional script arguments, the argument data is updated for the containing script only. If other scripts make cross-script calls to your function, those functions must be recompiled in order for their calls to work properly. Otherwise...

  • If you just added the optional arguments, the other scripts will be unaware of them unless recompiled; you will receive Papyrus errors whining about an "incorrect number of arguments passed."
  • If you changed the optional arguments' default values, the other scripts will use the old default values until recompiled.

Papyrus errorsEdit

Samples of Papyrus logs and errors that I haven't often seen posted on the web, along with meanings when known.

Baked script data is outdatedEdit

Source: AFKMods: The critter thread
warning: Function <name> in stack frame <number> in stack <number> differs from the in-game resource files - using version from save

Occurs when an old version of a script is baked into a savegame.

Baked script data malfunctioning badly enough to be droppedEdit

Source: AFKMods: The critter thread
[02/09/2014 - 03:33:25PM] error: Failed to read basic script data for critterFish attached to  (FF002ABA)
[02/09/2014 - 03:33:25PM] error: Unable to load object 0x1305E1E0 from save game
[02/09/2014 - 03:33:25PM] Errors occurred while loading the Papyrus save game data

Occurs when old script data (baked into a savegame) has malfunctioned badly enough for the game engine to just throw it out.

Variable loaded from save could not be found on the actual objectEdit

Source: AFKMods: Help with script log "errors"

Apparently the result of scripts being updated.

   [11/17/2013 - 02:59:23AM] warning: Variable ::WVAAliasStorage_var on script DLC1_QF_DLC1EclipseAttack2_01017648 loaded from save not found within the actual object. This variable will be skipped.


Unsorted factsEdit

Unsorted edge-casesEdit

  • Be careful about handling things OnCellAttach and OnCellDetach in Riften. The city's walkways have you cross back and forth across a cell boundary.
    • The use case dealt with here involves deleting critters when you leave their containing cells. The scripter's attempted solution was to add a timed delay (using OnUpdateGameTime) to the deletion. Return to the cell before the timer has elapsed, and the critter is reused -- the deletion is canceled.
  • You may run into a peculiar problem when passing through a load door: cells that are unloaded by the game can still exist as "valid" Papyrus Cell objects. They'll be recognized as Cells rather than as Nones, but attempts to call most native methods on them will fail. Effectively, it's the bizarre difference between something that's null and something that's None.
    • Surprisingly, kMyBrokenCell.GetFormID() will still return a null cell's proper ID, even though the cell object is broken.
    • Comparing kMyBrokenCell to Game.GetForm(kMyBrokenCell.GetFormID()) reportedly returns False when dealing with a null cell. This would make sense: an existing Papyrus Cell object can lose its underlying cell and still exist, but you probably cannot create a new Papyrus Cell object from a lost cell.

Unsorted engine bugsEdit

Unsorted best practicesEdit


Unsorted lessonsEdit


Unsorted things to look intoEdit