Jump to content

Recommended Posts

Hello!

Can't find a way to get ID from FF forms. They have a random ID after which they are spawned in the game. If you change your mod list, the ID changes so it doesn't even remain in your Save
 

ObjectReference ref = Game.GetCurrentCrosshairRef()
if ref
   if ref.GetVoiceType() != none
      ActorRef = ref as Actor
   endif
endif
ActorBase ActorRefBase = ActorRef.GetLeveledActorBase()
int ID = ActorRefBase.GetFormID()
string MODID = Math.LogicalAnd(ID, 0xffffff) as string


But this will return the spawned ID. Not the Form ID

The only mod I can find that does this right is https://www.nexusmods.com/skyrimspecialedition/mods/19250?tab=description
But can't see any way this can be exploited.

Edited by Swe-DivX
Link to comment

Just out of curiosity, does GetActorBase return anything different in this case?

 

Edit: Also your variable naming is a bit off. You get the mod id from shifting the form id right by 24 bits. What you're doing in your code above is basically removing the mod id, the opposite of what your variable name suggests.

Edited by traison
Link to comment
6 hours ago, traison said:

Just out of curiosity, does GetActorBase return anything different in this case?

 

Edit: Also your variable naming is a bit off. You get the mod id from shifting the form id right by 24 bits. What you're doing in your code above is basically removing the mod id, the opposite of what your variable name suggests.


It works! Thanks!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use