Determing Race

Post » Wed Dec 30, 2009 12:20 am

Hello @ll,

currently I am playing with a cute elf.
But I cant retrieve her race in any script!
I can retrieve vanilla races, but not the cute elf.
neither the objectID, nor the formID is recognized, and the script stops

when i try argonian as a race, it is recognized by 'getpcisrace'.

Does this mean that Oblivion is not able to retrieve or test the editorIDs of custom races??
then how am i able to determine a race via script if custom races are included?
User avatar
Nina Mccormick
 
Posts: 3507
Joined: Mon Sep 18, 2006 5:38 pm

Post » Wed Dec 30, 2009 3:02 am

I suspect that your problem is one of knowing the FormID at game time. Assuming you don't want to make the "cute elf" mod a requirement for yours, you'd need to use OBSE functions to (1) determine if the other mod is present (IsModLoaded), and (2) get the full FormID for the race from it, including the first byte that changes with load order (GetFormFromMod) . If you then make the GetIsPCRace call using that value, it should work.

And if you want to support other race mods, you'd need a section of code to do the same thing for each of them. You could put all this into a quest script that runs once each time the game is loaded, and checks what race mods are present, saving the FormIDs as variables (type ref). That would make the code for each check simpler.
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Wed Dec 30, 2009 7:47 am

I suspect that your problem is one of knowing the FormID at game time. Assuming you don't want to make the "cute elf" mod a requirement for yours, you'd need to use OBSE functions to (1) determine if the other mod is present (IsModLoaded), and (2) get the full FormID for the race from it, including the first byte that changes with load order (GetFormFromMod) . If you then make the GetIsPCRace call using that value, it should work.

And if you want to support other race mods, you'd need a section of code to do the same thing for each of them. You could put all this into a quest script that runs once each time the game is loaded, and checks what race mods are present, saving the FormIDs as variables (type ref). That would make the code for each check simpler.

thank you ghastly, i will try it asap! :tops:
User avatar
Anna Krzyzanowska
 
Posts: 3330
Joined: Thu Aug 03, 2006 3:08 am


Return to IV - Oblivion

cron