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!
#✅ | More Stuff about brightness sliders
1 messages · Page 1 of 1 (latest)
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?
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:
-
Create a variable (e.g.
brightness_label) via Customization → Variables → Manage Variables.
Docs: Variables -
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 / ELSEchain. - Use the
Is Numberrequirement each time and compare$$value(the slider’s current value) to your thresholds (0, 0.5, 1). TheIs Numberrequirement’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
ELSEbranch 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). -
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.
Okay so, I set the "Number" text to ```{"placeholder":"calc","values":{"expression":"$$value * 100","decimal":"false"}}````but what do I compare the number to?
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” to0. - 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!
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
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:
- 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 Variableaction:brightness_label:Moody
- Set Number to
- Append an ELSE-IF with the same Number placeholder, “Compare With” =
50, andSet Variable→brightness_label:Default. - Add another ELSE-IF for
100and setbrightness_label:Bright. - 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.
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:
-
Near the bottom of the action script, add the
Set Minecraft Option Valueaction (name: gamma,value: $$value). That’s what’s described in the Set Minecraft Option section of the docs. -
Above (or before) that action, keep your
IF / ELSE-IF / ELSEblock that sets thebrightness_labelvariable to “Moody/Default/Bright” or the percent text using theSet Variable Value (FM Variable)action. Each branch should still runSet Variable Valuebased on theIs Numberrequirement (compare to0,50, and100with the$$valueexpression). That ensures the label text changes but doesn’t stop the gamma action from running. -
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.
I don't understand
No worries, let me split it up:
-
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: $$valueIf that action disappears, the slider stops working.
-
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_labelvariable; they don’t block the gamma action. -
Example action order:
- IF
$$valueequals 0 → Set Variablebrightness_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.
- IF
-
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!
Okay you know what, let's make a new brightness slider from scratch including the 3 texts for 0, 50 and 100.
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
0to100(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
IFblock withIs Numberrequirement:- Number:
{"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}} - Compare With:
0 - Inside:
Set Variable Value→brightness_label:Moody
- Number:
- Append an
ELSE-IFchecking the same expression against50, set variable tobrightness_label:Default. - Add another
ELSE-IFcomparing to100, setbrightness_label:Bright. - Add an
ELSEthat setsbrightness_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!
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:
-
Create a variable (e.g.
brightness_label) via Customization → Variables → Manage Variables.
Variables -
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"}} -
Edit the slider’s action script:
- Add an
IF / ELSE-IF / ELSEchain withIs Numberrequirements comparing$$value(no calculator needed since the slider already uses 0–100).IFcompare with0→Set Variable Valuetobrightness_label:MoodyELSE-IFcompare with50→brightness_label:DefaultELSE-IFcompare with100→brightness_label:BrightELSE→ setbrightness_label:{"placeholder":"calc","values":{"expression":"$$value","decimal":"false"}}%
- After the branch, add
Set Variable Value? wait instructions say keep brightness action. AddSet Minecraft Option Valueaction (namegamma, value$$value) so the slider actually changes Minecraft’s brightness.
Action Scripts & Minecraft Options
- Add an
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!
No without the texts
Got it—if you just need a plain brightness slider (no “Moody/Default/Bright” text), here’s the minimal setup:
- Slider range: Set the slider to go from
0to100(matching vanilla brightness). - Pre-selected value: Use
{"placeholder":"minecraft_option_value","values":{"name":"gamma"}}so it always starts at the current brightness. - Action script: Add one action (
Set Minecraft Option Value) with:Name:gammaValue:$$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.
Okay nevermind.
No problem! If you ever want to revisit it or need help with anything else, just let me know 💫
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!
Marked by Bunni 🐇