#✅ | Peak Stamina compat?

1 messages · Page 1 of 1 (latest)

grizzled stag
#

How do i set the value of a progress bar to be the current value percentage of parcool stamina

tawdry notchBOT
#

Hi! 👋 Please first click the button below to start this support ticket.

⚠️ It is not possible for anybody to send messages in this ticket before it has been started, so you need to click the button for others to be able to help/answer you.

tawdry notchBOT
# grizzled stag How do i set the value of a progress bar to be the current value percentage of p...

SpiffyHUD does not need built-in compatibility for this. You can read ParCool’s stamina NBT using FancyMenu’s Client NBT Data placeholder and use it in a Progress Bar.

Your NBT data shows:

  • Current stamina: parcool:stamina.value
  • Maximum stamina: parcool:stamina.max

Set the Progress Bar’s Value to:

{"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.max"}}) * 100","decimal":"true"}}

This returns a percentage from 0 to 100, which matches the usual Progress Bar range.

If your Progress Bar is configured for a 0.01.0 range instead, remove * 100:

{"placeholder":"calc","values":{"expression":"{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.max"}}","decimal":"true"}}

If it displays an empty value, add Spiffy’s Player NBT Helper element and verify that the exact path is shown as parcool:stamina.value and parcool:stamina.max. On a multiplayer server, you may need the server-side NBT placeholder instead, which requires FancyMenu installed on the server. 📊

grizzled stag
#

[10 02 46] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Found no elements matching parcool:stamina
[10 02 46] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.max"}}) * 100","decimal":"true"}}

tawdry notchBOT
grizzled stag
#

[10 02 46] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Found no elements matching parcool:stamina
[10 02 46] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"parcool:stamina.max"}}) * 100","decimal":"true"}}

tawdry notchBOT
# grizzled stag [10 [02](https://cdn.discordapp.com/emojis/919963963016491028.webp?size=48&name=...

The error means parcool:stamina is not directly at the root of the player’s NBT. It is most likely inside the ForgeCaps compound, as shown in your screenshot.

Use these paths instead:

  • ForgeCaps."parcool:stamina".value
  • ForgeCaps."parcool:stamina".max

Set the Progress Bar’s value to:

{"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.\"parcool:stamina\".value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.\"parcool:stamina\".max"}}) * 100","decimal":"true"}}

The calculator error is only a consequence of the NBT placeholders returning no value.

If this still reports that no elements match, open SpiffyHUD’s Player NBT Helper and copy the complete path exactly as it appears there. Depending on your loader/version, the parent may be different, such as neoforge:attachments; the path must match the helper’s hierarchy exactly. 🧭

grizzled stag
#

[10 04 27] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Expected '.' at position 11: ...orgeCaps.<--[HERE]
[10 04 27] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Expected '.' at position 11: ...orgeCaps.<--[HERE]
[10 04 27] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps."parcool:stamina".value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps."parcool:stamina".max"}}) * 100","decimal":"true"}}

tawdry notchBOT
grizzled stag
#

[10 04 27] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Expected '.' at position 11: ...orgeCaps.<--[HERE]
[10 04 27] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Expected '.' at position 11: ...orgeCaps.<--[HERE]
[10 04 27] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps."parcool:stamina".value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps."parcool:stamina".max"}}) * 100","decimal":"true"}}

tawdry notchBOT
# grizzled stag [10 [04](https://cdn.discordapp.com/emojis/919963962924228648.webp?size=48&name=...

The backslashes are the problem. FancyMenu’s placeholder syntax is JSON-like, not real JSON, so \" is passed literally to Minecraft’s NBT path parser.

Use the path without quotes or backslashes:

ForgeCaps.parcool:stamina.value

and:

ForgeCaps.parcool:stamina.max

Your Progress Bar value should therefore be:

{"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.parcool:stamina.max"}}) * 100","decimal":"true"}}

The important correction is:

ForgeCaps.parcool:stamina.value

, not:

ForgeCaps.\"parcool:stamina\".value

If it still fails, verify the exact hierarchy in the Player NBT Helper, since the parent may differ between Forge/NeoForge versions. If needed, send your /logs/latest.log grabbed immediately after testing this; it can show the exact path FancyMenu is receiving. 🧩

grizzled stag
#

[11:56:31] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Found no elements matching ForgeCaps
[11:56:31] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Found no elements matching ForgeCaps
[11:56:31] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.parcool:stamina.max"}}) * 100","decimal":"true"}}
[11:56:32] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Found no elements matching ForgeCaps
[11:56:32] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlaceholder/]: [FANCYMENU] Error in nbt_data_get placeholder
com.mojang.brigadier.exceptions.CommandSyntaxException: Found no elements matching ForgeCaps
[11:56:32] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"ForgeCaps.parcool:stamina.max"}}) * 100","decimal":"true"}}

tawdry notchBOT
# grizzled stag [11:56:31] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.ClientSideNbtDataGetPlace...

That log confirms ForgeCaps does not exist in your player NBT, so my previous path was incorrect. Sorry about that. 🛠️

You are most likely using NeoForge, where the data is stored under neoforge:attachments.

Try these paths:

neoforge:attachments.parcool:stamina.value
neoforge:attachments.parcool:stamina.max

Your Progress Bar value should be:

{"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.parcool:stamina.value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.parcool:stamina.max"}}) * 100","decimal":"true"}}

Do not add backslashes or quotation marks around parcool:stamina.

If this also fails, open SpiffyHUD → Player NBT Helper and check the parent compound containing parcool:stamina. The path must start with the exact parent shown there:

  • NeoForge commonly: neoforge:attachments
  • Forge commonly: ForgeCaps

The error means the current path’s first compound is not present; the calculator itself is not the problem.

grizzled stag
#

working but my bad i meant to use peakstamina's max and current values as the variables for the calc not parcool

tawdry notchBOT
# grizzled stag working but my bad i meant to use peakstamina's max and current values as the va...

Got it, the PeakStamina data is stored here:

  • Current stamina: neoforge:attachments.peakstamina:stamina.Stamina
  • Maximum stamina: neoforge:attachments.peakstamina:stamina.MaxStamina

Use this as the Progress Bar value:

{"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina"}}) * 100","decimal":"true"}}

This calculates:

current stamina / maximum stamina × 100

The capitalization matters: Stamina and MaxStamina must use uppercase S and M.

If your Progress Bar uses a 0.01.0 range instead of 0100, remove * 100 from the expression. 📊

grizzled stag
#

[12:10:55] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"({"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina"}}) * 100","decimal":"true"}}

tawdry notchBOT
# grizzled stag [12:10:55] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: ...

The NBT paths are likely correct now, the log only shows a Calculator error, not an NBT path error. Try this version with explicit numeric return types and without the outer parentheses:

{"placeholder":"calc","values":{"expression":"{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}} * 100","decimal":"true"}}

First, test both NBT placeholders separately in a text element:

{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}}
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}}

They should display plain numbers. If they do, but the combined calculator still fails, use FancyMenu variables as a workaround:

  1. Create variables named peak_current and peak_max.
  2. In a HUD Ticker, add these actions:
    peak_current:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}}
    
    peak_max:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}}
    
  3. Set the Progress Bar value to:
    {"placeholder":"calc","values":{"expression":"{"placeholder":"getvariable","values":{"name":"peak_current"}} / {"placeholder":"getvariable","values":{"name":"peak_max"}} * 100","decimal":"true"}}
    
#

Set the Ticker delay to around 50–100 ms so the bar updates smoothly without checking NBT every game tick.

If it still fails, send /logs/latest.log as a file immediately after testing; that will show whether the raw PeakStamina values are numeric or formatted differently. 📊

grizzled stag
#

[12:13:24] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}} * 100","decimal":"true"}}

tawdry notchBOT
# grizzled stag [12:13:24] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: ...

The calculator is still receiving a value it cannot parse. The log does not show an NBT path error, but that does not confirm that both placeholders return usable numbers.

Please test the two placeholders separately in a Text element:

{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}}
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}}

They must display plain numeric values, for example 75 and 100.

  • If either one is blank or contains text, the path/value from the Player NBT Helper needs to be checked.
  • If both show numbers, create FancyMenu variables from them using a Ticker, then calculate from the variables:
{"placeholder":"calc","values":{"expression":"{"placeholder":"getvariable","values":{"name":"peak_current"}} / {"placeholder":"getvariable","values":{"name":"peak_max"}} * 100","decimal":"true"}}

The two variables should be set with:

peak_current:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}}
peak_max:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}}

Please send the exact outputs of the two individual tests. That will tell us whether the problem is the PeakStamina paths or the nested calculator input. 🧪

grizzled stag
#

ill pass i just need a fixed single calc

tawdry notchBOT
# grizzled stag ill pass i just need a fixed single calc

Understood, use this single expression:

{"placeholder":"calc","values":{"expression":"100 * {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina"}}","decimal":"true"}}

This calculates:

Stamina ÷ MaxStamina × 100

Do not escape any nested placeholders with backslashes. If this exact expression still produces the same calculator error, the issue is a FancyMenu placeholder-parser limitation with PeakStamina’s NBT values, and a single calculator expression cannot resolve it.

grizzled stag
#

[12:17:48] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: [FANCYMENU] Failed to parse Calculator placeholder: {"placeholder":"calc","values":{"expression":"100 * {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina"}} / {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina"}}","decimal":"true"}}

tawdry notchBOT
# grizzled stag [12:17:48] [Render thread/ERROR] [de.ke.fa.cu.pl.pl.ad.CalculatorPlaceholder/]: ...

I’m sorry, I shouldn’t keep guessing at this. The single-calculator syntax is valid, so the failure means at least one PeakStamina placeholder is not resolving to a plain numeric value. FancyMenu’s calculator cannot convert it automatically.

There is no different fixed single calc expression I can provide confidently from this log alone. The reliable options are:

  • Use the two NBT values through FancyMenu variables, then calculate from those variables.
  • Or verify the exact raw values with the Player NBT Helper / separate placeholder tests.

If you want further debugging, please attach /logs/latest.log directly, captured immediately after testing, not pasted text, so the complete placeholder output can be checked. 🧩

grizzled stag
#

let's just use the variable ticker method then, explain in baby stes

tawdry notchBOT
# grizzled stag let's just use the variable ticker method then, explain in baby stes

Yep, let’s do it step by step. 🧸

We’ll:

  1. Create two variables.
  2. Make a HUD Ticker update them.
  3. Make the Progress Bar calculate using those variables.

1. Create the variables

Leave the layout editor first.

Go to:

Customization → Variables → Manage Variables

Create these two variables:

my_peak_current
my_peak_max

Set their initial values to:

my_peak_current = 0
my_peak_max = 100

The initial values prevent the calculator from trying to divide by an empty value.

2. Add a Ticker

Open your SpiffyHUD layout editor.

Right-click the empty background and choose:

New Element → Ticker

The Ticker is invisible in-game.

Set its tick delay to around:

100

This updates the stamina values every 100 milliseconds.

3. Add the current stamina action

Right-click the Ticker and choose:

Manage Action Script or Edit Action Script

Add the action:

Set Variable Value (FM Variable)

Set its value to:

my_peak_current:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina"}}

4. Add the maximum stamina action

Add another Set Variable Value (FM Variable) action.

Set its value to:

my_peak_max:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina"}}

Make sure both actions are directly inside the Ticker’s action script, not inside an IF block.

5. Set the Progress Bar value

Right-click your Progress Bar and edit its Value.

Use:

{"placeholder":"calc","values":{"expression":"{"placeholder":"getvariable","values":{"name":"my_peak_current"}} / {"placeholder":"getvariable","values":{"name":"my_peak_max"}} * 100","decimal":"true"}}

This calculates:

current stamina ÷ maximum stamina × 100

6. Save and test

#

Save the layout with CTRL + S, leave the editor, and test the stamina bar.

If your Progress Bar uses a range from 0.0 to 1.0 instead of 0 to 100, use this value instead:

{"placeholder":"calc","values":{"expression":"{"placeholder":"getvariable","values":{"name":"my_peak_current"}} / {"placeholder":"getvariable","values":{"name":"my_peak_max"}}","decimal":"true"}}

Do not add backslashes before the nested placeholders.

grizzled stag
#

okay i think i see the issue, for some reason the values have an f at the end of them

tawdry notchBOT
# grizzled stag okay i think i see the issue, for some reason the values have an f at the end of...

Ah, that’s the issue! The NBT values are being returned like 75.0f, and the calculator cannot parse the trailing f. We can remove it automatically in the Ticker using FancyMenu’s Replace Text placeholder. 🧩

1. Replace the current stamina action

In the Ticker’s action script, use Set Variable Value with this value:

my_peak_current:{"placeholder":"replace_text","values":{"text":"{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.Stamina","return_type":"value"}}","search":"f$","replacement":"","use_regex":"true","replace_all":"false"}}

This changes a value like:

75.0f

into:

75.0

2. Replace the maximum stamina action

Add another Set Variable Value action with:

my_peak_max:{"placeholder":"replace_text","values":{"text":"{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"neoforge:attachments.peakstamina:stamina.MaxStamina","return_type":"value"}}","search":"f$","replacement":"","use_regex":"true","replace_all":"false"}}

Make sure both actions are directly inside the Ticker.

3. Keep this as the Progress Bar value

{"placeholder":"calc","values":{"expression":"{"placeholder":"getvariable","values":{"name":"my_peak_current"}} / {"placeholder":"getvariable","values":{"name":"my_peak_max"}} * 100","decimal":"true"}}

The Ticker should now store clean numbers, allowing the calculator to work correctly. Make sure the Ticker runs before the Progress Bar is evaluated; a tick delay of 100 ms is fine.