Skip to content

Instantly share code, notes, and snippets.

@mrowrpurr
Created November 23, 2021 05:23
Show Gist options
  • Save mrowrpurr/b408bf711a2da1e39bc1ed236eaed577 to your computer and use it in GitHub Desktop.
Save mrowrpurr/b408bf711a2da1e39bc1ed236eaed577 to your computer and use it in GitHub Desktop.
event OnInit()
int formId = GetOwningQuest().GetFormID()
int modIndex = Math.RightShift(formId, 24)
if modIndex == 0xFE
int lightModIndex = Math.LogicalAnd(Math.RightShift(formId, 12), 0xFFF)
Debug.MessageBox(Game.GetLightModName(lightModIndex))
else
Debug.MessageBox(Game.GetModName(modIndex))
endIf
endEvent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment