Difference between revisions of "User:DavidJCobb/Miscellany"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>DavidJCobb
(created page for miscellaneous info I find that might be useful)
 
imported>DavidJCobb
m
Line 25: Line 25:
       ;
       ;
   EndIf
   EndIf
=== Detecting references created at run-time ===
:''Source:'' [http://afkmods.iguanadons.net/index.php?/topic/3941-how-to-distinguish-run-time-created-actors-from-hand-placed-ones/ AFKMods: How to distinguish run-time created actors from hand-placed ones ? ]
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.

Revision as of 04:25, 18 January 2015

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

Detecting references created at run-time

Source: AFKMods: How to distinguish run-time created actors from hand-placed ones ?

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.