Author Topic: Custom races (Problem refined)  (Read 307 times)

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Custom races (Problem refined)
« on: May 22, 2015, 01:06:24 pm »


               

Here is the refined problem.

We need to set the subrace field to setrace if such a value is inputted.

As ConvoCC is disabled we cannot easily select races. However, the workaround for it was to setrace based on the value set in subrace.

The constants for the races are integer numbers so setting the subrace to say.. 84 for hound archon in order for StringToInt should in theory work.

This needs to happen at the right time otherwise we have numerous problems.

Where can we inject the following code:




Code: #include "inc_nwnx_funcs"
/* Check Subrace and set race based on this.
*/
void main()
{
    {
    object oPC = GetFirstPC();
    string sRace = GetSubRace(oPC); //grab the subrace
    int nRace = StringToInt(sRace); //convert to int, use numbers so this goes smoothly.
    if (nRace != 0) //if this returns 0, assume error and no number was input.
        {
        PRC_Funcs_SetRace(oPC, nRace); //set race via funcs.
        }
    }
}

Any ideas?



               
               

               
            

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Custom races (Problem refined)
« Reply #1 on: May 22, 2015, 02:58:59 pm »


               

DELETED



               
               

               
            

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Custom races (Problem refined)
« Reply #2 on: May 23, 2015, 10:22:30 pm »


               

DELETED