User:DavidJCobb/Miscellany
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)
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
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
Detecting references created at run-time
If the reference is an Actor, you can't! The base game can create actors to fill quest aliases, it seems.
As for other kinds of references? I'll look into that later.