Author Topic: VFX and Custom Races  (Read 482 times)

Legacy_Jenna WSI

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
VFX and Custom Races
« on: October 18, 2011, 03:33:40 pm »


               I'm using the following script with PRC races, how do I find the racemod numbers to add them in?

// Use with GetGenderModifier() to locate the index
// in visualeffects.2da of the effect to apply
// Locate the index in visualeffects.2da of the effect to apply
int getEffectIndex(object oTarget)
{
    int PCRace = GetRacialType(oTarget);
    int PCGender = GetGender(oTarget);

    int raceMod, genderMod;

    switch (PCRace)
    {
    case RACIAL_TYPE_HUMAN:
        raceMod = 8192;
        break;
    case RACIAL_TYPE_ELF:
        raceMod = 8220;
        break;
    case RACIAL_TYPE_DWARF:
        raceMod = 8248;
        break;
    case RACIAL_TYPE_HALFLING:
        raceMod = 8276;
        break;
    case RACIAL_TYPE_GNOME:
        raceMod = 8304;
        break;
    case RACIAL_TYPE_HALFELF:
        raceMod = 8192;
        break;
    case RACIAL_TYPE_HALFORC:
        raceMod = 8332;
        break;
    default:
        SendMessageToPC(oTarget, "Warning: you are not a supported race. Only human, elf, dwarf, halfling, gnome, half-elf and half-orc characters are supported.");
        raceMod = 567;
        break;
    }
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
VFX and Custom Races
« Reply #1 on: October 18, 2011, 08:20:53 pm »


               You'd have to paste the rest of the function, so we can see what it's returning. If it's returning the raceMods, as I suspect, then it is definitely returning visualeffects.2da numbers, as it purports to do. It seems odd that the 'not supported' vfx should be a green eye vfx (567), though, which is why I'm asking to see what it does in the rest of the function.

Most likely, you're going to wind up viewing one 2da or another, whatever the outcome. NWNExplorer Reborn by acaos is a good tool for this:
Link

Funky