Jump to content

[LE] Need help getting ref ID of quest alias


Recommended Posts

So I'm sure this is rather simple, but my brain just can't seem to figure out how to do it after trying a bunch of different functions. Guess I'm just not using the right ones in the right way. Still kinda new at this.

 

I have a quest that has a number of reference aliases on it (namely for NPCs). If I go in game and enter "sqv questname" in the console, I can see the list of those aliases as well as the reference ID for that particular NPC (ie, FF000983). My goal is to get that reference ID for eventual output to the screen.

 

In my script, I have those aliases declared as ReferenceAlias properties and they're set properly on the quest scripts tab in the CK. Unfortunately, it doesn't seem as simple as just reading that property out to the screen. It typically gives me something like "[REFERENCEALIAS" rather than the hex ref ID as shown in the sqv console command. Anyone know the right command to get that ID into a variable?

 

Thanks.

Link to comment
Share on other sites

If I understand correctly, the RefID should be stored as a string variable for later display?

 

If that's the case you could use a function like this, it requires Skse:

string Function GetAliasRefID(ReferenceAlias RefAlias)
	string RefID = StringUtil.SubString(RefAlias.GetReference(),(StringUtil.Find((RefAlias.GetReference() as string), "(")) + 1, 8)
	return RefID
EndFunction

As you're stating the RefAliases are mostly NPCs, you may need to replace GetReference() with GetActorReference(), not tested.

Link to comment
Share on other sites

 

 

or

ReferenceAlias.GetID() 

 

That would return the Alias ID number, not the actual reference ID. Please see the wiki.

 

 

AFAIK they don't have a FormID, they can have MOD ID like alias1 & alias2 but that simply

ReferenceAlias.GetID() + 1

all I have to say DON'T duplicate Quest when your dealing with Alias or be prepared to Suffer the consequences!!

Link to comment
Share on other sites

AFAIK they don't have a FormID, they can have MOD ID like alias1 & alias2 but that simply

It's not about FormID. The OP wanted to get the ID of the reference the alias is filled with, in hexadecimal notation.

 

 

all I have to say DON'T duplicate Quest when your dealing with Alias or be prepared to Suffer the consequences!!

???

Edited by Ghaunadaur
Link to comment
Share on other sites

  • Recently Browsing   0 members

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