Aller au contenu

Photo

Unable to compile/merge?


  • Veuillez vous connecter pour répondre
21 réponses à ce sujet

#1
Who said that I

Who said that I
  • Members
  • 492 messages

Okay I know I have had a lot of questions and requests for help, feeling a bit bad for it though....

 

but I am simply puzzled with this one... I am trying to install the shayan subrace system and all the other files seem to merge perfectly fine except for the on client leave script....

 

so I will post the script here and if anyone has a solution for this rather annoying problem then you'll be my bestie! :D

 

Shayan script:
 
 
{
       SubraceOnClientLeave();
}

 

 

 

need to merge it with:

 

#include "sha_subr_methds"
void main()
{
 
object oPC = GetExitingObject();
string sPC = GetName(oPC);
object oPITMASTER = GetObjectByTag("da_pitmaster");
int iRED = GetLocalInt(oPITMASTER, "da_Red");
int iBLUE = GetLocalInt(oPITMASTER, "da_Blue");
int iGREEN = GetLocalInt(oPITMASTER, "da_Green");
int iSLOT = GetLocalInt(oPC, "da_slot");
 
if (iSLOT > 10)
  SpeakString(sPC + " has exited the Dueling Pit.");
 
//  Help the Scoredial and Pit Master keep track of who's in the Pit.
//  There are fifteen possible slots the PC could be in, five for each color.
switch (iSLOT)
{
 case 11:
   SetLocalString(oPITMASTER, "da_redslot1", "");
   iRED--;
   break;
 case 12:
   SetLocalString(oPITMASTER, "da_redslot2", "");
   iRED--;
   break;
 case 13:
   SetLocalString(oPITMASTER, "da_redslot3", "");
   iRED--;
   break;
 case 14:
   SetLocalString(oPITMASTER, "da_redslot4", "");
   iRED--;
   break;
 case 15:
   SetLocalString(oPITMASTER, "da_redslot5", "");
   iRED--;
   break;
 case 21:
   SetLocalString(oPITMASTER, "da_blueslot1", "");
   iBLUE--;
   break;
 case 22:
   SetLocalString(oPITMASTER, "da_blueslot2", "");
   iBLUE--;
   break;
 case 23:
   SetLocalString(oPITMASTER, "da_blueslot3", "");
   iBLUE--;
   break;
 case 24:
   SetLocalString(oPITMASTER, "da_blueslot4", "");
   iBLUE--;
   break;
 case 25:
   SetLocalString(oPITMASTER, "da_blueslot5", "");
   iBLUE--;
   break;
 case 31:
   SetLocalString(oPITMASTER, "da_greenslot1", "");
   iGREEN--;
   break;
 case 32:
   SetLocalString(oPITMASTER, "da_greenslot2", "");
   iGREEN--;
   break;
 case 33:
   SetLocalString(oPITMASTER, "da_greenslot3", "");
   iGREEN--;
   break;
 case 34:
   SetLocalString(oPITMASTER, "da_greenslot4", "");
   iGREEN--;
   break;
 case 35:
   SetLocalString(oPITMASTER, "da_greenslot5", "");
   iGREEN--;
   break;
 }
 
//  Just in case the counting has gone wrong...
if (iRED < 0)
  iRED = 0;
if (iBLUE < 0)
  iBLUE = 0;
if (iGREEN < 0)
  iGREEN = 0;
 
//  Let the PitMaster keep track of how many holders of each token are in the Pit.
SetLocalInt(oPITMASTER, "da_Red", iRED);
SetLocalInt(oPITMASTER, "da_Blue", iBLUE);
SetLocalInt(oPITMASTER, "da_Green", iGREEN);
 
//  This conditional determines whether there are enough people in the Pit to duel.
//  It returns FALSE if the pit is full of only Red, or only Blue, or only Green.
if ((iRED < 1 || iBLUE < 1) && (iRED < 1 || iGREEN < 1) && (iBLUE < 1 || iGREEN < 1))
   SetLocalInt(oPITMASTER, "da_Foe", FALSE);
}

 

 

thank you....



#2
The Mad Poet

The Mad Poet
  • Members
  • 425 messages

I'm not familiar with the system directly, but I'd assume all you would have to do is take the one line from your top script and place it in the bottom script. Like so...

object oPC = GetExitingObject();
string sPC = GetName(oPC);
object oPITMASTER = GetObjectByTag("da_pitmaster");
int iRED = GetLocalInt(oPITMASTER, "da_Red");
int iBLUE = GetLocalInt(oPITMASTER, "da_Blue");
int iGREEN = GetLocalInt(oPITMASTER, "da_Green");
int iSLOT = GetLocalInt(oPC, "da_slot");

//Shayan Subrace Engine - On Client Leave function
SubraceOnClientLeave();

I put the little note in there just so six months down the line when you look at this script you will remember what this is.

 

Also the top script doesn't have an include line. Is the 'sha_sub_methds' script the one where the SubraceOnClientLeave function comes from? If not you need to add that include.


  • Squatting Monk, GhostOfGod et Who said that I aiment ceci

#3
Who said that I

Who said that I
  • Members
  • 492 messages

I'm not familiar with the system directly, but I'd assume all you would have to do is take the one line from your top script and place it in the bottom script. Like so...

object oPC = GetExitingObject();
string sPC = GetName(oPC);
object oPITMASTER = GetObjectByTag("da_pitmaster");
int iRED = GetLocalInt(oPITMASTER, "da_Red");
int iBLUE = GetLocalInt(oPITMASTER, "da_Blue");
int iGREEN = GetLocalInt(oPITMASTER, "da_Green");
int iSLOT = GetLocalInt(oPC, "da_slot");

//Shayan Subrace Engine - On Client Leave function
SubraceOnClientLeave();

I put the little note in there just so six months down the line when you look at this script you will remember what this is.

 

Also the top script doesn't have an include line. Is the 'sha_sub_methds' script the one where the SubraceOnClientLeave function comes from? If not you need to add that include.

Thank you poet! learned something new today :)


  • The Mad Poet aime ceci

#4
The Mad Poet

The Mad Poet
  • Members
  • 425 messages

Not a problem ;)



#5
Who said that I

Who said that I
  • Members
  • 492 messages

Thank you poet! learned something new today :)

hmm it does not seem to work still....

 should I do something like this to every script? or is merging a better way?



#6
The Mad Poet

The Mad Poet
  • Members
  • 425 messages

What is the error that shows when it fails to compile?



#7
Who said that I

Who said that I
  • Members
  • 492 messages

no errors, just when I load a character with a subrace it is simply not loading the stats for it (nor does it give a loading screen when first logging in......)



#8
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

no errors, just when I load a character with a subrace it is simply not loading the stats for it (nor does it give a loading screen when first logging in......)

Wouldn't this happen in the OnClientEnter script?



#9
Who said that I

Who said that I
  • Members
  • 492 messages
#include "da_includefile_1"
#include "dmfi_init_inc"
#include "sha_subr_methds"
//  If your module's OnClientEnter has custom scripting, just paste the following into it.
//  Be sure to include the file "da_includefile_1" at the very top, as it is here.
void main()
{
 SetLocalInt(GetEnteringObject(), "nRestingCounterPC", 100); // (100) number of rounds between rest must be same as on OnModRest
 
int iPUNISHMENT = TRUE;   //Change this to FALSE to turn *off* the module's auto-punishment for criminals who try to log off and on again to evade punishment.
object DA_oMODULE = GetModule();
object DA_oPC = GetEnteringObject();
object DA_oAREA = GetArea(DA_oPC);
object DA_oPITMASTER = GetObjectByTag("da_pitmaster");
object DA_oPIT = GetArea(DA_oPITMASTER);
object DA_oWP_ENTRANCE = GetWaypointByTag("da_wp_entrance");
int iENFORCER = GetIsEnforcer(DA_oPC);
int iEXEMPT = GetIsExempt(DA_oPC);
string DA_sNAME = GetName(DA_oPC);
string DA_sUSERID = GetPCPlayerName(DA_oPC);
 
DeleteLocalInt(DA_oPC, "da_slot");
DeleteLocalInt(DA_oPC, "da_Team");
 
if (iENFORCER == TRUE)   //Place an Enforcer Key in the inventory of every Enforcer who doesn't yet have one.
 {
  int iHASKEY = FALSE;
  string sKEY = "da_enforcerkey";
  object oITEM = GetFirstItemInInventory(DA_oPC);
  while (GetIsObjectValid(oITEM))
   {
    string sITEM = GetTag(oITEM);
    string sITEMLEFT14 = GetStringLeft(sITEM, 14);
    if (sITEMLEFT14 == sKEY)
      iHASKEY = TRUE;
    oITEM = GetNextItemInInventory(DA_oPC);
   }
  if (iHASKEY == FALSE)
   {
    CreateItemOnObject("da_enforcerkey", DA_oPC);
    SendMessageToPC(DA_oPC, "You might find this item useful; please hold on to it.");
   }
 }
else   //Destroy all Enforcer Keys in the inventory of non-authorized enforcers.
 {
  string sKEY = "da_enforcerkey";
  object oITEM = GetFirstItemInInventory(DA_oPC);
  while (GetIsObjectValid(oITEM))
   {
    string sITEM = GetTag(oITEM);
    string sITEMLEFT14 = GetStringLeft(sITEM, 14);
    if (sITEMLEFT14 == sKEY)
     {
      DestroyObject(oITEM);
      SendMessageToPC(DA_oPC, "You are not authorized to carry an Enforcer Key; it has been destroyed.");
     }
    oITEM = GetNextItemInInventory(DA_oPC);
   }
 }
 
if (iEXEMPT == TRUE)
  DeleteLocalInt(DA_oMODULE, "da_" + DA_sNAME + DA_sUSERID);  //Make sure no exempt player is counted as punishable.
int iJAIL = GetLocalInt(DA_oMODULE, "da_" + DA_sNAME + DA_sUSERID);
if (iJAIL == TRUE && iPUNISHMENT == TRUE)
 {
  int iPRIORXP = GetXP(DA_oPC);
  int iXPHIT = iPRIORXP/10;
  int iPOSTXP = iPRIORXP - iXPHIT;                     //Take 10% of the criminal's XP.
  SetXP(DA_oPC,iPOSTXP);                               //Default punishment is 5%; the other 5% is for logging off and on again.
  object oITEM = GetFirstItemInInventory(DA_oPC);
  while (GetIsObjectValid(oITEM))
   {
    DestroyObject(oITEM);                              //Destroy all items in the criminal's inventory.
    oITEM = GetNextItemInInventory(DA_oPC);
   }
  oITEM = GetItemInSlot(INVENTORY_SLOT_ARMS, DA_oPC);  //Destroy all equipped items.
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_ARROWS, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_BELT, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_BOLTS, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_BOOTS ,DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_BULLETS, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_CHEST, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_CLOAK,DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_HEAD,DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_LEFTRING, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_NECK, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  oITEM = GetItemInSlot(INVENTORY_SLOT_RIGHTRING, DA_oPC);
  if (GetIsObjectValid(oITEM))
    DestroyObject(oITEM);
  int iGP = GetGold(DA_oPC);
  AssignCommand(DA_oPC, TakeGoldFromCreature(iGP, DA_oPC, TRUE));         //Take the criminal's gold.
  object oGARB = CreateItemOnObject("da_prsngrb", DA_oPC);        //Make the criminal don prison garb.
  DelayCommand(0.1, AssignCommand(DA_oPC, ActionEquipItem(oGARB, INVENTORY_SLOT_CHEST)));
  DelayCommand(10.0, FloatingTextStringOnCreature("You're still a criminal; leaving & coming back won't help.", DA_oPC, FALSE));  //Verbal reprimand.
 }
    object oUser = GetEnteringObject();
 
    // do any other module OnClientEnter work here
    ExecuteScript("x3_mod_def_enter", OBJECT_SELF);
 
    // initialize DMFI
    dmfiInitialize(oUser);
 
     SubraceOnClientEnter();
}

 

 

 

 

my on client enter script. So unless I have done something wrong (which is likely since I seem to suffer from a lack of sleep as of recent XD)



#10
The Mad Poet

The Mad Poet
  • Members
  • 425 messages

Alright. Silly question, but it comes up a lot. Did you compile all scripts with 'Build Module'? When messing with scripts with include files that is usually the first thing that many people, including myself, forget to do.


  • GhostOfGod aime ceci

#11
Who said that I

Who said that I
  • Members
  • 492 messages
I do, though first i use the compils button in the scriptor (upper left corner)

#12
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

I'm not familiar with the system either but I do see an include and I do see the OnEnter function so that part looks ok anyway. Did you use or merge all the other scripts like the OnModuleLoad too?


  • The Mad Poet aime ceci

#13
Who said that I

Who said that I
  • Members
  • 492 messages
Yup, i do believe I did. Will poat the scripts just incase :)

#14
Who said that I

Who said that I
  • Members
  • 492 messages

on activate:

#include "da_includefile_1"
#include "x2_inc_switches"
#include "sha_subr_methds"
//  If your module's OnActivateItem has custom scripting, just paste the following into it.
//  Be sure to include the file "da_includefile_1" at the very top, as it is here, above the void main().
void main()
{
{
     object oItem = GetItemActivated();
 
     // * Generic Item Script Execution Code
     // * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
     // * it will execute a script that has the same name as the item's tag
     // * inside this script you can manage scripts for all events by checking against
     // * GetUserDefinedItemEventNumber(). See x2_it_example.nss
     if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
     {
        SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACTIVATE);
        int nRet =   ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
        if (nRet == X2_EXECUTE_SCRIPT_END)
        {
           return;
        }
 
     }
 
}
object oDA_ITEM = GetItemActivated();
string sDA_ITEM = GetTag(oDA_ITEM);
string sDA_DETECTOR = "da_gladetecto";
string sDA_ENFORCER = "da_enforcerke";
string sDA_ITEMLEFT13 = GetStringLeft(sDA_ITEM, 13);
object oDA_ACTIVATOR = GetItemActivator();
object oDA_TARGET = GetItemActivatedTarget();
string sDA_TARGET = GetTag(oDA_TARGET);
string sDA_TARGETLEFT12 = GetStringLeft(sDA_TARGET, 12);
string sDA_CONTAINER = "da_jailcrate";
 
if (sDA_ITEMLEFT13 == sDA_ENFORCER)  //The lines for the Enforcer Key.
 {
  int iENFORCER = GetIsEnforcer(oDA_ACTIVATOR);
  int iEXEMPT = GetIsExempt(oDA_TARGET);
  if (iENFORCER == FALSE)
   {
    DestroyObject(oDA_ITEM);         //Make sure only authorized enforcers can activate this item.
    FloatingTextStringOnCreature("Only authorized enforcers may use that key.", oDA_ACTIVATOR, FALSE);
   }
  else if (GetIsPC(oDA_TARGET))
   {
    SetLocalObject(oDA_ACTIVATOR, "da_mytarget", oDA_TARGET); //If the target if a player, start a conversation for more options.
    AssignCommand(oDA_ACTIVATOR, ActionStartConversation(oDA_ACTIVATOR, "da_cnv_enforcrky", TRUE));
   }
  else if (sDA_TARGETLEFT12 == sDA_CONTAINER)
   {
    effect eKNOCK = EffectVisualEffect(VFX_IMP_KNOCK);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eKNOCK, oDA_TARGET);
    SetLocked(oDA_TARGET, FALSE);                                        //Unlock the Confiscated Item Crate, if that's the target.
    AssignCommand(oDA_TARGET, SpeakString("**unlocks temporarily**"));
    FloatingTextStringOnCreature("This container will be unlocked for the next twenty seconds, or until someone opens it.", oDA_ACTIVATOR, FALSE);
    float fDELAY = 20.0;
    DelayCommand(fDELAY, SetLocked(oDA_TARGET, TRUE));
   }
  else FloatingTextStringOnCreature("The key is inert.", oDA_ACTIVATOR, FALSE);
 }
 
if (sDA_ITEMLEFT13 == sDA_DETECTOR)  //The lines for the Gladi-Detector.
 {
  if (GetIsPC(oDA_TARGET))
  {
   int iTEAM = GetLocalInt(oDA_TARGET, "da_Team");
   string sTARGETNAME = GetName(oDA_TARGET);
   switch (iTEAM)  //Inform the activator what color Gladiator, if any, the target is.
    {
     case 1:
       FloatingTextStringOnCreature(sTARGETNAME + " glows red.", oDA_ACTIVATOR, FALSE);
       break;
     case 2:
       FloatingTextStringOnCreature(sTARGETNAME + " glows blue.", oDA_ACTIVATOR, FALSE);
       break;
     case 3:
       FloatingTextStringOnCreature(sTARGETNAME + " glows green.", oDA_ACTIVATOR, FALSE);
       break;
     default:
       FloatingTextStringOnCreature(sTARGETNAME + " does not glow.", oDA_ACTIVATOR, FALSE);
       break;
    }
   DelayCommand(1.5, AssignCommand(oDA_ACTIVATOR, SpeakString("** examines " + sTARGETNAME + " with a Gla-Detector **")));  //Announce to the examination action to all.
  }
  else FloatingTextStringOnCreature("The detector is inert.", oDA_ACTIVATOR, FALSE);  //Do nothing if the target is not a player.
 }
//  Paste the above lines into your module properties' OnActivateItem script to enable the Enforcer Key and Token Detector.
 
{
     object oItem = GetModuleItemAcquired();
     // * Generic Item Script Execution Code
     // * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
     // * it will execute a script that has the same name as the item's tag
     // * inside this script you can manage scripts for all events by checking against
     // * GetUserDefinedItemEventNumber(). See x2_it_example.nss
     if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
     {
        SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACQUIRE);
        int nRet =   ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
        if (nRet == X2_EXECUTE_SCRIPT_END)
        {
           return;
        }
             SubraceOnItemActivated();
}
}
}

 

 

on client leave:

#include "sha_subr_methds"
void main()
{
 
object oPC = GetExitingObject();
string sPC = GetName(oPC);
object oPITMASTER = GetObjectByTag("da_pitmaster");
int iRED = GetLocalInt(oPITMASTER, "da_Red");
int iBLUE = GetLocalInt(oPITMASTER, "da_Blue");
int iGREEN = GetLocalInt(oPITMASTER, "da_Green");
int iSLOT = GetLocalInt(oPC, "da_slot");
 
if (iSLOT > 10)
  SpeakString(sPC + " has exited the Dueling Pit.");
 
//  Help the Scoredial and Pit Master keep track of who's in the Pit.
//  There are fifteen possible slots the PC could be in, five for each color.
switch (iSLOT)
{
 case 11:
   SetLocalString(oPITMASTER, "da_redslot1", "");
   iRED--;
   break;
 case 12:
   SetLocalString(oPITMASTER, "da_redslot2", "");
   iRED--;
   break;
 case 13:
   SetLocalString(oPITMASTER, "da_redslot3", "");
   iRED--;
   break;
 case 14:
   SetLocalString(oPITMASTER, "da_redslot4", "");
   iRED--;
   break;
 case 15:
   SetLocalString(oPITMASTER, "da_redslot5", "");
   iRED--;
   break;
 case 21:
   SetLocalString(oPITMASTER, "da_blueslot1", "");
   iBLUE--;
   break;
 case 22:
   SetLocalString(oPITMASTER, "da_blueslot2", "");
   iBLUE--;
   break;
 case 23:
   SetLocalString(oPITMASTER, "da_blueslot3", "");
   iBLUE--;
   break;
 case 24:
   SetLocalString(oPITMASTER, "da_blueslot4", "");
   iBLUE--;
   break;
 case 25:
   SetLocalString(oPITMASTER, "da_blueslot5", "");
   iBLUE--;
   break;
 case 31:
   SetLocalString(oPITMASTER, "da_greenslot1", "");
   iGREEN--;
   break;
 case 32:
   SetLocalString(oPITMASTER, "da_greenslot2", "");
   iGREEN--;
   break;
 case 33:
   SetLocalString(oPITMASTER, "da_greenslot3", "");
   iGREEN--;
   break;
 case 34:
   SetLocalString(oPITMASTER, "da_greenslot4", "");
   iGREEN--;
   break;
 case 35:
   SetLocalString(oPITMASTER, "da_greenslot5", "");
   iGREEN--;
   break;
 }
 
//  Just in case the counting has gone wrong...
if (iRED < 0)
  iRED = 0;
if (iBLUE < 0)
  iBLUE = 0;
if (iGREEN < 0)
  iGREEN = 0;
 
//  Let the PitMaster keep track of how many holders of each token are in the Pit.
SetLocalInt(oPITMASTER, "da_Red", iRED);
SetLocalInt(oPITMASTER, "da_Blue", iBLUE);
SetLocalInt(oPITMASTER, "da_Green", iGREEN);
 
//  This conditional determines whether there are enough people in the Pit to duel.
//  It returns FALSE if the pit is full of only Red, or only Blue, or only Green.
if ((iRED < 1 || iBLUE < 1) && (iRED < 1 || iGREEN < 1) && (iBLUE < 1 || iGREEN < 1))
   SetLocalInt(oPITMASTER, "da_Foe", FALSE);
 
//Shayan Subrace Engine - On Client Leave function
SubraceOnClientLeave();
}

 

 

 

heartbeat:

 

#include "sha_subr_methds"
void main()
{
    object oFirstPC=GetFirstPC();
    object oCurrentPC=GetFirstPC();
 
    while(oCurrentPC!=OBJECT_INVALID)
    {
     int nRestingCounter = GetLocalInt(oCurrentPC, "nRestingCounterPC")+2;
    SetLocalInt(oCurrentPC, "nRestingCounterPC", nRestingCounter);
     oCurrentPC=GetNextPC();
    }
     int iHour = GetTimeHour ();
    int iMinute = GetTimeMinute ();
    int iSecond = GetTimeSecond ();
    int iMillisecond = GetTimeMillisecond();
    SetTime(iHour, iMinute, iSecond, iMillisecond);
}

 

 

think that are all the scripts that I added/merged for it :) 



#15
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

OnModuleLoad?



#16
Who said that I

Who said that I
  • Members
  • 492 messages

the standard shayan script, nothing added.

 

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//:::::::::::::::::::::::: Shayan's Subrace Engine :::::::::::::::::::::::::::::
//:::::::::::::::::File Name: sha_on_modload :::::::::::::::::::::::::::::::::::
//::::::::::::::::::::: OnModuleLoad script ::::::::::::::::::::::::::::::::::::
//:: Written By: Shayan.
//:: Contact: mail_shayan@yahoo.com
//:: Updated By: Moon
//:: Contact: dm_moonshadow@hotmail.com
//
// Description: This is an example of script of how to use Shayan's Subraces on
//              your Module.
//
// The OnModuleLoad script is where you define your subraces. (Look below)
//
// Double click on any of the methods below to get know how to use them.
//
//
// :: Version 2.0: Pre-made subraces are now seperated into categories (Monsterous, and Normal)
//                 and put into scripts: sha_subraces1, and sha_subraces2.
 
#include "sha_subr_methds"
 
void main()
{
  SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE);
 
   if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
   {
 
}
 
 
   //Ignore this... this is for NWNX/SQL database functionality
   if(ENABLE_NWNX_DATABASE)
   {
        //Initialize NWNX DB support
        SQLInit();
        //Create subrace table in database (if it doesn't exist)
        DelayCommand(1.0, NWNX_CreateSubraceDBTables());
   }
 
 
   //Functions available for use are: (Note, this is not the full list)
   //
   // ::The Most Important Method (Used to define your subrace). MUST BE CALLED BEFORE ALL OTHERS.::
   //----- CreateSubrace(int Race, string SubraceName, string HideResRef, string UniqueItemResref, int IsLightSensitive = FALSE, int DamageTakenWhileInLight = 0, int IsUndergroundSensitive = FALSE, int DamageTakenWhileInUnderground = 0, int ECL = 0, int IsUndead = FALSE, int PrestigiousSubrace = FALSE)
   //
   // ::Used to Add another Race that can be part of the Subrace.::
   // ::Reuse as many times as needed.::
   //----- AddAdditionalBaseRaceToSubrace(string subraceName, int AdditionalBaseRace)
   //
   // ::Used to add an Alignment Restriction to a Subrace.
   //----- CreateSubraceAlignmentRestriction(string subraceName, int CanBeAlignment_Good = TRUE , int CanBeAlignment_Neutral1 = TRUE, int CanBeAlignment_Evil = TRUE, int CanBeAlignment_Lawful = TRUE, int CanBeAlignment_Neutral2 = TRUE, int CanBeAlignment_Chaotic = TRUE)
   //
   // ::Used to add a Class restriction on the Subrace.
   //----- CreateSubraceClassRestriction(string subraceName, int CanBe_Barbarian = TRUE, int CanBe_Bard = TRUE, int CanBe_Cleric = TRUE, int CanBe_Druid = TRUE, int CanBe_Fighter = TRUE, int CanBe_Monk = TRUE, int CanBe_Paladin = TRUE, int CanBe_Ranger = TRUE, int CanBe_Rogue = TRUE, int CanBe_Sorcerer = TRUE, int CanBe_Wizard = TRUE)
   //
   // ::Used to change a Player Subrace's Appearance::
   // ::Use only ONCE per subrace per level::
   //----- CreateSubraceAppearance(string subraceName, int AppearanceChangeTime, int MaleAppearance, int FemaleAppearance)
   //
   // ::Used to give PC's a change in Ability scores, or Attack Bonus or Armour Class. During the day or Night.
   // ::Used in conjunction with CreateCustomStats() <Look Below>.
   //----- CreateTemporaryStatModifier(string subraceName, struct SubraceStats Stats, int TimeToApply, int InInteriorArea = TRUE, int InExteriorArea = TRUE, int InNaturalArea = TRUE, int InArtifacialArea = TRUE, int InUndergroundArea = TRUE, int InAbovegroundArea = TRUE)
   //
   // ::Used to define the Ability increase or decrease, AC increase/decrease, AB increase/Decrease.
   //----- SubraceStats CreateCustomStats(int StatModifierType, float StrengthModifier, float DexterityModifier, float ConstitutionModifier, float IntelligenceModifier, float WisdomModifier, float CharismaModifier, float ACModifier, float ABModifier)
   //
   // ::Used to disable/allow only the use of melee, ranged or other kind of weapons during certain times of day or permanently.
   // ::Reuse as many times as needed to a max of 4.::
   //----- SubraceRestrictUseOfItems(string subrace, int ItemType, int TimeOfDay = TIME_BOTH, int Allow = ITEM_TYPE_REQ_DO_NOT_ALLOW)
   //
   // ::Add a favored Class to Subrace
   // ::Use only ONCE per subrace::
   //----- AddSubraceFavoredClass(string subraceName, int MaleFavoredClass, int FamaleFavoredClass)
   //
   // ::Add an effect to the Subrace, that takes effect during the night (lasts until morning), day(lasts until dusk) or permanently.
   // ::Use as many times as desired::
   //----- AddSubraceEffect(string subraceName, int EffectID, int Value1, int Value2, int nDurationType, float fDuration, int TimeOfDay)
   //
   // ::Add another skin for the subrace to be equipped at a particular level.
   // :: Use as Many times as desired.
   //----- AddAdditionalSkinsToSubrace(string subraceName, string SkinResRef, int EquipLevel, int iTime = TIME_BOTH)
   //
   // ::Use to create varying Spell resistance for the subrace.
   //----- CreateSubraceSpellResistance(string subraceName, int SpellResistanceBase, int SpellResistanceMax)
   //
   // ::Add 'claws' to the playable subrace.
   // :: Use as many times as desired.
   //----- AddClawsToSubrace(string subraceName, string RightClawResRef, string LeftClawResRef , int EquipLevel)
   //
   // :: Setup the player belonging to the subrace to 'switch' to another subrace
   //----- SetupSubraceSwitch(string subraceName, string switchSubraceName, int Level, int MustMeetRequirements = TRUE)
   //
   // :: Give additional 'unique' items
   //----- AddSubraceItem(string subraceName, string ItemResRef, int Level = 1)
   //
   // :: Set-up a Prestige class restriction for a subrace.
   //----- CreateSubracePrestigiousClassRestriction(string subraceName, int MinimumLevels = 1, int CanBe_ArcaneArcher = TRUE, int CanBe_Assasin = TRUE, int CanBe_Blackguard = TRUE, int CanBe_ChampionOfTorm = TRUE, int CanBe_RedDragonDisciple = TRUE, int CanBe_DwarvenDefender = TRUE, int CanBe_HarperScout = TRUE, int CanBe_PaleMaster = TRUE, int CanBe_ShadowDancer = TRUE, int CanBe_Shifter = TRUE, int CanBe_WeaponMaster = TRUE);
   //
   //
   // The following scripts load up the example subraces created by me (Shayan).
   // You can use these or add to them or delete them all.
   // You can find the Creature Hide relating to these subraces in Items -> Custom -> Creature Items -> Skin/Hide
   // You can also find the Unique Items relating to these subraces in Items -> Plot Items
 
    //Call it exactly one time and only during OnModuleLoad!
    SSE_ModuleLoadEvent();
 
    //Load Shayan's Non-Leto Subraces only if we are not using Leto
    LoadSubraceFromScript("sha_subraces1", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_NOT_USING_LETO);
    LoadSubraceFromScript("sha_subraces2", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_NOT_USING_LETO);
    LoadSubraceFromScript("sha_subraces3", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_NOT_USING_LETO);
    LoadSubraceFromScript("sha_subraces4", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_NOT_USING_LETO);
    LoadSubraceFromScript("sha_subraces5", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_NOT_USING_LETO);
    LoadSubraceFromScript("sha_subraces6", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_NOT_USING_LETO);
 
    //Load Shayan's Leto Subraces only if we are using Leto
    LoadSubraceFromScript("sha_leto_sraces1", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_USING_LETO);
    LoadSubraceFromScript("sha_leto_sraces2", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_USING_LETO);
    LoadSubraceFromScript("sha_leto_sraces3", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_USING_LETO);
    LoadSubraceFromScript("sha_leto_sraces4", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_USING_LETO);
    LoadSubraceFromScript("sha_leto_sraces5", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_USING_LETO);
    LoadSubraceFromScript("sha_leto_sraces6", SSE_SUBRACE_LOADER_CONDITION_LOAD_IF_USING_LETO);
 
    //:: Display messages about Leto Modifications
    //:: Note: some Leto Modifications messages are flagged vital and would be showed anyway
    //:: Recommended
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_CHARACTER_LETO_MODIFICATION);
 
    //Display messages when a player's sub-race is being changed.
    //:: Recommended
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_SUBRACE_CHANGE);
 
    //Display messages about SSE's status (Display when it is disabled/enabled)
    //:: Recommended
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_SSE_ENGINE_STATUS);
 
    //Display Error messages - Not a lot of those as I recall.
    //:: Recommended
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_ERROR);
 
    //Display messages about requirements
    //e.g. "You could not become this sub-race because you did not meet this and that requirement"
    //:: Recommended
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_REQUIREMENT);
 
    //Display messages about aliases
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_SUBRACE_ALIAS);
 
    //Display messages about sub-race items
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_CHARACTER_ITEM);
 
    //Display messages about non-leto stat modifications
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_CHARACTER_NON_LETO_MODIFICATION);
 
    //Display messages about character appearance modifications
        //SSE_Message_AddDisplayType(MESSAGE_TYPE_CHARACTER_APPEARANCE_MODIFICATION);
 
}

 



#17
The Mad Poet

The Mad Poet
  • Members
  • 425 messages

I see that it uses a NWNX database. Again I'm not familiar, but do you have NWNX and the database running when you load the module?



#18
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

Hmm. Are you using LETO or NWNX? And the OnModuleLoad I'm looking at looks different than yours for some reason.

 

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//:::::::::::::::::::::::: Shayan's Subrace Engine :::::::::::::::::::::::::::::
//:::::::::::::::::File Name: sha_on_modload :::::::::::::::::::::::::::::::::::
//::::::::::::::::::::: OnModuleLoad script ::::::::::::::::::::::::::::::::::::
//:: Written By: Shayan.
//:: Contact: mail_shayan@yahoo.com
//
// Description: This is an example of script of how to use Shayan's Subraces on
//              your Module.
//
// The OnModuleLoad script is where you define your subraces. (Look below)
//
// Double click on any of the methods below to get know how to use them.
//
//
// :: Version 2.0: Pre-made subraces are now seperated into categories (Monsterous, and Normal)
//                 and put into scripts: sha_subraces1, and sha_subraces2.

#include "sha_subr_methds"


void main()
{
   //Ignore this... this is for NWNX/SQL database functionality
   if(ENABLE_NWNX_DATABASE)
   {
        //Initialize NWNX DB support
        SQLInit();
        //Create subrace table in database (if it doesn't exist)
        DelayCommand(1.0, NWNX_CreateSubraceDBTables());
   }


   //Functions available for use are:
   //
   // ::The Most Important Method (Used to define your subrace). MUST BE CALLED BEFORE ALL OTHERS.::
   //----- CreateSubrace(int Race, string SubraceName, string HideResRef, string UniqueItemResref, int IsLightSensitive = FALSE, int DamageTakenWhileInLight = 0, int IsUndergroundSensitive = FALSE, int DamageTakenWhileInUnderground = 0, int ECL = 0, int IsUndead = FALSE, int PrestigiousSubrace = FALSE)
   //
   // ::Used to Add another Race that can be part of the Subrace.::
   // ::Reuse as many times as needed.::
   //----- AddAdditionalBaseRaceToSubrace(string subraceName, int AdditionalBaseRace)
   //
   // ::Used to add an Alignment Restriction to a Subrace.
   //----- CreateSubraceAlignmentRestriction(string subraceName, int CanBeAlignment_Good = TRUE , int CanBeAlignment_Neutral1 = TRUE, int CanBeAlignment_Evil = TRUE, int CanBeAlignment_Lawful = TRUE, int CanBeAlignment_Neutral2 = TRUE, int CanBeAlignment_Chaotic = TRUE)
   //
   // ::Used to add a Class restriction on the Subrace.
   //----- CreateSubraceClassRestriction(string subraceName, int CanBe_Barbarian = TRUE, int CanBe_Bard = TRUE, int CanBe_Cleric = TRUE, int CanBe_Druid = TRUE, int CanBe_Fighter = TRUE, int CanBe_Monk = TRUE, int CanBe_Paladin = TRUE, int CanBe_Ranger = TRUE, int CanBe_Rogue = TRUE, int CanBe_Sorcerer = TRUE, int CanBe_Wizard = TRUE)
   //
   // ::Used to change a Player Subrace's Appearance::
   // ::Use only ONCE per subrace::
   //----- CreateSubraceAppearance(string subraceName, int AppearanceChangeTime, int MaleAppearance, int FemaleAppearance)
   //
   // ::Used to give PC's a change in Ability scores, or Attack Bonus or Armour Class. During the day or Night.
   // ::USed in conjunction with CreateCustomStats() <Look Below>.
   //----- CreateTemporaryStatModifier(string subraceName, struct SubraceStats Stats, int TimeToApply, int InInteriorArea = TRUE, int InExteriorArea = TRUE, int InNaturalArea = TRUE, int InArtifacialArea = TRUE, int InUndergroundArea = TRUE, int InAbovegroundArea = TRUE)
   //
   // ::Used to define the Ability increase or decrease, AC increase/decrease, AB increase/Decrease.
   //----- SubraceStats CreateCustomStats(int StatModifierType, float StrengthModifier, float DexterityModifier, float ConstitutionModifier, float IntelligenceModifier, float WisdomModifier, float CharismaModifier, float ACModifier, float ABModifier)
   //
   // ::Used to disable/allow only the use of melee, ranged or other kind of weapons during certain times of day or permanently.
   // ::Use only ONCE per subrace::
   //----- SubraceRestrictUseOfWeaponsOfType(string subraceName, int WeaponType, int TimeOfDay = TIME_BOTH)
   //
   // ::Used to disable/allow only the use of heavy, medium or light armour during the day, night or permanently.
   // ::Use only ONCE per subrace::
   //----- SubraceRestrictUseOfArmourAndShieldsOfType(string subraceName, int Type, int TimeOfDay = TIME_BOTH, int Allow = FALSE)
   //
   // ::Add a favored Class to Subrace
   // ::Use only ONCE per subrace::
   //----- AddSubraceFavoredClass(string subraceName, int MaleFavoredClass, int FamaleFavoredClass)
   //
   // ::Add an effect to the Subrace, that takes effect during the night (lasts until morning), day(lasts until dusk) or permanently.
   // ::Use as many times as desired::
   //----- AddSubraceEffect(string subraceName, int EffectID, int Value1, int Value2, int nDurationType, float fDuration, int TimeOfDay)
   //
   // ::Add another skin for the subrace to be equipped at a particular level.
   // :: Use as Many times as desired.
   //----- AddAdditionalSkinsToSubrace(string subraceName, string SkinResRef, int EquipLevel, int iTime = TIME_BOTH)
   //
   // ::Use to create varying Spell resistance for the subrace.
   //----- CreateSubraceSpellResistance(string subraceName, int SpellResistanceBase, int SpellResistanceMax)
   //
   // ::Add 'claws' to the playable subrace.
   // :: Use as many times as desired.
   //----- AddClawsToSubrace(string subraceName, string RightClawResRef, string LeftClawResRef , int EquipLevel)
   //
   // :: Setup the player belonging to the subrace to 'switch' to another subrace
   //----- SetupSubraceSwitch(string subraceName, string switchSubraceName, int Level, int MustMeetRequirements = TRUE)
   //
   // :: Give additional 'unique' items
   //----- AddSubraceItem(string subraceName, string ItemResRef, int Level = 1)
   //
   // :: Set-up a Prestige class restriction for a subrace.
   //----- CreateSubracePrestigiousClassRestriction(string subraceName, int MinimumLevels = 1, int CanBe_ArcaneArcher = TRUE, int CanBe_Assasin = TRUE, int CanBe_Blackguard = TRUE, int CanBe_ChampionOfTorm = TRUE, int CanBe_RedDragonDisciple = TRUE, int CanBe_DwarvenDefender = TRUE, int CanBe_HarperScout = TRUE, int CanBe_PaleMaster = TRUE, int CanBe_ShadowDancer = TRUE, int CanBe_Shifter = TRUE, int CanBe_WeaponMaster = TRUE);
   //
   //
   // The following scripts load up the example subraces created by me (Shayan).
   // You can use these or add to them or delete them all.
   // You can find the Creature Hide relating to these subraces in Items -> Custom -> Creature Items -> Skin/Hide
   // You can also find the Unique Items relating to these subraces in Items -> Plot Items

   //:: Spell Hooking - Uncomment line 93 to enable it. Remember to have imported
   //::                 sha_spellhooks script.
   //SetLocalString(GetModule(), "X2_S_UD_SPELLSCRIPT", "sha_spellhooks");


   if(!ENABLE_LETO)
   {
       //:: These subraces do not use the Leto functions. They work on creature hides/skins
       //:: for their ability score bonuses, feats, etc.

       //Pre-made subraces... If you do not want to use them, comment or delete the lines below.
       //:: Loads the 'normal' subraces...
       DelayCommand(1.0, ExecuteScript("sha_subraces1", GetModule()));
       //:: Loads the 'monsterous' subraces...
       DelayCommand(2.0, ExecuteScript("sha_subraces2", GetModule()));
   }
   else
   {
       //:: These subraces use the new Leto functions. They get permanent ability score
       //:: boosts, feats, skills, etc.

       //Pre-made subraces... If you do not want to use them, comment or delete the lines below.
       //:: Loads the 'normal' subraces...
       DelayCommand(1.0, ExecuteScript("sha_leto_sraces1", GetModule()));
       //:: Loads the 'monsterous' subraces...
       DelayCommand(2.0, ExecuteScript("sha_leto_sraces2", GetModule()));

   }

   //:: This signals that all subraces are loaded onto the module.
   DelayCommand(3.0, SetLocalInt(oStorer, SUBRACE_INFO_LOADED_ON_MODULE, TRUE));

}



#19
Who said that I

Who said that I
  • Members
  • 492 messages
Nwnx (i think) since I have not really changed that much on that

#20
Who said that I

Who said that I
  • Members
  • 492 messages

Hmm. Are you using LETO or NWNX? And the OnModuleLoad I'm looking at looks different than yours for some reason.

 

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//:::::::::::::::::::::::: Shayan's Subrace Engine :::::::::::::::::::::::::::::
//:::::::::::::::::File Name: sha_on_modload :::::::::::::::::::::::::::::::::::
//::::::::::::::::::::: OnModuleLoad script ::::::::::::::::::::::::::::::::::::
//:: Written By: Shayan.
//:: Contact: mail_shayan@yahoo.com
//
// Description: This is an example of script of how to use Shayan's Subraces on
//              your Module.
//
// The OnModuleLoad script is where you define your subraces. (Look below)
//
// Double click on any of the methods below to get know how to use them.
//
//
// :: Version 2.0: Pre-made subraces are now seperated into categories (Monsterous, and Normal)
//                 and put into scripts: sha_subraces1, and sha_subraces2.

#include "sha_subr_methds"


void main()
{
   //Ignore this... this is for NWNX/SQL database functionality
   if(ENABLE_NWNX_DATABASE)
   {
        //Initialize NWNX DB support
        SQLInit();
        //Create subrace table in database (if it doesn't exist)
        DelayCommand(1.0, NWNX_CreateSubraceDBTables());
   }


   //Functions available for use are:
   //
   // ::The Most Important Method (Used to define your subrace). MUST BE CALLED BEFORE ALL OTHERS.::
   //----- CreateSubrace(int Race, string SubraceName, string HideResRef, string UniqueItemResref, int IsLightSensitive = FALSE, int DamageTakenWhileInLight = 0, int IsUndergroundSensitive = FALSE, int DamageTakenWhileInUnderground = 0, int ECL = 0, int IsUndead = FALSE, int PrestigiousSubrace = FALSE)
   //
   // ::Used to Add another Race that can be part of the Subrace.::
   // ::Reuse as many times as needed.::
   //----- AddAdditionalBaseRaceToSubrace(string subraceName, int AdditionalBaseRace)
   //
   // ::Used to add an Alignment Restriction to a Subrace.
   //----- CreateSubraceAlignmentRestriction(string subraceName, int CanBeAlignment_Good = TRUE , int CanBeAlignment_Neutral1 = TRUE, int CanBeAlignment_Evil = TRUE, int CanBeAlignment_Lawful = TRUE, int CanBeAlignment_Neutral2 = TRUE, int CanBeAlignment_Chaotic = TRUE)
   //
   // ::Used to add a Class restriction on the Subrace.
   //----- CreateSubraceClassRestriction(string subraceName, int CanBe_Barbarian = TRUE, int CanBe_Bard = TRUE, int CanBe_Cleric = TRUE, int CanBe_Druid = TRUE, int CanBe_Fighter = TRUE, int CanBe_Monk = TRUE, int CanBe_Paladin = TRUE, int CanBe_Ranger = TRUE, int CanBe_Rogue = TRUE, int CanBe_Sorcerer = TRUE, int CanBe_Wizard = TRUE)
   //
   // ::Used to change a Player Subrace's Appearance::
   // ::Use only ONCE per subrace::
   //----- CreateSubraceAppearance(string subraceName, int AppearanceChangeTime, int MaleAppearance, int FemaleAppearance)
   //
   // ::Used to give PC's a change in Ability scores, or Attack Bonus or Armour Class. During the day or Night.
   // ::USed in conjunction with CreateCustomStats() <Look Below>.
   //----- CreateTemporaryStatModifier(string subraceName, struct SubraceStats Stats, int TimeToApply, int InInteriorArea = TRUE, int InExteriorArea = TRUE, int InNaturalArea = TRUE, int InArtifacialArea = TRUE, int InUndergroundArea = TRUE, int InAbovegroundArea = TRUE)
   //
   // ::Used to define the Ability increase or decrease, AC increase/decrease, AB increase/Decrease.
   //----- SubraceStats CreateCustomStats(int StatModifierType, float StrengthModifier, float DexterityModifier, float ConstitutionModifier, float IntelligenceModifier, float WisdomModifier, float CharismaModifier, float ACModifier, float ABModifier)
   //
   // ::Used to disable/allow only the use of melee, ranged or other kind of weapons during certain times of day or permanently.
   // ::Use only ONCE per subrace::
   //----- SubraceRestrictUseOfWeaponsOfType(string subraceName, int WeaponType, int TimeOfDay = TIME_BOTH)
   //
   // ::Used to disable/allow only the use of heavy, medium or light armour during the day, night or permanently.
   // ::Use only ONCE per subrace::
   //----- SubraceRestrictUseOfArmourAndShieldsOfType(string subraceName, int Type, int TimeOfDay = TIME_BOTH, int Allow = FALSE)
   //
   // ::Add a favored Class to Subrace
   // ::Use only ONCE per subrace::
   //----- AddSubraceFavoredClass(string subraceName, int MaleFavoredClass, int FamaleFavoredClass)
   //
   // ::Add an effect to the Subrace, that takes effect during the night (lasts until morning), day(lasts until dusk) or permanently.
   // ::Use as many times as desired::
   //----- AddSubraceEffect(string subraceName, int EffectID, int Value1, int Value2, int nDurationType, float fDuration, int TimeOfDay)
   //
   // ::Add another skin for the subrace to be equipped at a particular level.
   // :: Use as Many times as desired.
   //----- AddAdditionalSkinsToSubrace(string subraceName, string SkinResRef, int EquipLevel, int iTime = TIME_BOTH)
   //
   // ::Use to create varying Spell resistance for the subrace.
   //----- CreateSubraceSpellResistance(string subraceName, int SpellResistanceBase, int SpellResistanceMax)
   //
   // ::Add 'claws' to the playable subrace.
   // :: Use as many times as desired.
   //----- AddClawsToSubrace(string subraceName, string RightClawResRef, string LeftClawResRef , int EquipLevel)
   //
   // :: Setup the player belonging to the subrace to 'switch' to another subrace
   //----- SetupSubraceSwitch(string subraceName, string switchSubraceName, int Level, int MustMeetRequirements = TRUE)
   //
   // :: Give additional 'unique' items
   //----- AddSubraceItem(string subraceName, string ItemResRef, int Level = 1)
   //
   // :: Set-up a Prestige class restriction for a subrace.
   //----- CreateSubracePrestigiousClassRestriction(string subraceName, int MinimumLevels = 1, int CanBe_ArcaneArcher = TRUE, int CanBe_Assasin = TRUE, int CanBe_Blackguard = TRUE, int CanBe_ChampionOfTorm = TRUE, int CanBe_RedDragonDisciple = TRUE, int CanBe_DwarvenDefender = TRUE, int CanBe_HarperScout = TRUE, int CanBe_PaleMaster = TRUE, int CanBe_ShadowDancer = TRUE, int CanBe_Shifter = TRUE, int CanBe_WeaponMaster = TRUE);
   //
   //
   // The following scripts load up the example subraces created by me (Shayan).
   // You can use these or add to them or delete them all.
   // You can find the Creature Hide relating to these subraces in Items -> Custom -> Creature Items -> Skin/Hide
   // You can also find the Unique Items relating to these subraces in Items -> Plot Items

   //:: Spell Hooking - Uncomment line 93 to enable it. Remember to have imported
   //::                 sha_spellhooks script.
   //SetLocalString(GetModule(), "X2_S_UD_SPELLSCRIPT", "sha_spellhooks");


   if(!ENABLE_LETO)
   {
       //:: These subraces do not use the Leto functions. They work on creature hides/skins
       //:: for their ability score bonuses, feats, etc.

       //Pre-made subraces... If you do not want to use them, comment or delete the lines below.
       //:: Loads the 'normal' subraces...
       DelayCommand(1.0, ExecuteScript("sha_subraces1", GetModule()));
       //:: Loads the 'monsterous' subraces...
       DelayCommand(2.0, ExecuteScript("sha_subraces2", GetModule()));
   }
   else
   {
       //:: These subraces use the new Leto functions. They get permanent ability score
       //:: boosts, feats, skills, etc.

       //Pre-made subraces... If you do not want to use them, comment or delete the lines below.
       //:: Loads the 'normal' subraces...
       DelayCommand(1.0, ExecuteScript("sha_leto_sraces1", GetModule()));
       //:: Loads the 'monsterous' subraces...
       DelayCommand(2.0, ExecuteScript("sha_leto_sraces2", GetModule()));

   }

   //:: This signals that all subraces are loaded onto the module.
   DelayCommand(3.0, SetLocalInt(oStorer, SUBRACE_INFO_LOADED_ON_MODULE, TRUE));

}

 

the script was the problem apparently! The script it came with was faulty since once I loaded the one you posted it worked! THANKS! :D



#21
Who said that I

Who said that I
  • Members
  • 492 messages

okay I was wondering the following:  Is it normal that special subraces get double the xp per kill since that is what is happening with me and not sure what script I should open to fix that....



#22
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

Hmm. Well I know this system also has it's own XP system. Most likely the default "nw_c2_default7" (monster OnDeath script) has been overwritten to use the new system. If you see that script in your list then it has been altered in some way.