#Render distance button

1 messages · Page 1 of 1 (latest)

wicked sapphireBOT
#

You can make a render‑distance button by using a FancyMenu variable plus an action script that cycles through the four presets and calls the Set Minecraft Option action with the matching numeric value.

Steps

  1. Create a variable (e.g. rd_mode) via Customization → Variables → Manage Variables and initialize it to normal.
    (See the Variables page for details.)

  2. Add your button and open its action script.
    (Guided in Action Scripts.)

  3. Build an action script like this:

    • IF rd_mode equals tiny → set renderDistance to 2 with Set Minecraft Option and then set rd_mode to short.
    • ELSE-IF rd_mode equals short → set renderDistance to 4, set rd_mode to normal.
    • ELSE-IF rd_mode equals normal → set renderDistance to 8, set rd_mode to far.
    • ELSE → set renderDistance to 16, set rd_mode to tiny.

    Use the Set Variable Value action and the Set Minecraft Option action described on the Minecraft Options page.

  4. Optional: set the button label to show the current preset via {"placeholder":"getvariable","values":{"name":"rd_mode"}} so it reads “Render Distance: normal”.

That way each click cycles through TINY → SHORT → NORMAL → FAR → … and keeps Minecraft’s renderDistance option in sync.

opal dew
#

Can you walk me through building the action script?

wicked sapphireBOT
# opal dew Can you walk me through building the action script?

Of course! Here’s how to build the action script for a button that cycles through Tiny → Short → Normal → Far by updating renderDistance and a helper variable:

1. Create the variable

  • Open Customization → Variables → Manage Variables (see Variables) and add one named rd_mode.
  • Set its starting value to tiny (or whatever your button should start on).

2. Open the button’s action script

3. Build the IF chain

Add the following structure (each branch uses a Set Minecraft Option action and a Set Variable action):

  1. IF Is Variable Value (FM Variable) where name=rd_mode and value=tiny:
    • Action: Set Minecraft Option → name=renderDistance, value=2
    • Action: Set Variable Valuerd_mode:short
  2. ELSE-IF variable rd_mode equals short:
    • Set option to 4, set variable to normal
  3. ELSE-IF variable rd_mode equals normal:
    • Set option to 8, set variable to far
  4. ELSE (covers far and any fallback):
    • Set option to 16, set variable to tiny

💡 Use the Is Variable Value requirement with OPPOSITE where needed, and place each “Set Variable” action inside the matching branch so the variable always tracks the next preset.

4. Optional label

Set the button label to something like:

Render Distance: {"placeholder":"getvariable","values":{"name":"rd_mode"}}

So players see the currently selected preset.

This cycles the render distance every click while keeping Minecraft’s option synced.

opal dew
#

Is this correct?

wicked sapphireBOT
# opal dew Is this correct?

Almost there! A few tweaks will make it work:

  1. Each IF needs a value check (you probably already set it, but double-check the “Is Variable Value (FM Variable)” requirement for each branch uses rd_mode and compares against tiny, short, normal. Otherwise the script can’t tell which branch to run.

  2. Keep the Set Variable action inside the branch so after switching to renderDistance it also updates rd_mode to the next state:

    • tiny branch → set option to 2, then rd_mode:short
    • short branch → option 4, then rd_mode:normal
    • normal branch → option 8, then rd_mode:far
    • ELSE branch (covers far/fallback) → option 16, then rd_mode:tiny
  3. Label value strings consistently (tiny, short, normal, far) so your button label using {"placeholder":"getvariable","values":{"name":"rd_mode"}} reads nicely.

With those adjustments you’ve got a proper cycle button. If you want a full reference while editing, check the Action Scripts doc for managing IF blocks and actions.

opal dew
#

How would you make a button that changes the game's difficulty?

wicked sapphireBOT
# opal dew How would you make a button that changes the game's difficulty?

You can do it exactly like the render-distance button: use a variable to track the current difficulty and build an action script that cycles through the four levels while using the Set Minecraft Option action.

Quick steps

  1. Create a variable (e.g. diff_mode) via Customization → Variables → Manage Variables and set an initial value like peaceful.
  2. Right-click your button → Edit Action Script.
  3. Build an IF / ELSE-IF / ELSE chain that checks diff_mode with the Is Variable Value (FM Variable) requirement:
    • peaceful branch: use Set Minecraft Option with name= difficulty and value=0, then Set Variable to easy.
    • easy branch: set option to 1, variable to normal.
    • normal branch: set option to 2, variable to hard.
    • ELSE branch (covers hard/fallback): set option to 3, variable back to peaceful.
  4. (Optional) Set the button label to something like Difficulty: {"placeholder":"getvariable","values":{"name":"diff_mode"}}.

This cycles the difficulty value (0–3) every click while keeping the variable in sync. Use the same Set Minecraft Option action described on the Minecraft Options page.

opal dew
#

Can you walk me through building the action script?

wicked sapphireBOT
# opal dew Can you walk me through building the action script?

Absolutely! Here’s how to build the action script for a difficulty-cycling button:

1. Create a helper variable

  • Go to Customization → Variables → Manage Variables and create (for example) diff_mode.
  • Set its initial value to peaceful.

2. Open the button’s action script

  • Right-click the button → Edit Action Script.

3. Build the IF chain

Use four branches with the Is Variable Value (FM Variable) requirement each checking diff_mode:

  1. IF diff_mode = peaceful
    • Action: Set Minecraft Optionname=difficulty, value=0
    • Action: Set Variable Valuediff_mode:easy
  2. ELSE-IF diff_mode = easy
    • Set option to value=1, variable to normal
  3. ELSE-IF diff_mode = normal
    • Set option to value=2, variable to hard
  4. ELSE (covers hard or fallback)
    • Set option to value=3, variable back to peaceful

Each branch sets the option and then updates the variable to the next state, just like the render distance example but with difficulty (0–3).

4. Optional: show current difficulty

Set the button label to:

Difficulty: {"placeholder":"getvariable","values":{"name":"diff_mode"}}

so users see what difficulty is active.

Let me know if you want to show a more user-friendly name (e.g., capitalized) or add sounds/feedback!

opal dew
#

there's no difficulty option

wicked sapphireBOT
# opal dew there's no difficulty option

If the dropdown in the Set Minecraft Option action doesn’t list “difficulty”, just type it manually — the option name is difficulty and value needs to be the numeric level (0=Peaceful, 1=Easy, 2=Normal, 3=Hard). The action doesn’t require a preset entry in the list, it just needs the exact option name.

Build your script like I outlined before, but use those numbers for value. If you want, you can display the current mode by setting the button label to Difficulty: {"placeholder":"getvariable","values":{"name":"diff_mode"}}.

More info on this action is in the Set/Get Minecraft Options page — it shows how to name the option and use the action correctly.

opal dew
#

There is no difficulty value.

wicked sapphireBOT
# opal dew There is no difficulty value.

If you don’t see “difficulty” in the dropdown, just type it manually into the Name field of the Set Minecraft Option action. The option name is difficulty and the allowed numeric values are:

  • 0 → Peaceful
  • 1 → Easy
  • 2 → Normal
  • 3 → Hard

So each branch of your script should call the action with name=difficulty and the appropriate number. Then use Set Variable Value to update diff_mode to the next label (e.g., easy, normal, etc.).

The Set/Get Minecraft Options page documents how to enter the option name and value in case you need a refresher.

opal dew
#

How would I make a graphics mode button that ranges from "FANCY" and "FAST"?

wicked sapphireBOT
# opal dew How would I make a graphics mode button that ranges from "FANCY" and "FAST"?

You can make a graphics-mode button the same way as the other option buttons: track the current mode with a variable and use Set Minecraft Option in an action script to cycle between fancy and fast.

Steps

  1. Create a variable (e.g. graphics_mode) via Customization → Variables → Manage Variables and set it to fancy.

  2. Right-click the button → Edit Action Script.

  3. Build an IF/ELSE chain:

    • IF graphics_mode = fancy:
      • Set Minecraft Option → name=graphics_mode, value=fast
      • Set Variable Value → graphics_mode:fast
    • ELSE (covers fast/fallback):
      • Set Minecraft Option → name=graphics_mode, value=fancy
      • Set Variable Value → graphics_mode:fancy

    The option name is literally graphics_mode, so type it manually in the action because it isn’t always listed.

  4. (Optional) Set the button label to show the current mode:
    Graphics: {"placeholder":"getvariable","values":{"name":"graphics_mode"}}

That cycles between Fancy and Fast every click. See the Set/Get Minecraft Options page if you need a reminder about configuring that action.

opal dew
#

Can you walk me through building the action script?