[DN 5.1] Help: Healing Surge

Framework(s) for D&D 4e, including Veggiesama's.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Post Reply
Jaxom
Kobold
Posts: 17
Joined: Mon Apr 05, 2010 7:38 pm

[DN 5.1] Help: Healing Surge

Post by Jaxom »

Anyone have the code and instructions to get a healing surge bar working with the DN Character Sheet v5-1.

I have the bar created as "SurgeBar" within the campaign properties and is two colors to show the bar adjust as the healing surges are used.

I figure that a Macro needs to be added to the "Health" section of Lib:Execute and that the Macro needs to do the following to the appropriate Properites... I'm hoping someone can help me figure out how the code should be written to get the bar to adjust correctly as healing surges are used by the character.

DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal

Thanks,

Jaxom
Kobold
Posts: 17
Joined: Mon Apr 05, 2010 7:38 pm

Re: [DN 5.1] Help: Healing Surge

Post by Jaxom »

Using some code for health bars that was created by Darakonis, I was able to apply it to making a healing surge bar and then just needed to add the following line...

Code: Select all

<!-- Surge bar-->
[H, macro("SurgeBar@Lib:Execute"): ""]
To the macros SurgeRecord & RestRecord

For those that might want the code, which I'm sure could be written better, for fun I thought I might make a few different colors later...

Code: Select all

<!--Surge bar-->
[H: setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.6): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.4): setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.8): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.6): setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.4): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.2): setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal > 0.8): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.2): setBarVisible("SurgeBar",0)]
<!--The following turns off the bars for NPCs. Delete these lines if you want NPCs to display surge bars-->
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]

Post Reply

Return to “D&D 4e Frameworks”