RE: Subrace field not recognized
by: DM Heatstroke, 01-10-2009 10:11 PM (#18)
Ok, here are your problem scripts, unfortunately you still aren't going to have a stable module until you can get this thing to compile with the PRC compiler.
drow_recog.nss
Codeif (GetSubRace(GetPCSpeaker())=="Drow")
Should be
Codeif (GetRacialType(GetPCSpeaker()) = 163 || 164)
duergar_recog.nss
Codeif (GetSubRace(GetPCSpeaker())=="Duergar")
Should be
Codeif (GetRacialType(GetPCSpeaker()) = 153)
entrance_port.nss & guardian_spawn.nss
(guardian_spawn.nss uses oRespawner instead of oTarget as the object, you'll have to change that manually)
Codestring sRace=GetSubRace(oTarget);
Should be
Codeint iRace = GetRacialType(oTarget);
And farther down
Codeelse
if (sRace == "Drow")
{
ExploreAreaForPlayer(GetObjectByTag("UnderdarkCentral"),oTarget);
AssignCommand(oTarget, JumpToLocation(GetLocation(GetObjectByTag ("drowstart"))));
}
else
if (sRace == "Duergar")
{
ExploreAreaForPlayer(GetObjectByTag("LaduguerHalls"),oTarget);
AssignCommand(oTarget, JumpToLocation(GetLocation(GetObjectByTag ("duergarstart"))));
Should be
Codeelse
if (iRace = 163 || 164)
{
ExploreAreaForPlayer(GetObjectByTag("UnderdarkCentral"),oTarget);
AssignCommand(oTarget, JumpToLocation(GetLocation(GetObjectByTag ("drowstart"))));
}
else
if (iRace = 153)
{
ExploreAreaForPlayer(GetObjectByTag("LaduguerHalls"),oTarget);
AssignCommand(oTarget, JumpToLocation(GetLocation(GetObjectByTag ("duergarstart"))));
hc_inc_subrace.nss
You're going to basically want to remark out this entire script. This is the one that gives & destroys the subrace items & it will conflict with the creature hides & weapons that the PRC uses.
hc_on_cl_enter.nss
Code //Setting custom factions
if (GetSubRace(oPC)=="Drow")
{
AdjustReputation(oPC,GetObjectByTag("bad_boy"),100);
if (!HasItem(oPC,"BondofH_NOD"))
AdjustReputation(oPC,GetObjectByTag("good_boy"),-100);
}
if (GetSubRace(oPC)=="Duergar")
{
AdjustReputation(oPC,GetObjectByTag("duergar_faction"),100);
if (!HasItem(oPC,"BondofH_NOD"))
AdjustReputation(oPC,GetObjectByTag("good_boy"),-100);
}
Should be
Code //Setting custom factions
if (GetRacialType(oPC) = 163 || 164)
{
AdjustReputation(oPC,GetObjectByTag("bad_boy"),100);
if (!HasItem(oPC,"BondofH_NOD"))
AdjustReputation(oPC,GetObjectByTag("good_boy"),-100);
}
if (GetRacialType(oPC) = 153)
{
AdjustReputation(oPC,GetObjectByTag("duergar_faction"),100);
if (!HasItem(oPC,"BondofH_NOD"))
AdjustReputation(oPC,GetObjectByTag("good_boy"),-100);
}
hc_on_play_death.nss
(this script doesn't take Duergar into consideration, if that is an issue, the script above can give pointers on how it should work I think)
Code if (GetSubRace(oPlayer)=="Drow")
{
AdjustReputation(oPlayer,GetObjectByTag("bad_boy"),100);
if (!HasItem(oPlayer,"BondofH_NOD"))
AdjustReputation(oPlayer,GetObjectByTag("good_boy"),-100);
}
else
{
AdjustReputation(oPlayer,GetObjectByTag("good_boy"),100);
}
Should be
Code if (GetRacialType(oPlayer) = 163 || 164)
{
AdjustReputation(oPlayer,GetObjectByTag("bad_boy"),100);
if (!HasItem(oPlayer,"BondofH_NOD"))
AdjustReputation(oPlayer,GetObjectByTag("good_boy"),-100);
}
else
{
AdjustReputation(oPlayer,GetObjectByTag("good_boy"),100);
}
hc_on_ply_respwn.nss
Codestring sRace=GetSubRace(oRespawner);
Should be
Codeint iRace = GetRacialType(oRespawner);
& a bit further down
Codeif (sRace == "Drow")
{
AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("drowstart"))));
}
else
if (sRace == "Duergar")
{
AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("duergarspawn"))));
}
else
AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("playerrespawn"))));
Should be
Codeif (iRace = 163 || 164)
{
AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("drowstart"))));
}
else
if (iRace = 153)
{
AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("duergarspawn"))));
}
else
AssignCommand(oRespawner, JumpToLocation(GetLocation(GetObjectByTag ("playerrespawn"))));
rr_enter.nss
Code// Sets up subrace if legal one chosen
if(use_pc_subrace())
SendMessageToPC(oPC,"Your subrace of "+GetSubRace(oPC)+" has been enabled.");
if (GetSubRace(oPC)=="Drow")
{
AdjustReputation(oPC,GetObjectByTag("bad_boy"),100);
if (!HasItem(oPC,"BondofH_NOD"))
AdjustReputation(oPC,GetObjectByTag("good_boy"),-100);
}
Should be
Code// Sets up subrace if legal one chosen
if(use_pc_subrace())
SendMessageToPC(oPC,"Your subrace of "+GetSubRace(oPC)+" has been enabled.");
if (GetRacialType(oPC) = 163 || 164)
{
AdjustReputation(oPC,GetObjectByTag("bad_boy"),100);
if (!HasItem(oPC,"BondofH_NOD"))
AdjustReputation(oPC,GetObjectByTag("good_boy"),-100);
}
whizbang_drow.nss
Codeint StartingConditional()
{
// Reject player races
if(GetSubRace(GetPCSpeaker()) == "Drow")
return TRUE;
else
return FALSE;
}
Should be
Codeint StartingConditional()
{
// Reject player races
if(GetRacialTyep(GetPCSpeaker()) = 163 || 164)
return TRUE;
else
return FALSE;
}
sei_subraces.nss
(This one is kinda screwy, and won't compile under the PRC compiler. Basically this is the script set (SEI) you're going to want to get rid of completely by the time your mod is done)
Codestring sSubraceField = GetStringLowerCase( GetSubRace( a_oCharacter ) );
Should be
Code
string sSubraceTemp = Get2DAString("racialtypes", "Label", GetRacialType(a_oCharacter));
SetSubRace( a_oCharacter, sSubraceTemp );
string sSubraceField = GetStringLowerCase( GetSubRace( a_oCharacter ) );
Pick these apart guys. I'm not 100% on the last one. Haven't done many 2DA lookups. Edited by
DM Heatstroke 04-10-2009 12:36 AM
|
DM HeatstrokeGeneral MemberMember Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

|