Jump to content

BGII: Detecting a Drow PC?


jastey

Recommended Posts

Is there a valid way to detect whether the player created a drow PC? To be specific (unless someone has a better idea):

 

Vanilla game:

-Is there a way to check for the skin and hair color of the PC?

 

Modded game:

-Does anyone know what drow-kits are added by mods and can give me mod names I should look at?

Link to comment

I would suggest a simple Player1-self-initiated dialogue at the very start of your game: if the mod deals with a drow protagonist story-wise, it probably must have its own variable - and the player should control this choice. (Color's less reliable, since the player could accidentally use white hair for his surface elf/or create a drow protagonist with skin that is way too light for the mod's "dark skin" checks. Also, a mod kit may be not enough or too much, if the player roleplays, for example, an elven fighter who was taught drow ways in the name of revenge).

Link to comment

It's only a check for a game character that should react to it. My mod will not change any other ingame reactions to a drow PC. That is also why a dialogue line feels kind of not-appropriate: "Hello, surfacer!" - "Erm, I am drow, actually!" - "Oh! Yes, of course!" :(

 

I would be interested in knowing the checks for skin and hair colors nontheless, because I didn't spot how.

Link to comment

There isn't a reliable way to check for drow in the vanilla game, afaik. The best you can do is checking for an evil elf and hope for the best. You could add the lines "Hello, drow!" - "Erm, I am a sylvan elf, actually!" - "Oh! Yes, I'm sorry!" anyway, just to be sure. :p

 

I have found the BG2 Subrace Mod which apparently installs a couple of new races, including drow. From a quick look however, it merely applies spell effects to change some of the character stats (see SrED.spl for drow). And there is nothing which can be detected by script as drow.

Link to comment

No way to check for hair and skin color in the game? :(

Not to my knowledge.

 

Theoretically it is possible to add new races to the game (simply by adding new entries to RACE.IDS) which can be checked against by the Race(O:Object*,I:Race*Race) trigger, but I don't think it is possible to select the new races during character creation. I guess you would also need TobEx to support new races properly.

Link to comment

Seems the dialogue option would be probably the best. It's still in the Underdark, thus a "Hello? Look closely, I am still a drow" would be not too out of place in the darkness. (I am still only talking about my NPC, not an adaption of the whole game).

 

I think I will skip this, although it would have made a lot of interesting new content (for the 0.0003% of potential players that might want to play a drow). I also realized that I ignored this possibility in e.g. my Ajantis mod, where Ajantis is really unhappy about the drow camouflage ("We are to walk as drow?!" - "Er, yes, and the woman you proposed to is one, too, you know?").

Link to comment
Seems the dialogue option would be probably the best. It's still in the Underdark, thus a "Hello? Look closely, I am still a drow" would be not too out of place in the darkness. (I am still only talking about my NPC, not an adaption of the whole game). I think I will skip this, although it would have made a lot of interesting new content (for the 0.0003% of potential players that might want to play a drow). I also realized that I ignored this possibility in e.g. my Ajantis mod, where Ajantis is really unhappy about the drow camouflage ("We are to walk as drow?!" - "Er, yes, and the woman you proposed to is one, too, you know?").

 

Cool, I'm part of the 0.0003% :D

Link to comment

Character creation mentions "There are five racial divisions of elves within the Realms: Gold elves, Moon elves, Wild elves, Sea elves, and Drow", but nobody in the game reacts as though you might be a drow elf or an aquatic elf. In the vanilla game, it doesn't seem possible to even detect this without having someone come up and actually ask the protagonist (and account for the player's sense of humour).

 

However, if players use FinnJO's Subrace mod linked above, it is possible to detect the character's subrace via script (though I'm not aware of any existing mods that do). The Subrace mod changes the character's title (using opcode #190), so that instead of displaying the character's class on the inventory/record screens, it displays the character's subrace. This changes stat 173 on the character to the strref of the new title, which can be detected via CheckStat.

 

To detect one of the subraces, you'll need to know what string the Subrace mod uses for its title (case is important). This should be all of them:

~gold dwarf~

~shield dwarf~

~duergar~

~arctic dwarf~

~drow~

~moon elf~

~wild elf~

~sun elf~

~sylvan elf~

~rock gnome~

~svirfneblin~

~lightfoot~

~strongheart~

~ghostwise~

~half-moon elf~

~half-drow~

~half-wild elf~

~half-sun elf~

~half-sylvan elf~

~half-orc~

~human~

~aasimar~

~tiefling~

~air genasi~

~earth genasi~

~fire genasi~

~water genasi~

 

Then the title can be detected in script via:

CheckStat(Player1,~drow~,173)

If true, Player1 has the drow subrace.

Link to comment

Unfortunately it's not as simple as that. You need to check for the exact string reference used in the 'Change Title' opcode, which may vary in different versions and localizations of the game. A more reliable approach would require that the subrace mod has already been installed and your mod fetches the specific strref from the 'Change Title' opcode in the drow spell during its own installation. That's much effort for an additional branch in a conversation which only 0.0003% of the players might use.

Link to comment

Seems the dialogue option would be probably the best. It's still in the Underdark, thus a "Hello? Look closely, I am still a drow" would be not too out of place in the darkness. (I am still only talking about my NPC, not an adaption of the whole game).

 

I think I will skip this, although it would have made a lot of interesting new content (for the 0.0003% of potential players that might want to play a drow). I also realized that I ignored this possibility in e.g. my Ajantis mod, where Ajantis is really unhappy about the drow camouflage ("We are to walk as drow?!" - "Er, yes, and the woman you proposed to is one, too, you know?").

 

To expand on the dialogue idea, you could do something similar to what the Amber mod does for stuff like the protagonist's hair and eye color, hair cut, body type and size.

That is, have a kind of 'setup dialogue' to inquire whether the protagonist is a drow or not, long before the actual dialogue fires.

E.g.: Add a new npc 'crazed old beggar' to a place the player is bound to visit (the promenade or the slums for example) and have him initiate a dialogue like this:

 

If ~Race(Player1,ELF)~ SAY ''Ahh it's the drow! The drow are here! They are here to kill me!''.

 

++ ''Truth: Are you blind old man? I'm not a drow, calm yourself.''

++ ''Lie: Are you blind old man? I'm not a drow, calm yourself.''

++ ''Truth: Yes, I'm a drow and I'm here to kill you, run old man, run!''

++ ''Lie: Yes, I'm a drow and I'm here to kill you, run old man, run!''

++ ...

 

Obviously it still screams 'mod content' since truth/lie dialogue options aren't really used that much in BG2, but it might be the most certain way to determine whether an elf protagonist is a drow or not.

The good thing is, once you've set the variable, you can use it for as many dialogues as you like, without having to give the player akward dialogue options over and over again.

 

*edit* I actually think there already is a npc at the northern promenade exit, who hates elves and goes total nuts if you talk to him with a npc drow in the party. Maybe you could use that one...

Link to comment

Thank you for your suggestions. I will ponder on that a bit more, since it is a bit of work (it would more or less lead to an own friendship path). BG(II) itself ignores the drow PC possibility completely, so players won't really expect it.

Link to comment

Unfortunately it's not as simple as that. You need to check for the exact string reference used in the 'Change Title' opcode, which may vary in different versions and localizations of the game. A more reliable approach would require that the subrace mod has already been installed and your mod fetches the specific strref from the 'Change Title' opcode in the drow spell during its own installation. That's much effort for an additional branch in a conversation which only 0.0003% of the players might use.

The same string reference would be created/fetched by WeiDU regardless of install order, since WeiDU does not add duplicate strings. The new string would be added automatically by whichever mod is installed first and the reference to that string would be retrieved automatically by whichever mod is installed after.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...