Aller au contenu

Photo

Where are healing factors defined? (esp. for blood magic)


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

#1
Emperor Iaius I

Emperor Iaius I
  • Members
  • 1 158 messages
  So I want to adjust the rate of healing spells, especially the blood magic penalty, but I have no idea where to do this. 

I've found "HEAL_HEALTH_FRACTION" for the heal spell and "BLOOD_MAGIC_FACTOR" for the regen spell listed in spell_singletarget.nss, and other healing spells like death magic and such have their own factors in their scripts.

But where are these factors defined? Where can I adjust them?

#2
jsd313

jsd313
  • Members
  • 184 messages
I have edited healing for my mod by adjusting values in 2 2DA's, ABI_base.xls and difficulty.xls. Can change most everything this way but depending what type of mod you have would decide if this way would work. I'd check those out at least and then the wiki has some 2DA information as well.

#3
Emperor Iaius I

Emperor Iaius I
  • Members
  • 1 158 messages
Hm. I found the values in difficulty.xls, but those apply globally and I'm most interested in counteracting the blood magic penalty. I could do this spell by spell in the scripts, but that's extremely inelegant.



What fields control healing rates in abi_base.xls?

#4
jsd313

jsd313
  • Members
  • 184 messages
in ABI_base you can see all the spells/abilities on the first tab labeled ABI_base. You can adjust the mana cost, the upkeep cost, cooldown, and other things. I am pretty sure you can cut down the BM penalty. Line 147 in the worksheet is for Blood Magic , I'm not sure that you will be able to adjust what you want but this is how I know to change things.

#5
shennessy

shennessy
  • Members
  • 29 messages
The special code for bloodmage healing is done inside of effect_heal_h, which is an include nss that has no main. To rebuild anything you do in that file you need to recompile rules_core. The blood magic healing factor is defined in spell_constants_h and is a number that divides the healing amount. If you change anything in spell_constants_h you also need to rebuild rules_core. The formula for the healing factor (100+spellpower)* healing factor is also in spell_constants_h I believe.



I am pretty sure once you have to recompile any of the core stuff you have a mod thats going to be incompatible with any other mod that does the same. There is no way I know of that Bioware could be able to merge the core scripts like they can merge 2das. An example of a mod that is going to be very incompatible is the Combat tweaks mod. It pretty much recompiles every core script. It looks like the PRC is also going to be using alot of core script recompiles also. Hopefully as time goes on we can come up with something a bit less monolithic when effecting core game code.

#6
Rolenka

Rolenka
  • Members
  • 2 257 messages
You could probably do this with event interception to avoid having to compile a core script.

EVENT_TYPE_APPLY_EFFECT is handled by rules_core, which calls Effects_HandleApplyEffect() from effects_h, whcih calls Effects_HandleApplyEffectHeal() from effect_heal_h. Effects_HandleApplyEffectHeal() calls Effect_ApplyInstantEffectHeal() from the same script, which is where your code is.

It modifies the healing amount by BLOOD_MAGIC_FACTOR, a constant float. You could change the healing code to use another variable of your choosing.

If you need help with event interception I suggest Dhuester's dev diary and modding notes. I'm not sure if there's another guide somewhere or not.

Modifié par Rolenka, 19 janvier 2010 - 07:16 .