#Modpack Update checker

1 messages · Page 1 of 1 (latest)

magic spearBOT
#

Hi! A few hints from the docs that should help you troubleshoot:

  1. The “equals” requirement compares the strings exactly as they come in. Nothing in FancyMenu strips a leading v automatically, so v1.2.3 and 1.2.3 are considered different. If you want to ignore that prefix, normalize both values before comparing (e.g., store them without the v, or run them through the trim_text / replace_text placeholders to strip it).

  2. web_text runs asynchronously, so until the HTTP request finishes the placeholder resolves to whatever default text it can return (usually an empty string). That means the requirement might evaluate while the variable is still empty, so the “if_not equals” branch will remain true until the value actually updates. Make sure your visibility requirement also checks that the ticker variable isn’t empty (e.g., use Is Text with mode: not-empty before comparing).

  3. There’s no built‑in “recheck only after this ticker finishes” trigger, but you can make the ticker set a second variable (like orb_version_ready) once it successfully updates the version text, and add that as an extra requirement before the equals check. This way the button only evaluates the comparison after orb_version_ready is true.

  4. Both json_parser and web_text return raw text, so trailing newlines or carriage returns can sneak in and break exact string compares. Wrap those variables in trim_text (or replace_text to remove \n/\r) before storing or comparing them. See the placeholders reference for trim_text / replace_text usage: Placeholders.

Let me know if you need help building the requirement logic!

proud maple
#

Variable Scope: "When using tick_mode = once_per_session in a layout ticker, does the variable change propagate immediately to all active layouts, or is a screen refresh required?"

Placeholder Nesting: "Is there a limit to how many levels deep I can nest placeholders (e.g., replace_text inside trim_text inside web_text) before it causes performance issues?"

Variable Definitions: "If I define a variable in user_variables.txt with a blank value, but a Ticker updates it using set_variable, will the .db file correctly persist that change across different layout screens?"

MCEF Dependency: "Does the web_text placeholder require a specific version of MCEF or any additional browser-engine mods to handle JSON responses from the Modrinth API?"

magic spearBOT
# proud maple Variable Scope: "When using tick_mode = once_per_session in a layout ticker, doe...

Hey Tyler! 🧡 I had a look through the FancyMenu docs, but they don’t cover those specific details yet—there’s no info on ticker variable propagation among active layouts, limits on nested placeholders, persistence quirks between user_variables.txt and ticker updates, or any browser-engine requirements for web_text beyond the general MCEF dependency.

If you’re still stuck, you could test the behaviors in-game (e.g., change the variable, open multiple layouts, reload screens) or ask in the Discord server—they might have some firsthand experience. Let me know if you want me to help track down a specific doc page!

proud maple
#

Ticker Initialization: "When using a Ticker with is_async = true, is there a risk of set_variable actions completing out of order if one (like web_text) takes longer than the others?"

Placeholder Cache: "Does the web_text placeholder cache the result for the entire session, or will it re-fetch the API data every time the layout is reloaded?"

Error Handling: "If the web_text URL fails or returns a 404, what does the variable value become? Does it stay empty () or return an error string?"

JSON Path Arrays: "When Modrinth returns an array $[0], is $[0].version_number the standard way to grab the first object's version, or does FancyMenu prefer a different syntax for JSON arrays?"

magic spearBOT
# proud maple Ticker Initialization: "When using a Ticker with is_async = true, is there a ris...

Here’s what the docs say (and don’t say) about your points:

  1. Ticker async ordering: The docs don’t describe how is_async = true tickers interleave Set Variable actions (especially when some actions await web_text). There’s no reference to guarantee ordering, so you’ll need to test it in-game or ask a human for more detail.

  2. web_text caching: The placeholder list entry for web_text simply says it “retrieves text content from a web URL” without mentioning any cache lifetime. The docs don’t spell out whether FancyMenu caches that value per session or refetches on each layout load.

  3. Error handling (404s, failures): Again, the placeholder reference doesn’t describe what happens if the request fails. There’s no documented “error string” vs. empty string behavior, so you’d need to observe it yourself or ask someone with hands-on knowledge.

  4. JSON-path arrays: The JSON Parser placeholder uses standard Jayway JsonPath syntax, so accessing the first array entry’s field with $[0].version_number is exactly how it’s done. That usage is spelled out on the JSON Paths page.

If you want a precise answer for the first three points, please test those scenarios in-game or ask a human helper, since the docs currently don’t cover them.

proud maple
#

Questions for Alice
Reset Behavior: "If reset_on_launch is true in user_variables.txt, but a Ticker with tick_mode = once_per_session sets the variable, will navigating away and back to the Title Screen trigger a re-fetch?"

Variable Priority: "If a variable is defined in both user_variables.txt and a layout's set_variable action, which one takes precedence if they occur at the same time during the first frame of the Title Screen?"

magic spearBOT
proud maple
#

Questions for Alice

JSON Path Precision: "In the json_path placeholder, if the file path is config/fancymenu/modpack_version.json, should the path value inside the curly braces use a dot $.localVersion or just localVersion for a top-level key?"

Web Request Timeout: "Does the web_text placeholder have a built-in timeout? If the Modrinth API is slow, will it return an empty string immediately or wait for the response?"

magic spearBOT
# proud maple Questions for Alice JSON Path Precision: "In the json_path placeholder, if the ...

Here’s what the docs say:

  1. JSON Path syntax — use a full JsonPath expression that starts from $, so when reading a top-level key you’d write it as $.localVersion. The JSON Paths page copies the official syntax, so just follow the same format there: JSON Paths.

  2. web_text timeout — the placeholder reference only states that it “retrieves text content from a web URL.” There’s no mention of timeouts or what happens if the API is slow, so the docs don’t clarify whether it waits or immediately returns an empty string. You’d need to test it in-game or ask for human assistance if you need that precise behavior.

proud maple
#

@magic spear Do I need both user_variables.txt when user_variables.db exisits

magic spearBOT
# proud maple <@795315959212539934> Do I need both user_variables.txt when user_variables.db e...

I couldn’t find anything in the FancyMenu docs about keeping both user_variables.txt and user_variables.db. The documentation only explains how to edit variables via the in-game manager and actions, but it doesn’t mention the file formats or whether you need both. If you need a concrete answer, you might want to test it in-game or ask a human helper who can inspect your files directly.

proud maple
#

I am working in FancyMenu and need to fix my "Loading Requirements."

The Problem:

My custom button (ID: ab13a010-3d07-4800-af24-52b9c555200e-1760507106544) is always visible, even when the versions match. I believe the issue is how I've defined the requirement container in the layout-meta versus the element itself.

Requirements:

  1. Please provide the exact code block for a fancymenu_visibility_requirement_is_text that compares ${modpack_current_version} and ${orb-version} using requirement_mode: if_not.
  2. Show me the correct way to structure the [loading_requirement_container_meta:ID] in the layout-meta so it matches the element_loading_requirement_container_identifier on the button.
  3. Reference the documentation on "is_text" requirements to ensure I am using the correct JSON syntax for the "equals" mode comparison.

My Goal:

The button should only load/appear if ${modpack_current_version} is NOT EQUAL to ${orb-version}.

magic spearBOT
# proud maple I am working in FancyMenu and need to fix my "Loading Requirements." ### The P...

Hi Tyler! Here’s how to match everything up using the docs:

  1. fancymenu_visibility_requirement_is_text block
    Use the Is Text requirement format from the Conditions page (see the “Is Text” entry on this page). In JSON-style form it looks like this:

    requirement_type = fancymenu_visibility_requirement_is_text
    requirement_mode = if_not
    requirement_value = ["mode":"equals","text":"{"placeholder":"getvariable","values":{"name":"modpack_current_version"}}","compare_with":"{"placeholder":"getvariable","values":{"name":"orb-version"}}"]$
    

    That compares the two variables and only passes when they are not equal (if_not + equals). Adjust the placeholders if you’ve normalized the strings (e.g., trimmed prefixes) before storing them in the variables.

  2. Matching the layout-meta container
    The layout needs a [loading_requirement_container_meta:<container_id>] block whose identifier equals the element_loading_requirement_container_identifier on your button. For example, if your button has element_loading_requirement_container_identifier = ab13a010-3d07-4800-af24-52b9c555200e-1760507106544, include this in the layout meta:

    element_loading_requirement_container_identifier = ab13a010-3d07-4800-af24-52b9c555200e-1760507106544
    
    [loading_requirement_container_meta:ab13a010-3d07-4800-af24-52b9c555200e-1760507106544]
    requirement_type = fancymenu_visibility_requirement_is_text
    requirement_mode = if_not
    requirement_value = ["mode":"equals","text":"{"placeholder":"getvariable","values":{"name":"modpack_current_version"}}","compare_with":"{"placeholder":"getvariable","values":{"name":"orb-version"}}"]$
    

    This ensures the requirement container is registered in the layout meta and the button really uses it.

#
  1. Reference for is_text syntax
    The “Is Text” requirement description in the Conditions docs shows the expected JSON format, which is ["mode":"comparison_mode","text":"text1","compare_with":"text2"]$. Use "mode":"equals" and wrap your placeholders for text and compare_with as shown above. That reference keeps your syntax aligned with FancyMenu’s parser.

With this setup the button will only become visible when ${modpack_current_version} and ${orb-version} differ. Let me know if you need a trimmed/normalized placeholder example too!

proud maple
#

I have a few follow-up questions regarding the "Loading Requirements" and "Ticker" mechanics to ensure zero-latency updates.

  1. Evaluation Order: When a layout loads, does the Ticker element execute its actions BEFORE or AFTER the Visibility Requirements of other elements (like buttons) are checked? If the Ticker runs after, how do I force a requirement re-check?

  2. Nested Placeholder Syntax: In my layout-meta, I am using:
    ["mode":"equals","text":"${variable_name}","compare_with":"${variable_name}"]$
    Is this "shorthand" ${} syntax fully supported within the JSON-style requirement value, or must I use the full {"placeholder":"getvariable"...} nested JSON structure for it to be stable?

  3. Ticker Frequency: My ticker is set to tick_mode = once_per_session with a tick_delay = 100. If a user stays on the title screen, will the button update its visibility state the moment the Ticker finishes the set_variable action, or does the UI require a manual screen refresh (like clicking into a menu and back)?

  4. Web Text Timeouts: If the GitHub URL fails to load (offline), what is the default "fallback" value for the web_text placeholder? Does it return an empty string, or the raw URL?

magic spearBOT
# proud maple I have a few follow-up questions regarding the "Loading Requirements" and "Ticke...

Hey Tyler! 💫

  1. Evaluation order: The docs don’t describe whether tickers run before or after visibility checks, so there’s no official guidance on forcing a re-check once your ticker updates a variable. You’ll need to observe the behavior in-game or ask a human helper for the exact timing.

  2. Placeholder syntax: FancyMenu’s placeholders use the JSON-style format shown on the Placeholders page (e.g., {"placeholder":"getvariable","values":{"name":"my_var"}}). There’s no mention of ${...} shorthand being supported inside requirement values, so stick to the full JSON structure to keep things stable.

  3. Ticker frequency & visibility refresh: The docs don’t explain whether a once_per_session ticker triggers an automatic requirements refresh when it writes a variable, nor whether the UI needs a manual screen reload. This would also need to be tested in-game or clarified by a human helper.

  4. web_text fallback: The placeholder reference simply says it “retrieves text content from a web URL”; it doesn’t specify what happens when the request fails (empty string, URL, etc.). You’d have to test an offline scenario or ask a human for that detail.

Sorry I can’t give you a definitive answer on the timing/fallback bits—if you want to dig deeper, testing in-game or requesting human help is the next best step.

proud maple
#

I am building an update checker for a Minecraft modpack using FancyMenu. I need the exact code for a "Loading Requirement" that applies to the ENTIRE layout.

Technical Context:

  • Local Version Source: A JSON file at config/fancymenu/modpack_version.json.
  • JSON Path: $.localVersion.
  • Variable 1 (Local): modpack_current_version.
  • Variable 2 (Web): orb-version (Fetched from a GitHub RAW URL).

The Logic Goal:

The entire layout should only LOAD if modpack_current_version is NOT EQUAL to orb-version. If they are the same (e.g., both 1.0.13), the layout should stay hidden/not load.

Please Provide:

  1. The full layout-meta block including the [loading_requirement_container_meta] and the [loading_requirement:fancymenu_visibility_requirement_is_text] block.
  2. Use the "if_not" + "equals" logic with full JSON placeholders: {"placeholder":"getvariable","values":{"name":"..."}}.
  3. Provide the Ticker code that pulls the local version from the JSON file and the web version from GitHub.
  4. IMPORTANT: Verify if placing the Loading Requirement on the LAYOUT-META prevents the Ticker from running. If the layout doesn't load, will the Ticker still update the variables for the next launch?
magic spearBOT
# proud maple I am building an update checker for a Minecraft modpack using FancyMenu. I need ...

Here’s how to wire everything up using the documented formats:


1. Layout-wide loading requirement

Use a layout-wide requirement (right-click background → Loading Requirements [Layout-Wide]), but under the hood the meta file needs both the [loading_requirement_container_meta:…] block and the requirement definition. This example keeps the layout hidden unless the two stored versions differ:

layout-meta {
  identifier = title_screen
  layout_index = 0
  render_custom_elements_behind_vanilla = false
  is_enabled = true
}

element_loading_requirement_container_identifier = version_mismatch

[loading_requirement_container_meta:version_mismatch]
requirement_type = fancymenu_visibility_requirement_is_text
requirement_mode = if_not
requirement_value = ["mode":"equals","text":"{"placeholder":"getvariable","values":{"name":"modpack_current_version"}}","compare_with":"{"placeholder":"getvariable","values":{"name":"orb-version"}}"]$

This uses the Is Text requirement (see the Conditions guide) with mode: equals/requirement_mode: if_not plus the documented placeholder format {"placeholder":"getvariable",…} from the Placeholders page. It will only let the layout load when the two variables are not equal.


2. Setting the variables

  • Local JSON version (modpack_current_version): Use your ticker (or another action) to run the JSON Parser placeholder with the full JsonPath syntax—see JSON Paths. Example action value:

    {"placeholder":"json","values":{"source":"/config/fancymenu/modpack_version.json","json_path":"$.localVersion"}}
    

    Store the result via Set Variable into modpack_current_version.

#
  • Web version (orb-version): Use web_text to fetch the GitHub RAW URL (per Placeholders → Web Text):

    {"placeholder":"webtext","values":{"source":"https://raw.githubusercontent.com/…/latest_version.txt","interval":"60"}}
    

    Then Set Variable to orb-version.

You can run those actions from the same ticker: add the JSON parse action first, set the variable, then add the web_text action followed by another Set Variable. The ticker’s tick_delay controls how often it re-checks.


3. Ticker setup summary

  • Tick mode: once_per_session (or normal if you want constant refresh).
  • Tick delay: 100 ms is fine.
  • Actions:
    1. Set Variable (modpack_current_version) with the JSON Parser placeholder above.
    2. Set Variable (orb-version) with the Web Text placeholder above.

This keeps the stored versions in sync with your local file and the GitHub API.


4. Does the requirement block the ticker?

The docs don’t explain whether a layout-wide requirement that blocks loading also prevents its tickers from running. In practice you’ll need to test: if the layout never loads, the ticker may never initialize, so the comparison can’t update. If you need the ticker to fetch data even when the layout is hidden, consider moving it into a universal layout (which always loads) or use a listener/ticker in a layout that stays enabled. The docs don’t guarantee the behavior, so testing in your setup is the safest way to confirm.

Let me know if you’d like me to help design the fallback layout or ticker logic!

proud maple
#

Alice, the layout is still appearing even though I've used your suggested syntax. I need to verify the Ticker's "Set Variable" action.

Current Ticker Code:

[executable_action_instance:get_local][action_type:set_variable] = modpack_current_version:{"placeholder":"json","values":{"source":"/config/fancymenu/modpack_version.json","json_path":"$.localVersion"}}

Questions:

  1. Does the "Set Variable" action support a JSON placeholder as the value directly in the .txt file?
  2. In the latest FancyMenu version, is there a specific "Wait" or "Delay" needed between the Ticker fetching a WebText and setting the Variable?
  3. If the user manualy changed 'modpack_current_version' in the Variable Manager to 1.0.11, will this Ticker action successfully OVERWRITE it to 1.0.13 on the next tick?
  4. Is the path "/config/fancymenu/..." relative to the Minecraft root, or does it need the "" prefix inside the JSON placeholder source string?