2026/03/05 Update

Added Dynamic conversations.
Added more files from original Background system for reference.
This commit is contained in:
Jaysyn904
2026-03-05 09:32:13 -05:00
parent 4da556c31a
commit 752f53292b
133 changed files with 12285 additions and 10 deletions

View File

@@ -0,0 +1,26 @@
2DA V2.0
Label FeatConstant FeatIndex Name Description
0 Affluence BACKGROUND_AFFLUENCE 1153 16925516 16925517
1 Brawler BACKGROUND_BRAWLER 1154 16925518 16925519
2 Cosmopolitan BACKGROUND_COSMOPOLITAN 1155 16925520 16925521
3 Crusader BACKGROUND_CRUSADER 1156 16925522 16925523
4 Duelist BACKGROUND_DUELIST 1157 16925524 16925525
5 Evangelist BACKGROUND_EVANGELIST 1158 16925526 16925527
6 Forester BACKGROUND_FORESTER 1159 16925528 16925529
7 "Hard Laborer" BACKGROUND_HARD_LABORER 1160 16925530 16925531
8 Healer BACKGROUND_HEALER 1161 16925532 16925533
9 Knight BACKGROUND_KNIGHT 1162 16925534 16925535
10 "Hedge Mage" BACKGROUND_HEDGEMAGE 1163 16925536 16925537
11 Mendicant BACKGROUND_MENDICANT 1164 16925538 16925539
12 Merchant BACKGROUND_MERCHANT 1165 16925540 16925541
13 Metalsmith BACKGROUND_METALSMITH 1166 16925542 16925543
14 Minstrel BACKGROUND_MINSTREL 1167 16925544 16925545
15 Occultist BACKGROUND_OCCULTIST 1168 16925546 16925547
16 Saboteur BACKGROUND_SABOTEUR 1169 16925548 16925549
17 Scout BACKGROUND_SCOUT 1170 16925550 16925551
18 Sneak BACKGROUND_SNEAK 1171 16925552 16925553
19 Soldier BACKGROUND_SOLDIER 1172 16925554 16925555
20 Traveler BACKGROUND_TRAVELER 1173 16925556 16925557
21 Spellfire BACKGROUND_SPELLFIRE 1174 16925558 16925559
22 "Natural Lycanthrope" BACKGROUND_NATLYCAN 1175 16925560 16925561

71
src/2da/bg_deity.2da Normal file
View File

@@ -0,0 +1,71 @@
2DA V2.0
Label FeatConstant FeatIndex Name Description
0 Akadi DEITY_AKADI 1304 16926030 16926031
1 Auril DEITY_AURIL 1305 16926032 16926033
2 Azuth DEITY_AZUTH 1306 16926034 16926035
3 Beshaba DEITY_BESHABA 1307 16926036 16926037
4 Cyric DEITY_CYRIC 1308 16926038 16926039
5 Deneir DEITY_DENEIR 1309 16926040 16926041
6 Gond DEITY_GOND 1310 16926042 16926043
7 Grumbar DEITY_GRUMBAR 1311 16926044 16926045
8 Helm DEITY_HELM 1312 16926046 16926047
9 Ibrandul DEITY_IBRANDUL 1313 16926048 16926049
10 Ilmater DEITY_ILMATER 1314 16926050 16926051
11 Ishtisha DEITY_ISHTISHA 1315 16926052 16926053
12 Bane DEITY_XVIM 1316 16926054 16926055
13 Kelemvor DEITY_KELEMVOR 1317 16926056 16926057
14 Kossuth DEITY_KOSSUTH 1318 16926058 16926059
15 Lathander DEITY_LATHANDER 1319 16926060 16926061
16 Leira DEITY_LEIRA 1320 16926062 16926063
17 Lliira DEITY_LLIIRA 1321 16926064 16926065
18 Loviatar DEITY_LOVIATAR 1322 16926066 16926067
19 Malar DEITY_MALAR 1323 16926068 16926069
20 Mask DEITY_MASK 1324 16926070 16926071
21 Milil DEITY_MILIL 1325 16926072 16926073
22 Mystra DEITY_MYSTRA 1326 16926074 16926075
23 Oghma DEITY_OGHMA 1327 16926076 16926077
24 Selune DEITY_SELUNE 1328 16926078 16926079
25 Shar DEITY_SHAR 1329 16926080 16926081
26 Shaundakul DEITY_SHAUNDAKUL 1330 16926082 16926083
27 Sune DEITY_SUNE 1331 16926084 16926085
28 Talona DEITY_TALONA 1332 16926086 16926087
29 Talos DEITY_TALOS 1333 16926088 16926089
30 Tempus DEITY_TEMPUS 1334 16926090 16926091
31 Torm DEITY_TORM 1335 16926092 16926093
32 Tymora DEITY_TYMORA 1336 16926094 16926095
33 Tyr DEITY_TYR 1337 16926096 16926097
34 Umberlee DEITY_UMBERLEE 1338 16926098 16926099
35 Finder_Wyvernspur DEITY_FINDER_WYVERNSPUR 1339 16926100 16926101
36 Garagos DEITY_GARAGOS 1340 16926102 16926103
37 Gargauth DEITY_GARGAUTH 1341 16926104 16926105
38 Gwaeron_Windstrom DEITY_GWAERON_WINDSTROM 1342 16926106 16926107
39 Hoar DEITY_HOAR 1343 16926108 16926109
40 Lurue DEITY_LURUE 1344 16926110 16926111
41 Nobanion DEITY_NOBANION 1345 16926112 16926113
42 Red_Knight DEITY_RED_KNIGHT 1346 16926114 16926115
43 Savras DEITY_SAVRAS 1347 16926116 16926117
44 Sharess DEITY_SHARESS 1348 16926118 16926119
45 Siamorphe DEITY_SIAMORPHE 1349 16926120 16926121
46 Valkur DEITY_VALKUR 1350 16926122 16926123
47 Velsharoon DEITY_VELSHAROON 1351 16926124 16926125
48 Chauntea DEITY_CHAUNTEA 1352 16926126 16926127
49 Silvanus DEITY_SILVANUS 1353 16926128 16926129
50 Mielikki DEITY_MIELIKKI 1354 16926130 16926131
51 Eldath DEITY_ELDATH 1355 16926132 16926133
52 Shiallia DEITY_SHIALLIA 1356 16926134 16926135
53 Elven_Powers DEITY_ELVEN_POWERS 1357 16926138 16926139
54 Underdark_Powers DEITY_UNDERDARK_POWERS 1358 16926140 16926141
55 Dwarven_Powers DEITY_DWARVEN_POWERS 1359 16926142 16926143
56 Halfling_Powers DEITY_HALFLING_POWERS 1360 16926144 16926145
57 Gnomish_Powers DEITY_GNOMISH_POWERS 1361 16926146 16926147
58 Orcish_Powers DEITY_ORCISH_POWERS 1362 16926148 16926149
59 Amaunator DEITY_AMAUNATOR 1363 16926150 16926151
60 Bane DEITY_BANE 1364 16926152 16926153
61 Bhaal DEITY_BHAAL 1365 16926154 16926155
62 Jergal DEITY_JERGAL 1366 16926156 16926157
63 Karsus DEITY_KARSUS 1367 16926158 16926159
64 Moander DEITY_MOANDER 1368 16926160 16926161
65 Myrkul DEITY_MYRKUL 1369 16926162 16926163
66 Ulutiu DEITY_ULUTIU 1370 16926164 16926165
67 Waukeen DEITY_WAUKEEN 1371 16926166 16926167

22
src/2da/bg_ethnicity.2da Normal file
View File

@@ -0,0 +1,22 @@
2DA V2.0
Label FeatConstant FeatIndex Name Description ParentRace
0
1 BACKGROUND_COPPER_ELF1177 1692577016925771 1
2 BACKGROUND_GREEN_ELF1178 1692577216925773 1
3 BACKGROUND_DARK_ELF1179 1692577416925775 1
4 BACKGROUND_SILVER_ELF1180 1692577616925777 1
5 BACKGROUND_GOLD_ELF1181 1692577816925779 1
6 BACKGROUND_GOLD_DWARF1182 1692578016925781 0
7 BACKGROUND_GREY_DWARF1183 1692578216925783 0
8 BACKGROUND_SHIELD_DWARF1184 1692578416925785 0
9 BACKGROUND_OUTSIDER1185 1692556616925567 ****
10 BACKGROUND_AASIMAR1186 1692575616925757 ****
11 BACKGROUND_TIEFLING1187 1692575816925759 ****
12 CalishiteETHNICITY_CALISHITE1381 1692578616925787 6
13 ChondathanETHNICITY_CHONDATHAN1382 1692578816925789 6
14 DamaranETHNICITY_DAMARAN1383 1692579016925791 6
15 IlluskanETHNICITY_ILLUSKAN1384 1692579216925793 6
16 Mulan ETHNICITY_MULAN1385 1692579416925795 6
17 RashemiETHNICITY_RASHEMI1386 1692579616925797 6
18 TethyrianETHNICITY_TETHYRIAN1387 1692579816925799 6

View File

@@ -0,0 +1,6 @@
2DA V2.0
Label FeatConstant FeatIndex Name Description
0 "Lower Class" BACKGROUND_LOWER 1150 16925673 16925674
1 "Middle Class" BACKGROUND_MIDDLE 1151 16925675 16925676
2 "Upper Class" BACKGROUND_UPPER 1152 16925677 16925678

11
src/2da/bg_type.2da Normal file
View File

@@ -0,0 +1,11 @@
2DA V2.0
Label FeatConstPrefix
0 INVALID ****
1 Ethnicity ETHNICITY_
2 "Social Class" SOCIAL_CLASS_
3 Past BACKGROUND_
4 Deity DEITY_
5 Proficiency PROFICIENCY_
6 Age AGE_CATEGORY_
7 Disability DISABILITY_

1804
src/2da/feat.2da Normal file

File diff suppressed because it is too large Load Diff

65
src/nss/bg_age_cv.nss Normal file
View File

@@ -0,0 +1,65 @@
// bg_age_cv.nss
#include "inc_dynconv"
#include "x2_inc_switches"
const int STAGE_LIST = 0;
const int STAGE_CONFIRM = 1;
void main() {
object oPC = GetPCSpeaker();
SendMessageToPC(oPC, "DEBUG: bg_age_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE) {
if (!GetIsStageSetUp(nStage, oPC)) {
if (nStage == STAGE_LIST) {
SetHeader("Now for the finishing touches. If you would like to apply an age modifier to your character, you may do so. Aging affects are as follows:\n" +
"Young Age/Opt Out: No effects\n" +
"Middle Age: -1 STR, -1 DEX, -1 CON, +1 INT, +1 WIS, +1 CHA\n" +
"Old Age: -2 STR, -2 DEX, -2 CON, +2 INT, +2 WIS, +2 CHA\n" +
"Venerable Age: -3 STR, -3 DEX, -3 CON, +3 INT, +3 WIS, +3 CHA");
AddChoice("Young Age / Opt Out", 0, oPC);
AddChoice("Middle Age", 1, oPC);
AddChoice("Old Age", 2, oPC);
AddChoice("Venerable Age", 3, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
} else if (nStage == STAGE_CONFIRM) {
int nSelected = GetLocalInt(oPC, "age_selected");
string sPrompt = "Are you sure you want to apply this age modifier?";
SetHeader(sPrompt);
AddChoice("Yes", nSelected, oPC);
AddChoice("No", -1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
}
SetupTokens();
} else {
int nChoice = GetChoice(oPC);
if (nStage == STAGE_LIST) {
SetLocalInt(oPC, "age_selected", nChoice);
SetStage(STAGE_CONFIRM, oPC);
} else if (nStage == STAGE_CONFIRM) {
if (nChoice >= 0) {
string sGrant;
switch (nChoice) {
case 0: sGrant = "te_bg_a_n"; break;
case 1: sGrant = "te_bg_a_m"; break;
case 2: sGrant = "te_bg_a_o"; break;
case 3: sGrant = "te_bg_a_v"; break;
default: sGrant = ""; break;
}
if (sGrant != "") ExecuteScript(sGrant, oPC);
// Conversation ends naturally
} else {
SetStage(STAGE_LIST, oPC);
}
}
SetStage(nStage, oPC);
}
}

3082
src/nss/bg_background_cv.nss Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
//:://///////////////////////////////////////////// //::///////////////////////////////////////////////
//:: FileName BG 1 //:: FileName bg_chk_natly
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Created By: David Novotny //:: Created By: David Novotny

74
src/nss/bg_const_inc.nss Normal file
View File

@@ -0,0 +1,74 @@
//:: bg_const_inc.nss
//::
const int BACKGROUND_TYPE_INVALID = 0;
const int BACKGROUND_TYPE_ETHNICITY = 1;
const int BACKGROUND_TYPE_SOCIAL_CLASS = 2;
const int BACKGROUND_TYPE_BACKGROUND = 3;
const int BACKGROUND_TYPE_DEITY = 4;
const int BACKGROUND_TYPE_PROFICIENCY = 5;
const int BACKGROUND_TYPE_AGE = 6;
const int BACKGROUND_TYPE_DISABILITY = 7;
const int ETHNICITY_SHADOW = 1176;
const int ETHNICITY_COPPER_ELF = 1177;
const int ETHNICITY_GREEN_ELF = 1178;
const int ETHNICITY_DARK_ELF = 1179;
const int ETHNICITY_SILVER_ELF = 1180;
const int ETHNICITY_GOLD_ELF = 1181;
const int ETHNICITY_GOLD_DWARF = 1182;
const int ETHNICITY_GREY_DWARF = 1183;
const int ETHNICITY_SHIELD_DWARF = 1184;
const int ETHNICITY_OUTSIDER = 1185;
const int ETHNICITY_AASIMAR = 1186;
const int ETHNICITY_TIEFLING = 1187;
const int ETHNICITY_CALISHITE = 1381;
const int ETHNICITY_CHONDATHAN = 1382;
const int ETHNICITY_DAMARAN = 1383;
const int ETHNICITY_ILLUSKAN = 1384;
const int ETHNICITY_MULAN = 1385;
const int ETHNICITY_RASHEMI = 1386;
const int ETHNICITY_TETHYRIAN = 1387;
const int ETHNICITY_OTHER = 1388;
const int SOCIAL_CLASS_LOWER = 1150;
const int SOCIAL_CLASS_MIDDLE = 1151;
const int SOCIAL_CLASS_UPPER = 1152;
const int BACKGROUND_AFFLUENCE = 1153;
const int BACKGROUND_BRAWLER = 1154;
const int BACKGROUND_COSMOPOLITAN = 1155;
const int BACKGROUND_CRUSADER = 1156;
const int BACKGROUND_DUELIST = 1157;
const int BACKGROUND_EVANGELIST = 1158;
const int BACKGROUND_FORESTER = 1159;
const int BACKGROUND_HARD_LABORER = 1160;
const int BACKGROUND_HEALER = 1161;
const int BACKGROUND_KNIGHT = 1162;
const int BACKGROUND_HEDGEMAGE = 1163;
const int BACKGROUND_MENDICANT = 1164;
const int BACKGROUND_MERCHANT = 1165;
const int BACKGROUND_METALSMITH = 1166;
const int BACKGROUND_MINSTREL = 1167;
const int BACKGROUND_OCCULTIST = 1168;
const int BACKGROUND_SABOTEUR = 1169;
const int BACKGROUND_SCOUT = 1170;
const int BACKGROUND_SNEAK = 1171;
const int BACKGROUND_SOLDIER = 1172;
const int BACKGROUND_TRAVELER = 1173;
const int BACKGROUND_SPELLFIRE = 1174;
const int BACKGROUND_NAT_LYCAN = 1175;
const int BACKGROUND_AMN_TRAINED = 1389;
const int BACKGROUND_CALISHITE_TRAINED = 1390;
const int BACKGROUND_CHURCH_ACOLYTE = 1392;
const int BACKGROUND_CARAVANNER = 1391;
const int BACKGROUND_CIRCLE_BORN = 1393;
const int BACKGROUND_ENLIGHTENED_STUDENT = 1394;
const int BACKGROUND_HAREM_TRAINED = 1395;
const int BACKGROUND_HARPER = 1396;
const int BACKGROUND_KNIGHT_SQUIRE = 1397;
const int BACKGROUND_TALFIRIAN = 1398;
const int BACKGROUND_THEOCRAT = 1399;
const int BACKGROUND_WARD_TRIAD = 1400;
const int BACKGROUND_ZHENTARIM = 1401;

2633
src/nss/bg_deity_cv.nss Normal file

File diff suppressed because it is too large Load Diff

69
src/nss/bg_disfig_cv.nss Normal file
View File

@@ -0,0 +1,69 @@
// bg_disfig_cv.nss
#include "inc_dynconv"
#include "x2_inc_switches"
const int STAGE_LIST = 0;
const int STAGE_CONFIRM = 1;
void main() {
object oPC = GetPCSpeaker();
SendMessageToPC(oPC, "DEBUG: bg_disfig_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE) {
if (!GetIsStageSetUp(nStage, oPC)) {
if (nStage == STAGE_LIST) {
SetHeader(
"Some players wish to have intentional disfigurements such as lost limbs or lingering injuries. " +
"These are rare among those who still wish to adventure, but not unique. Many keep these as " +
"scars of what has come before, and a warning to those left.\n\n" +
"[These aren't going to be updated too often unless a player asks for something for a " +
"specific character. However, when someone does, we'll do our best to add it. These additions " +
"will stay on the server for all to use. You will also gain a small RPXP bonus. This is not " +
"recommended for new players.]"
);
AddChoice("One-Armed", 1, oPC);
AddChoice("No Disfigurement", 2, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
else if (nStage == STAGE_CONFIRM) {
int nSelected = GetLocalInt(oPC, "disfig_selected");
string sPrompt = (nSelected == 1)
? "You lost an arm. At some point, you lost one. Maybe it was a woodcutting accident, " +
"maybe it was a punishment for theft. In any case, you're down an appendage.\n\n" +
"You can't use your left arm. This means one-handed weapons only, no two handers. " +
"No left hand rings.\n\nAre you sure?"
: "Are you sure you want to continue without a disfigurement?";
SetHeader(sPrompt);
AddChoice("Yes!", nSelected, oPC);
AddChoice("No...", -1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
SetupTokens();
}
}
else {
int nChoice = GetChoice(oPC);
if (nStage == STAGE_LIST) {
SetLocalInt(oPC, "disfig_selected", nChoice);
SetStage(STAGE_CONFIRM, oPC);
}
else if (nStage == STAGE_CONFIRM) {
if (nChoice >= 0) {
string sGrant = (nChoice == 1) ? "bg_give_noarm" : "bg_give_nodisfig";
ExecuteScript(sGrant, oPC);
// Chain to next step, e.g., final touches
// StartDynamicConversation("bg_final_cv", oPC);
} else {
SetStage(STAGE_LIST, oPC);
}
}
SetStage(nStage, oPC);
}
}

523
src/nss/bg_language_cv.nss Normal file
View File

@@ -0,0 +1,523 @@
// bg_language_cv.nss
#include "inc_dynconv"
#include "x2_inc_switches"
#include "inc_persist_loca"
#include "te_afflic_func"
const int STAGE_LIST = 0;
const int STAGE_CONFIRM = 1;
// Ensure the PC Data Object exists; create if missing
object EnsurePlayerDataObject(object oPC)
{
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem))
{
oItem = CreateItemOnObject("pc_data_object", oPC);
}
return oItem;
}
// Check if PC already knows a language
int KnowsLanguage(object oPC, int nLanguageFeat)
{
object oItem = EnsurePlayerDataObject(oPC);
// Search through all LANGUAGE_* slots for this feat
int i = 0;
string sSlot;
while (i < 99)
{
sSlot = "LANGUAGE_" + (i < 20 ? "0" : "") + IntToString(i);
if (GetLocalInt(oItem, sSlot) == nLanguageFeat)
return TRUE;
i++;
}
return FALSE;
}
// Function to get the next available language slot
int GetNextLanguageSlot(object oPC)
{
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem)) return 0;
int i = 0;
string sSlot;
// Find the first empty slot
while (i < 99) // Maximum 99 languages
{
sSlot = "LANGUAGE_" + (i < 20 ? "0" : "") + IntToString(i);
if (!GetLocalInt(oItem, sSlot))
return i;
i++;
}
return -1; // No slots available
}
// Grant a language to PC
void GrantLanguage(object oPC, int nLanguageFeat)
{
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem)) return;
int nSlot = GetNextLanguageSlot(oPC);
if (nSlot >= 0)
{
string sSlot = "LANGUAGE_" + (nSlot < 20 ? "0" : "") + IntToString(nSlot);
SetLocalInt(oItem, sSlot, nLanguageFeat);
SetPersistantLocalInt(oPC, sSlot, nLanguageFeat);
}
}
// Count automatic racial and class languages using slot-searching pattern
int GetAutomaticLanguageCount(object oPC)
{
int nAutomaticLanguages = 0;
int nRace = GetRacialType(oPC);
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem)) return 0;
// Search through all language slots
int i = 0;
string sSlot;
int nLanguageFeat;
while (i < 99)
{
sSlot = "LANGUAGE_" + (i < 10 ? "0" : "") + IntToString(i);
nLanguageFeat = GetLocalInt(oItem, sSlot);
if (nLanguageFeat > 0)
{
// Check if this is an automatic racial language
switch(nRace)
{
case RACIAL_TYPE_ELF: case RACIAL_TYPE_HALFELF:
if (nLanguageFeat == FEAT_LANGUAGE_ELVEN) nAutomaticLanguages++;
break;
case RACIAL_TYPE_DWARF:
if (nLanguageFeat == FEAT_LANGUAGE_DWARVEN) nAutomaticLanguages++;
break;
case RACIAL_TYPE_GNOME:
if (nLanguageFeat == FEAT_LANGUAGE_GNOMISH) nAutomaticLanguages++;
break;
case RACIAL_TYPE_HALFLING:
if (nLanguageFeat == FEAT_LANGUAGE_HALFLING) nAutomaticLanguages++;
break;
case RACIAL_TYPE_HALFORC:
if (nLanguageFeat == FEAT_LANGUAGE_ORCISH) nAutomaticLanguages++;
break;
}
// Check if this is an automatic class language
if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC) >= 1 && nLanguageFeat == FEAT_LANGUAGE_THIEVES_CANT)
nAutomaticLanguages++;
if (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 5 && nLanguageFeat == FEAT_LANGUAGE_DRUIDIC)
nAutomaticLanguages++;
if ((GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 8 || GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 5) && nLanguageFeat == FEAT_LANGUAGE_ANIMAL)
nAutomaticLanguages++;
if (GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC) >= 1 && nLanguageFeat == FEAT_LANGUAGE_ASSASSINS_CANT)
nAutomaticLanguages++;
}
i++;
}
return nAutomaticLanguages;
}
// Calculate remaining bonus language picks
int GetBonusLanguageCount(object oPC)
{
object oItem = EnsurePlayerDataObject(oPC);
// Calculate total bonus languages based on Intelligence modifier
int nIntMod = GetAbilityModifier(ABILITY_INTELLIGENCE, oPC);
int nTotalBonus = 0;
if (nIntMod > 0)
nTotalBonus = nIntMod;
// Count languages already selected by searching LANGUAGE_* slots
int nSelected = 0;
int i = 0;
string sSlot;
while (i < 99)
{
sSlot = "LANGUAGE_" + (i < 20 ? "0" : "") + IntToString(i);
if (GetLocalInt(oItem, sSlot))
nSelected++;
i++;
}
// Subtract automatic languages (this function needs similar fix)
int nAutomatic = GetAutomaticLanguageCount(oPC);
nSelected -= nAutomatic;
// Return remaining picks (minimum 0)
int nRemaining = nTotalBonus - nSelected;
return (nRemaining > 0) ? nRemaining : 0;
}
void GrantDefaultLanguages(object oPC)
{
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem)) return;
// Get saved character creation choices
int nSubrace = GetLocalInt(oItem, "CC0");
int nBackground = GetLocalInt(oItem, "CC2");
// Racial Languages
switch (GetRacialType(oPC))
{
case RACIAL_TYPE_ELF: case RACIAL_TYPE_HALFELF:
GrantLanguage(oPC, FEAT_LANGUAGE_ELVEN);
break;
case RACIAL_TYPE_GNOME:
GrantLanguage(oPC, FEAT_LANGUAGE_GNOMISH);
break;
case RACIAL_TYPE_HALFLING:
GrantLanguage(oPC, FEAT_LANGUAGE_HALFLING);
break;
case RACIAL_TYPE_DWARF:
GrantLanguage(oPC, FEAT_LANGUAGE_DWARVEN);
break;
case RACIAL_TYPE_HALFORC:
GrantLanguage(oPC, FEAT_LANGUAGE_ORCISH);
break;
}
// Class Languages
int nRanger = GetLevelByClass(CLASS_TYPE_RANGER, oPC);
int nDruid = GetLevelByClass(CLASS_TYPE_DRUID, oPC);
int nRogue = GetLevelByClass(CLASS_TYPE_ROGUE, oPC);
int nAssn = GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC);
if (nRanger >= 8 || nDruid >= 5 || nBackground == BACKGROUND_CIRCLE_BORN)
{
GrantLanguage(oPC, FEAT_LANGUAGE_ANIMAL);
if (nDruid >= 5) GrantLanguage(oPC, FEAT_LANGUAGE_DRUIDIC);
}
if (nRogue > 0 || nAssn > 0)
{
GrantLanguage(oPC, FEAT_LANGUAGE_THIEVES_CANT);
if (nAssn > 0) GrantLanguage(oPC, FEAT_LANGUAGE_ASSASSINS_CANT);
}
// Ethnicity Languages
if (nSubrace == ETHNICITY_CALISHITE || nBackground == BACKGROUND_CALISHITE_TRAINED)
GrantLanguage(oPC, FEAT_LANGUAGE_ALZHEDO);
if (nSubrace == ETHNICITY_CHONDATHAN || nSubrace == ETHNICITY_TETHYRIAN)
GrantLanguage(oPC, FEAT_LANGUAGE_CHONDATHAN);
if (nSubrace == ETHNICITY_DAMARAN)
GrantLanguage(oPC, FEAT_LANGUAGE_DAMARAN);
if (nSubrace == ETHNICITY_ILLUSKAN)
GrantLanguage(oPC, FEAT_LANGUAGE_ILLUSKAN);
if (nSubrace == ETHNICITY_MULAN)
GrantLanguage(oPC, FEAT_LANGUAGE_MULANESE);
if (nSubrace == ETHNICITY_RASHEMI)
GrantLanguage(oPC, FEAT_LANGUAGE_RASHEMI);
// Special Subrace Languages
if (nBackground == BACKGROUND_DARK_ELF)
{
GrantLanguage(oPC, FEAT_LANGUAGE_DROW);
GrantLanguage(oPC, FEAT_LANGUAGE_DROW_HAND_CANT);
GrantLanguage(oPC, FEAT_LANGUAGE_UNDERCOMMON);
}
if (nBackground == BACKGROUND_GREY_DWARF)
{
GrantLanguage(oPC, FEAT_LANGUAGE_DUERGAR);
GrantLanguage(oPC, FEAT_LANGUAGE_UNDERCOMMON);
}
// Planar Languages
if (nBackground == 1137) // Abyssal_Pact
GrantLanguage(oPC, FEAT_LANGUAGE_ABYSSAL);
if (nBackground == 1139) // Dark_Pact
GrantLanguage(oPC, FEAT_LANGUAGE_INFERNAL);
}
void main()
{
object oPC = GetPCSpeaker();
object oItem = EnsurePlayerDataObject(oPC);
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
int nChoice = GetChoice();
int nBackground = GetLocalInt(oItem, "CC2");
int nCleric = GetLevelByClass(CLASS_TYPE_CLERIC, oPC);
int nDruid = GetLevelByClass(CLASS_TYPE_DRUID, oPC);
int nWizard = GetLevelByClass(CLASS_TYPE_WIZARD, oPC);
int nAir = GetHasFeat(FEAT_AIR_DOMAIN_POWER, oPC);
int nEarth = GetHasFeat(FEAT_EARTH_DOMAIN_POWER, oPC);
int nFire = GetHasFeat(FEAT_FIRE_DOMAIN_POWER, oPC);
int nWater = GetHasFeat(FEAT_WATER_DOMAIN_POWER, oPC);
if(nValue == 0) return;
if(nValue == DYNCONV_SETUP_STAGE)
{
if(!GetIsStageSetUp(nStage, oPC))
{
if(nStage == STAGE_LIST)
{
int nRemaining = GetBonusLanguageCount(oPC);
string sHeader = "You have " + IntToString(nRemaining) + " bonus language picks remaining.\n\ You can refresh the list with the Escape if needed.\n\nSelect a language:";
SetHeader(sHeader);
// Add all available languages that PC doesn't know and has picks for
if (nRemaining > 0 && nCleric && !KnowsLanguage(oPC, FEAT_LANGUAGE_ABYSSAL))
{
AddChoice("Abyssal", 1, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_ALZHEDO))
{
AddChoice("Alzhedo", 2, oPC);
}
if (nRemaining > 0 && nWater && !KnowsLanguage(oPC, FEAT_LANGUAGE_AQUAN))
{
AddChoice("Aquan", 3, oPC);
}
if (nRemaining > 0 && nAir && !KnowsLanguage(oPC, FEAT_LANGUAGE_AURAN))
{
AddChoice("Auran", 5, oPC);
}
if (nRemaining > 0 && nCleric && !KnowsLanguage(oPC, FEAT_LANGUAGE_CELESTIAL))
{
AddChoice("Celestial", 6, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_CHESSENTAN))
{
AddChoice("Chessentan", 7, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_CHONDATHAN))
{
AddChoice("Chondathan", 8, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_CHULTAN))
{
AddChoice("Chultan", 9, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_DAMARAN))
{
AddChoice("Damaran", 10, oPC);
}
if (nRemaining > 0 && nWizard && !KnowsLanguage(oPC, FEAT_LANGUAGE_DRACONIC))
{
AddChoice("Draconic", 11, oPC);
}
if (nRemaining > 0 && KnowsLanguage(oPC, FEAT_LANGUAGE_UNDERCOMMON) ||
KnowsLanguage(oPC, FEAT_LANGUAGE_ELVEN) ||
KnowsLanguage(oPC, FEAT_LANGUAGE_IMASKARI &&
!KnowsLanguage(oPC, FEAT_LANGUAGE_DROW)))
{
AddChoice("Drow", 12, oPC);
}
if (nRemaining > 0 && KnowsLanguage(oPC, FEAT_LANGUAGE_UNDERCOMMON) ||
KnowsLanguage(oPC, FEAT_LANGUAGE_DWARVEN) ||
KnowsLanguage(oPC, FEAT_LANGUAGE_IMASKARI &&
!KnowsLanguage(oPC, FEAT_LANGUAGE_DUERGAR)))
{
AddChoice("Duergar", 13, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_DWARVEN))
{
AddChoice("Dwarven", 14, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_ELVEN))
{
AddChoice("Elven", 15, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_GIANT))
{
AddChoice("Giant", 16, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_GNOMISH))
{
AddChoice("Gnomish", 17, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_GOBLIN))
{
AddChoice("Goblin", 18, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_HALFLING))
{
AddChoice("Halfling", 19, oPC);
}
if (nRemaining > 0 && nFire && !KnowsLanguage(oPC, FEAT_LANGUAGE_IGNAN))
{
AddChoice("Ignan", 20, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_ILLUSKAN))
{
AddChoice("Illuskan", 21, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_IMASKARI))
{
AddChoice("Imaskari", 22, oPC);
}
if (nRemaining > 0 && nCleric && !KnowsLanguage(oPC, FEAT_LANGUAGE_INFERNAL))
{
AddChoice("Infernal", 23, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_KOBOLD))
{
AddChoice("Kobold", 24, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_LANTANESE))
{
AddChoice("Lantanese", 25, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_MULANESE))
{
AddChoice("Mulanese", 26, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_MULHORANDI))
{
AddChoice("Mulhorandi", 27, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_ORCISH))
{
AddChoice("Orcish", 28, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_RASHEMI))
{
AddChoice("Rashemi", 29, oPC);
}
if (nRemaining > 0 && nDruid && !KnowsLanguage(oPC, FEAT_LANGUAGE_SYLVAN))
{
AddChoice("Sylvan", 30, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_TALFIRIC))
{
AddChoice("Talfiric", 31, oPC);
}
if (nRemaining > 0 && nEarth && !KnowsLanguage(oPC, FEAT_LANGUAGE_TERRAN))
{
AddChoice("Terran", 32, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_TROGLODYTE))
{
AddChoice("Troglodyte", 33, oPC);
}
if (nRemaining > 0 && !KnowsLanguage(oPC, FEAT_LANGUAGE_UNDERCOMMON))
{
AddChoice("Undercommon", 34, oPC);
}
// Refresh option
AddChoice("[Refresh Language Choices]", 99, oPC);
// No Options Left finalizer
if (nRemaining == 0)
{
AddChoice("[No Options Left]", 100, oPC);
}
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
else if (nStage == STAGE_CONFIRM)
{
SetHeader("Language selection complete.");
AddChoice("[Finish]", 1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
}
SetupTokens();
}
// Handle PC responses
else
{
if(nStage == STAGE_LIST)
{
// Handle language selection
if (nChoice >= 1 && nChoice <= 36)
{
int nRemaining = GetBonusLanguageCount(oPC);
if (nRemaining > 0)
{
// Grant the selected language based on choice
switch (nChoice)
{
case 1: GrantLanguage(oPC, FEAT_LANGUAGE_ABYSSAL); break;
case 2: GrantLanguage(oPC, FEAT_LANGUAGE_ALZHEDO); break;
case 3: GrantLanguage(oPC, FEAT_LANGUAGE_AQUAN); break;
case 4: GrantLanguage(oPC, FEAT_LANGUAGE_AURAN); break;
case 5: GrantLanguage(oPC, FEAT_LANGUAGE_CELESTIAL); break;
case 6: GrantLanguage(oPC, FEAT_LANGUAGE_CHESSENTAN); break;
case 7: GrantLanguage(oPC, FEAT_LANGUAGE_CHONDATHAN); break;
case 8: GrantLanguage(oPC, FEAT_LANGUAGE_CHULTAN); break;
case 9: GrantLanguage(oPC, FEAT_LANGUAGE_DAMARAN); break;
case 10: GrantLanguage(oPC, FEAT_LANGUAGE_DRACONIC); break;
case 11: GrantLanguage(oPC, FEAT_LANGUAGE_DROW); break;
case 12: GrantLanguage(oPC, FEAT_LANGUAGE_DUERGAR); break;
case 13: GrantLanguage(oPC, FEAT_LANGUAGE_DWARVEN); break;
case 14: GrantLanguage(oPC, FEAT_LANGUAGE_ELVEN); break;
case 15: GrantLanguage(oPC, FEAT_LANGUAGE_GIANT); break;
case 16: GrantLanguage(oPC, FEAT_LANGUAGE_GNOMISH); break;
case 17: GrantLanguage(oPC, FEAT_LANGUAGE_GOBLIN); break;
case 18: GrantLanguage(oPC, FEAT_LANGUAGE_HALFLING); break;
case 19: GrantLanguage(oPC, FEAT_LANGUAGE_IGNAN); break;
case 20: GrantLanguage(oPC, FEAT_LANGUAGE_ILLUSKAN); break;
case 21: GrantLanguage(oPC, FEAT_LANGUAGE_IMASKARI); break;
case 22: GrantLanguage(oPC, FEAT_LANGUAGE_INFERNAL); break;
case 23: GrantLanguage(oPC, FEAT_LANGUAGE_KOBOLD); break;
case 24: GrantLanguage(oPC, FEAT_LANGUAGE_LANTANESE); break;
case 25: GrantLanguage(oPC, FEAT_LANGUAGE_MULANESE); break;
case 26: GrantLanguage(oPC, FEAT_LANGUAGE_MULHORANDI); break;
case 27: GrantLanguage(oPC, FEAT_LANGUAGE_ORCISH); break;
case 28: GrantLanguage(oPC, FEAT_LANGUAGE_RASHEMI); break;
case 29: GrantLanguage(oPC, FEAT_LANGUAGE_SYLVAN); break;
case 30: GrantLanguage(oPC, FEAT_LANGUAGE_TALFIRIC); break;
case 31: GrantLanguage(oPC, FEAT_LANGUAGE_TERRAN); break;
case 32: GrantLanguage(oPC, FEAT_LANGUAGE_TROGLODYTE); break;
case 33: GrantLanguage(oPC, FEAT_LANGUAGE_UNDERCOMMON); break;
}
// Rebuild stage to update available options
MarkStageNotSetUp(nStage, oPC);
SetStage(nStage, oPC);
}
}
// Handle refresh
else if (nChoice == 99)
{
MarkStageNotSetUp(nStage, oPC);
SetStage(nStage, oPC);
}
// Handle no options left - move to confirm
else if (nChoice == 100)
{
nStage = STAGE_CONFIRM;
SetStage(nStage, oPC);
}
}
else if (nStage == STAGE_CONFIRM)
{
SetHeader("Language selection complete.");
AddChoice("[Finish]", 1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
}
// Setup tokens for dynamic conversation system
SetupTokens();
}

153
src/nss/bg_profs_cv.nss Normal file
View File

@@ -0,0 +1,153 @@
// bg_proficiency_cv.nss
#include "inc_dynconv"
#include "x2_inc_switches"
const int STAGE_LIST = 0;
void main() {
object oPC = GetPCSpeaker();
SendMessageToPC(oPC, "DEBUG: bg_proficiency_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE) {
if (!GetIsStageSetUp(nStage, oPC)) {
if (nStage == STAGE_LIST) {
SetHeader("Now you will select your proficiencies. All characters are allowed three proficiencies. Some proficiencies are only available to certain class standings.");
// Proficiency options with condition checks and grant scripts
if (ExecuteScriptAndReturnInt("prof_chk_alchemy", oPC)) {
AddChoice("Alchemy", 1, oPC);
SetLocalString(oPC, "prof_dyn_text_1", "Allows you to combine and refine natural or unnatural elements into new and exciting combinations.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_anatomy", oPC)) {
AddChoice("Anatomy", 2, oPC);
SetLocalString(oPC, "prof_dyn_text_2", "This proficiency represents the study of the anatomy of living things. It enables a character to increase their effective critical hit severity by +2, as well as increase the save DC vs. death for a critical hit effect by +2. Additionally, a character with Anatomy proficiency receives a +2 bonus to heal checks when applying a bandage, and they receive a +2 bonus to hunting checks to recover an organ or other resource.\nRequirements: Upper or Middle Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_armor", oPC)) {
AddChoice("Armorsmithing", 3, oPC);
SetLocalString(oPC, "prof_dyn_text_3", "Allows you to craft armor from base materials.\nRequirements: Lower Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_astro", oPC)) {
AddChoice("Astronomy", 4, oPC);
SetLocalString(oPC, "prof_dyn_text_4", "Allows you to study celestial bodies and navigate by the stars.\nRequirements: Middle or Upper Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_carp", oPC)) {
AddChoice("Carpentry", 5, oPC);
SetLocalString(oPC, "prof_dyn_text_5", "Allows you to work wood to create placeables or other objects.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_deciph", oPC)) {
AddChoice("Decipher Script", 6, oPC);
SetLocalString(oPC, "prof_dyn_text_6", "Allows you to decode and understand coded or arcane writings.\nRequirements: Middle or Upper Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_disguis", oPC)) {
AddChoice("Disguise", 7, oPC);
SetLocalString(oPC, "prof_dyn_text_7", "Allows you to alter your appearance and impersonate others.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_fire", oPC)) {
AddChoice("Firemaking", 8, oPC);
SetLocalString(oPC, "prof_dyn_text_8", "Allows you to create and maintain fires in various conditions.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_guns", oPC)) {
AddChoice("Gunsmithing", 9, oPC);
SetLocalString(oPC, "prof_dyn_text_9", "This proficiency enables a character to make firearms from base crafting materials, as well as make modifications to a firearm without a requiring a crafting roll.\nRequirements: None");
}
if (ExecuteScriptAndReturnInt("prof_chk_herb", oPC)) {
AddChoice("Herbalism", 10, oPC);
SetLocalString(oPC, "prof_dyn_text_10", "Allows you to combine and refine natural or unnatural elements into new and exciting combinations.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_hist", oPC)) {
AddChoice("History", 11, oPC);
SetLocalString(oPC, "prof_dyn_text_11", "Allows you to recall historical events and lore.\nRequirements: Middle or Upper Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_hunt", oPC)) {
AddChoice("Hunting", 12, oPC);
SetLocalString(oPC, "prof_dyn_text_12", "Allows you to track and harvest game.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_mason", oPC)) {
AddChoice("Masonry", 13, oPC);
SetLocalString(oPC, "prof_dyn_text_13", "Allows you to work stone in order to create placeables or other objects.\nRequirements: Middle or Lower Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_mining", oPC)) {
AddChoice("Mining", 14, oPC);
SetLocalString(oPC, "prof_dyn_text_14", "Allows you to gather useful ores, metals, and minerals from rock.\nRequirements: Lower Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_obs", oPC)) {
AddChoice("Observation", 15, oPC);
SetLocalString(oPC, "prof_dyn_text_15", "Allows you to notice details and perceive hidden things.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_siege", oPC)) {
AddChoice("Siege Engineering", 16, oPC);
SetLocalString(oPC, "prof_dyn_text_16", "Allows you to construct and operate siege weapons.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_smelt", oPC)) {
AddChoice("Smelting", 17, oPC);
SetLocalString(oPC, "prof_dyn_text_17", "Allows you to refine ores into usable metals.\nRequirements: Lower Class Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_tailor", oPC)) {
AddChoice("Tailoring", 18, oPC);
SetLocalString(oPC, "prof_dyn_text_18", "Allows you to craft clothing and leather goods.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_track", oPC)) {
AddChoice("Tracking", 19, oPC);
SetLocalString(oPC, "prof_dyn_text_19", "Allows you to follow tracks and trails.\nRequirements: Any Standing");
}
if (ExecuteScriptAndReturnInt("prof_chk_wood", oPC)) {
AddChoice("Wood Gathering", 20, oPC);
SetLocalString(oPC, "prof_dyn_text_20", "Allows you to gather wood from trees.\nRequirements: Any Standing");
}
// No Options Left
if (ExecuteScriptAndReturnInt("prof_chk_l", oPC)) {
AddChoice("No Options Left", 21, oPC);
SetLocalString(oPC, "prof_dyn_text_21", "You have selected all available proficiencies or have no remaining slots.");
}
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
SetupTokens();
}
} else {
// Handle PC responses
int nChoice = GetChoice(oPC);
if (nChoice == 21) {
// No Options Left: finalize and proceed to next step (e.g., disfigurement or final)
ExecuteScript("prof_give_nomore", oPC);
// Optionally chain to next conversation:
// StartDynamicConversation("bg_disfig_cv", oPC);
} else if (nChoice >= 1 && nChoice <= 20) {
// Grant the selected proficiency
string sGrant;
switch (nChoice) {
case 1: sGrant = "prof_give_alchemy"; break;
case 2: sGrant = "prof_give_anatomy"; break;
case 3: sGrant = "prof_give_armor"; break;
case 4: sGrant = "prof_give_astro"; break;
case 5: sGrant = "prof_give_carp"; break;
case 6: sGrant = "prof_give_deciph"; break;
case 7: sGrant = "prof_give_disgui"; break;
case 8: sGrant = "prof_give_fire"; break;
case 9: sGrant = "prof_give_guns"; break;
case 10: sGrant = "prof_give_herb"; break;
case 11: sGrant = "prof_give_hist"; break;
case 12: sGrant = "prof_give_hunt"; break;
case 13: sGrant = "prof_give_mason"; break;
case 14: sGrant = "prof_give_mine"; break;
case 15: sGrant = "prof_give_obs"; break;
case 16: sGrant = "prof_give_siege"; break;
case 17: sGrant = "prof_give_smelt"; break;
case 18: sGrant = "prof_give_tailor"; break;
case 19: sGrant = "prof_give_track"; break;
case 20: sGrant = "prof_give_wood"; break;
default: sGrant = ""; break;
}
if (sGrant != "") ExecuteScript(sGrant, oPC);
// Return to list to allow further selections
SetStage(STAGE_LIST, oPC);
}
SetStage(nStage, oPC);
}
}

256
src/nss/bg_soclass_cv.nss Normal file
View File

@@ -0,0 +1,256 @@
// bg_soclass_cv.nss
#include "inc_dynconv"
#include "x2_inc_switches"
#include "inc_persist_loca"
#include "te_afflic_func"
const int STAGE_LIST = 0;
const int STAGE_CONFIRM = 1;
string GetClassText(object oPC, int nChoice) {
return GetLocalString(oPC, "cs_dyn_text_" + IntToString(nChoice));
}
// TODO: See if "!GetHasFeat(BACKGROUND_AASIMAR, oPC) && " would be better.
int NobiltyCheck(object oPC = OBJECT_SELF)
{
// Make sure the player has the required feats
object oPC = GetPCSpeaker();
//int nSubrace = GetLocalInt(oItem, "CC0");
int nSubrace = GetPersistantLocalInt(oPC,"CC0");
return (
GetRacialType(oPC) == RACIAL_TYPE_HUMAN &&
GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC) < 1 &&
nSubrace != 1186 && // Aasimar
nSubrace != 1187 && // Tiefling
nSubrace != 1445 && // F(?) Folk
nSubrace != 1446 && // Chultan
nSubrace != 1450 && // Shaaran
nSubrace != 1451 && // Shou
nSubrace != 1448 && // Maztican
nSubrace != 1175 // Natural Lycan
);
}
// Ensure the PC Data Object exists; create if missing
object EnsurePlayerDataObject(object oPC)
{
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem))
{
oItem = CreateItemOnObject("pc_data_object", oPC);
}
return oItem;
}
void main()
{
object oPC = GetPCSpeaker();
SendMessageToPC(oPC, "DEBUG: bg_soclass_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE)
{
if (!GetIsStageSetUp(nStage, oPC))
{
if (nStage == STAGE_LIST)
{
SetHeader("Class Standing is your place in Tethyrian society and will affect what Backgrounds or Subraces you can select. Some races only have access to certain Class Standings due to the political and social stigmas on certain races in the region.\n\nSelect the Class Standing that best represents your character.\nYou can refresh the list with the Escape key if needed.");
// 1 Lower Class
AddChoice("Lower Class", 1, oPC);
SetLocalString(oPC, "cs_dyn_text_1",
"You are a commoner, a peasant, or a laborer. You have little wealth or influence, but you are hardworking and resilient. Many in Tethyr view you with pity or contempt, but you know the value of a day's work.\n\nDoes this describe you?");
// 2 Middle Class
AddChoice("Middle Class", 2, oPC);
SetLocalString(oPC, "cs_dyn_text_2",
"You are a tradesperson, a merchant, or a skilled artisan. You have some wealth and influence, but you are not nobility. You are respected for your craft and your contributions to Tethyr's economy.\n\nDoes this describe you?");
// 3 Upper Class (requires Nobility 1+ and Human)
if (NobiltyCheck(oPC))
{
AddChoice("Upper Class", 3, oPC);
SetLocalString(oPC, "cs_dyn_text_3",
"You are a noble, a landowner, or a person of high birth. You have great wealth and influence, but you are also burdened by the responsibilities and expectations of your station. Many in Tethyr admire you, but some envy or resent you.\n\nDoes this describe you?");
}
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
else if (nStage == STAGE_CONFIRM)
{
int nSelected = GetLocalInt(oPC, "cs_selected");
SetHeader(GetClassText(oPC, nSelected) + "\n\nIs this correct?");
AddChoice("Yes", 0, oPC);
AddChoice("No", 1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
}
SetupTokens();
}
else
{
int nChoice = GetChoice(oPC);
if (nStage == STAGE_LIST)
{
SetLocalInt(oPC, "cs_selected", nChoice);
nStage = STAGE_CONFIRM; // update local nStage
}
else if (nStage == STAGE_CONFIRM)
{
if (nChoice == 0) { // Yes
int nSelected = GetLocalInt(oPC, "cs_selected");
object oItem = EnsurePlayerDataObject(oPC);
switch (nSelected) {
case 1:
{
SetPersistantLocalInt(oPC,"CC1",BACKGROUND_LOWER);
SetPersistantLocalInt(oPC,"BG_Select",1);
SetLocalInt(oItem, "CC1", BACKGROUND_LOWER);
SetLocalInt(oItem, "BG_Select", 1);
break; // Lower Class
}
case 2:
{
SetPersistantLocalInt(oPC,"CC1",BACKGROUND_MIDDLE);
SetPersistantLocalInt(oPC,"BG_Select",2);
SetLocalInt(oItem, "CC1", BACKGROUND_MIDDLE);
SetLocalInt(oItem, "BG_Select", 2);
break; // Middle Class
}
case 3:
{
SetPersistantLocalInt(oPC,"CC1",BACKGROUND_UPPER);
SetPersistantLocalInt(oPC,"BG_Select",3);
SetLocalInt(oItem, "CC1", BACKGROUND_UPPER);
SetLocalInt(oItem, "BG_Select", 3);
break; // Upper Class
}
}
AllowExit(DYNCONV_EXIT_FORCE_EXIT, TRUE, oPC);
SetPersistantLocalInt(oPC, "CC1_DONE", 1);
DelayCommand(0.1f, StartDynamicConversation("bg_background_cv", oPC));
}
else
{ // No
MarkStageNotSetUp(STAGE_LIST, oPC);
MarkStageNotSetUp(STAGE_CONFIRM, oPC);
nStage = STAGE_LIST; // update local nStage
}
}
SetStage(nStage, oPC);
}
}
/* void main()
{
object oPC = GetPCSpeaker();
object oItem = EnsurePlayerDataObject(oPC);
SendMessageToPC(oPC, "DEBUG: bg_soclass_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE)
{
if (!GetIsStageSetUp(nStage, oPC))
{
if (nStage == STAGE_LIST)
{
SetHeader("Class Standing is your place in Tethyrian society and will affect what Backgrounds or Subraces you can select. Some races only have access to certain Class Standings due to the political and social stigmas on certain races in the region.\n\nSelect the Class Standing that best represents your character.");
// 1 Lower Class
if (GetIsPC(oPC))
{
AddChoice("Lower Class", 1, oPC);
SetLocalString(oPC, "cs_dyn_text_1",
"You are from the dredges of society and are considered a peasant at best. You have worked hard your entire life - when you could find it. Whether you are from the city or a rural farm, you never had much to your name. You likely do not have a surname and claiming one is considered purgery in many counties. This is Tethyr however, so an individual can rise above their current station through deeds and valor. You could be moving upwards soon.\n\nDoes this describe you?");
}
// 2 Middle Class
if((GetRacialType(oPC) != RACIAL_TYPE_HALFORC) && (GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC) < 1))
{
AddChoice("Middle Class", 2, oPC);
SetLocalString(oPC, "cs_dyn_text_2",
"You are from the middling classes of society. Your family may have been merchants, craftsmen, knights or small landowners. Your upbringing has provided you with skills that you can put to good use, even if you lack the inheritance that more fortunate members of society might have. Whether you will take up the sword or continue the family business is now up to you.\n\nDoes this describe you?");
}
// 3 Upper Class
if (NobiltyCheck(oPC))
{
AddChoice("Upper Class", 3, oPC);
SetLocalString(oPC, "cs_dyn_text_3",
"You are from the upper classes of society. Your family may have been landowners, merchants, knights, or landed nobles with titles to their name. While not all nobles fit the same mold or are necessarily Tethyrian in descent, they are distinguished easily by their fealty and unending service to the crown. Your upbringing has left you with many opportunities and advantages that others may not have had - how you use them is now entirely up to you.\n\nDoes this describe you?");
}
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
else if (nStage == STAGE_CONFIRM)
{
int nSelected = GetLocalInt(oPC, "cs_selected");
SetHeader(GetClassText(oPC, nSelected));
AddChoice("Yes!", nSelected, oPC);
AddChoice("No...", -1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
SetupTokens();
}
}
else
{
int nChoice = GetChoice(oPC);
if (nStage == STAGE_LIST)
{
SetLocalInt(oPC, "cs_selected", nChoice);
SetStage(STAGE_CONFIRM, oPC);
}
else if (nStage == STAGE_CONFIRM)
{
if (nChoice >= 0)
{ // "Yes!" - grant the standing
string sGrant;
switch (GetLocalInt(oPC, "cs_selected"))
{
case 1:
{
//sGrant = "bg_give_low";
SetPersistantLocalInt(oPC,"CC1",BACKGROUND_LOWER);
SetPersistantLocalInt(oPC,"BG_Select",2);
SetLocalInt(oItem,"CC1",BACKGROUND_LOWER);
SetLocalInt(oItem,"BG_Select",2);
break; // Lower Class
}
case 2:
{
//sGrant = "bg_give_mid";
SetPersistantLocalInt(oPC,"CC1",BACKGROUND_MIDDLE);
SetPersistantLocalInt(oPC,"BG_Select",2);
SetLocalInt(oItem,"CC1",BACKGROUND_MIDDLE);
SetLocalInt(oItem,"BG_Select",2);
break; // Middle Class
}
case 3:
{
//sGrant = "bg_give_up";
SetPersistantLocalInt(oPC,"CC1",BACKGROUND_UPPER);
SetPersistantLocalInt(oPC,"BG_Select",2);
SetLocalInt(oItem, "CC1", BACKGROUND_UPPER);
SetLocalInt(oItem, "BG_Select", 2);
break; // Upper Class
//default: sGrant = ""; break;
}
//if (sGrant != "") ExecuteScript(sGrant, oPC);
// Conversation ends naturally; no explicit end call needed
}
}
else
{ // "No..." - return to list
SetStage(STAGE_LIST, oPC);
}
}
SetStage(nStage, oPC);
}
}
*/

788
src/nss/bg_subrace_cv.nss Normal file
View File

@@ -0,0 +1,788 @@
// bg_subrace_cv.nss
#include "inc_dynconv"
#include "x2_inc_switches"
#include "inc_persist_loca"
#include "te_afflic_func"
const int STAGE_LIST = 0;
const int STAGE_CONFIRM = 1;
string GetSubraceText(object oPC, int nChoice) {
return GetLocalString(oPC, "sub_dyn_text_" + IntToString(nChoice));
}
// Ensure the PC Data Object exists; create if missing
object EnsurePlayerDataObject(object oPC)
{
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
if (!GetIsObjectValid(oItem))
{
oItem = CreateItemOnObject("pc_data_object", oPC);
}
return oItem;
}
void main()
{
object oPC = GetPCSpeaker();
SendMessageToPC(oPC, "DEBUG: bg_subrace_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE)
{
if (!GetIsStageSetUp(nStage, oPC))
{
if (nStage == STAGE_LIST)
{
SetHeader("You will now choose your Subrace or Ethnicity. Subraces will affect what class standings you may be able to choose.\nYou can refresh the list with the Escape key if needed.");
// 1 Other (unlisted)
AddChoice("[Other]", 1, oPC);
SetLocalString(oPC, "sub_dyn_text_1",
"My ethnicity or subrace is not listed. I realize that I am likely about to play a concept that is unsupported and not recommended, but I will select this anyway.\n\nDoes this describe you?");
// 2 Human ethnicities (inline bg_chk_hum logic)
if (GetRacialType(oPC) == RACIAL_TYPE_HUMAN || GetRacialType(oPC) == RACIAL_TYPE_HALFELF)
{
AddChoice("Tethyrian", 2, oPC);
SetLocalString(oPC, "sub_dyn_text_2",
"The Tethyrian culture is a melting pot of Calishite, Chondathan, Illuskan, and Low Netherese elements. This unique background makes Tethyrians among the most tolerant, though fiercely independent, ethnic groups in Faerun. They inhabit a vast territory stretching from Calimshan to Silverymoon, and from the Sea of Swords to the Sea of Fallen Stars. Tethyrians are of medium build and height, with dusky skin that grows fairer the farther north they dwell. Their hair and eye color vary widely, but brown hair and blue eyes are the most common. Tethyrians are proud of their diverse heritage and protective of their freedom, so they tend to distrust powerful kingdoms and empires.\n\nTethyrians receive Alzhedo as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Calishite", 3, oPC);
SetLocalString(oPC, "sub_dyn_text_3",
"These humans are descended from the slaves of Calimshan's ancient genie lords, form the primary racial stock of the Border Kingdoms, the Lake of Steam cities, the Nelanther Isles, and Calimshan. Shorter and slighter in build than most other humans, Calishites have dusky brown skin, hair, and eyes. they regard themselves as the rightful rulers of all lands south and west of the Sea of Fallen Stars and look upon northern cultures as short-lived barbarian kingdoms barely worthy of notice. Most Calishites seek nothing more than a lifestyle of comfort and the respect of their peers.\n\nCalishites receive Alzhedo as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Illuskan", 4, oPC);
SetLocalString(oPC, "sub_dyn_text_4",
"The seagoing, warlike people of the Sword Coast North, the Trackless Sea, and the Dessarin river valley, Illuskans are fall, fair-skinned folk with blue or steely gray eyes. Among the islands of the Trackless Sea and Icewind Dale, their hair color tends towards blond, red, or light brown. On the mainland south of the Spine of the World, however, raven-black hair is most common. Illuskans are proud, particularly of their ability to survive in the harsh environment of their northern homelands, and they regard most southerners as weak and decadent. Illuskans make their living as farmers, fishers, miners, sailors, raiders, skalds, and runecasters.\n\nThe Illuskans receive Illuskan as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Rashemi", 5, oPC);
SetLocalString(oPC, "sub_dyn_text_5",
"These humans are tough, sturdy, and well adapted to life in the harsh and dangerous northeastern reaches of Faerun. They are descended from the nomadic tribes that won the Orcgate Wars and built the empire of Raumathar. Not only do the Rashemis dominate Rashemen and Thay, they also form significant minorities in Aglarond, the Endless Wastes, Thesk, and the Wizards' Reach region. Rashemis tend to be short, stout, and muscular, and they usually have dusky skin, dark eyes, and thick, black hair. They cherish their strong ties to their land, appreciating its beauty while respecting its harshness. They display little of the arrogance that marks other groups whose ancestors once ruled empires.\n\nRashemi receive Rashemi as a bonus language.\n\nDoes this describe you?");
AddChoice("Shou", 6, oPC);
SetLocalString(oPC, "sub_dyn_text_6",
"Little is known of the Shou - and in western Faerun it is assumed that they are the only racial group of the far-distant Kara-Tur. It is rare to see a Shou outside of the far east. Shou have a bronzed-yellow skin tones and typically have black hair with broad, flat features.\n\nShou do not receive any bonus language.\n\nDoes this describe you?");
AddChoice("Maztican", 7, oPC);
SetLocalString(oPC, "sub_dyn_text_7",
"After the Helmite conquest in Maztica, many people of the differing tribes lumped together by the Easterners began to immigrate to the old world and see what wonders lied across the Trackless Sea. Truely a people displaced, Mazticans are unfamiliar with the customs of the Tethyrians or the Chondathans. Rumors of Helmite abuse and exploitation in Maztica are common, much more common than the sight of a simple Maztican.\n\nDoes this describe you?");
AddChoice("Chultan", 8, oPC);
SetLocalString(oPC, "sub_dyn_text_8",
"The jungles of Chult are a harsh and unforgiving land that forged together the many disparate tribes of the peninsula into one single culture more than a millennia ago. Most Chultans distrust power and wealth, believing that things that they cannot take with them are ultimately worthless. It is rare to see a Chultan separated from their clan. Chultans are tall and ebony-skinned.\n\nDoes this describe you?");
AddChoice("Chondathan", 9, oPC);
SetLocalString(oPC, "sub_dyn_text_9",
"Descended from the natives of the Vilhon Reach, these hardy folk have spread to settle most of the western and central Inner Sea region and much of the Western Heartlands. Chondathans form the primary racial stock of Altumbel, Cormyr, the southern Dalelands, the Dragon Coast, the Great Dale, Hlondeth and both shores of the Vilhon Reach, the Pirate Isles of the Inner Sea, Sembia, and Sespech. They are slender, tawny-skinned folk with brown hair that ranges from almost blond to almost black. Most are tall and have green or brown eyes, but these traits are hardly universal. \n\nDoes this describe you?");
AddChoice("Damaran", 10, oPC);
SetLocalString(oPC, "sub_dyn_text_10",
"Proud and stubborn, these humans were born from some scattered remnants of Narfell's fall - primarily groups of Nars, Rashemis, and Sossrims who struggled to survive while waves of Chondathan emigrants settled in the lands of the Easting Reach. These four populations gradually coalesced into a new ethnic group that now makes up the primary racial stock of Damara, Impiltur, Thesk, and the Vast. Damarans are of moderate height and build, with skin hues ranging from tawny to fair. Their hair is usually brown or black, and their eye color varies widely, though brown is most common. Damarans see the world in stark contrasts - unspeakable evil opposed by indomitable and uncompromising good. \n\nDoes this describe you?");
AddChoice("Mulan", 11, oPC);
SetLocalString(oPC, "sub_dyn_text_11",
"Members of this ethnic group have dominated the eastern shores of the Sea of Fallen stars since the fall of ancient Ilmaskar. At various times in their long history, they have made up at least the ruling elite of Ashanath, Chessenta, the Eastern Shaar, Murghom, Rashemen, Semphar, Thay, Thesk, and the Wizards' Reach cities south of the Yuirwood. Mulan are generally tall, slim, and sallow-skinned with eyes of hazel or brown. Their hair ranges from black to dark brown, but all nobles and many other Mulan routinely shave off all of their hair. As a race, Mulan are arrogant, conservative, and convinced of their cultural superiority over the rest of Faerun.\n\nMulan receive Mulanese as a bonus language.\n\nDoes this describe you?");
AddChoice("Ffolk", 12, oPC);
SetLocalString(oPC, "sub_dyn_text_12",
"These humans are descended from Tethyrians who migrated from the Western Heartlands to the Moonshae Isles. They are generally hostile to the Illuskans who are seen as invaders to the Moonshae Isles, though, most of the Ffolk speak Illuskan and use the Thorass script. More so than many other cultural groups, the Ffolk are governed by a strong druidical tradition that permeates their society. Due to their Tethyrian heritage, the ffolk tend to have darker skin and hair when compared to Illuskans or Chondathans.\n\nThe Ffolk receive Talfiric as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Imaskari", 13, oPC);
SetLocalString(oPC, "sub_dyn_text_13",
"Before the rise of the Mulan in the great deserts, the Imaskari ruled in a great empire rumored to stretch across the east. But that is all that remains of the Imaskari - rumors and what little of their culture has been preserved by the Mulan.\n\nDoes this describe you?");
AddChoice("Shaaran", 14, oPC);
SetLocalString(oPC, "sub_dyn_text_14",
"The Shaarans are the group of humans native to the steepes of the Shaar region. A simple, nomadic culture based on clan loyalty, they were once considered part of the Shoon Imperium before the ancient empire allowed them to rebel in the fifth century. Shaarans are long-faced with a yellow-tanned skin. They speak Shaaran and most do not read or write.\n\nDoes this describe you?");
}
// 3 Elf subraces (bg_chk_elf logic)
if (GetRacialType(oPC) == RACIAL_TYPE_ELF)
{
AddChoice("Moon Elf", 15, oPC);
SetLocalString(oPC, "sub_dyn_text_15",
"Silver Elves are the most common sort of elves in Faerun, also called Moon Elves they have fair skin and hair of silver-white, black or blue. Their eyes are blue or green with gold flecks. They are the elven subrace most tolerant of human kind, and most half-elves are descended from Silver Elves. These elves are a minority in Tethyr and might be regarded as soft or alien by the Copper and Green elves that inhabit the Wealdath.\n\nDoes this describe you?");
AddChoice("Sun Elf", 16, oPC);
SetLocalString(oPC, "sub_dyn_text_16",
"Gold Elves are less common across Faerun than Silver Elves, because most live on Evermeet, where non-elves are not allowed. Also called Sun Elves, they have bronze skin, golden-blond, copper or black hair and green or gold eyes. These are seen as the most civilized and haughty elves, preferring to remain separate from non-elven races. Seeing a Gold Elf is typically more rare than a Dark Elf in the Lands of Intrigue.\n\nDoes this describe you?");
AddChoice("Wild Elf", 17, oPC);
SetLocalString(oPC, "sub_dyn_text_17",
"The very rare Green Elves, also called Wild Elves, are rarely seen by others because they live in the heart of the Wealdath Forest. They possess incredible skill at keeping hidden. Their skin tends to be dark brown and their hair ranges from black to light brown, lightening to silvery-white with age. Although less numerous than Copper Elves, they are the second most populous type of elf in the region of Old Noromath.\n\nDoes this describe you?");
AddChoice("Wood Elf", 18, oPC);
SetLocalString(oPC, "sub_dyn_text_18",
"Wood Elves, also called Copper Elves, are reclusive but less so than their cousins - the almost feral Wild Elves. They have copper colored skin tinged with green. They have brown, green or hazel colored eyes. Their hair is usually brown or black with blond and coppery red occasionally found. Copper Elves are the most numerous type of elf in Northern Tethyr.\n\nDoes this describe you?");
AddChoice("Dark Elf (Drow)", 19, oPC);
SetLocalString(oPC, "sub_dyn_text_19",
"Descended from the original dark-skinned elven subrace known as Illythiiri, the Dark Elves were cursed into their present appearance by the good elven deities for following the goddess Lolth down the path to evil and corruption. Also called the Drow, they have black skin that resembles polished obsidian and stark white or pale yellow hair. Dark Elves found in Tethyr have likely been forced from their subterranean home of the Underdark, unable to return for many varied reasons.\n\nECL +2\n\nDoes this describe you?");
AddChoice("Fey'ri", 20, oPC);
SetLocalString(oPC, "sub_dyn_text_20",
"NOT FULLY IMPLEMENTED\n\nThe result of four noble Sun Elf houses breeding with demons in an attempt to strengthen the Dlardrageth bloodline, the Fey'ri are type of planetouched that breeds only amongst themselves. Once a prominent Elven House in Cormanthyr, the Fey'ri have been involved in various schemes and remain reviled throughout the realms since these times.\n\nECL +3\n\nDoes this describe you?");
}
// 4 Dwarf subraces (bg_chk_dwarf logic)
if (GetRacialType(oPC) == RACIAL_TYPE_DWARF)
{
AddChoice("Shield Dwarf - Default/Recommended", 21, oPC);
SetLocalString(oPC, "sub_dyn_text_21",
"The sculpted halls and echoing chambers of Dwarven Kingdoms are scattered through the Underdark like forgotten necklaces of semiprecious stones. Dwarven Kingdoms such as Xonathanur, Oghrann, and Gharraghaur taught the less civilized races of Faerun what it meant to hold and wield power. Unlike the ancient human empires, the Dwarves distrusted magic - so they were never seduced to the heights of magical folly that toppled Netheril and Imaskar. Instead, the Dwarves became locked in eternal wars with goblin kind and the other dwellers of the Underdark. One by one, the empires of the North failed - leaving only scattered survivors in the mountains or unconquered sections of the Underdark.\n\nDoes this describe you?");
AddChoice("Gold Dwarf", 22, oPC);
SetLocalString(oPC, "sub_dyn_text_22",
"Unlike the Shield Dwarves, the Gold Dwarves maintained their Great Kingdom in the Rift and did not decline in terrible wars against evil humanoids. While they practiced some magic, they never acquired the hubris that caused the downfall of some human nations. Confident and secure in their remote home the Gold Dwarves gained a reputation for haughtiness and pride.\n\nDoes this describe you?");
AddChoice("Gray Dwarf (Duergar)", 23, oPC);
SetLocalString(oPC, "sub_dyn_text_23",
"Long ago, mindflayers conquered the strongholds of Clan Duergar of the Dwarven Kingdom of Shanatar. After generations of enslavement and cruel experimentation at the hands of the Illithids, the Duergar rose against their masters and regained their freedom. They emerged as a new subrace of Dwarf with limited magical powers. Many Grey Dwarves have escaped the Underdark for the promise of a better life on the surface - only to be met with extreme prejudice. Their only hope is now to reclaim their ancient Kingdom of Shanatar and the Wyrmskull Throne - located beneath Tethyr. \n\nECL +2\n\nDoes this describe you?");
}
// 5 Gnome subraces (bg_chk_gnome logic)
if (GetRacialType(oPC) == RACIAL_TYPE_GNOME)
{
AddChoice("Rock Gnome", 24, oPC);
SetLocalString(oPC, "sub_dyn_text_24",
"Rock gnomes are the gnomes that most people are familiar with. When someone refers to a \"gnome\", they are almost certainly refering to a Rock Gnome. Unlike their cousins, Rock Gnomes are found across Faerun and integrate well into the rolling countryside towns found across Tethyr and the Heartlands. Most rock gnomes are friendly and fond of jokes or pranks and find work as technicians, alchemists, and inventors when not found as exceptional Illusionist Wizards.\n\nDoes this describe you?");
AddChoice("Forest Gnome", 25, oPC);
SetLocalString(oPC, "sub_dyn_text_25",
"Forest gnomes are exceptionally shy in comparison to the well-known Rock Gnomes. Often times, Forest Gnomes can live side by side with civilizations without ever being discovered or uncovered. Forest gnomes have a great love for nature and are extremely private, prefering to be left alone whenever possible.\n\nECL +1\n\nDoes this describe you?");
AddChoice("Deep Gnome (Svirfneblin)", 26, oPC);
SetLocalString(oPC, "sub_dyn_text_26",
"The Deep Gnomes are often counted among the evil creatures within the Underdark, however they are no more evil than any other rock gnome common on the surface. Centuries of dealing with the threats and poor conditions of the Underdarked have made them extremely distrustful of outsiders and make their appearance outside of their small communities exceptionally rare.\n\nECL +3\n\nDoes this describe you?");
}
// 6 Halfling subraces (bg_chk_halfling logic)
if (GetRacialType(oPC) == RACIAL_TYPE_HALFLING)
{
AddChoice("Lightfoot Halfling", 27, oPC);
SetLocalString(oPC, "sub_dyn_text_27",
"Most of the halflings encountered in Faerun are the Lightfoot halflings. They are the most numerous and widely traveled group across Faerun. Their behavior is highly varied, and adaptable to whatever society they find themselves in. No lightfoot can be compared with another, because of these widely diverse view points about the world, leadingto a roaming lifestyle where entire families may decide to simply leave on a whim when their minds change.\n\nDoes this describe you?");
AddChoice("Strongheart Halfling", 28, oPC);
SetLocalString(oPC, "sub_dyn_text_28",
"The Strongheart halflings are the clans that decided to remain in their homeland of Luiren. Most Stronghearts will form communities but maintain and nomadic lifestyle within these communities. It is not uncommon for a Strongheart halfling to travel between communities to satisfy some form of wanderlust.\n\nDoes this describe you?");
AddChoice("Ghostwise Halfling", 29, oPC);
SetLocalString(oPC, "sub_dyn_text_29",
"The ghostwise are some of the most uncommon halflings one might encounter in Faerun. Most make their home in the Chondalwood and prefer to pursue a nomadic lifestyle in the forests. Clan loyalty is of the outmost importance to a Ghostwise Halfling, and the most likely reason for seeing a Ghostwise halfling outside of the Chondalwood is expulsion and exile.\n\nDoes this describe you?");
}
// 8 Other (bg_chk_oth logic)
if ((GetRacialType(oPC) == RACIAL_TYPE_HUMAN || GetRacialType(oPC) == RACIAL_TYPE_HALFELF || GetRacialType(oPC) == RACIAL_TYPE_HALFORC) && GetAbilityScore(oPC,ABILITY_CHARISMA, TRUE) >= 11)
{
AddChoice("Tiefling", 30, oPC);
SetLocalString(oPC, "sub_dyn_text_30",
"Because they are descended from evil outsiders, those who know of their ancestry must immediately consider most Tieflings evil and untrustworthy, although this is not always the case. Some tieflings have a minor physical trait suggesting their heritage, such as pointed teeth, red eyes, small horns, the odor of brimstone, cloven feet, or just an unnatural aura of wrongness. Tieflings, like Aasimar, are feared and considered outcasts by most of Tethyrian society.\n\nDoes this describe you?");
AddChoice("Aasimar", 31, oPC);
SetLocalString(oPC, "sub_dyn_text_31",
"Carrying the blood of a Celestial, an Aasimar is usually good-aligned and fights against evil in the world. Some have a minor physical trait suggesting their heritage, such as silver hair, golden eyes, or an unnaturally intense stare. Aasimar, like Tieflings, are feared and considered outcasts by most of Tethyrian society.\n\nDoes this describe you?");
}
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
else if (nStage == STAGE_CONFIRM)
{
int nSelected = GetLocalInt(oPC, "sub_selected");
SetHeader(GetSubraceText(oPC, nSelected) + "\n\nIs this correct?");
AddChoice("Yes", 0, oPC);
AddChoice("No", 1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
}
SetupTokens();
}
else
{
int nChoice = GetChoice(oPC);
if (nStage == STAGE_LIST)
{
SetLocalInt(oPC, "sub_selected", nChoice);
nStage = STAGE_CONFIRM; // update local nStage
}
else if (nStage == STAGE_CONFIRM)
{
if (nChoice == 0) { // Yes sub_selected");
int nSelected = GetLocalInt(oPC, "sub_selected");
object oItem = EnsurePlayerDataObject(oPC);
switch (nSelected)
{
// Ethnicities
case 1:
{
//sGrant = "bg_ethn_other";
SetLocalInt(oItem,"CC0",ETHNICITY_OTHER);
SetLocalInt(oItem,"BG_Select",1);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_OTHER);
SetPersistantLocalInt(oPC,"BG_Select",1);
break; // Other
}
case 2:
{
//sGrant = "bg_ethn_tethyr";
SetLocalInt(oItem,"CC0",ETHNICITY_TETHYRIAN);
SetLocalInt(oItem,"BG_Select",2);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_TETHYRIAN);
SetPersistantLocalInt(oPC,"BG_Select",2);
break; // Tethyrian
}
case 3:
{
//sGrant = "bg_ethn_calish";
SetLocalInt(oItem,"CC0",ETHNICITY_CALISHITE);
SetLocalInt(oItem,"BG_Select",3);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_CALISHITE);
SetPersistantLocalInt(oPC,"BG_Select",3);
break; // Calishite
}
case 4:
{
//sGrant = "bg_ethn_illusk";
SetLocalInt(oItem,"CC0",ETHNICITY_ILLUSKAN);
SetLocalInt(oItem,"BG_Select",4);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_ILLUSKAN);
SetPersistantLocalInt(oPC,"BG_Select",4);
break; // Illuskan
}
case 5:
{
//sGrant = "bg_ethn_rashemi";
SetLocalInt(oItem,"CC0",ETHNICITY_RASHEMI);
SetLocalInt(oItem,"BG_Select",5);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_RASHEMI);
SetPersistantLocalInt(oPC,"BG_Select",5);
break; // Rashemi
}
case 6:
{
//sGrant = "bg_ethn_shou";
SetLocalInt(oItem,"CC0",ETHNICITY_SHOU);
SetLocalInt(oItem,"BG_Select",6);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_SHOU);
SetPersistantLocalInt(oPC,"BG_Select",6);
break; // Shou
}
case 7:
{
//sGrant = "bg_ethn_mazti";
SetLocalInt(oItem,"CC0",ETHNICITY_MAZTILAN);
SetLocalInt(oItem,"BG_Select",7);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_MAZTILAN);
SetPersistantLocalInt(oPC,"BG_Select",7);
break; // Maztilan
}
case 8:
{
//sGrant = "bg_ethn_chult";
SetLocalInt(oItem,"CC0",ETHNICITY_CHULTAN);
SetLocalInt(oItem,"BG_Select",8);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_CHULTAN);
SetPersistantLocalInt(oPC,"BG_Select",8);
break; // Chultan
}
case 9:
{
//sGrant = "bg_ethn_chond";
SetLocalInt(oItem,"CC0",ETHNICITY_CHONDATHAN);
SetLocalInt(oItem,"BG_Select",9);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_CHONDATHAN);
SetPersistantLocalInt(oPC,"BG_Select",9);
break; // Chondathan
}
case 10:
{
//sGrant = "bg_ethn_damar";
SetLocalInt(oItem,"CC0",ETHNICITY_DAMARAN);
SetLocalInt(oItem,"BG_Select",10);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_DAMARAN);
SetPersistantLocalInt(oPC,"BG_Select",10);
break; // Damaran
}
case 11:
{
//sGrant = "bg_ethn_mulan";
SetLocalInt(oItem,"CC0",ETHNICITY_MULAN);
SetLocalInt(oItem,"BG_Select",11);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_MULAN);
SetPersistantLocalInt(oPC,"BG_Select",11);
break; // Mulan (duplicate)
}
case 12:
{
//sGrant = "bg_ethn_ffolk";
SetLocalInt(oItem,"CC0",ETHNICITY_FFOLK);
SetLocalInt(oItem,"BG_Select",12);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_FFOLK);
SetPersistantLocalInt(oPC,"BG_Select",12);
break; // Ffolk
}
case 13:
{
//sGrant = "bg_ethn_imask";
SetLocalInt(oItem,"CC0",ETHNICITY_IMASKARI);
SetLocalInt(oItem,"BG_Select",13);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_IMASKARI);
SetPersistantLocalInt(oPC,"BG_Select",13);
break; // Imaskari
}
case 14:
{
//sGrant = "bg_ethn_mazti";
SetLocalInt(oItem,"CC0",ETHNICITY_SHAARAN);
SetLocalInt(oItem,"BG_Select",14);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_SHAARAN);
SetPersistantLocalInt(oPC,"BG_Select",14);
break; // Shaaran
}
// Elves
case 15:
{
//sGrant = "bg_give_elfsilv";
SetLocalInt(oItem,"CC0",BACKGROUND_SILVER_ELF);
SetLocalInt(oItem,"BG_Select",15);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_SILVER_ELF);
SetPersistantLocalInt(oPC,"BG_Select",15);
break; // Moon Elf
}
case 16:
{
//sGrant = "bg_give_elfgold";
SetLocalInt(oItem,"CC0",BACKGROUND_GOLD_ELF);
SetLocalInt(oItem,"BG_Select",16);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_GOLD_ELF);
SetPersistantLocalInt(oPC,"BG_Select",16);
break; // Sun Elf
}
case 17:
{
//sGrant = "bg_give_elfgre";
SetLocalInt(oItem,"CC0",BACKGROUND_GREEN_ELF);
SetLocalInt(oItem,"BG_Select",17);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_GREEN_ELF);
SetPersistantLocalInt(oPC,"BG_Select",71);
break; // Wild Elf
}
case 18:
{
//sGrant = "bg_give_elfcop";
SetLocalInt(oItem,"CC0",BACKGROUND_COPPER_ELF);
SetLocalInt(oItem,"BG_Select",18);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_COPPER_ELF);
SetPersistantLocalInt(oPC,"BG_Select",18);
break; // Wood Elf
}
case 19:
{
//sGrant = "bg_give_elfdark";
SetLocalInt(oItem,"CC0",BACKGROUND_DARK_ELF);
SetLocalInt(oItem,"BG_Select",19);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_DARK_ELF);
SetPersistantLocalInt(oPC,"BG_Select",19);
break; // Dark Elf (Drow)
}
case 20:
{
//sGrant = "bg_give_elffeyri";
SetLocalInt(oItem,"CC0",ETHNICITY_FEYRI);
SetLocalInt(oItem,"BG_Select",20);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_FEYRI);
SetPersistantLocalInt(oPC,"BG_Select",20);
break; // Fey'ri
}
// Dwarves
case 21:
{
//sGrant = "bg_give_dwashiel";
SetLocalInt(oItem,"CC0",BACKGROUND_SHIELD_DWARF);
SetLocalInt(oItem,"BG_Select",21);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_SHIELD_DWARF);
SetPersistantLocalInt(oPC,"BG_Select",21);
break; // Shield Dwarf
}
case 22:
{
//sGrant = "bg_give_dwagold";
SetLocalInt(oItem,"CC0",BACKGROUND_GOLD_DWARF);
SetLocalInt(oItem,"BG_Select",22);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_GOLD_DWARF);
SetPersistantLocalInt(oPC,"BG_Select",22);
break; // Gold Dwarf
}
case 23:
{
//sGrant = "bg_give_dwagrey";
SetLocalInt(oItem,"CC0",BACKGROUND_GREY_DWARF);
SetLocalInt(oItem,"BG_Select",23);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_GREY_DWARF);
SetPersistantLocalInt(oPC,"BG_Select",23);
break; // Gray Dwarf (Duergar)
}
// Gnomes
case 24:
{
//sGrant = "bg_give_gnrock";
SetLocalInt(oItem,"CC0",ETHNICITY_ROCK_GNOME);
SetLocalInt(oItem,"BG_Select",24);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_ROCK_GNOME);
SetPersistantLocalInt(oPC,"BG_Select",24);
break; // Rock Gnome
}
case 25:
{
//sGrant = "bg_give_gnfor";
SetLocalInt(oItem,"CC0",ETHNICITY_FOREST_GNOME);
SetLocalInt(oItem,"BG_Select",25);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_FOREST_GNOME);
SetPersistantLocalInt(oPC,"BG_Select",25);
break; // Forest Gnome
}
case 26:
{
//sGrant = "bg_give_gndeep";
SetLocalInt(oItem,"CC0",ETHNICITY_DEEP_GNOME);
SetLocalInt(oItem,"BG_Select",26);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_DEEP_GNOME);
SetPersistantLocalInt(oPC,"BG_Select",26);
break; // Deep Gnome
}
// Halflings
case 27:
{
//sGrant = "bg_give_hllight";
SetLocalInt(oItem,"CC0",ETHNICITY_LIGHTFOOT);
SetLocalInt(oItem,"BG_Select",27);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_LIGHTFOOT);
SetPersistantLocalInt(oPC,"BG_Select",27);
break; // Lightfoot
}
case 28:
{
//sGrant = "bg_give_hlstrong";
SetLocalInt(oItem,"CC0",ETHNICITY_STRONGHEART);
SetLocalInt(oItem,"BG_Select",28);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_STRONGHEART);
SetPersistantLocalInt(oPC,"BG_Select",28);
break; // Strongheart
}
case 29:
{
//sGrant = "bg_give_hlghost";
SetLocalInt(oItem,"CC0",ETHNICITY_GHOSTWISE);
SetLocalInt(oItem,"BG_Select",29);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_GHOSTWISE);
SetPersistantLocalInt(oPC,"BG_Select",29);
break; // Ghostwise
}
// Other races
case 30:
{
//sGrant = "bg_give_tiefling";
SetLocalInt(oItem,"CC0",BACKGROUND_TIEFLING);
SetLocalInt(oItem,"BG_Select",30);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_TIEFLING);
SetPersistantLocalInt(oPC,"BG_Select",30);
break; // Tiefling
}
case 31:
{
//sGrant = "bg_give_aasimar";
SetLocalInt(oItem,"CC0",BACKGROUND_AASIMAR);
SetLocalInt(oItem,"BG_Select",31);
SetPersistantLocalInt(oPC,"CC0",BACKGROUND_AASIMAR);
SetPersistantLocalInt(oPC,"BG_Select",31);
break; // Aasimar
}
}
AllowExit(DYNCONV_EXIT_FORCE_EXIT, TRUE, oPC);
SetPersistantLocalInt(oPC, "CC0_DONE", 1);
DelayCommand(0.1f, StartDynamicConversation("bg_soclass_cv", oPC));
}
else
{ // No
MarkStageNotSetUp(STAGE_LIST, oPC);
MarkStageNotSetUp(STAGE_CONFIRM, oPC);
nStage = STAGE_LIST; // update local nStage
}
}
SetStage(nStage, oPC);
}
}
/*
void main() {
object oPC = GetPCSpeaker();
object oItem = EnsurePlayerDataObject(oPC);
SendMessageToPC(oPC, "DEBUG: bg_subrace_cv main() entered");
WriteTimestampedLogEntry("DEBUG: bg_subrace_cv main() entered");
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
int nStage = GetStage(oPC);
// Required guard: abort if nValue is 0
if (nValue == 0) return;
if (nValue == DYNCONV_SETUP_STAGE)
{
if (!GetIsStageSetUp(nStage, oPC))
{
if (nStage == STAGE_LIST)
{
SetHeader("You will now choose your Subrace or Ethnicity. Subraces will affect what class standings you may be able to choose.\nYou can refresh the list with the Escape key if needed.");
// 1 Other (unlisted)
AddChoice("[Other]", 1, oPC);
SetLocalString(oPC, "sub_dyn_text_1",
"My ethnicity or subrace is not listed. I realize that I am likely about to play a concept that is unsupported and not recommended, but I will select this anyway.\n\nDoes this describe you?");
// 2 Human ethnicities (inline bg_chk_hum logic)
if (GetRacialType(oPC) == RACIAL_TYPE_HUMAN || GetRacialType(oPC) == RACIAL_TYPE_HALFELF)
{
AddChoice("Tethyrian", 2, oPC);
SetLocalString(oPC, "sub_dyn_text_2",
"The Tethyrian culture is a melting pot of Calishite, Chondathan, Illuskan, and Low Netherese elements. This unique background makes Tethyrians among the most tolerant, though fiercely independent, ethnic groups in Faerun. They inhabit a vast territory stretching from Calimshan to Silverymoon, and from the Sea of Swords to the Sea of Fallen Stars. Tethyrians are of medium build and height, with dusky skin that grows fairer the farther north they dwell. Their hair and eye color vary widely, but brown hair and blue eyes are the most common. Tethyrians are proud of their diverse heritage and protective of their freedom, so they tend to distrust powerful kingdoms and empires.\n\nTethyrians receive Alzhedo as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Calishite", 3, oPC);
SetLocalString(oPC, "sub_dyn_text_3",
"These humans are descended from the slaves of Calimshan's ancient genie lords, form the primary racial stock of the Border Kingdoms, the Lake of Steam cities, the Nelanther Isles, and Calimshan. Shorter and slighter in build than most other humans, Calishites have dusky brown skin, hair, and eyes. they regard themselves as the rightful rulers of all lands south and west of the Sea of Fallen Stars and look upon northern cultures as short-lived barbarian kingdoms barely worthy of notice. Most Calishites seek nothing more than a lifestyle of comfort and the respect of their peers.\n\nCalishites receive Alzhedo as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Illuskan", 4, oPC);
SetLocalString(oPC, "sub_dyn_text_4",
"The seagoing, warlike people of the Sword Coast North, the Trackless Sea, and the Dessarin river valley, Illuskans are fall, fair-skinned folk with blue or steely gray eyes. Among the islands of the Trackless Sea and Icewind Dale, their hair color tends towards blond, red, or light brown. On the mainland south of the Spine of the World, however, raven-black hair is most common. Illuskans are proud, particularly of their ability to survive in the harsh environment of their northern homelands, and they regard most southerners as weak and decadent. Illuskans make their living as farmers, fishers, miners, sailors, raiders, skalds, and runecasters.\n\nThe Illuskans receive Illuskan as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Rashemi", 5, oPC);
SetLocalString(oPC, "sub_dyn_text_5",
"These humans are tough, sturdy, and well adapted to life in the harsh and dangerous northeastern reaches of Faerun. They are descended from the nomadic tribes that won the Orcgate Wars and built the empire of Raumathar. Not only do the Rashemis dominate Rashemen and Thay, they also form significant minorities in Aglarond, the Endless Wastes, Thesk, and the Wizards' Reach region. Rashemis tend to be short, stout, and muscular, and they usually have dusky skin, dark eyes, and thick, black hair. They cherish their strong ties to their land, appreciating its beauty while respecting its harshness. They display little of the arrogance that marks other groups whose ancestors once ruled empires.\n\nRashemi receive Rashemi as a bonus language.\n\nDoes this describe you?");
AddChoice("Shou", 6, oPC);
SetLocalString(oPC, "sub_dyn_text_6",
"Little is known of the Shou - and in western Faerun it is assumed that they are the only racial group of the far-distant Kara-Tur. It is rare to see a Shou outside of the far east. Shou have a bronzed-yellow skin tones and typically have black hair with broad, flat features.\n\nShou do not receive any bonus language.\n\nDoes this describe you?");
AddChoice("Tashalarran", 7, oPC);
SetLocalString(oPC, "sub_dyn_text_7",
"Members of this ethnic group have dominated the eastern shores of the Sea of Fallen stars since the fall of ancient Ilmaskar. At various times in their long history, they have made up at least the ruling elite of Ashanath, Chessenta, the Eastern Shaar, Murghom, Rashemen, Semphar, Thay, Thesk, and the Wizards' Reach cities south of the Yuirwood. Mulan are generally tall, slim, and sallow-skinned with eyes of hazel or brown. Their hair ranges from black to dark brown, but all nobles and many other Mulan routinely shave off all of their hair. As a race, Mulan are arrogant, conservative, and convinced of their cultural superiority over the rest of Faerun.\n\nMulan receive Mulanese as a bonus language.\n\nDoes this describe you?");
AddChoice("Chultan", 8, oPC);
SetLocalString(oPC, "sub_dyn_text_8",
"The jungles of Chult are a harsh and unforgiving land that forged together the many disparate tribes of the peninsula into one single culture more than a millennia ago. Most Chultans distrust power and wealth, believing that things that they cannot take with them are ultimately worthless. It is rare to see a Chultan separated from their clan. Chultans are tall and ebony-skinned.\n\nDoes this describe you?");
AddChoice("Chondathan", 9, oPC);
SetLocalString(oPC, "sub_dyn_text_9",
"Descended from the natives of the Vilhon Reach, these hardy folk have spread to settle most of the western and central Inner Sea region and much of the Western Heartlands. Chondathans form the primary racial stock of Altumbel, Cormyr, the southern Dalelands, the Dragon Coast, the Great Dale, Hlondeth and both shores of the Vilhon Reach, the Pirate Isles of the Inner Sea, Sembia, and Sespech. They are slender, tawny-skinned folk with brown hair that ranges from almost blond to almost black. Most are tall and have green or brown eyes, but these traits are hardly universal. \n\nDoes this describe you?");
AddChoice("Damaran", 10, oPC);
SetLocalString(oPC, "sub_dyn_text_10",
"Proud and stubborn, these humans were born from some scattered remnants of Narfell's fall - primarily groups of Nars, Rashemis, and Sossrims who struggled to survive while waves of Chondathan emigrants settled in the lands of the Easting Reach. These four populations gradually coalesced into a new ethnic group that now makes up the primary racial stock of Damara, Impiltur, Thesk, and the Vast. Damarans are of moderate height and build, with skin hues ranging from tawny to fair. Their hair is usually brown or black, and their eye color varies widely, though brown is most common. Damarans see the world in stark contrasts - unspeakable evil opposed by indomitable and uncompromising good. \n\nDoes this describe you?");
AddChoice("Mulan", 11, oPC);
SetLocalString(oPC, "sub_dyn_text_11",
"Members of this ethnic group have dominated the eastern shores of the Sea of Fallen stars since the fall of ancient Ilmaskar. At various times in their long history, they have made up at least the ruling elite of Ashanath, Chessenta, the Eastern Shaar, Murghom, Rashemen, Semphar, Thay, Thesk, and the Wizards' Reach cities south of the Yuirwood. Mulan are generally tall, slim, and sallow-skinned with eyes of hazel or brown. Their hair ranges from black to dark brown, but all nobles and many other Mulan routinely shave off all of their hair. As a race, Mulan are arrogant, conservative, and convinced of their cultural superiority over the rest of Faerun.\n\nMulan receive Mulanese as a bonus language.\n\nDoes this describe you?");
AddChoice("Ffolk", 12, oPC);
SetLocalString(oPC, "sub_dyn_text_12",
"These humans are descended from Tethyrians who migrated from the Western Heartlands to the Moonshae Isles. They are generally hostile to the Illuskans who are seen as invaders to the Moonshae Isles, though, most of the Ffolk speak Illuskan and use the Thorass script. More so than many other cultural groups, the Ffolk are governed by a strong druidical tradition that permeates their society. Due to their Tethyrian heritage, the ffolk tend to have darker skin and hair when compared to Illuskans or Chondathans.\n\nThe Ffolk receive Talfiric as a bonus language automatically.\n\nDoes this describe you?");
AddChoice("Imaskari", 13, oPC);
SetLocalString(oPC, "sub_dyn_text_13",
"Before the rise of the Mulan in the great deserts, the Imaskari ruled in a great empire rumored to stretch across the east. But that is all that remains of the Imaskari - rumors and what little of their culture has been preserved by the Mulan.\n\nDoes this describe you?");
AddChoice("Shaaran", 14, oPC);
SetLocalString(oPC, "sub_dyn_text_14",
"The Shaarans are the group of humans native to the steepes of the Shaar region. A simple, nomadic culture based on clan loyalty, they were once considered part of the Shoon Imperium before the ancient empire allowed them to rebel in the fifth century. Shaarans are long-faced with a yellow-tanned skin. They speak Shaaran and most do not read or write.\n\nDoes this describe you?");
}
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
else if (nStage == STAGE_CONFIRM)
{
int nSelected = GetLocalInt(oPC, "sub_selected");
SetHeader(GetSubraceText(oPC, nSelected));
AddChoice("Yes!", nSelected, oPC);
AddChoice("No...", -1, oPC);
MarkStageSetUp(nStage, oPC);
SetDefaultTokens();
}
SetupTokens();
}
}
else
{
SendMessageToPC(oPC, "DEBUG: Handling response, nStage=" + IntToString(nStage) + ", nChoice=" + IntToString(GetChoice(oPC)));
WriteTimestampedLogEntry("DEBUG: Handling response, nStage=" + IntToString(nStage) + ", nChoice=" + IntToString(GetChoice(oPC)));
int nChoice = GetChoice(oPC);
if (nStage == STAGE_LIST)
{
SendMessageToPC(oPC, "DEBUG: STAGE_LIST choice=" + IntToString(nChoice));
WriteTimestampedLogEntry("DEBUG: STAGE_LIST choice=" + IntToString(nChoice));
SetLocalInt(oPC, "sub_selected", nChoice);
nStage = STAGE_CONFIRM;
SetStage(STAGE_CONFIRM, oPC);
}
else if (nStage == STAGE_CONFIRM)
{
SendMessageToPC(oPC, "DEBUG: STAGE_CONFIRM choice=" + IntToString(nChoice));
WriteTimestampedLogEntry("DEBUG: STAGE_CONFIRM choice=" + IntToString(nChoice));
if (nChoice >= 0)
{ // "Yes!" - grant the subrace/ethnicity
SendMessageToPC(oPC, "DEBUG: STAGE_CONFIRM Yes, sub_selected=" + IntToString(GetLocalInt(oPC, "sub_selected")));
WriteTimestampedLogEntry("DEBUG: STAGE_CONFIRM Yes, sub_selected=" + IntToString(GetLocalInt(oPC, "sub_selected")));
string sGrant;
switch (GetLocalInt(oPC, "sub_selected"))
{
// Ethnicities
case 1:
{
//sGrant = "bg_ethn_other";
SetLocalInt(oItem,"CC0",ETHNICITY_OTHER);
SetLocalInt(oItem,"BG_Select",1);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_OTHER);
SetPersistantLocalInt(oPC,"BG_Select",1);
break; // Other
}
case 2:
{
//sGrant = "bg_ethn_tethyr";
SetLocalInt(oItem,"CC0",ETHNICITY_TETHYRIAN);
SetLocalInt(oItem,"BG_Select",2);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_TETHYRIAN);
SetPersistantLocalInt(oPC,"BG_Select",2);
break; // Tethyrian
}
case 3:
{
//sGrant = "bg_ethn_calish";
SetLocalInt(oItem,"CC0",ETHNICITY_CALISHITE);
SetLocalInt(oItem,"BG_Select",3);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_CALISHITE);
SetPersistantLocalInt(oPC,"BG_Select",3);
break; // Calishite
}
case 4:
{
//sGrant = "bg_ethn_illusk";
SetLocalInt(oItem,"CC0",ETHNICITY_ILLUSKAN);
SetLocalInt(oItem,"BG_Select",4);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_ILLUSKAN);
SetPersistantLocalInt(oPC,"BG_Select",4);
break; // Illuskan
}
case 5:
{
//sGrant = "bg_ethn_rashemi";
SetLocalInt(oItem,"CC0",ETHNICITY_RASHEMI);
SetLocalInt(oItem,"BG_Select",5);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_RASHEMI);
SetPersistantLocalInt(oPC,"BG_Select",5);
break; // Rashemi
}
case 6:
{
//sGrant = "bg_ethn_shou";
SetLocalInt(oItem,"CC0",ETHNICITY_SHOU);
SetLocalInt(oItem,"BG_Select",6);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_SHOU);
SetPersistantLocalInt(oPC,"BG_Select",6);
break; // Shou
}
case 7:
{
//sGrant = "bg_ethn_mulan ";
SetLocalInt(oItem,"CC0",ETHNICITY_MULAN);
SetLocalInt(oItem,"BG_Select",7);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_MULAN);
SetPersistantLocalInt(oPC,"BG_Select",7);
break; // Tashalarran (Mulan)
}
case 8:
{
//sGrant = "bg_ethn_chult";
SetLocalInt(oItem,"CC0",ETHNICITY_CHULTAN);
SetLocalInt(oItem,"BG_Select",8);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_CHULTAN);
SetPersistantLocalInt(oPC,"BG_Select",8);
break; // Chultan
}
case 9:
{
//sGrant = "bg_ethn_chond";
SetLocalInt(oItem,"CC0",ETHNICITY_CHONDATHAN);
SetLocalInt(oItem,"BG_Select",9);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_CHONDATHAN);
SetPersistantLocalInt(oPC,"BG_Select",9);
break; // Chondathan
}
case 10:
{
//sGrant = "bg_ethn_damar";
SetLocalInt(oItem,"CC0",ETHNICITY_DAMARAN);
SetLocalInt(oItem,"BG_Select",10);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_DAMARAN);
SetPersistantLocalInt(oPC,"BG_Select",10);
break; // Damaran
}
case 11:
{
//sGrant = "bg_ethn_mulan";
SetLocalInt(oItem,"CC0",ETHNICITY_MULAN);
SetLocalInt(oItem,"BG_Select",11);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_MULAN);
SetPersistantLocalInt(oPC,"BG_Select",11);
break; // Mulan (duplicate)
}
case 12:
{
//sGrant = "bg_ethn_ffolk";
SetLocalInt(oItem,"CC0",ETHNICITY_FFOLK);
SetLocalInt(oItem,"BG_Select",12);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_FFOLK);
SetPersistantLocalInt(oPC,"BG_Select",12);
break; // Ffolk
}
case 13:
{
//sGrant = "bg_ethn_imask";
SetLocalInt(oItem,"CC0",ETHNICITY_IMASKARI);
SetLocalInt(oItem,"BG_Select",13);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_IMASKARI);
SetPersistantLocalInt(oPC,"BG_Select",13);
break; // Imaskari
}
case 14:
{
SetLocalInt(oItem,"CC0",ETHNICITY_SHAARAN);
SetLocalInt(oItem,"BG_Select",14);
SetPersistantLocalInt(oPC,"CC0",ETHNICITY_SHAARAN);
SetPersistantLocalInt(oPC,"BG_Select",14);
break; // Shaaran
}
//default: sGrant = ""; break;
}
//f (sGrant != "") ExecuteScript(sGrant, oPC);
SetPersistantLocalInt(oPC, "CC0_DONE", 1);
AllowExit(DYNCONV_EXIT_FORCE_EXIT, TRUE, oPC);
DelayCommand(0.1f, StartDynamicConversation("bg_soclass_cv", oPC));
}
else
{ // "No..." - return to list
SendMessageToPC(oPC, "DEBUG: STAGE_CONFIRM No");
WriteTimestampedLogEntry("DEBUG: STAGE_CONFIRM No");
MarkStageNotSetUp(STAGE_LIST, oPC); // Mark list stage for rebuilding
MarkStageNotSetUp(STAGE_CONFIRM, oPC); // Mark confirm stage for rebuilding
SetStage(STAGE_LIST, oPC);
}
}
}
}
*/

22
src/nss/deity_akadi.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Akadi;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_amaun.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Amaunator;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_auril.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Auril;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_azuth.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Azuth;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_bane.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Bane;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_beshaba.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Beshaba;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_bhaal.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Bhaal;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Chauntea;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_cyric.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Cyric;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_deneir.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Deneir;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_dwarf.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Dwarven_Powers;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_eldath.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Eldath;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_elven.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Elven_Powers;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_finder.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Finder_Wyvernspur;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_garagos.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Garagos;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Gargauth;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_gnome.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Gnomish_Powers;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_gond.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Gond;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_grumbar.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Grumbar;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_gwaeron.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Gwaeron_Windstrom;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_half.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Halfling_Powers;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_helm.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Helm;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_hoar.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Hoar;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Ibrandul;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_ilmater.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Ilmater;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Ishtisha;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_jergal.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Jergal;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_karsus.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Karsus;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Kelemvor;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_kossuth.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Kossuth;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Lathander;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_leira.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Leira;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_lliira.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Lliira;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Loviatar;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_lurue.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Lurue;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_malar.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Malar;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_mask.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Mask;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Mielikki;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_milil.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Milil;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_moander.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Moander;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_myrkul.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Myrkul;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_mystra.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Mystra;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Nobanion;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_oghma.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Oghma;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_orc.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Orcish_Powers;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Red_Knight;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_savras.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Savras;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_selune.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Selune;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_shar.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Shar;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_sharess.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Sharess;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Shaundakul;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Shiallia;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Siamorphe;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Silvanus;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_sune.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Sune;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_talona.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Talona;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_talos.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Talos;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_tempus.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Tempus;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_torm.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Torm;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_tymora.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Tymora;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_tyr.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Tyr;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_ulutiu.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Ulutiu;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Umberlee;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Underdark_Powers;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_valkur.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Valkur;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Velsharoon;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_waukeen.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Waukeen;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

22
src/nss/deity_xvim.nss Normal file
View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: FileName BG 1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: David Novotny
//:: Created On: 10/20/17
//:://////////////////////////////////////////////
#include "NWNX_Creature"
#include "te_afflic_func"
void main()
{
object oPC = GetPCSpeaker();
int iFeat = DEITY_Xvim;
/* -- Rearranged to apply at end of CharCreation: LordValinar(12/18/2023) --
NWNX_Creature_AddFeat(oPC,iFeat);
*/
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"CC3",iFeat);
SetLocalInt(oItem,"BG_Select",4);
ActionStartConversation(oPC,"bg_language",TRUE);
}

37
src/nss/inc_alignment.nss Normal file
View File

@@ -0,0 +1,37 @@
// inc_alignment.nss
// Nine-alignment constants for general scripting
const int ALIGNMENT_LAWFUL_GOOD = 0;
const int ALIGNMENT_LAWFUL_NEUTRAL = 1;
const int ALIGNMENT_LAWFUL_EVIL = 2;
const int ALIGNMENT_NEUTRAL_GOOD = 3;
const int ALIGNMENT_TRUE_NEUTRAL = 4;
const int ALIGNMENT_NEUTRAL_EVIL = 5;
const int ALIGNMENT_CHAOTIC_GOOD = 6;
const int ALIGNMENT_CHAOTIC_NEUTRAL = 7;
const int ALIGNMENT_CHAOTIC_EVIL = 8;
// Get a creature<72>s alignment.
int GetCreaturesAlignment(object oCreature)
{
int nGE = GetAlignmentGoodEvil(oCreature);
int nLC = GetAlignmentLawChaos(oCreature);
int nBase;
switch (nGE)
{
case ALIGNMENT_GOOD: nBase = 0; break;
case ALIGNMENT_NEUTRAL: nBase = 1; break;
case ALIGNMENT_EVIL: nBase = 2; break;
default: nBase = 1; // fallback to neutral on error
}
switch (nLC)
{
case ALIGNMENT_LAWFUL: nBase += 0; break;
case ALIGNMENT_NEUTRAL: nBase += 3; break;
case ALIGNMENT_CHAOTIC: nBase += 6; break;
default: nBase += 3; // fallback to neutral on error
}
return nBase; // returns one of the nine ALIGNMENT_* constants above
}

19
src/nss/l__prep.nss Normal file
View File

@@ -0,0 +1,19 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
int nInt = GetAbilityModifier(ABILITY_INTELLIGENCE,oPC);
SetLocalInt(oItem,"nIntMod",nInt); // Is this even used? -LV
SetLocalInt(oItem,"nLangSelect",nInt);
// Resets the languages array
SetLocalString(oItem, "ARR_LANGUAGES", "");
}

26
src/nss/l_abyss_chk.nss Normal file
View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "11") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"11") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_abyssal.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "11");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,"11",1); // Abyssal
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

26
src/nss/l_abyssal_chk.nss Normal file
View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "11") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"11") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_alzhedo.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "23");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,23",1); // Alzhedo
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

26
src/nss/l_alzhedo_chk.nss Normal file
View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "23") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"23") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_chondathan.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "53");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,"53",1); // Chondathan
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "53") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"53") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_damaran.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "56");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,"56",1); // Damaran
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

26
src/nss/l_damaran_chk.nss Normal file
View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "56") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"56") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_duergar.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "64");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,"64",1); // Duergar
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

26
src/nss/l_duergar_chk.nss Normal file
View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "64") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"64") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_dwarven.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "4");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,"4",1); // Dwarven
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

26
src/nss/l_dwarven_chk.nss Normal file
View File

@@ -0,0 +1,26 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
// Make sure the player has the required feats
return (
GetLocalInt(oItem,"nLangSelect") > 0 && // Points to spend
ArrayLength(sArr) < 3 && // Array not full
ArrayIndex(sArr, "4") == -1 // This lang not already picked
);
/* -- Original Code --
if(GetLocalInt(oItem,"4") != 1 && GetLocalInt(oItem,"nLangSelect") >= 1)
{
return TRUE;
}
return FALSE;
*/
}

18
src/nss/l_elven.nss Normal file
View File

@@ -0,0 +1,18 @@
#include "lv_inc"
/*
Modified by: LordValinar (12/18/2023)
Switched method to arrays (stored until applied at the
Character Creation's finale)
*/
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "PC_Data_Object");
SetLocalInt(oItem,"BG_Select",5);
string sArr = GetLocalString(oItem, "ARR_LANGUAGES");
sArr = ArrayPush(sArr, "1");
SetLocalString(oItem, "ARR_LANGUAGES", sArr);
// SetLocalInt(oItem,"1",1); // Elven
int nInt = GetLocalInt(oItem,"nLangSelect") - 1;
SetLocalInt(oItem,"nLangSelect", nInt);
}

Some files were not shown because too many files have changed in this diff Show More