Using PCRace in scripts and dialogue

Post » Tue Aug 02, 2011 9:55 pm

Unless I've got it wrong (which could be) when you select your race during chargen a global "PCRace" is set to the corresponding number of the race chosen. The races are ordered alphabetically, so Argonian is 1, Breton is 2, Dark elf is 3, ans so on.

Dialogue uses the value of PCRace to determine some responses, like "what do you want, Orc?" if the value of PCRace is 8. I presume that there exists a possibility that some mods also use this variable for various race related events in dialogue and scripts.

I've noticed that with some mods installed, the voice or greeting may use the wrong race for the PC, and I presume that a new race has been created for one reason or another, though I may never see it if the race is not playable.

There are a number of mods that create races, both playable and not, and I'm wondering how a unique race can be created with an arbitrary PCRace preset. I know the race would have to alphabetically fall after Wood Elves in order to leave the default values unchanged... but even beginning the race name with a string of z's would not guarantee placement, if enough people were thinking of this when creating a new race.

All dialogue using PCRace would be in jeopardy of not appearing or appearing to the wrong racial type of PC.

Does anyone have any suggestions (other than don't use PCRace and hope that no other mod does either) ?

EDIT
There is a Race Check script that sets the default races to their respective number. Would it work to write a similar script and set the number of a new race to say, 83?
User avatar
Tinkerbells
 
Posts: 3432
Joined: Sat Jun 24, 2006 10:22 pm

Return to III - Morrowind