September 09 2010 09:19:08
Users Online
Guests Online: 2

Members Online: 0

Total Members: 548
Newest Member: fokl
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Who should our first Dragon Age class be for?







You must login to vote.
Player Resource Consortium » Neverwinter Nights » Help
Subrace field not recognized
Username
Password
Register FAQ Members List Today's Posts Search

Print Thread

  Subrace field not recognized
by: Badjaccur, 22-09-2009 05:54 PM (#1)

I'm not sure if this is PRC related but since I can not find any information on this problem, have PRC 3.3g installed and think the most skilled NWN developers are found here Cool I might as well give it a try on this forum.

I'm running a Nordock mod that was patched with PRC 3.3 and uses the convoCC without any problems. Characters I made (using convoCC or the Java CC) get a dialogue with the following text as soon as they enter the starting area:

Your subrace field was not recognized. Please, finish this dialog completely to correctly initialize your subrace.

Does anyone have any idea what is going on here and how this can be fixed?
 
Edited by Badjaccur 22-09-2009 05:55 PM
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 22-09-2009 06:05 PM (#2)

Badjaccur wrote:
I'm not sure if this is PRC related but since I can not find any information on this problem, have PRC 3.3g installed and think the most skilled NWN developers are found here Cool I might as well give it a try on this forum.

I'm running a Nordock mod that was patched with PRC 3.3 and uses the convoCC without any problems. Characters I made (using convoCC or the Java CC) get a dialogue with the following text as soon as they enter the starting area:

Your subrace field was not recognized. Please, finish this dialog completely to correctly initialize your subrace.

Does anyone have any idea what is going on here and how this can be fixed?


Did this module at one time have a separate subrace system installed?
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: Badjaccur, 22-09-2009 06:53 PM (#3)

Hello DM Heatstroke, thanks for your quick reply.

No, I don't think so. It's a clean Nordock with only the subrace system Nordock uses (written by Shir'le E. Illios who has seemed to disappear from the face of Faerun) patched with the PRC pack.
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 23-09-2009 07:07 AM (#4)

Well one easy way to find out whats throwing that error would be to open the module in the toolset, go the the temp0 folder that the toolset dumps all the modules files into & do a search for that textstring. That should point you in the right direction.
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: fluffyamoeba, 23-09-2009 08:22 AM (#5)

The two systems are completely unrelated and using Shirle's system with the prc won't work as they apply the subrace bonuses/penalties differently. You need to use one or the other.
User Avatar
fluffyamoeba

Super Administrator

Posts: 81
Joined: 03.06.09

RE: Subrace field not recognized
by: DM Heatstroke, 23-09-2009 11:25 AM (#6)

fluffyamoeba wrote:
The two systems are completely unrelated and using Shirle's system with the prc won't work as they apply the subrace bonuses/penalties differently. You need to use one or the other.


Well there you go. I've never even heard of that subrace system.
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: Badjaccur, 24-09-2009 02:09 PM (#7)

Thank you both fluffyamoeba and DM Heartstroke for you help,

The thing with Shirle's subrace system is that it also sets a faction and a starting point. In Nordock Drow and Duergar have their own starting point in cities in the Underdark, while all other races start topside in Bezor. I don't care much for the subrace bonuses/penalties because the PRC handles those a lot better, but I still need to set the right faction and spawning point. But for some reason the subrace is not being read. I was hoping someone would recognize this problem and could give me some clues.

I have played NWN for quite a few years now and I just LOVE what you guys at the PRC did with it but this is my first serious attempt at building a PW. And I'm a complete n00b when it comes to scripting, so any help is appreciated.
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 24-09-2009 02:36 PM (#8)

Badjaccur wrote:
Thank you both fluffyamoeba and DM Heartstroke for you help,

The thing with Shirle's subrace system is that it also sets a faction and a starting point. In Nordock Drow and Duergar have their own starting point in cities in the Underdark, while all other races start topside in Bezor. I don't care much for the subrace bonuses/penalties because the PRC handles those a lot better, but I still need to set the right faction and spawning point. But for some reason the subrace is not being read. I was hoping someone would recognize this problem and could give me some clues.

I have played NWN for quite a few years now and I just LOVE what you guys at the PRC did with it but this is my first serious attempt at building a PW. And I'm a complete n00b when it comes to scripting, so any help is appreciated.


I think you are confusing Race & Subrace. AFAIK the PRC doesn't do anything with the actual BIC subrace field, so there is nothing for your faction script to read. What you can do is have the OnClientEnter script read the PC race using GetRacialType the 1st time they enter the server & SetSubrace to whatever you want it to be. The older, non-PRC version of Athas Reborn is setup this way for the Gnome (Tari) & Half-Orc (Half-Giant) races & it works fine. It'd probably be easier to just change the faction script from detecting subrace to detecting race however. You shouldn't need to futz with subraces anymore with the PRC installed. If you are still confused PM me & I'll see what I can do to help.
 
Edited by DM Heatstroke 24-09-2009 02:41 PM
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: Badjaccur, 24-09-2009 03:19 PM (#9)

Thanks a lot for your suggestions, DM Heartstroke. In the mean time I found that when I use the Bioware CC to make an Elf and set the subrace to "Drow" the subrace does get read because the dialogue that asks me for my race and subrace does not show up, I get the (buffed, the way Shirley's subrace system works) ability boni and spawn in the Underdark. So something is working. With the hints you gave I 'll look into the scripts again and hope I'll find out that is happening here. If I hit that good old brick wall again I will make sure to PM you for advice.

Thanks again, your help with this is much appreciated.
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 24-09-2009 03:33 PM (#10)

Badjaccur wrote:
Thanks a lot for your suggestions, DM Heartstroke. In the mean time I found that when I use the Bioware CC to make an Elf and set the subrace to "Drow" the subrace does get read because the dialogue that asks me for my race and subrace does not show up, I get the (buffed, the way Shirley's subrace system works) ability boni and spawn in the Underdark. So something is working. With the hints you gave I 'll look into the scripts again and hope I'll find out that is happening here. If I hit that good old brick wall again I will make sure to PM you for advice.

Thanks again, your help with this is much appreciated.


That kinda goes along with what I was saying. If you use the JavaCC or the ConvoCC nothing gets populated in the Subrace field because Drow & Duegar are actual racial types. If you use the Bioware CC, you can manually type Drow in but you don't get the natural bonuses or SLAs. You really want to be using racial types as opposed to subraces.
 
Edited by DM Heatstroke 24-09-2009 03:35 PM
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: Badjaccur, 24-09-2009 03:51 PM (#11)

I used to play this Nordock server with PRC installed and as far as I know we used both systems at the same time. (This was not good because the buffed stats from Shirley's and the PRC's unbuffed racial stats stack, giving the Drow and Duergar double boni, but it was all about getting the right factions and spawning point.) So it worked one way or the other.

So I assume that some script would be checking for any subrace, if set to "Drow" it would set faction, add stats etc. Same goes with Duergar. But if no subrace was set it should set the spawning point to Benzor and not add bonus abilities. The last thing does not happen, but brings up the dialog and the options to set both race and subrace instead.

The idea about letting the faction script detect the race is really a good idea, although I don't know how to set the correct spawning point once the race is detected. But I have not looked at the script yet and as I mentioned before, I'm new with this.

I'm going to see if I can find out what script is doing what and how I can change it to work as it should again.

Again my thanks for your advice. I really appreciate it.
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 24-09-2009 04:16 PM (#12)

Badjaccur wrote:
I used to play this Nordock server with PRC installed and as far as I know we used both systems at the same time. (This was not good because the buffed stats from Shirley's and the PRC's unbuffed racial stats stack, giving the Drow and Duergar double boni, but it was all about getting the right factions and spawning point.) So it worked one way or the other.

So I assume that some script would be checking for any subrace, if set to "Drow" it would set faction, add stats etc. Same goes with Duergar. But if no subrace was set it should set the spawning point to Benzor and not add bonus abilities. The last thing does not happen, but brings up the dialog and the options to set both race and subrace instead.

The idea about letting the faction script detect the race is really a good idea, although I don't know how to set the correct spawning point once the race is detected. But I have not looked at the script yet and as I mentioned before, I'm new with this.

I'm going to see if I can find out what script is doing what and how I can change it to work as it should again.

Again my thanks for your advice. I really appreciate it.


Should be just a matter of switching GetSubrace to GetRacialType in the script & then disabling all of the "artifical" bonuses those races get.
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: Badjaccur, 29-09-2009 05:04 PM (#13)

Wow, my brain hurts.
I have been looking through scripts trying to find what is happening where but no luck so far. This is far more complicated than I hoped.
The desired behavior is that Nordock's subrace system no longer gives any boni to abilities and such since PRC handles this in a far better way. I also want the scripts check for the player's race (like DM Heartstroke suggested) instead of subrace and set factions and spawning point accordingly. But I have no idea how to do this.

If anyone has any (hands-on and scripting n00b compatible) suggestions or hints they are much appreciated.
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 29-09-2009 08:57 PM (#14)

Badjaccur wrote:
DM Heartstroke


Lol

Badjaccur wrote:
Wow, my brain hurts.
I have been looking through scripts trying to find what is happening where but no luck so far. This is far more complicated than I hoped.
The desired behavior is that Nordock's subrace system no longer gives any boni to abilities and such since PRC handles this in a far better way. I also want the scripts check for the player's race (like DM Heartstroke suggested) instead of subrace and set factions and spawning point accordingly. But I have no idea how to do this.

If anyone has any (hands-on and scripting n00b compatible) suggestions or hints they are much appreciated.


By any chance did you try my text search suggestion above? If you did & you still can't figure out where the bonuses are coming from you can 7zip & send the module to dmheatstroke(at)athasreborn(dot)com. Not saying I'll fix it for you, but I will tell you what script is calling the racial bonuses.
 
Edited by DM Heatstroke 29-09-2009 08:59 PM
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: fluffyamoeba, 30-09-2009 08:50 AM (#15)

The PRC racial constants are in prc_racial_const.nss in the include hak. You would just need to use GetRacialType() where you are currently using GetSubrace() and compare against the race constants instead of matching strings (the subrace is a string, the races are an integer than corresponds to the race's line in racialtypes.2da).
User Avatar
fluffyamoeba

Super Administrator

Posts: 81
Joined: 03.06.09

RE: Subrace field not recognized
by: DM Heatstroke, 30-09-2009 08:55 AM (#16)

fluffyamoeba wrote:
The PRC racial constants are in prc_racial_const.nss in the include hak. You would just need to use GetRacialType() where you are currently using GetSubrace() and compare against the race constants instead of matching strings (the subrace is a string, the races are an integer than corresponds to the race's line in racialtypes.2da).


Yeah, kinda already covered that above. I think he's having trouble actually finding the script that it's being called from.
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 01-10-2009 07:54 PM (#17)

fluffyamoeba wrote:
The PRC racial constants are in prc_racial_const.nss in the include hak. You would just need to use GetRacialType() where you are currently using GetSubrace() and compare against the race constants instead of matching strings (the subrace is a string, the races are an integer than corresponds to the race's line in racialtypes.2da).


It's a lot more complex than that. The subrace system is from 2002 & horribly convoluted. It's also got an old version of the HCR ruleset in there, & the module doesn't compile with the PRC compiler. Probably going to be a lot more involved than we thought.
 
Edited by DM Heatstroke 01-10-2009 08:21 PM
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

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

Download source  Code
if (GetSubRace(GetPCSpeaker())=="Drow")



Should be

Download source  Code
if (GetRacialType(GetPCSpeaker()) = 163 || 164)





duergar_recog.nss

Download source  Code
if (GetSubRace(GetPCSpeaker())=="Duergar")



Should be

Download source  Code
if (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)

Download source  Code
string sRace=GetSubRace(oTarget);



Should be

Download source  Code
int iRace = GetRacialType(oTarget);




And farther down
Download source  Code
else
    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

Download source  Code
else
    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
Download source  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

Download source  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)

Download source  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

Download source  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

Download source  Code
string sRace=GetSubRace(oRespawner);



Should be

Download source  Code
int iRace = GetRacialType(oRespawner);



& a bit further down

Download source  Code
if (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

Download source  Code
if (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

Download source  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

Download source  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

Download source  Code
int StartingConditional()
{

    // Reject player races
    if(GetSubRace(GetPCSpeaker()) == "Drow")
        return TRUE;
    else
        return FALSE;

}



Should be

Download source  Code
int 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)

Download source  Code
string sSubraceField = GetStringLowerCase( GetSubRace( a_oCharacter ) );



Should be

Download source  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
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: DM Heatstroke, 01-10-2009 10:50 PM (#19)

I hate to say it, but you guys are going to have some pretty serious scripting hurdles getting this module to work properly with the PRC & I'm not just talking about the subrace stuff.
User Avatar
DM Heatstroke
General Member
Member

Posts: 397
Joined: 13.06.09
Location: The Pristine Tower
Age: 32

Warn Level 0

RE: Subrace field not recognized
by: Badjaccur, 02-10-2009 03:53 AM (#20)

DM Heatstroke wrote:
I hate to say it, but you guys are going to have some pretty serious scripting hurdles getting this module to work properly with the PRC & I'm not just talking about the subrace stuff.


Thanks a lot for looking into this!
Surely seems like we have some work to do... But I think it's worth it so I have some work to do now.

Thank you both DM Heatstroke and Fluffy for your help. I really appreciate it.
I'll keep you posted when I make any progress.
Badjaccur
General Member
Member

Posts: 13
Joined: 22.09.09

Warn Level 0

Options
Jump to Forum:
Forum powered by fusionBoard
Share this Thread
URL:
BBcode:
HTML:

282,718 unique visits

Powered by PHP-Fusion copyright © 2002 - 2010 by Nick Jones.
Released as free software without warranties under GNU Affero GPL v3.
Warhammer-theme is a modification of Simplicity_div.
Modified by Wolphard.
Special thanks to Mangee.