#✅ | More Stuff about brightness sliders

1 messages · Page 1 of 1 (latest)

storm plumeBOT
#

Hey Bunni 🐇, could you tell me a bit more? 😊
Are you trying to make a slider that changes Minecraft’s brightness option, or is it about showing a value somewhere?
If it’s the former, using a Decimal slider with the Set Minecraft Option action (name: gamma, value $$value, set preselected value via {"placeholder":"minecraft_option_value","values":{"name":"gamma"}}) is usually the way to go. Let me know what you already tried or what part is confusing so I can help precisely!

charred heron
#

So I've made a working brightness slider but I am missing something, so at 0% it says "Moody" instead of actually saying 0% same when it's at 50% it says "Default" and when it's at 100% it says "Bright", how could I possibly replicate that?

storm plumeBOT
# charred heron So I've made a working brightness slider but I am missing something, so at 0% it...

You can mimic the “Moody/Default/Bright” names by letting the slider set a FancyMenu variable every time it changes, and then reading that variable in the slider’s label. Here’s the flow:

  1. Create a variable (e.g. brightness_label) via Customization → Variables → Manage Variables.
    Docs: Variables

  2. Give the slider an action script that runs whenever its value changes:

    • Right-click the slider → Edit Action Script.
    • Start with an IF / ELSE-IF / ELSE chain.
    • Use the Is Number requirement each time and compare $$value (the slider’s current value) to your thresholds (0, 0.5, 1). The Is Number requirement’s “number” field accepts placeholders, so you can paste something like {"placeholder":"calc","values":{"expression":"$$value","decimal":"true"}} or {"placeholder":"calc","values":{"expression":"$$value * 100","decimal":"false"}} depending on how your slider is configured.
    • Inside each branch add a Set Variable action (brightness_label:Moody, brightness_label:Default, brightness_label:Bright).
    • In the ELSE branch you can fall back to showing the numeric percent: brightness_label:{"placeholder":"calc","values":{"expression":"$$value * 100","decimal":"false"}}%.

    Reference: Action Scripts (see $$ placeholders, Set Variable, and conditionals).

  3. Use the variable in the slider label so it displays whatever you just wrote into it:

    Brightness: {"placeholder":"getvariable","values":{"name":"brightness_label"}}
    

    (You can add this in the label field via the Placeholder picker.)
    Reference: Placeholders

That way the slider still adjusts the gamma option, but the label says “Moody” at 0 %, “Default” at 50 %, “Bright” at 100 %, and shows the percent for every other value.

charred heron
#

Okay so, I set the "Number" text to ```{"placeholder":"calc","values":{"expression":"$$value * 100","decimal":"false"}}````but what do I compare the number to?

storm plumeBOT
# charred heron Okay so, I set the "Number" text to ```{"placeholder":"calc","values":{"expressi...

If your slider is 0–1 but you’re comparing percentages, just keep reusing the same calculator expression and compare it to the target numbers (0, 50, 100). Example:

  • In the IF requirement, set Compare Mode = equals and paste this as the Number:
    {"placeholder":"calc","values":{"expression":"$$value * 100","decimal":"false"}}
    Then set “Compare With” to 0.
  • For the ELSE-IF branch, compare the same expression with 50.
  • For the next one, compare it with 100.

That way the requirement evaluates “Is the current percent 0? 50? 100?”—and you can set the variable to “Moody”, “Default”, or “Bright” inside each branch. Keep a final ELSE that sets the variable to the % value so every other position still shows the number.

Let me know if your slider uses 0–100 instead and I’ll adjust the comparison values accordingly!

charred heron
#

Yes my slider does use 0-100% just like the vanilla brightness slider, it's a very similar replication of it but again.. The 3 set texts are missing for when it's on 0, 50 and 100

storm plumeBOT
# charred heron Yes my slider does use 0-100% just like the vanilla brightness slider, it's a ve...

Perfect! Since your slider already uses 0‑100, you can just compare $$value directly.

Here’s what to do in the slider’s action script:

  1. Add an IF Statement with an Is Number requirement.
    • Set Number to {"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}
    • Set Compare With to 0
    • In the IF block add Set Variable action: brightness_label:Moody
  2. Append an ELSE-IF with the same Number placeholder, “Compare With” = 50, and Set Variablebrightness_label:Default.
  3. Add another ELSE-IF for 100 and set brightness_label:Bright.
  4. Finally add an ELSE that sets the variable to the percentage text:
    brightness_label:{"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}%
    

Then use that variable in the slider label:
Brightness: {"placeholder":"getvariable","values":{"name":"brightness_label"}}

This keeps the slider updating gamma (like before) but now shows “Moody/Default/Bright” at 0/50/100 and the percentage everywhere else.

charred heron
#

It broke the slider, it only goes up from moody to 1% now..

storm plumeBOT
# charred heron It broke the slider, it only goes up from moody to 1% now..

Looks like the action script lost the part that actually changes the game’s brightness, so the slider only updates your label variable (which explains why it “breaks” and just jumps from Moody to 1%).

To fix it, keep the original Set Minecraft Option action in the script (so Minecraft keeps reacting to the slider) and add the IF/ELSE logic alongside it rather than instead of it:

  1. Near the bottom of the action script, add the Set Minecraft Option Value action (name: gamma, value: $$value). That’s what’s described in the Set Minecraft Option section of the docs.

  2. Above (or before) that action, keep your IF / ELSE-IF / ELSE block that sets the brightness_label variable to “Moody/Default/Bright” or the percent text using the Set Variable Value (FM Variable) action. Each branch should still run Set Variable Value based on the Is Number requirement (compare to 0, 50, and 100 with the $$value expression). That ensures the label text changes but doesn’t stop the gamma action from running.

  3. Display that variable in the slider label with {"placeholder":"getvariable","values":{"name":"brightness_label"}}, so the UI shows the special names at the three key points and a percent elsewhere.

With both pieces in place, the slider will still actually change brightness while showing “Moody/Default/Bright” at 0/50/100.

charred heron
#

I don't understand

storm plumeBOT
# charred heron I don't understand

No worries, let me split it up:

  1. Keep the original brightness action: Your slider needs to tell Minecraft to change the brightness. That means your action script still needs this action:

    Set Minecraft Option Value
    Name: gamma
    Value: $$value
    

    If that action disappears, the slider stops working.

  2. Add the label logic below/above it: Don’t replace the action—just add an IF/ELSE chain before the set-option action. The IFs only change the brightness_label variable; they don’t block the gamma action.

  3. Example action order:

    • IF $$value equals 0 → Set Variable brightness_label:Moody
    • ELSE-IF equals 50 → Set Variable brightness_label:Default
    • ELSE-IF equals100 → Set Variable brightness_label:Bright
    • ELSE → Set Variable brightness_label:$$value% (using the calculator or just $$value)
    • Then (always) Set Minecraft Option Value with name=gamma, value=$$value.
  4. Label: Use Brightness: {"placeholder":"getvariable","values":{"name":"brightness_label"}} for the slider label so it shows the text you just stored.

The key is: the IF/ELSE block only updates the label variable, and the gamma action still runs every time. Let me know if you want a screenshot of the action script order!

charred heron
#

Okay you know what, let's make a new brightness slider from scratch including the 3 texts for 0, 50 and 100.

storm plumeBOT
# charred heron Okay you know what, let's make a new brightness slider from scratch including th...

Let’s build it step-by-step 😊

1. Create a helper variable

  • Go to Customization → Variables → Manage Variables and add a new variable, e.g. brightness_label.

2. Create the slider

  • Add a new Slider element.
  • Set it to Decimal or Integer Range from 0 to 100 (mirror vanilla brightness).
  • Set “Pre-Selected Value” to {"placeholder":"minecraft_option_value","values":{"name":"gamma"}} so it starts at the current brightness.
  • In the label field use:
    Brightness: {"placeholder":"getvariable","values":{"name":"brightness_label"}}
    (Reads the variable you’ll set in the script.)
    Docs: Minecraft Options and Placeholders

3. Build the action script (right-click slider → Edit Action Script):

  • Add an IF block with Is Number requirement:
    • Number: {"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}
    • Compare With: 0
    • Inside: Set Variable Valuebrightness_label:Moody
  • Append an ELSE-IF checking the same expression against 50, set variable to brightness_label:Default.
  • Add another ELSE-IF comparing to 100, set brightness_label:Bright.
  • Add an ELSE that sets brightness_label:{"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}% (shows the exact percent elsewhere).
  • After the entire IF/ELSE tree, add the original brightness action:
    • Set Minecraft Option Value
    • Value: name=gamma, value=$$value

This keeps the slider actually adjusting gamma while the IF tree only updates the label text. The label then shows “Moody/Default/Bright” at 0/50/100 and the percent for every other value. Let me know if you’d like a screenshot of how the script should look!

charred heron
#

I need help making a brightness slider

storm plumeBOT
# charred heron I need help making a brightness slider

Sure! Here's how to build a 0‑100 brightness slider that also shows “Moody”, “Default” and “Bright” at 0/50/100:

  1. Create a variable (e.g. brightness_label) via Customization → Variables → Manage Variables.
    Variables

  2. Add a slider set to 0–100 and pre-select its value with
    {"placeholder":"minecraft_option_value","values":{"name":"gamma"}}
    Use this label:
    Brightness: {"placeholder":"getvariable","values":{"name":"brightness_label"}}

  3. Edit the slider’s action script:

    • Add an IF / ELSE-IF / ELSE chain with Is Number requirements comparing $$value (no calculator needed since the slider already uses 0–100).
      • IF compare with 0Set Variable Value to brightness_label:Moody
      • ELSE-IF compare with 50brightness_label:Default
      • ELSE-IF compare with 100brightness_label:Bright
      • ELSE → set brightness_label:{"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}%
    • After the branch, add Set Variable Value? wait instructions say keep brightness action. Add Set Minecraft Option Value action (name gamma, value $$value) so the slider actually changes Minecraft’s brightness.
      Action Scripts & Minecraft Options

That keeps the slider controlling gamma while the label displays the three special words at 0/50/100 and shows a percent otherwise. Let me know if you want the IF block screenshot!

charred heron
#

No without the texts

storm plumeBOT
# charred heron No without the texts

Got it—if you just need a plain brightness slider (no “Moody/Default/Bright” text), here’s the minimal setup:

  1. Slider range: Set the slider to go from 0 to 100 (matching vanilla brightness).
  2. Pre-selected value: Use {"placeholder":"minecraft_option_value","values":{"name":"gamma"}} so it always starts at the current brightness.
  3. Action script: Add one action (Set Minecraft Option Value) with:
    • Name: gamma
    • Value: $$value

That’s all you need for the slider to adjust brightness exactly like vanilla. If you want to show the current percent later, you can add a label like Brightness: {"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}%, but otherwise you can leave the label empty or set it to whatever text you like.

charred heron
#

Okay nevermind.

storm plumeBOT
#
Thread Marked as Solved

This support thread has been marked as solved by @charred heron.

The AI helper is now disabled, but you can still continue the conversation if needed. Thank you for using our support system!