User:DavidJCobb/Miscellany

From the CreationKit Wiki
< User:DavidJCobb
Revision as of 22:53, 9 January 2015 by imported>DavidJCobb (created page for miscellaneous info I find that might be useful)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page contains miscellaneous information about Skyrim modding that I've found during my glorious adventures through the Internet. Please lemme know if I link to any sources this wiki isn't cool with.

Scripting

Changing a player's Speed Multiplier (SpeedMult)

Source: gamesas: Dynamic Walk Speed Script

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.

Detecting invalid references

Source: gamesas: Suspended stack count is over our warning threshold...

It's possible for your mod to reference (by variable or Alias) a Form from another mod. If that mod is uninstalled, your reference will break. Tests like kMyObject is ObjectReference will return true, but attempts to access any functions or data on the variable will throw errors. What you must do instead is:

  Int iFormID = kSomeReference.GetFormId()
  If iFormID && kSomeReference is ObjectReference
     ;
     ; we're cool bro
     ;
  Else
     ;
     ; CODE RED
     ;
  EndIf