#β | Get balance from scorebored in multiplayer minecraft server
1 messages Β· Page 1 of 1 (latest)
what if i setup a command to run every so often to check the balance, could i read that from chat somehow?
That's a clever idea! π€
While FancyMenu (and by extension SpiffyHUD) has a listener for "On Chat Message Received," allowing you to detect when a chat message appears, there are some limitations to consider:
- Chat message content: Using it to parse dynamic data like a balance might be tricky and prone to errors if the message format subtly changes or if other chat messages interfere. You'd likely need to use text parsing placeholders or requirements, which can become quite complex for robust data extraction.
- Server-side setup: You'd still need to configure the server to periodically send the balance information to your client's chat.
Given these complexities, it's generally not the recommended way to get dynamic data like a player's balance. Scoreboard support is definitely something that would make this much smoother in the future!
For now, the scoreboard-related placeholders are client-side only and can only work with data the client inherently knows, not what gets printed in chat.
well the client can see the balance, i just need to read from that line
Yes, I understand that the client can see the balance in the chat! My apologies if my previous explanation wasn't clear enough. π
The main challenge with reading specific data like a balance from chat is extracting just that numerical value reliably. If the balance is displayed as part of a chat message (e.g., "Your balance is: 1234 coins"), while FancyMenu can detect the message, it doesn't have a direct, built-in feature to easily "filter" out just the 1234 from the rest of the text and use it as a numerical value for a progress bar or other dynamic element.
You would need to use a combination of Text elements and placeholders like "Split Text" and "Replace Text" within FancyMenu to try and isolate the number from the chat message. This can be quite advanced and brittle if the chat message format ever changes. Additionally, "On Chat Message Received" is a listener, and while listeners can execute action scripts to set variables, it might still be a complex setup to get a consistently updated numerical value that can then be used in other elements.
Currently, directly reading dynamically changing numbers from a specific part of a visible chat message to drive other UI elements (like progress bars) isn't designed to be straightforward within SpiffyHUD. It's more geared towards displaying the message itself or triggering actions based on its presence.
I hope this clarifies things a bit more! Let me know if you would like me to elaborate on anything. π
i meant i can see it on the scoreboard, is there a way to read a specific line?
Ah, thank you for clarifying! My apologies for the misunderstanding. You're completely right to point that out. π
If the balance is visible on the in-game scoreboard, that definitely changes things! There are "Scoreboard Info" placeholders in FancyMenu that allow you to read scoreboard values.
You can use the get_scoreboard_value placeholder to get the value of a specific scoreboard objective for a player. It looks something like this:
{"placeholder":"get_scoreboard_value","values":{"objective":"<objective_name>","player":"<player_name>"}}
You would need to replace <objective_name> with the actual name of your scoreboard objective (e.g., "balance") and <player_name> with the player you want to get the balance for (e.g., {"placeholder":"playername"} for the current player).
You can then use this placeholder in a text element or as the progress value in a progress bar element!
You can find more details about placeholders in the FancyMenu documentation: Placeholders
Does this sound like what you're looking for? Let me know if you need more help with the exact setup! π
i see "chat customizer" but it doesnt show anything, is there a way to do a custom chat?
I haven't found any information about a "chat customizer" tool or feature in the documentation for SpiffyHUD or FancyMenu. It's possible that this is a feature from another mod or a misunderstanding. π€
Regarding setting up a custom chat:
FancyMenu primarily focuses on GUI customization, not direct chat interface modification. While you can use some elements in screens to display text dynamically (like using placeholder-driven Text elements to show messages), it doesn't provide tools to fundamentally change how the in-game chat box functions or appears in the HUD.
If you're looking to modify the chat's appearance itself (like its position, background, or colors), that would typically require a dedicated chat modification mod, which is outside the scope of what SpiffyHUD and FancyMenu do.
I hope this clears things up! π
i'd be fine with using text placeholders for messages if i can input messages in my own menu
Yes, you absolutely can input messages in your own menu using text placeholders! That's a great way to display dynamic content. π
Here's how you can do it:
- Add a "Text Input Field" element: This element allows users to type text directly into your custom menu.
- Add a "Text" element: This element will display the message you want.
- Link them with a Variable:
- Right-click the Text Input Field element and enable its Variable Linking option. Give it a unique variable name (e.g.,
user_message). - Right-click the Text element. For its text content, use the "Get Variable Value (FM Variable)" placeholder and set it to read from your
user_messagevariable:{"placeholder":"getvariable","values":{"name":"user_message"}} - Now, whatever the user types into the Text Input Field will be displayed by the Text element!
- Right-click the Text Input Field element and enable its Variable Linking option. Give it a unique variable name (e.g.,
This setup allows users to input messages within your custom menu and have those messages appear elsewhere in your menu or HUD.
You can learn more about these elements and variables here:
- Elements
- Text Input Field
- Variables
- Placeholders (specifically, the "Get Variable Value" placeholder)
Does this sound like what you had in mind? Let me know if you need any more details! β¨
how do i get messages i recieve ingame?
To get messages you receive in-game, you can use a FancyMenu Listener (available in FancyMenu v3.8.0+).
Here's how you can set it up:
-
Create a Listener:
- While NOT in the layout editor, go to FancyMenu's menu bar at the top of the screen.
- Click on Customization -> Manage Listeners.
- Click New Listener, then choose On Chat Message Received.
- Give your new listener a descriptive name (e.g., "Chat_Receiver").
-
Configure the Listener's Action Script:
- Right-click your newly created listener and select Manage Action Script.
- Add an action to Set Variable Value (FM Variable).
- For the value of this action, you'll use the
$$chat_message_stringvariable provided by the listener. You'll also need a variable name to store it in. For example:last_chat_message:$$chat_message_string - This will store the plain text content of every received chat message into a variable named
last_chat_message.
-
Display the Message in your HUD:
- In your SpiffyHUD layout, add a Single-Line Text element (or a regular Text element).
- Set its content to use the "Get Variable Value (FM Variable)" placeholder, referencing the variable you just created:
{"placeholder":"getvariable","values":{"name":"last_chat_message"}}
Now, whenever you receive a chat message in-game, the listener will update the last_chat_message variable, and your text element in SpiffyHUD will display that message!
You can find more details about listeners here:
Let me know if you would like me to clarify any of these steps! π
can i show more than just the last message? would love a way to scroll
That's a fantastic idea! While there isn't a direct "chat history" element, you can definitely create a scrolling display for multiple messages with a bit more setup using variables and custom logic. It would involve combining a few features:
Here's a concept of how you could approach it:
-
Multiple Variables for Chat Lines:
- Instead of just one
last_chat_messagevariable, create several for a limited history, e.g.,chat_line_1,chat_line_2,chat_line_3, etc. (decide how many lines you want to display).
- Instead of just one
-
Listener with Action Script for Shifting Messages:
- The "On Chat Message Received" listener's action script would become more complex. Every time a new message comes in, it would need to "shift" the old messages down:
chat_line_Xgetschat_line_X-1's value.chat_line_1gets the new$$chat_message_string.
- This requires nested
Set Variable Valueactions withGet Variable Valueplaceholders, executed in the correct order (starting from the oldest message).
- The "On Chat Message Received" listener's action script would become more complex. Every time a new message comes in, it would need to "shift" the old messages down:
-
Displaying the Lines in Text Elements:
- You would then have multiple Single-Line Text elements (or regular Text elements with line wrapping disabled) on your HUD, each displaying one of your
chat_line_Xvariables.
- You would then have multiple Single-Line Text elements (or regular Text elements with line wrapping disabled) on your HUD, each displaying one of your
- Scrolling (Advanced - Requires more complex logic):
- True scrolling for this setup would be more advanced, as FancyMenu's default "Text" element scrolling is for its own content when it overflows, not for dynamically changing multiple distinct text elements.
- To simulate scrolling, you'd need buttons (e.g., "scroll up" and "scroll down") that, when clicked, modify which
chat_line_Xvariable each displayed text element shows. For example, if you have 10chat_linevariables but only display 3 at a time, scroll buttons would change an offset variable, which then dynamically updates the placeholders in your text elements to showchat_line_offset,chat_line_offset+1, etc.
Limitations:
- This approach stores messages client-side only and has a finite history size (determined by how many variables you set up).
- The action scripting for shifting messages can get quite long and intricate depending on how many lines you want.
Recommendation:
For a simple, limited display of the last few messages, steps 1-3 are very doable! If you need extensive chat history with full scrolling comparable to Minecraft's native chat, that's likely beyond FancyMenu's current capabilities, as it delves into full UI rendering of complex dynamic lists.
Would you like me to try and lay out the action script logic for shifting messages in steps 1-3? π
adding a single line text element for the scoreboard shows the word "literal" before the title and it doesnt appear in-game
Oh dear! "Literal" appearing before the title and not showing in-game sounds like a placeholder issue. This usually happens when the placeholder isn't correctly structured or evaluated by FancyMenu. π₯
Could you please provide the exact placeholder text you are using for your "Single-Line Text" element? I need to see the full placeholder, including all values, to understand why "literal" might be appearing and why it's not showing in-game.
For example, is it something like this (replace with your actual text):
{"placeholder":"get_scoreboard_value","values":{"objective":"balance_objective","player":"{"placeholder":"playername"}"}}
Once I have that, I can take a closer look! π
sorry not scoreboard, i mean titles
Ah, thank you for clarifying! Not scoreboard, but Titles. This helps a lot! π
If you're seeing "literal" appear and the title not showing in-game when trying to display HUD titles or subtitles (like the large text that appears in the middle of your screen from /title commands), that often indicates a problem with the current_title placeholder or how it's being used.
The current_title placeholder has two main parameters: is_subtitle and as_json.
Here's how the current_title placeholder should generally be used:
- For the main HUD title:
{"placeholder":"current_title","values":{"is_subtitle":"false","as_json":"false"}} - For the HUD subtitle:
{"placeholder":"current_title","values":{"is_subtitle":"true","as_json":"false"}}
Potential Reasons for "literal" and not appearing in-game:
as_jsonparameter: Ifas_jsonis set to"true", it means the placeholder will return the raw JSON text component (e.g.,{"text":"Hello","color":"gold"}). A plain text element might display this literally or struggle to render it, leading to unexpected output like "literal". Unless you specifically need to work with the raw JSON for advanced formatting in a component-aware element, you should keepas_jsonset to"false".- No Title Currently Active: If no
/titlecommand has been recently executed in-game, or if the title has timed out, the placeholder won't have any content to display, which could result in blank space or default text like "literal" if not handled properly. - Element Type: Ensure you are using a Single-Line Text element or a regular Text element. If you're trying to integrate this into a component that expects a different data type, it might not render correctly.
Could you please share the exact placeholder text you are using for the current_title? This will help me pinpoint the issue much more quickly! π
{"placeholder":"current_title","values":{"is_subtitle":"false","as_json":"false"}}
This is what i have and when i do /title player title "test"
It shows "literal{test}" but only in the editor. in-game the text doesnt render at all
Thank you for providing the exact placeholder! That's very helpful. π
The fact that you're seeing "literal{test}" in the editor (instead of just "test") and nothing in-game suggests a deeper issue with how the current_title placeholder is being processed or accessed by SpiffyHUD in your specific setup. The placeholder itself {"placeholder":"current_title","values":{"is_subtitle":"false","as_json":"false"}} is indeed the correct one to get the plain text version of the active title.
Here are a few things we can check:
-
Minecraft Version and FancyMenu/SpiffyHUD Version:
- What Minecraft version are you playing on? (e.g., 1.20.1, 1.21.1)
- What are your FancyMenu and SpiffyHUD versions? (These are important as newer versions sometimes have bug fixes or changes).
- It's possible you're using an older version of SpiffyHUD (version 1 or 2) which may not support this correctly. If so, please update to SpiffyHUD version 3.
-
Mod Conflicts:
- It's possible another mod is interfering with the title display system. Have you recently added any new mods, especially those that might modify HUD elements or chat?
- To test for this, you could try running Minecraft with only FancyMenu, SpiffyHUD, and their dependencies (Konkrete, Melody) to see if the issue persists.
-
Element Type:
- Just to confirm, are you placing this placeholder inside a Single-Line Text element? This is the most suitable element for this.
-
A quick workaround/test for the "literal" part:
- In the description of the
boss_nameplaceholder (which also returns a text component but often displays as "literal"), it's suggested to use a Single-Line Text element and only place the placeholder inside it. Ensure there isn't any other text, spaces, or formatting outside of the placeholder in your Single-Line Text element's content.
- In the description of the
- Log File: Could you please provide your
latest.logfile after you've tried using the/titlecommand and observed the placeholder behavior?- You can find this file in your Minecraft instance at
<MC instance>/logs/latest.log. - Please upload it to a site like Gist and share the link here. This log can often contain error messages or warnings that might explain why the placeholder isn't rendering correctly in-game. Please make sure it's
latest.log, not a crash log.
- You can find this file in your Minecraft instance at
Let's get to the bottom of this! β¨
1.20.1
Alright, thank you for those details! So you're on Minecraft 1.20.1. That's a good start.
Could you please also provide the exact version numbers for:
- FancyMenu (
fancymenu-FORGE-...jarorfancymenu-FABRIC-...jar) - SpiffyHUD (
spiffyhud-FORGE-...jarorspiffyhud-FABRIC-...jar)
These full version numbers will help determine if it's a known bug in a specific release.
And again, please share your latest.log file when you get a chance. It's often invaluable for diagnosing these kinds of issues! π
spiffyhud_fabric_3.1.1_MC_1.20.1.jar
fancymenu_fabric_3.8.1_MC_1.20.1.jar
Thank you for the detailed version numbers!
- SpiffyHUD:
3.1.1 - FancyMenu:
3.8.1
These are recent versions for Minecraft 1.20.1, which is good!
Given everything we've discussed:
- The placeholder
{"placeholder":"current_title","values":{"is_subtitle":"false","as_json":"false"}}is correct. - You're using recent versions of the mods.
- The "literal" issue typically points to a placeholder not resolving correctly or an unexpected format.
The most crucial piece of information needed now is your latest.log file. This log often captures internal errors or warnings that occur when placeholders are evaluated, even if they don't crash the game.
Please upload your latest.log file (found in <MC instance>/logs/latest.log) to a site like Gist and share the link here. This will give us the best chance to figure out why the title isn't rendering in-game for you. β¨
Thank you so much for sharing your latest.log file! I've reviewed it, and it gives us some good clues.
I see a repeated error related to the current_title placeholder when it tries to fetch the value:
[22:20:12] [FancyMenu Main Thread/WARN]: Invalid/Unknown placeholder 'current_title' from mod 'spiffyhud (SpiffyHUD)' received! Placeholder will be returned as text.
This warning is the reason you're seeing "literal" and why the title isn't appearing in-game. It means that FancyMenu is not recognizing current_title as a valid placeholder provided by SpiffyHUD.
This is quite unexpected, as current_title should be a valid SpiffyHUD placeholder according to the documentation on Game UI Related placeholders. It looks like there might be a bug or an installation issue that's preventing SpiffyHUD from correctly registering its placeholders with FancyMenu.
Here's what I recommend we try:
- Clear FancyMenu Cache/Re-install (Carefully):
- Backup your
config/fancymenufolder first! This folder contains all your layouts and customizations. - Delete the
fancymenu_placeholder_cache.jsonfile inside yourconfig/fancymenufolder. This forces FancyMenu to re-read all available placeholders. - If that doesn't work, try a clean re-installation of SpiffyHUD and FancyMenu:
- Delete the
spiffyhud-fabric-3.1.1-MC-1.20.1.jarandfancymenu-fabric-3.8.1-MC-1.20.1.jarfiles from yourmodsfolder. - Re-download them directly from their official Modrinth/CurseForge pages and place them back in your
modsfolder.
- Delete the
- Backup your
- Check for other Mod Conflicts: While FancyMenu's log isn't directly pointing to a conflict, sometimes other mods (especially those that heavily modify the UI or titles) can indirectly prevent placeholders from registering correctly.
- If the re-install doesn't work, try running the game with only FancyMenu, SpiffyHUD, and their core dependencies (
konkreteandmelody). See if thecurrent_titleplaceholder works then.
- If the re-install doesn't work, try running the game with only FancyMenu, SpiffyHUD, and their core dependencies (
This "Invalid/Unknown placeholder" warning is definitely the key to your problem. Let me know how these steps go! β¨
This support thread has been marked as solved by @frail gazelle.
The AI helper is now disabled, but you can still continue the conversation if needed. Thank you for using our support system!