Author Topic: Question re GetChallengeRating(object) function  (Read 574 times)

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« on: September 09, 2011, 04:42:01 pm »


               Has anyone any experience using the GetChallengeRating(object) function?

Specifically, when you're creating a critter, the toolset calculates the CR based on stats, HP etc, but the builder can manually amend that CR by adding a positive or negative integar to it.  So for instance a Zombie could be created that NWN determines is CR10, but the builder could nudge this up to CR12.

My question relating to the GetChallengeRating(object) function is that on testing it seems to return the CR that NWN has assigned by default, and not one that's been amended (so in the example above, it would return 10, not 12).

Does anyone know:

1. Am I incorrect in this (and my testing is messed up somewhere - although I'm literally just using the function to return the value and then displaying it on screen)?

2. If this is correct, is there anyway of getting the CR of the critter including the adjustment (ie to output CR12 from the example above)?

3. Is there a better (more accurate) way of getting a critter's danger rating?

Thanks
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #1 on: September 09, 2011, 05:06:01 pm »


               I use this function in my XP reward scripts and it works correctly afaik. If it wouldnt players would get insane xp ammounts as my monsters usualy have -10 or even more adjustment.
               
               

               
            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #2 on: September 11, 2011, 09:51:05 am »


               During further testing of this, I've discovered some things I didn't know:

1. The GetChallengeRating(object) function works correctly, using the modified CR if it's been adjusted.

2. If you have creatures in Hak files, and use an editor to modify them outside of the toolset, whilst some things edit fine, others (such as CR adjustments) don't edit correctly.  So although it's a bit slower and more labourious, it seems using the toolset to edit is the best option.

3. If you use NWN's 2da file as a reference for getting an XP reward, it only goes up to CR40 and if creatures are created with a higher CR (or manually given a higher CR by a DM (using the "dm_setCR 50" command)), when the script tries to get the CR from the 2da table, it fails and gives a very low amount of XP (it may possibly return zero - I didn't check this).  So, the XP script should allow for this.

... now, to get those hours of my life back ':pinched:'
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #3 on: September 11, 2011, 03:25:42 pm »


               

aradankir wrote...

2. If you have creatures in Hak files, and use an editor to modify them outside of the toolset, whilst some things edit fine, others (such as CR adjustments) don't edit correctly.  So although it's a bit slower and more labourious, it seems using the toolset to edit is the best option.


Hane you tried editing both the CRAdjust and ChallengeRating fields in the Hak file. It sounds like the problem is that the ChallengeRating  was alrady calculated with the CRAdjust included by the time it was saved into the .utc
               
               

               


                     Modifié par Lightfoot8, 11 septembre 2011 - 02:27 .
                     
                  


            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #4 on: September 11, 2011, 04:34:01 pm »


               Editing the CR directly didn't seem to change it when viewed in the toolset, or the CR was displayed in a script - it's like it hadn't been edited at all (leading me to think the toolset recalcuates it, or it's actually stored somewhere in the file you can't edit).

When I edited the CR Adjustment, it did display in the toolset with the correct adjustment and the correctly calculated CR, but the script that displayed the CR outputted the original CR, not the one the toolset was displaying.

This is perhaps more of a building / toolset issue, rather than scripting, but initially I thought the problem was down to the GetChallengeRating function - but that seems to work correctly.
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #5 on: September 14, 2011, 02:41:03 pm »


               The XP Slider in the Module > Advanced Tab, is really pretty good, where as most custom XP systems really aren't as good, to me that is.  I have been using Scrafaces XP system, and it's accurate too, but the gold thing is just not very good.  When a party of 5 team up and are fighting super hard monsters they end up getting a lot of XP & Gold. the killer can walk away with more XP too.

XP / Gold balance is extremely hard to obtain & keep, where if you give too much gold it will be a Monte Python campaign, where if you give too little gold then a player will be level 20-40 with + 3 gear or weak equipment etc...  I have played on many modules where I got to level 20 quickly and I didn't have much better than + 1 to +2 items on me.  This is bad.

Obviously most builders seek to be very much in control of XP & Gold on their modules, some even go through great measure to ensure that you do not get rich quick or rise in ranks too fast.  I'm all for slow advancement provided the storyline/RP & game-play are excellent...

Slow advanced in a bland module makes me hate it instantly.  I walk 8 maps to fight 2 goblins 3-5 times, Found some merchants in town, but that was it, nothing really exciting here to keep my interest, I walk a few more maps only meet some more of the same, so I close the module with 0 regret.

------------------------------------

Are you wanting to use the CR to calculate XP?
               
               

               


                     Modifié par _Guile, 14 septembre 2011 - 01:44 .
                     
                  


            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #6 on: September 14, 2011, 03:23:30 pm »


               

Are you wanting to use the CR to calculate XP?


Our scripts use CR to calculate both XP and treasure drops.  What I've discovered though is that if you give items to a creature, the Toolset calculates the creature's CR based on the items it has equipped (so giving it a +5 sword raises its CR).  However, discovered that some creatures have been given hides with powers on and these aren't used by the Toolset to calculate CR.

So, you can have a creature with a lowish CR (say CR10), which can be given a hide item which makes it much more dangerous / difficult to kill, but the CR rewards as though it's a CR10 creature.  As an example, I took one creature and made a sword with the properties of the hide and it changed it's CR from 24 to 271 '<img'>

So, I needed to manually adjust the CRs up to more appropriately reward PCs for the danger involved, both re XP and treasure.

Anyway, I've now returned to extracting things from haks into the toolset and editing there - as at least that works!
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Question re GetChallengeRating(object) function
« Reply #7 on: September 14, 2011, 10:42:40 pm »


               I only use Hides & Claws on my creatures now, I've found that custom items on Mobs can severly add to lag issues something bad, screws with CR, and is generally a bad idea.  (not to mention there are weapon switching bugs)

I'd rather give them special abilities than potions too.  Though there are some instance where potions are indeed better, this way they can heal if they are in a timestop. (winks*)  Ultimately avoiding (buffed) CRs through items on the monsters is important.

The only time I give a monster a weapon is when they are big boss (like really big) this way they can get really high Attack Bonuses through a stacking bug (e.g. if they have a claw that is say +10 and you give them a +10 weapon, they get +20 AB & yes the damage does stack too!)  Often 20d20 dmg is not enough if the items in the module are pretty uber, though I learned a while back ago not to hand out uber Dmg Immunity on items.  (Or at least severly limit it!)
               
               

               


                     Modifié par _Guile, 14 septembre 2011 - 09:45 .