Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Dec 2017
Emraell Offline OP
stranger
OP Offline
stranger
Joined: Dec 2017
Is it possible to create a skill that deals a percent of the target's current vitality?

I'm having some difficulty understanding the behaviour of Damage: TargetCurrentVitality.

My skill currently is set up as:

Damage: TargetCurrentVitality
Damage Multiplier: 100
Damage Range: 0
Damage Type: None

In game, it deals 0-1 pure damage.

[b]EDIT 1[/b]
Setting Damage to TargetCurrentPhysicalArmor appears to crash the game.

Damage: TargetCurrentPhysicalArmor
Damage Multiplier: 99
Damage Range: -1
Damage Type: None

[b]EDIT 2[/b]
Might have been Damage Range: -1.

Trying with no Damage Range doesn't crash.

Last edited by Emraell; 19/12/17 02:16 AM.
Joined: Jun 2014
veteran
Offline
veteran
Joined: Jun 2014
So like the "Gravity/Demi" Final Fantasy Spells?

Joined: Dec 2017
Emraell Offline OP
stranger
OP Offline
stranger
Joined: Dec 2017
Pretty much. I just don't know how to make the current vitality thing work. There are no examples in the base game to use.

Joined: Dec 2017
Emraell Offline OP
stranger
OP Offline
stranger
Joined: Dec 2017
I didn't notice this in the logs before.

[CalculateBaseDamage] Trying to calculate damnage based on Target Current Vitality, but tgtCharStats is nullptr!

Joined: Nov 2017
Location: Ukraine
apprentice
Offline
apprentice
Joined: Nov 2017
Location: Ukraine
There are 2 ways I found to do this:
1) Scripting. Story script will do.
+: flexible, can setup it the way you want.
-: damage numbers wont be shown overhead

2) Deal damage with Status_HEAL with negative number. There is a tab for vitality%based heals.
+: easy to setup, just apply that status with your skill ExtraProperty
+: damage numbers overhead
-: damage numbers may look strange



A basic example with story script.
Will deal 10% hp damage each time a status YOUR_STATUS is applied.

IF
CharacterStatusApplid(_Character,"YOUR_STATUS",_)
AND
CharacterGetHitpointsPercentage(_Character,_CurrentHP)
AND
IntegerSubtract(_CurrentHP,10,_NewHP)
THEN
CharacterSetHitpointsPercentage(_Character,_NewHP);

Description:
line#1: triggers when a status YOUR_STATUS is applied to any character
#2: checks current HP of a target and saves it to _CurrentHP variable
#3: subtract 10 from _CurrentHP and saves to _NewHP variable
#4: sets target HP to new value

Of course there should be more conditions, like checks if target has HP left > 0, and kill it if it has <0 left after apply,
or some target checks (is it dead, is it enemy, etc.), but thats the idea.

If you find a better way to do it - lemme know plz =)

Hope that helped

Last edited by Module 003; 03/02/18 08:47 AM.
Joined: Nov 2017
E
journeyman
Offline
journeyman
E
Joined: Nov 2017
In case of HEAL damage numbers will look like this:
[Linked Image]


Moderated by  Larian_Koala, Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5