Convert object ID name to string

Post » Tue May 17, 2011 4:34 am

I would like to convert an object ID name to a string (like AdventurerOrcWarrior01). Is this possible and if so, how would this be done? Thanks!
User avatar
Guy Pearce
 
Posts: 3499
Joined: Sun May 20, 2007 3:08 pm

Post » Tue May 17, 2011 1:41 am

The only two things you can get an EditorID for are cells and quests (OBSE's GetEditorID will do those two) and you'd start from a numeric RefID to get there. I'm not sure if you can take a displayable name (e.g. "Adventurer" for your example) and get an ID from it at all, as there are so many synonyms involved. However, you can get the display name from a RefID with GetName, as seen in the FormID Finder and RefScope mods.
User avatar
Ashley Hill
 
Posts: 3516
Joined: Tue Jul 04, 2006 5:27 am

Post » Tue May 17, 2011 5:25 am

Just to clarify, I have an Object through GetBaseObject and want to put the name found under the Editor ID in a string. I did notice the cells and quests thing, but I need it for npcs. I was hoping there would be a way to compare the name to a certain string, as GetName doesn't give the right info.
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Tue May 17, 2011 1:09 pm

nm... didn't click that you tried GetName...
User avatar
KU Fint
 
Posts: 3402
Joined: Mon Dec 04, 2006 4:00 pm

Post » Tue May 17, 2011 1:58 pm

Just to clarify, I have an Object through GetBaseObject and want to put the name found under the Editor ID in a string. I did notice the cells and quests thing, but I need it for npcs. I was hoping there would be a way to compare the name to a certain string, as GetName doesn't give the right info.

In that case no. The EditorIds are otherwise converted to the numeric when the forms are compiled in the CS, and are no longer available in-game. The Cell name and Quest name are special cases, the first for supporting GetInCell, and the latter for console support.
User avatar
Monique Cameron
 
Posts: 3430
Joined: Fri Jun 23, 2006 6:30 am


Return to IV - Oblivion