Aller au contenu

Photo

script that does area balance/setting area level


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

#1
SuperD-710

SuperD-710
  • Members
  • 130 messages
Could someone point me to the part of the script that set the area level and execute creature balancing? I'm not talking about the helpers in sys_areabalance or the chargen scripts, but the part that actually call those helpers. Thanks in advance!

#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
In creaure_core.nss under EVENT_TYPE_SPAWN.

#3
SuperD-710

SuperD-710
  • Members
  • 130 messages
Thanks for the answer.

So looking through the script, it looks like the "TargetLevel" field of the areadata 2DA is not used? Contrary to the comment on the field title (in the xls), the equipment level is scaled based on creature level rather than the value in "TargetLevel" field? Is this field used for anything at all?

#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
You don't seem to have noticed the line:
[dascript]
int nLevelToScale = AS_GetCreatureLevelToScale(OBJECT_SELF, AB_GetAreaTargetLevel(OBJECT_SELF));
[/dascript]

#5
SuperD-710

SuperD-710
  • Members
  • 130 messages
I didn't miss the line. AB_GetAreaTargetLevel() grabs either the hero level or the area's min/max level if hero's level is outside range. However there's another field "TargetLevel" inside the xls, which I didn't see was used for anything, while the comment says it should be used for equipment scaling, thus my question.

#6
Magic

Magic
  • Members
  • 187 messages
Not all comments are true, unfortunately. Leaves me stumped again and again. :( ScaleEquippedItems() in creature_core.nss scales by the calculated creature level instead, I agree.

Edit: Oh, or maybe the engine function uses both levels as parameters? Some testing with the xls data seems to be in order.

Modifié par Magic, 26 janvier 2010 - 07:25 .


#7
Craig Graff

Craig Graff
  • Members
  • 608 messages

SuperD-710 wrote...

I didn't miss the line.
AB_GetAreaTargetLevel() grabs either the hero level or the area's
min/max level if hero's level is outside range. However there's another
field "TargetLevel" inside the xls, which I didn't see was used for
anything, while the comment says it should be used for equipment
scaling, thus my question.


My apologies, I didn't notice that you had switched from talking about creatures to talking about items. Nor did I pay enough attention to which column you were speaking of. It does in fact work as you noted, meaning that the TargetLevel column is useful only as a reference to the approximate desired level of items in the area (meaning in turn that the column should have been changed to the comment type at some point).

#8
SuperD-710

SuperD-710
  • Members
  • 130 messages
No worries, thanks for answering. Was just wondering if that column was used for anything at all.