Aller au contenu

Photo

Creature property relations, where are those handled?


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

#1
SuperD-710

SuperD-710
  • Members
  • 130 messages
As title. By "relations" I meant, such as strength contribute to physical resistance, or magic contribute to spellpower, str/dex contribute to attack, etc. Since even temporary attribute buffs have immediate effects on related properties, am I right to assume those relations are handled in the engine?

If one were to modify/add some of those relations, what would be the best way to go about it? Thanks.

#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
I think you want to look at effects_h, specifically the EVENT_TYPE_EFFECT_APPLIED section, Most of this is handled directly in the scripts if I recall correctly.

#3
SuperD-710

SuperD-710
  • Members
  • 130 messages
I've looked at it, but any modify property effect is handled in engine by calling ApplyEffectModifyProperty(). Also anytime the script want to modify a property, we use engine functions SetCreatureProperty() or UpdateCreatureProperty() as well.



My question was that, for example, even if we call to only update strength, physical resistance/attack gets updated as well accordingly. Same goes for magic and spellpower, etc. So I was wondering if that's all handled in the engine, and if so is there any perceivable way to intercept/modify them.

#4
anakin5

anakin5
  • Members
  • 258 messages
combat_h !

#5
SuperD-710

SuperD-710
  • Members
  • 130 messages
I can probably recite combat_h in reverse by now. Just checked, it's not in there.



That recite bit is hyperbole btw :P

#6
anakin5

anakin5
  • Members
  • 258 messages
oh, you are trying to find the function that make a SetCreatureProperty on PROPERTY_ATTRIBUTE_ATTACK when you put 1 point in strength for example.



Yes it seems to be engine side. But it is only for display purposes.

#7
SuperD-710

SuperD-710
  • Members
  • 130 messages
That is only one of the few examples. As for the attack stat, it's not for display purposes. The extra "damage" stat with engine link might be for display purposes, but attack is not.



If you look at the attack result calculation, one of the parameters is to grab the attack stat of the creature.