Author Topic: Creatures giving multiple xp?  (Read 321 times)

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Creatures giving multiple xp?
« on: July 15, 2012, 04:19:12 am »


               I have 3 creatures that have decided to give you more xp than is set in the script.

I am using scarface xp,has been working great but recently a scout gives you the reward 4 times .

I have a werewolf that gives you it 3 times?

I checked the scripts and they are the same as other creatures.

Anyone know where I should look to correct this ,please let me know.
               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Creatures giving multiple xp?
« Reply #1 on: July 15, 2012, 06:03:07 am »


               Depending if it's a whole new xp system or not, you may have to have the xp slider set to zero in module properties. I know for the PWFX xp script I use, I have to make sure that the ondeath scripts I use has these lines in it.

  // safety mechanism in case creature kills itself
  if(GetLastKiller() == OBJECT_SELF) return;

and this near the bottom of the script to avoid double xp messages.

   // resurrect & self kill to bypass bioware xp message
   ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), OBJECT_SELF);
   ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(10000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY), OBJECT_SELF);
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Creatures giving multiple xp?
« Reply #2 on: July 15, 2012, 06:13:34 am »


               Yeah xp slider set to zero.creatures have same scripts as other ones.

I havn't really changed anything.

I give your code a try.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Creatures giving multiple xp?
« Reply #3 on: July 15, 2012, 06:28:15 am »


               

Knight_Shield wrote...

I havn't "really" changed anything.


In most cases the only reason something like what you describe would happen is due to the fact that something did change. Even if it was something that might not SEEM to have anything to do with the other. So just out of curiosity did you do anything else to the mod before you started to notice the problem?

Perhaps these particular NPC's are triggering the OnDeath user-defined event? Did any OnSpawn scripts change?

And one thing I know I'm guilty of is checking scripts on an object I placed in the mod instead of checking the blueprint. Might want to double check that.

I haven't looked at scarface's xp system yet but it seems odd that it would just not work right one day if nothing else changed. Although who knows? Not saying it's impossible.
               
               

               


                     Modifié par GhostOfGod, 15 juillet 2012 - 05:36 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Creatures giving multiple xp?
« Reply #4 on: July 15, 2012, 08:15:59 pm »


               How would they trigger  the user defined.I mean how do I check that?
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Creatures giving multiple xp?
« Reply #5 on: July 16, 2012, 02:25:57 am »


               Some info here: www.nwnlexicon.com/compiled/event.onuserdefined.html

and here: www.nwnlexicon.com/compiled/tutorial.celowin-partivuserdefinedevents.html

So if any of the mentioned npc/creatures are using any special or modified OnUserDefined or OnSpawn scripts, that might have something to do with it. It is also possible that other scripted systems from the nwvault or what not, that you may have recently imported, can override the default OnUserDefined and OnSpawn events to possibly cause  some wonky behaviour with scarface's.

If you have "nw_c2_default9" or "nw_c2_defaultd" in your script list it means that they have been overwritten.

This is all just guessing of course. Could be completely off target but I suppose it's a place to check at least.
               
               

               


                     Modifié par GhostOfGod, 16 juillet 2012 - 01:30 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Creatures giving multiple xp?
« Reply #6 on: July 18, 2012, 04:33:22 pm »


               Ok ,I did some testing.

I turn off xp script then no xp.Turn on I have xp so that part works.

If I place a monster on map giving me trouble he works giving me xp one time.If I use custom encounter from pallette the monsters give me multiple xp.

I guess deleting the encounter and make a new one will fix this.

EDIT:ok deleted encounter on pallete and made a new one.It worked .Anyone have this see this kinda thing before?
               
               

               


                     Modifié par Knight_Shield, 18 juillet 2012 - 03:44 .