My goal is split in two parts:

First, I'd like to make a script that adds both physical and magical armor to every characters maximum vitality (players and enemies), without removing their armor. So, a character with 100 HP, 50 Physical armor and 30 Magical armor would now have 180 HP, 50 Physical armor and 30 Magical armor.

I'm not sure if this should be a charScript or a gameScript, but something along those lines is what I've thought so far:
Code
INIT
CHARACTER:__Me

EVENTS

EVENT AddHP
VARS
	FLOAT:_PhysicalArmor
	FLOAT:_MagicalArmor
	FLOAT:_BonusHP
ON
	OnInit()
ACTIONS

IF "c1&c2"
	CharacterGetStat(_PhysicalArmor,__Me,PhysicalArmorPoints)
	CharacterGetStat(_MagicalArmor,__Me,MagicArmorPoints)
THEN
	Set(_BonusHP,0)
	Add(_BonusHP,_PhysicalArmor)
	Add(_BonusHP,_MagicalArmor)

ENDIF


I'm not sure if EVENT would be a good way to trigger this, since I'm looking for a continuous script (if a character switch gears, their vitality must be updated). Also, I don't know how I can use the _BonusHP value to actually alter characters maximum Vitality, I've found no commands that does that.

I have not yet decided wether Armor bonuses/restorations (like Fortify or Mend Metal) would heal character's health or just increase their maximum health (or maybe increase maximum health and mantain current % health), but this isn't important for now.

The second part to the mod is to make all damage sources deal damage to both vitality and the proper armor (except Piercing, I'm not sure what to do with it, atm). I don't even know where to start with this, since I've seen no proper scripting that states how damage is inflicted to armor/health.

I'd like to know if this kind of mod is possible with the tools we have now, and, if it's not, if someone could think of a workaround.

Last edited by Zerd; 05/10/17 02:59 AM.