#JSON-UI General
1 messages · Page 48 of 1
its possible to code your dev packs and reload like you would on pc on mobile
Surely its enough to atleast accept the json shema file
Hahah you'd think so wouldn't you
no really
com.mojang is read-only
hm i have seen people do so
If you do goof with your ohone you can access it
They're on an old android version
I think it was android 13 that said no
waveplayz is also a phone guy and he has a complicated but efficient setup. I think he made a post on here somewhere that could help you get something set up
It has scripting autocomplete (someone made 1 specifically for this ide)
Try adding
"$schema": "https://kalmemarq.github.io/Bugrock-JSON-UI-Schemas/ui.schema.json",
To your json ui file
In the best case you would have some form of auto completions
What am I supposed to be seeing?
Autocomletions in the best case
I think I'm genuinely seeing everything but Json UI somehow
anyone know if %.(x)s kinda breaks with emojis/glyphs? Im trying to grab first 10 characters, which works fine with normal string, but breaks when I use a glyph, it just picks its own length to use?
Ok then ig your ide just doesn't do that
Maybe you have to supply the schema in a setting somewhere
I mean if you want to go through the trouble, there is a way to make it work on phones: https://discord.com/channels/523663022053392405/1286770002120409169
i have noticed when you paste a glyph in chat, sometimes there is like a fake extra space, that might count as a character which kind of messes with your glyphs. could be wrong though
If my PC had wifi rn this would probably be like 10x easier but I cannot afford to buy the adaptor rn
could possibly be, might have to split with a , or somin, but feels like unnecessary extra bindings
oh well
try an extra char for whatever value
Connect your phone with a cable and select usb tethering on your phone in the dropdowm
Dont have a cable that would work
it seems to count for 3 characters.. thats annoying asf
I promise I'm not trying to be awkward
i thought so
might have to make it smaller then
At the end of the day idk if it would even be worth it
Ive poured so much time into trying to get better at this that I don't even know if I'd be satisfied once I'm done with it anymore
The main "hype" died years ago but it's still something that it would be nice to create
Sorry for wasting y'all's time
np
a-z 0-9 is 1 character
§ is 2 characters
\eU123 is 3
Emojis take up 3 chars. More on this here
https://wiki.bedrock.dev/json-ui/json-ui-intro#unicode-character-width
Isn't OreUI still JSON...
Last I heard it was something closer to html
OreUI has been already used, and it still uses JSON at the time we checked.
I don't know how they've managed it but they've made it even harder to understand
Im just never using UI
Idc how much I want my pack to exist. Id much rather learn to write in fluid enchantment table
The technology behind ore ui is browser based yes. But it was a mistake to think that mojang would ever allow us raw access to that
I saw that comming already a while ago
The only way this turns out well is if the json files will only be used to reference element content created in jsx
I guess I'm never going to feel comfortable doing UI
Man I was so excited about Ore UI. Back then I wanted to create a JSON UI design program but dropped it since I thought "oh well, ore ui is announced, it'd surely make the tool obsolete anyway and provide a much more feature rich experience". All Ore UI actually has been so far is a big disappointment in every possible way.
- the ui isnt faster than json ui and has more input lag
- it lacks innovation and feels plain
- its not customizable like it was thought to be
- its been ages since its announced and its still not done, not even closely
- it doesnt give creators opportunity to express more freedom in their minigames through advanced UI elements
They should've just improved json ui at the end of the day
Or build on top of the existing features to create a new language making it easier to create and manage uis..
it lacks innovation and feels plain
In what way though?
Many of the new screens are just gray background with a nicer looking Minecraft font on top of it.
Is there any way to hide the Attack Damage from the hover text? This bugs me a lot and I'm hoping to remove it.
i hope they keep json ui
you can get rid of the "Attack Damage" text
in lang files
but not the value
removing the text via lang wont do anything.. i'm looking to remove the entire line and the gap above it
you cant
well bedrock is gay
u can define the attack damage from item to 0
You can't modify vanilla items though right? How would I make it 0?
that doesnt remove it
he wants to get rid of a hardcoded line
hello
wake up people JSON-UI got a new feature on the latest preview... somehow.
so i guess they're not deprecated anymore? idk.
i didnt understand any bit of this information
lol
me either sob
i guess in a nutshell another way to fetch element bindings from different places or something.
Couldn't we do that normally?
No idea.
I've fetched data from ancestors before, using only source_control_name
They won't give any more information on this ig
yeah that's kinda how it is.
though they keep doing JSON-UI changes and now there's this new stuff
it could be marketplace partners/studios demands or something.
The %.<number>s "crash" bugfix thing was requested by noxcrew apparently.
me when i go to fbi website and complain about json-ui
(real)
ironic because terry was insane too
I ran out of any ideas 😔.
🤔 Is it possible to use Minecraft version text as binding and only show if the player uses the correct version, like 1.21.80 or later?
how i can close that coordinate thing to other players?
anyone know how to resize player's inventory screen panel?
is it possible to randomize values in json ui?
Nope
then i guess i will randomize title text
Is there a way to make the paper doll always show? like keep it visible when they stop moving?
hello, i'm trying to display a progress bar on my UI extracting a number between 0 and 100 from an item's name (#hover_text) but i can't clip it
i already did this with a form button (#form_button_text) and didn't have this issue, and i'm sure it's not an issue related to $bar_collection_name or a size problem because when i remove clip_direction, the full bar displays correctly
here is my code and an preview in-game
"bar": {
"collection_index": "$bar_collection_index",
"type": "image",
"texture": "textures/custom/ui/white_divider",
"size": [
"100%",
50
],
"layer": 3,
"clip_direction": "down",
"clip_pixelperfect": false,
"bindings": [
{
"binding_name": "#hover_text",
"binding_type": "collection",
"binding_collection_name": "$item_collection_name"
},
{
"binding_type": "view",
"source_property_name": "(((#hover_text - ('%.6s' * #hover_text)) * 1)",
"target_property_name": "#progress"
},
{
"binding_type": "view",
"source_property_name": "((100.0 - #progress) / 100.0)",
"target_property_name": "#clip_ratio"
}
]
}
debugged item names
i also tried #hover_text - '§b§a§r'
Try this way
"$max": 100.0,
{
"binding_type": "view",
"source_property_name": "(#hover_text - '§b§a§r')",
"target_property_name": "#progress"
},
{
"binding_type": "view",
"source_property_name": "(($max - #progress) / $max)",
"target_property_name": "#clip_ratio"
}
How do i catch the title text in json ui so i can edit its look with conditions
in hud screen? if yes it's the hud_title_text element
not working
and when i pass this directly my game crash
Isn’t that an hardcoded variable? Sorry but I don’t understand a json ui how do i edit a property passe of the text contains a specific key?
What're you trying to do?
My map addon needs waypoints, i alredy used actionbar with simple conditions to edit the ui now i can’t add waypoints in actionbar too becouse it is alredy too much heavy
Normally it should've worked, but I can't tell if it's not the case for #hover_text. I didn't try with hover text before
i used item count and it worked
its weird
You can use preserved title if you want
Something like the red dot here https://discord.com/channels/523663022053392405/1380045360298328158
What's a preserved title?
i've read what it does, it can catch keywords from text but i dont know how to edit the appearance of the title with that
if you want to modify the appearance of title you'll have to modify hud_title_text element in hud_screen.json
i mentioned preserved title for this
yeah but i need it to do so only when needed and with my variables
use another factory with the current title factory, the other factory will have your modified style and the content will be hidden based on #hud_title_text_string binding
i only know how to edit actionbar becouse you use $actionbar_text in variables and you edit the parameters, but now i need to do the same thing but for title
for title you just do it with #hud_title_text_string
"bindings": [
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#title_text",
"binding_type": "global"
},
{
"binding_type": "view",
"source_property_name": "(#title_text = 'something')",
"target_property_name": "#visible"
}
]
so basically i create 2 uis inside of title text and i choose wich one to show with the view variable?
yup. btw it's not a variable, it's a type of binding that allows you to do operations or other bindings/properties
how can I create my own UI?? I want to replace that horse armor logo with my own logo thing, do I make to make my own UI or what?
edit ui/horse_screen.json
that would also edit the horse inventory, correct?
yes, you can use $container_title variable to change the logo only if the title contains a certain string
wtf
is there anywhere I can read more about this?
How can i use starlib for 2 uis diff styles
Is it possible to make a button set an specific string into a text input?
In a way, it's possible. Thanks to @/t1m0thy_yt
Is there anyway make item_text position change?
"bindings": [
{
"binding_type": "view",
"source_control_name": "health_title_control",
"source_property_name": "((#preserved_text - $update) * $one)",
"target_property_name": "#value"
},
{
"binding_type": "view",
"source_control_name": "health_title_control",
"source_property_name": "((#preserved_text - ($update + #value - ',')) * $one)",
"target_property_name": "#max_value"
},
{
"binding_type": "view",
"source_property_name": "((#max_value - #value) / #max_value)",
"target_property_name": "#clip_ratio"
}
]
/title @s title health:50,100
Why it isn't work??
"(not (#title_text - 'flag_1' = #title_text))", this will be true if the title contains the word flag_1 and you can add multiple words like this
"(not (#title_text - 'flag_1' - 'flag_2' - 'flag_3' = #title_text))"
you can ask
@manic dragon do you know?? srry for ping
"bindings": [
{
"binding_type": "view",
"source_control_name": "health_title_control",
"source_property_name": "#preserved_text",
"target_property_name": "#preserved_text"
},
{
"binding_type": "view",
"source_property_name": "((#preserved_text - $update) * $one)",
"target_property_name": "#value"
},
{
"binding_type": "view",
"source_property_name": "((#preserved_text - ($update + #value - ',')) * $one)",
"target_property_name": "#max_value"
},
{
"binding_type": "view",
"source_property_name": "((#max_value - #value) / #max_value)",
"target_property_name": "#clip_ratio"
}
]
try it this way
i've tried this, but nothing
use source_control_name properly, I don't know what properties those controls have
wdym
what do i look for to apply one of these forms to my UI??
i fix a lot errors on code, but the bar still not clipping
/title @s title health:25,100
i've picked of examples in your Animated Template Bar
source_control_name lets you access the properties/bindings inside a control
for example, in the 2nd image, preserved_title panel has these #preserved_text, #value, #max_value etc.
so use a proper value for source_control_name
in this case, "source_control_name": "preserved_title" should be used inside the progress bar image
yeahh, ik, i use this health_title_control just to change my $update_string
okk
now the bar disappear when i type the command
i'm confused myself, can't say why it isn't working
i didn't use clip_ratio for the animated bar but it should've worked
😭
maybe the error is happening in #value, but i don't know how to solve it, when i try to get the #value, #preserved_text is health:50,100 and it has a text before the value, so when i try to remove the $update_string, still remains ,100, but i think when i multiply it by $one it removes the ,100, idk
nope when you remove $update_string only 50 remains, the values after that is gone
what was your completed code here?
that value is got from the next binding object
I just parented everything to a screen with the follows_cursor and that fixed my issue
ew never use starlib
i did not make it
ik how to config buttions and stuff and how o change stuff around
ok well learn more
@manic dragon sorry for ping, but I have another problem
when the title is just a number, like: /title @s title 80, all the bars are changed
can I use that to make UI like the horse?
so you had:
"type": "screen",
"size": [
0,
0
],
"follows_cursor": true,
"controls": [
{
"0": {
"type": "image",
"texture": "textures/ui/Black",
"size": [
10,
10
],
"layer": 301,
"anchor_to": "top_left",
"anchor_from": "top_left"
}
}
]
}```?
what is global.image and global.label?
does someone have an existing addon that has custom UI?
Yes you can
It's image and label element in global namespace
I think you can use follows_cursor: true on button and input panel instead of a screen element but that's up to you
How can I make a button play an animation when its pressed?
Nvm, I wanted to make the button dissapear, but ended up using toggles
How do I make it so when I select a toggle, all the other toggles in the same group are set to the same state?
Set $radio_toggle_group: true for those toggles
And assign appropriate index for $toggle_group_forced_index
edit "pressed@$button_state_panel" and add an animation:
{
"button_alpha": "namespace.button_fade",
}
"button_fade": {
"anim_type": "alpha",
"from": 1,
"to": 0,
"easing": "in_back",
"duration": 2
}
there is also a pressed button alpha property i think
you can do the same with that without using the state, instead it would go in your light_text_button
Is it possible to make the button modify a parent's variable by adding "variables" into the "pressed" control?
No
So there is no way to make the button modify a variable when pressed?
I examined that emoji panel and I do not get how they modify the text from the chat
That actually has nothing to do with the button
There's a text box inside that button. That text box is actually doing the trick
But how does that text box access the actual chat input?
Wait, I think I have an idea why
Is it because the edit_box has the same text_box_name as the chat edit_box?
So the text_control from the dummy edit_box modifies both
The chat text box and the one inside that button has same text_box_name
So when you click on the button, the text box gets clicked and that sets value of the chat text box
Yup
I'm gonna try this
I'm not sure what I'm doing wrong, but its not working
{
"[email protected]_edit_box": {
"size": [ "100%", "100%" ],
"selected": true,
"always_listening": true,
"focus_enabled": true,
"$text_box_name": "#code_output"
}
}
"[email protected]": {
"$modifier|default": "#current_output",
"$pressed_button_name": "button.nodata",
"size": ["100%","100%"],
"controls": [
{
"text_edit_box": {
"type": "edit_box",
"text_box_name": "#code_output",
"text_control": "text_control",
"can_be_deselected": true,
"always_listening": true,
"focus_enabled": true,
"max_length": 6,
"size": [ "100%sm", "100%sm" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [2, 0],
"layer": 3,
"selected": "#selected",
"bindings": [
{
"binding_type": "view",
"source_property_name": "(#selected or not #selected)",
"target_property_name": "#selected"
}
],
"controls": [
{
"text_control": {
"type": "label",
"text": "#item_name",
"visible": false,
"property_bag": {
"#property_field": "#item_name"
},
"localize": false,
"bindings": [
{
"binding_type": "view",
"source_control_name": "display_text",
"source_property_name": "#item_name",
"target_property_name": "#text_content"
},
{
"binding_type": "view",
"source_property_name": "(#text_content + 'AAA')",
"target_property_name": "#current_output"
},
{
"binding_type": "view",
"source_property_name": "$modifier",
"target_property_name": "#item_name"
}
]
}
}
]
}
}
]
}
how do i rotate an image based on player rotation in hud screen?
You can't rotate an image
so i have to duplicate the same image and rotate the png?
Yeah different textures
Or you can use player.json and paperdoll
Then rotation is possible (those will be models)
Any idea why the edit_box thing wont work?
does anyone know if it is possible to leave a form with just the buttons? I mean without the frame and without a dark background, just buttons?
Maybe it only works for hardcoded ones
Honestly @/t1m0thy_yt would know better than me
I haven't messed with this other than using it for chat
I just change the "visible" property to true to see what was going on behind the scene
And looks like its doing it the opposite way
If I modify the main edit box it adds that text to all the buttons with the dummy one
I haven't noticed it earlier but why don't you have any button mappings in the dummy text box
That's important for it to work
I had to remove them before sending it to discord
The message was too long
But they are there
Yeah it's supposed to be that way because you're getting #item_text from there
But then how come it is modifying the "text_control" label but that's not affecting the main edit_box?
It's modifying the text_control because you're using the value of your actual text box in it
But why is it not modifying the actual text box? That I don't know
Could be that it only works for hardcoded ones like chat, but I'm not sure
Is it at least possible to save the result of a previous text + the #form_button_text into another place to use it later?
Even if its not for display
I'm trying to make it so you have to press the buttons in an specific order for another element to appear
And that order is random
Don't think so
You could use toggles instead of buttons. Use their #toggle_state to get info and combine those to do what you want. That would be a better choice
I was thinking of that, but that would make it so if you turn on all of the toggles, it would also work
Do something like this-
Multiply the first toggle state with 1 the next with 10 and next with 100 and so on
So each toggle combination will produce a unique number (binary string but a number)
So turning on all toggles will not trigger whatever you're trying to display
How did you plan to display in the first place? You have to compare to something to see if the combination is valid or not
I was going to compare the #form_body_text to the current modified text, and once it was almost complete, the last button would turn into an actual button that closes the form
will this (follows_cursor) work if this element is inside a stack panel?
as I am trying to do this within a server form
What is it called when you want to only modify a certain part of a JSON UI field that your extending, like using the / to access it?
like hud_title_text/title_frame/title_background
Am i doing this correctly? im creating a ui thatle replace the title that starts with ws. then a value for a cd bar but when the title ws.80 runs the ui dosent replace it
how do I make it contain a certain string? I'm sorry this UI stuff is just very new and it's been hard to learn
I didn't even know string() was a thing in Json UI
these arent a thing in json ui
umm, is there any way to make some items has its own hover text? like in the creative inventory or in the normal inventory, like the hover texture will have a different texture, and the item item will have a subtext like Protection: 11.6 under the item name
like without using setLore or anything related to renaming the item or Lore, just pure jsonUi and texts.
The use of AI is visible, but I have no proof lol
"I know it's AI, I just can't prove it"
is it possible to do a grid, then have other buttons like the cook button for example
Yeah
Does json UI have an
"Includes":[
"Path": ...
]
I know it's looked down upon but I just want to get this all done so I'm using AI to generate the framework and I'll just get help here to clean it up in post
I don't want to learn this stuff I just want a pack of my own
Well dangit
I assume that means I'll have to directly edit the full untruncated hud_screen.json file?
So many headaches for such a small thing
https://wiki.bedrock.dev/json-ui/json-ui-intro#modifications
I mean you can try to use this, if this is what youre "looking" for
I wish I could understand this all sometimes
Json is such a horrible lang
Im just gonna steal code from someone else's pack and slightly modify it to fit my needs, I'm done trying to learn this bs system
NEVERMIND I cant even find anyone who's done what im looking for
@left yew
Why did I think this would work?
..🤷♂️
.maybe pack dev ain't for me idk
This is like the easiest part of dev and I'm failing
Idk if id say json is the easiest part lol
Everyone else seems to know how
Because everyone else took the time to learn it
I did learn it at 1 point but then it went through like 9 different format changes
I should go back to making 2 pixel changes to item textures and calling it a good pack
I'm tryna cross reference a pack I downloaded online to the wiki and like half the stuff isn't even on there ...
@left yew
How do people learn this when half the resources are hidden behind bad search filters?
Idk?
I genuinely dont know what answer u want from me 😭🙏
I learnt like two-three years ago and there was hardly anything then.
There's WAY more resources now.
Like just look through channels and look through the official json files and reverse it all. Trace it all back or something
ye i feel like learning json-ui is kind of just back and forth
Tbh I'm only in it for input manipulation mainly
But i do agree. It feels like you finally get something and then boom, 7 different errors on how you didn't spell factory the Spanish way or something.
Omg its HIM
Please I beg you, help me with the edit box thing
wdym
I'm trying to make it so when pressing a button, it adds a string to a edit box
So for example if the edit box has the "ABC" text, when pressing the "D" button it then says "ABCD"
Hmm
Not sure if it's easy to implement
can i directly add a numeric value to a binding?
is there a way to display images of blocks as they would render in the inventory (3d with the tilt and all)
Item renderer only
Or you make the tilt beforehand
Using gimp or smth
Yeah
im sorry but how? I can't quite figure it out
{
"binding_type": "view",
"source_property_name": "(#main_binding + #secondary_binding)",
"target_property_name": "#value"
}
@odd wharf
how is the secondary binding registered as a value?
does anyone know how to get the aux id of a custom item/block?
did you mean replace #secondary_binding with a number or set the binding to a value?
Sure, what's up
The first thing
Check the complete bottom
Oh custom, seen somewhere a message or post about that exact thing
Better luck with the discord search bar
does the binding type have to be value? Im trying to offset the day counter which is a global binding
Yeah i just looked it up and theres no way to dynamically calculate it so im just using block bench to take screenshots of them
I'm trying to do the thing you did with the chat text box
Adding a string to the current text the edit box already has
But with a custom edit box instead of the chat one
actually there is a list thats updated every update that provides each aux id for every item
can someone make me a json ui for $10?
that mostly depends on what kind of ui
the regular one with the buttons
very ambiguous
It doesn't. You gotta try
Can you tell me how to do it
Im trying to enable my toggle by force, but it's still showing up disabled
Set "$toggle_default_state": true
That works. thanks, but how do I set it to get from the parent's $is_enabled?
I'm not sure about that
Try using bindings like this
{
"binding_type": "view",
"source_property_name": "#is_enabled",
"target_property_name": "#toggle_state"
}
This has to be inside the toggle (type: toggle; not its ancestors)
And I can't guarantee if it'll work
Yeah that didnt work
nvm, $is_enabled is propagated to children by default it turns out
Yeah variables are accessible from children
Hey anyone knows how to do this?
I can’t find the GitHub repository
This was from 1 or 2 years ago
Anyone knows how to fix this? I got the same problem
And maybe a way to pre input a default text in the text edit box figured out this part
How to fix this
{
"namespace": "hud",
"hud_title_text": {
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"offset": [ 8, 0 ],
"alpha": 1,
"bindings": [
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#text",
"binding_type": "global"
},
{
"binding_type": "view",
"source_property_name": "(not (#text = ' '))",
"target_property_name": "#visible"
}
]
},
"hud_title_text/title_frame/title_background": {
"size": [ "100%sm + 3px", "100%sm + 6px" ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"alpha": 0.6
},
"hud_title_text/title_frame/title": {
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"text_alignment": "left_middle",
"color": "$tool_tip_text",
"font_size": "normal",
"line_padding": -1
}
}
probably the offset
How
Why doesn't the scoreboard have a background?
How to fix this as you can see I'm riding a donkey while I'm inventory but then I ride the other one the item and name doesn't change dynamically you need to close the ui and open it again to change
Horse inventory screen doesn't update unless you reopen it
maybe if you tp far enough it will auto close the previous one
but unsure if it will open the next one
@rocky quail is it possible to hide a slot in the inventory if the item text/name has "test" so if I put item with name of "test" in the inventory slot 18 it hide
yes
container_scroll_panel
Why this doesn't work I want to get the name of the items in my inventory and display in the screen
you cant do that, invenotry slots can only be used on container screens
im trying my best! I can't get anything working whatsoever. Its always just a blank empty box. Can you provide any more input?
So I'm trying to learn how grid works so first how I can modify the 7th element I want to move it more so I try this approach but the game crash
Yes, using live horse renderer or using npc screen
Try searching it here, you'll find info on this
thank you
Hello ,does anyone know what other image formats are supported by the UI apart from png and jpg.
It would be cool if we could use something like webP for very small file size and good quality
I'm thinking of making UI animations but they are going to be expensive or low quality unless I can do this
is it not possible with horse renderer too?
Horse render require the id of the mob
If you can change that you can change the id
Tho it is easier to just change the npc model
can you elaborate a bit on this? and thank you for your help
You can change the entity model depending on entity property using render control
Would you not have to resend the form whenever they select another Pokémon anyways?
Well e.g for every button you'd trigger another UI with specified entity id
Depends on the implementation
yeah thats what I am doing right now
This bot was created by SmokeyStack for the purpose of making a FAQ bot for the Bedrock Add-Ons Discord Server.
To manage entries, please make a pull request on GitHub.
I have several questions, is it true that JSON UI will be deprecated in the near future? Would that mean I should stop coding using JSON UI until Ore UI officially comes out? Just want to make sure so I don't work on something that'll break.
well there are many marketplace maps and servers that use json ui, yes its true, but honestly i think there will be a long period before we eventually are forced to use Ore UI
so make stuff in json ui whilst you still can
Hmm, so as a summary if I am understanding this correctly:
JSON UI is going to break in all add-on/resource pack/map related content in the near future, though I can still use it with the time it has left?
yes
but it is unlikely right when ore ui comes out that they will break the content with json ui
marketplace maps with json ui = microsoft money
Hm, okay, I just wanted to make sure I wasn't going to waste my time doing something and then it breaking shortly after without me knowing beforehand, thank you for answering my questions! Have a good day!
you too
You have years before anytbing will go into place and even then it could co exist, no one really know a
I assume that JSON UI would still function even when Ore UI is fully set, though not handled or updated any longer, hence Alex's previous statement regarding marketplace content and all of that. Hopefully JSON UI won't be limited to just marketplace to protect their content from malfunctioning.
does anyone know if you can auto adjust an image to fit the user's screen
"fill": true or "keep_ratio": false
Also, make sure to establish "size": ["100%", "100%"]
How does "collection_details" binding type work?
I'm struggling to find information in the docs, there's a lot of info missing
Does anyone know how to turn the text bindings #text to variable $var so I can use it in variable
Like this
"requires": "($atext + 'test')"
Or I can just use the #text in the "requires"
Or is it possible to activate the factory once so the display or animation don't restart if I use again or type the command /title @a actionbar test2
I know It provides collection_index value. But I don't know how it exactly works.
You can't
thank you, this makes the image fill the entire screen?
Yeah
perfect, thanks again
Quick question, its neccesary to add the button 50 in the script to make this work?
Because it dont seems to work if the script have only 49 buttons
Well yeah
actually, collection index is 0-based. You will need 51 buttons in total
But yeah, you will need that 51st button to make it work.
[UI][error]-UI Control: gacha_panel | On Control Path: /hud_screen/variables_button_mappings_and_controls/safezone_screen_matrix/inner_matrix/safezone_screen_panel/root_screen_panel/root_panel/gacha_factory/gacha_panel/gacha | Type not specified (or @-base not found) for control: gacha
How to fix??
{
"namespace": "gacha",
"gacha_anim": {
"anim_type": "aseprite_flip_book",
"fps": 30,
"initial_uv": [0, 0],
"frames": 65,
"loop": false
},
"flash_alpha": {
"anim_type": "alpha",
"from": 0,
"to": 1,
"duration": 0.15
},
"flash_alpha_out": {
"anim_type": "alpha",
"from": 1,
"to": 0,
"duration": 0.25
},
"gacha_image": {
"type": "image",
"texture": "textures/ui/spritesheet",
"size": ["100%","100%"],
"anchor_from": "center",
"anchor_to": "center",
"uv_size": [1280, 720],
"uv": "@gacha.gacha_anim",
"layer": 200,
"anims": [
"@gacha.gacha_anim",
"@gacha.flash_alpha",
"@gacha.flash_alpha_out"
]
},
"gacha_root": {
"type": "panel",
"size": ["100%","100%"],
"visible": false,
"layer": 200,
"controls": [
{ "[email protected]_image": {} }
]
}
}
Did you define the file in _ui_defs.json?
How do I calculate the aux ID of an enchanted object?
I realized it after I wrote it, but I'm very lazy, thanks for the help!
Definitely did
Can you show how are you calling the [email protected]_root ?
{
"$schema": "../../../../schemas/ui/ui.schema.json",
"namespace": "hud",
"gacha_panel": {
"type": "panel",
"size": ["100%", "100%"],
"bindings": [
{
"binding_name": "#actionbar_text",
"binding_type": "global"
},
{
"binding_type": "view",
"source_property_name": "(#actionbar_text = 'gacha')",
"target_property_name": "#visible"
}
],
"controls": [
{
"[email protected]_root": {}
}
]
},
"gacha_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_panel"
}
}
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{ "[email protected]_factory": {} }
]
}
]
}
}
There don't seem to be any problems, are you 100% sure that the path in _ui_defs.json is correct? Did you try reopening the game?
@base not found or type not specified means You don't have the file defined in ui_defs, so it can't find it, or the type isn't defined, but from what I can see, it is defined.
Try adding your gacha_root directly in hudscreen to see if it works?
Not work
Impossible to fix...
If I remember correctly, you have to add 32768 with the aux id to make it enchanted
Yep, thanks
I know people don't owe me anything but if anyone is good at rebinds/factories and stuff can I ask a small favor?
(ping me if you reply to this)
Is it possible to add a button into the player gui hotbar screen thing that will hide every button?
Like just on the top right that can toggle on and off all the gui
Ts pmo sm 🥀🥀 instead the whole sentence, it's just colored the first word
F1 button
🇹 🇸
🟡 🫵 📴
yes
make new button, add f1 button mapping or whatever it is
Does anyone know what the initial_uv variable does?
I used it but it broke
[UI][error]-UI Control: gacha_panel | UI Control: gacha | UI Control: img | ----------------------------------------------------
Unknown properties found in def[gacha_anim] from namespace[hud]
- Unknown property [initial_uv]
----------------------------------------------------
Would this work for mobile?
hailo
i had a UI question
so with my addon i have positioned the action bar to be in the bottom right for the mana display
however, of course, this means all action bar text is in the bottom right...
Is it possible to make it so that only text that leads with certain characters (Eg, only text that starts with 'MANA') would be in the bottom right, and anything else would be normal?
Maybe something like
//....
"$c_text": "$actionbar_text",
"visible": "(not($c_text - 'MANA' = $c_text))",
//....
Someone knows how to do that
do what?
I suppose the fading black background
possibly but i think its just the way that packs are forcefully downloaded which is only possible via featured servers
because it was also posted in script api thing
Remove the acceptance screen and go to the downloads packs screen instantly
I already tried to modify how the server sends the packages and how the client responds but I can’t get it, they just skip all the screens and that’s it but it doesn’t do that and I think it’s because the official servers have a special flag in the ResourcePackInfo or Stack
well they are also just partnered with mojang so its some special feature they have access to that consumers cant access
Use PocketMine-MP for the experiment
what server is that?
It is a software to create servers
It’s what lifeboat uses
well they are still minecraft partners so i beleive thats the only way to access it
I was checking bro and I found a way
tyty
tyty
can a button drop items in the inventory screen?
yup it can
Anyone know why an Option button would get stuck like this after opening it?
that happens when the dropdown is "invalid" I think
yeah just invalid binding names
You guys have examples on dropdown options?
I think you need a hardcoded toggle binding to use the vanilla drop-down
I could implement that
which binding is it?
I tried using vanilla's content for testing. No JSON error no UI error just cant get out of this menu
I even tried doing all the options (im using regolith)
<Dropdown size={["fill", "30px"]}
// $option_label="options.sneakOption"
$option_label="#custom_text"
$dropdown_content="chat.coordinate_dropdown_content"
$dropdown_area="inside_header_panel"
$dropdown_name="custom_dropdown"
$toggle_binding_type="collection"
$toggle_grid_collection_name="custom_form"
$options_dropdown_toggle_label_binding="#dropdown_option_text"
$options_dropdown_toggle_label_binding_type="collection"
$options_dropdown_toggle_label_binding_collection_name="custom_form"
$dropdown_scroll_content_size={["100%", "200%"]}
$label_bindings={[
{
"binding_name": "#custom_text",
"binding_type": "collection",
"binding_collection_name": "custom_form"
}
]} />
Vanilla drop-down bindings are screen specific. So their binding will be invalid if used in other screens
I couldn't use the vanilla drop-down element normally. So made a copy that works somewhat close to the vanilla one
do you know which binding do I need to set in order to force show/hide it?
I think you are using the drop-down from chat screen here. That uses #chat_coordinate_dropdown binding for toggle state. This binding works in chat_screen. If you can make something like this for your screen, it could work.
Anyone have any examples?
I would like to make one action bar above hotbar (default position) and second in right corner of screen. I found a way to center them in both positions, but I don't know how to make them working in same time.
"[email protected]": {
"size": [20, 20],
"$default_button_texture|default": "",
"$hover_button_texture|default": "",
"$pressed_button_texture|default": "",
"$pressed_button_name": "button.drop_one", // or button.drop_all
"controls": [
{"default": {
"type": "image",
"texture": "$default_button_texture"
}},
{"hover": {
"type": "image",
"texture": "$hover_button_texture"
}},
{"pressed": {
"type": "image",
"texture": "$pressed_button_texture"
}}
]
}
The button mapping is the important part here
thanks
np
Good evening. I’d like to know if there’s any way to display an image at 100% of the screen while it’s inside a root container that has a fixed pixel size.
ex:
"root": {
"type": "panel",
"size": [
300,
300
],
"controls": [
{
"element": {
"type": "image",
"size": []
}
}
]
}
That works! Thanks. So it's basically #($dropdown_name). Idk how did you even figure that out xD
Well, I've messed with dropdowns before. There's no property named dropdown_name. They use it for the binding and for naming a control :)
aaa
You can't do that
Is there no way to do this at all?
Not while inside a fixed size element
I already know how to do it
is #player_position_text only for hud_screen and chat_screen or can it be grabbed anywhere
I didn't even know it could be used in chat screen xD
ANCHOREDOFFSETBINDINGY IS GONNA MAKE ME MADDDD
bruh it doesnt wanna grab the correct string
actually it just doesnt work at all??
anchored_offset_value_x works fine
y? nope
nevermind y works
bro WHATTT
the first one works find but the 2nd is cooked
{
"binding_type": "view",
"source_property_name": "(((#text * '%.3s') - '|') * 1 )",
"target_property_name": "#anchored_offset_value_x"
},
{
"binding_type": "view",
"source_property_name": "(((#text - (#text * '%.3s')) - '|') * 1)",
"target_property_name": "#anchored_offset_value_y"
}``` why
so
001 is fine for the first one
since it gets the first 3
as soon as i add an other numbers after it breaks
what's the value of #text
oh i meant what's the value of #text like what are you passing from the script
ohh
just
like
3||2||
bruh
i’m on my phone rn
i might just be too tired i’ve been up for 18 hours
you should try adding something in front of the numbers like :3||:2||
{
"binding_type": "view",
"source_property_name": "(((#text * '%.4s') - ':') * 1 )",
"target_property_name": "#anchored_offset_value_x"
},
{
"binding_type": "view",
"source_property_name": "(((#text - (#text * '%.4s')) - ':') * 1)",
"target_property_name": "#anchored_offset_value_y"
}
i think its cuz You have #text * '%.4s' and should be '%.4s' * #text ig?
What's "collection_length" counted actually?
the length of the collection
Very clever 
go7hn mentioned the 1st one (anchor x) was working but not the 2nd one
mmmh
maybe if he add some kind of 'start character' @3||2||
cuz if #text = 3||3|| and i remove 3|| it will remove all
Hmm that is true. But it should've worked for the 3||2|| ig
Anyone managed to force show the subtitles? Or is the code not implemented too?
I looked into it a bit, there is a factory that shows subtitle elements like the chat in the right down corner, but there is no binding that controls it visibility depending on a toggle
yes that works
now i have a new issue
if i want smaller incriments and movements in the offset i have to divide it by 10 or 100 correct?
{
"binding_type": "view",
"source_property_name": "((('%.6s' * #text) - '|') * 1)",
"target_property_name": "#offset_x"
},
{
"binding_type": "view",
"source_property_name": "(#offset_x / 10)",
"target_property_name": "#anchored_offset_value_x"
},
{
"binding_type": "view",
"source_property_name": "(((#text - ('%.6s' * #text )) - '|') * 1)",
"target_property_name": "#offset_y"
},
{
"binding_type": "view",
"source_property_name": "(#offset_y / 10)",
"target_property_name": "#anchored_offset_value_y"
}``` im doing that here yet the increments are still in multiples of 10
so it just converts 1 -> 10, 2 -> 20
15 doesnt do anything
How do you make buttion text smaller then the defauls size
I just figured out a way to do this haha, you just have to check with variables if it's visible and increase its size; if it's not, remove the size.
If I'm not mistaken, it's according to the parent size, size 10 means the offset unit is 10
i got it working
you have to multiply it first by a float ( i think ) and the float has to be a variable
I think I've tried that before but it still doesn't work. Is there a way to do that? Using grid and fill direction property (I forgot the name)?
ouh
dope ui in progresss holy crap
From what I've seen, when you only use the "visible" attribute in grid panels, the grid still considers the size, but if you check and remove the size attribute, it removes the spacing.
that or just remove the grid items
like the max grid items
and do some flagging in the title to determine which buttons are grid and arent
naruhodo, I'll try later
I tested this once, and it worked.
@chilly yacht Yo can you help me
is this true?
the I've already tried that and it never worked for me 🙁
Since there's a way to check if the panel is visible, then yes.
*hm in search? i wonder what you want to search for...
i saw someone do it
Whenever I try to do this, it only works with the button size.
Is there a reliable way to switch between server form designs without using #visible?
If I use factory, the contents don't get generated until I refresh the screen
And I don't want to click on a toggle to load the contents ;-;
#1434472828689977464 message
This is from a post here. I'm having the same issue
I'm doing something like this
"panel": { // generated from the server_form_factory
"controls": [
{
"panel1_with_factory": {}
},
{
"panel2_with_factory": {}
}
...
]
}
@chilly yacht sorry for the ping.
Mind sharing how you do it?
Can we make our own collection? Or it's all hardcoded?
You can create custom collection name but it won't provide any data or smth. However, you can use this collection name to get collection index via #collection_index binding
As for the #collection_length binding, you can use it on collection panels and stack panels to generate controls using factory for example
Apart from it's used for hardcoded elements/controls... If we make our own factory.. is collection_length provided on how many controls we have in factory or it's always counted as boolean 01?
It's not boolean. So it can be any positive number. For example if you set it to 5 the factory will generate 5 controls
Ah we can control it? Can you gimme an example?
I've tried playing with it, sum it, subtract it, the panel just gone 
What can i do just call it with binding name LoL
"some_name": {
"type": "collection_panel",
"size": [ "100%", "100%" ],
"factory": {
"name": "factory_name",
"control_name": "namespace.template_element"
},
"property_bag": {
"#length": 5
},
"bindings": [
{
"binding_type": "view",
"source_property_name": "#length",
"target_property_name": "#collection_length"
}
]
}
something like this
LOL??!?!!!😹just give it the value??? Dang, okay thankyou i'll try it later
Daaang.. it works.. can't believe i miss it before
Using collection panel make it overlap, maybe that's why i've never noticed it
Can collection_panel stacking the elements?
Just use a stack_panel
Okay so what's use of collection_panel?
It's like panel but for factory?
collection_panel is similar to normal panel but it can use collections like stack_panel
Hmmm i see.. oke rif thankyou so much for the info
np
heyy, sorry, but how can i make the bars fill when the players join??
Are you talking about this? https://discord.com/channels/523663022053392405/1430909706251272283
To make any changes to the progress you need to send the appropriate title.
What you're asking is basically on the script side. Ig you can use the playerSpawn after event and send a title to fill the bar
yeahh ik, but when i have multiple bars, with different update strings, is a bit harder to send all title at the same time
Is it possible to display individual parts of a player's skin? I know the entire model is possible, but for example, the head can be displayed separately so it tracks mouse movement, or a static head.
50/50
I will use the static option
Idk if this is even possible, but is there any way to define the offset of a server_form button using scripts?
u can use splitting text to avoid using lots of titles
Yes. #anchored_offset_value_x/y or #offset binding
Send the titles after about 1 tick of delay or combine them into one, and split the title carefully :)
I'm thinking of making a binding so that if a player writes something like "texture/ui/Player_Skin" in the BP, then in the RP he understands that instead of textures, he needs to substitute the player's skin or whatever is specified in the RP
"player_head_image": {
"type": "image",
"texture": "textures/ui/icon/player_face",
"size": [ 64, 64 ],
"anchor_from": "center",
"anchor_to": "center",
"offset": [ 0, -50 ]
}
}```
Similarity
I have the self-download of resource packs
The same thing that happens in this video is happening to me — is there a way to fix it?
Can someone help me...i want to make a custom button texture that doesn't change the original Minecraft texture, example the settings menu i want to change the button texture but i dont want to change the original mc texture, i assume that i will need to make a code, like for the custom button and the settings menu on common_button or smth like that...
It would be a great help if you know something about it even a little please tell me it would be a good help to me, sorry if you didn't gets my grammar im not good at English sorry...
Still looking for an answer for this ^
Ik it's possible to use factories instead of #visible but I can't get it right. Basically, the other factories inside the void factory doesn't generate the controls if I don't refresh the screen.
Oh also does anyone know what's the use of factory_variables
you can either create your own factory (but you will lose #form_text) or use grids (you will need to use source_control_name to access #form_text)
allows factories access to parent variables (?
I noticed if I use a custom factory the buttons factory doesn't generate the buttons until I refresh the screen (resize it), but this doesn't happen with grids, but what if i use another grid inside of it
honestly idk how actualy works, just use it if you have something like this ```json
"$blablabla": 67,
"factory": {
"type": "stack_panel",
"factory": {...}
}
// FATAL ERROR OH NO! cannot find variable blablabla in ancestor tree like why you didnt know
use a custom factory without using default one
that server_form_factory
I'm not using the default one
{
"item_grid": {
"type": "collection_panel",
"collection_name": "form_buttons",
"factory": {
"name": "item_grid_factory",
"control_name": "@server_form.item_grid_form"
},
"property_bag": {
"#form_length": 1
},
"bindings": [
{
"binding_type": "view",
"source_property_name": "#form_length",
"target_property_name": "#collection_length"
}
]
}
}
i don't think i saw any error like that but it was just a curiosity nothing that important
i mean like this
{
"namespace": "server_form",
"third_party_server_screen": {"$screen_content": "server_form.form_factory"},
"form_factory": {
"type": "collection_panel",
"factory": {
"name": "empty",
"control_ids": {
"actionform1": "server_form.form1",
"actionform2": "server_form.form2",
"actionform3": "server_form.form3",
"modalform1": "server_form.form4",
"mdoalform2": "server_form.form5"
}
},
"property_bag": {
"#§1": ["actionform1"],
"#§2": ["actionform2"],
"#§3": ["actionform3"],
"#§A": ["modalform1"],
"#§B": ["mdoalform2"]
},
"bindings": [
{"binding_name": "#title_text"},
{
"binding_type": "view",
"source_property_name": "('#' + '%.3s' * #title_text)",
"target_property_name": "#collection_length"
}
]
}
}
wait is #title_text available outside the factory?
yeah
WHAT
I can manage something else
Thanks a lot!!
yup
oh also thanks for the factory with control_ids, it helps a lot I used it in other places before (saw it from a msg here some time ago)
yes, very useful and I haven't stopped using it since I discovered how to use it when #form_button_contents was added xd
I wish I knew this before, would've saved me a ton of time ;-;
almost 6 months ago lol
yeah i saw it then, i was just talking about the fact that #title_text is available outside the default factory. I was doing everything inside of it 😭
OHH yeah xd
i think #submit_button_text it's also outside the factory
so you can use it as your #form_text for modal forms
ohh cool, thanks!
Can someone help me...i want to make a custom button texture that doesn't change the original Minecraft texture, example the settings menu i want to change the button texture but i dont want to change the original mc texture, i assume that i will need to make a code, like for the custom button and the settings menu on common_button or smth like that...
It would be a great help if you know something about it even a little please tell me it would be a good help to me
2nd try
if you don't want too much hassle creating custom buttons, add these variables to your button with your texture path
"$default_button_texture": "...",
"$hover_button_texture": "...",
"$pressed_button_texture": "...",
"$locked_button_texture": "...",
"$border_visible": false
also $locked_button_texture 🤓☝️
oh right xd
and $border_visible: false
cuz yea, that black border is separate from the button texture
and that doesn't work for some buttons like light_content_button
for some reason the dev team decided to use three variables for this xd
"$default_state_border_visible": false,
"$hover_state_border_visible": false,
"$pressed_state_border_visible": false
do you have a short example? I can't get a result
Anyway, thanks for the help
I can't understand how layering works in json ui (without to have determine "layer")
Sometimes it's above all element, sometimes it's in order, is there any tiering? Or just random?
How does anyone understand this? For me even trying to do something simple leads to so many errors
Thanks ill try it rn
is there any way to make the live_horse_renderer stop following the cursor?
NO
sad..
alright
Unfortunately
relative to the parent ```json
{
"o1": {
"controls": [
{
"o2": {
"layer": 1, // above o1
"controls": [
{
"o7": {
"layer": -1 // same as o1
}
}
]
}
},
{
"o3": {
"layer": 0, // or undefined, same as o1
"controls": [
{
"o5": {
"layer": 1 // above o1
}
},
{
"o6": {
"layer": 2 // above o5
}
}
]
}
},
{
"o4": {
"layer": -1 // below o1
}
}
]
}
}
What if i'm not defining any "layer" specifications to the elements?
And all of them in the same controls, same parent,
Which one is above the other?
"parent": {
"controls": [
{
"child1": {
//<as far as i know all child will be above the parent>
}
},
{
"child2": {}
},
{
"child3": {}
},
{
"child4": {}
},
{
"child5": {}
}
]
}
}```
Sometimes it's layering perfectly from 1 - 5.
But also sometimes no matter where i place child1, even at the bottom list, it's still above all other child
well idk, i think its from first defined (below) to last defined (above)
just use layers to prevent those 'bugs'
Hmmm okay i see... Thankyou
Hey can you help me again? I want to change the settings menu buttons but i can't seen to find the buttons connected to it i tried to find it in the settings_common.json file and i tried to find it in the settings_screen.json file and again no luck but i did modify a button but its not what i want ill send a screenshot of it for better understanding
settings_common.section_toggle_base
If you're looking for those buttons, they're in general section
Thanks ill try it rn
I finally got it TYSM
The toggle textures are kinda weird
"$default_texture": "default texture",
"$hover_texture": "pressed hover texture",
"$pressed_texture": "hover texture", "$pressed_no_hover_texture": "pressed texture"
You're here 24/7, they should be giving you a salary already.
And the toggle for global resources is not in settings_common. It's in resource_packs_screen
Nope, I'm just passing time
Well, everyone has different hobbies:)
I have a hobby of making and remaking my own server without help from others.
*Almost
RIGHTTT???!?!!!
i was literally doing this, and got confused by that "hover" and "pressed" HAHAHAHAHAHAHAHA
Also pressed no hover WDYM DAWG it's literally pressed HOVER
idk why it was named like this. I mostly don't use any of the template toggles

Mostly i use templates with original textures, so i didn't know it was a thing
Also most people will change it's texture directly instead of editing json template
you wont find anything on vanilla ui files, thats from tyel ui pack
maybe if you search on that pack
Anyone know why my preserve title preserves but will always "update"?
"5fs_hud_title_text": {
"type": "panel",
"size": [
"100%",
"100%"
],
"layer": 1,
"controls": [
{
"top_right_title_frame": {
"type": "image",
"size": [
"100%c + 8px",
"100%c + 4px"
],
"offset": [
"-2px",
"2px"
],
"layer": 1,
"anchor_to": "top_right",
"anchor_from": "top_right",
"texture": "textures/white_round",
"color": "$5fs_background_color",
"alpha": "$5fs_background_alpha",
"bindings": [
{
"binding_type": "view",
"source_control_name": "title_text",
"source_property_name": "(not (#text = ''))",
"target_property_name": "#visible",
"binding_condition": "visibility_changed"
}
],
"controls": [
{
"title_text": {
"type": "label",
"text": "#text",
"layer": 2,
"text_alignment": "center",
"controls": [
{
"data_control": {
"type": "panel",
"size": [0, 0],
"property_bag": {
"#preserved_text": ""
},
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $top_right_title) = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"source_property_name": "(#preserved_text - $top_right_title)",
"target_property_name": "#text"
}
]
}
}
]
}
}
]
},
You can't nest these.
Add them separately in the root_panel or somewhere else. Just use them here using source_control_name
How to make a search bar ( ModalFormData ) in JSON UI and give it a custom size and Texture?
Anyone knows how to modify the debug on beta ver?
I only know its connected to the debug_screen.json file...
Or is it not possible to modify it?
you can't modify that
Dang, i plan on just taking the fps counter but hey i appreciate your answer
yea np
Wdym by nest "these"?? and adding them to the root panel doesnt work at all, I have have to either modify the hud_title_text_area or replace it in root panel
what does this json ui line mean:
"source_property_name": "(not ((#hover_text-) = #hover_text))"
```?
i do not understand why write #hover_text-
i was looking through some code on MCPEDL and came across that, i also think it should've errored but in game it doesnt say anything
@turbid nimbus hey accept my friend request, it’s important I think you might be interested in, I can’t send you a dm
What's default animation play/start_event? When you're not defining it
is it possible to remove the letter limit in the jigsaw ui? I can't fit 99% of block states in its turns into field which is really annoying.
Try changing this max_length property. But not sure if it'll actually work. Because it may be that the extra chars won't be processed
How to??
@manic dragon how to remove scroll and the things in the picture
Genshin style gacha is hard
🐧
I’ll try that when I get home, ty
There are some variables to modify those but I don't remember them
what screen is that
Just FYI for people here that 1.21.130 aka probably upcoming new version yearly format — They changed slightly how %.<number>s works, so you might definitely need to update it asap especially those with custom bars as it may crash your game, there's also a case where bindings calculation are also changed due to this. so it probably may not work. So, just update it i guess idk lmao
tl;dr — %.<number>s go brokey, game crashes, update required.
so when exactly does the game crash. i use it a lot, i think everyone does.
Does anyone know how to make it so that at the beginning of the text titleraw in /title @s actiobar If you write §u§r At the beginning, the background of the action bar will be replaced with my texture.
is there a specific use case in which it will crash?
It mostly crashes when you're using custom bars.
since invalid value results in a crash for some reason.
If it doesn't crash, you may get a value or anything that is not the same as before, just keep that in mind.
%.<numbers>s * 1 should be avoided at all costs due to them resetting or straight up ignoring %.<numbers>s.
Other than that, some calculations or stuff like the way most detailed experience bar works may require a bindings redo.
updating the game with my fingers crossed
wdym
uh nice
how to sincerely say fuck them if they wanted to just get rid of this feature
or maybe they left some info, why they changed it or just anything
idk if you can call it info
probably "optimization"
so ig we cant convert string to number with * 1
well if its limited to only this mostly used part then it should work fine
however I see its not
you can but like dumb person
I mean, without proper tools lol
0 + #text maybe lol
Although I also believe it's not necessary, any string that starts with a number is automatically converted to a number
i just don't want my things to crash the game ;-;
Yesn't.
You don't need * 1 at all just for the value conversion.
If the bindings detect the number first at the first string character, it will consider that as a value.
I have a ui with a grid of buttons, and I was wondering if it would be possible to set the default cursor location or button for controller when the ui opens?
maybe with default_focus_precedence: int
Examples —
1asdk= valuetest1= string§k1200= string10000= value
but yeah i don't think it breaks anything that much, just get rid of * 1 if you can and pray it'll work like normal.
Also %.<number>s are also 'fixed' in a way that is no longer pins late or early.
wdym
Apparently it does a thing where doing %.6s from a string may shift that.
so from __asdfgh__jkl would be __asdfghj__kl instead.
or sometimes maybe __asdfg__hjkl for some reason
1.21.130 however, has this fixed.
so some stuff might require readjustment.
this still works?
That still works btw
But that was because, for example, § counted as two characters, right?
(that byte thing)
so i had no idea what caused this but i had to readjust most of my stuff just to get it working again probably by +1 or -1
Should be in theory.
My stuff that requires alot of complex and experimental stuff now just works with some patches i suppose, including dynamic splitting texts
By the way, did anyone figure out how to use that ancestor_scope thing?
it's still %.3s
Afaik, sibling scope looks at the parent and the children (but not the children-children), so what does the other one do?
honestly the same thing ngl but you can read parent-parent elements.
can't draw myself a graph but
- parent with bindings
- another parent
- also another parent
- children with ancestor scope and fetch bindings from the first parent```
i think it was always possible to do this with just source_control_name
yesyes was thinking about that too
it is yeah, but not always somehow. atleast on my end.
maybe its useful if youre working with collections
unless they patched this out and made ancestor scope as a replacement.
unexpected property 'resolve_sibling_scope' ☠️
i don't really use resolve scope that much due to them causing some issues that i think it's worth not using it.
source_control_name normally searches all controls but ig using ancestor_scope makes it more efficient to get ancestor proprties(?)
yep
yeah, atleast it should be.
Just FYI mojang does not add new UI property or changes unless a certain studio requested them to.
noxcrew with that crash issue with %.s
But I don't see any studio saying hey limit string multiplication to %.s cuz i relly need it lol I'm really smart
probably not but eh it is odd really.
Instead of removing it, Mojang should have made it work like in Python
%.<numbers>s that somehow crashing did get fixed by noxcrew requesting mojang to.
hi * 3 = hihihi
( honestly i can't reproduce or see how can i crash with that thing so idk lmao )
I never had it.
1 big update = 1 small change to JSON ui
and more bugs to fix 🥳
XD
JSON-UI always has hidden changes or bug fixes.
They don't list it up on changelog at all really.
I'm not surprised since this isn't the first time they've done this.
Since 1.19.20 where they changed a certain JSON-UI stuff that breaks the way variable and bindings work on ignored property and text property.
This results ALL UI stuff being broken at that time including mine.
the only workaround that me and some people found here were put another variable, slam a variable/bindings you want to use, and put that variable on it. or alternatively you can create another elements but leave the variable you want to use on the parent element.
Maybe someone knows?
Is it about not being able to do "text": "($text + something)"
Idk sometimes it seems to work and sometimes it doesn't. So I always use another variable
anyone know a quick fix for string multiplication already?
Yes, especially ignore property.
Something at that time everyone used it for condition rendering for variables.
Ignored property can't use any variables in the same scope. But it can use variables from ancestors
Yeah that's a thing — It used to.
pre-1.19.20 ignore property basically works like what would you expect, it supports operators along with it.
and is also a common way to properly remove elements when needed, unlike visible property that is.
out of nowhere, they changed it. mention absolutely nothing, not even once on changelog
All people's UI breaks, we had to spend half an hour or probably more about how to fix it.
I think there's also a thing that you can't use more than one variable from the same scope inside another variable. It gives me error
?
oh nevermind i was one of those people who found those workaround lmao i actually forgot LMAO
//Hide title
"hud_title_text/title_frame/title":{
"modifications":[
{
"array_name":"bindings",
"operation":"insert_back",
"value":{
"binding_type":"view",
"source_property_name":"(not('%.7s'*#text='$Itype.'))",
"target_property_name":"#visible"
}
}
]
},
//Cross hair indicator
"sword_cross_hair_indicator":{
"type":"image",
"texture":"#texture",
"size":[16,16],
"offset":[0,16],
"layer":10,
"anchor_from":"center",
"bindings":[
{
"binding_name":"#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name":"('%.10s'*#hud_title_text_string='$Itype.sch')",
"target_property_name": "#visible"
},
{
"binding_name":"#texture"
},
{
"binding_type": "view",
"source_property_name": "('textures/ui/'+(#hud_title_text_string-('%.7s'*#hud_title_text_string)))",
"target_property_name": "#texture"
}
]
},
Why did it stop working?
nvmd
got it to work
why can't we use anything different than #texture in here?
changing it to any different name break it
idk mojang things
also you don't need "texture": "#texture"
you can safely remove it
we are just testing for now, but thanks
Can i use custom control_ids? Or it can only use hardcoded elements?
custom
I mean we made control ourselves not the one that's already in the code
I try, but it's not showing
"type": "collection_panel",
"$toggle_state_panel_size|default": [ "100%", "100%" ],
"size": "$toggle_state_panel_size",
"$ui_button_panel|default": "common_buttons.new_ui_button_panel",
"factory": {
"name": "switch_toggle_factory",
"control_ids": {
"switch_toggle": "button_panel@common_buttons.new_ui_button_panel"
}
},
"bindings": [
{
"binding_name": "#collection_length"
}
]
}```
are there any bindings to control tiled_scale?
chest ui broke in new update?
expected
nothing of mine broke
guess my json ui is future proof
sorry @surreal ridge we cant all have good code 💔
ik u cant 💔
u use starlib 💔
In a server form, is there any way to track which button was last clicked and keep it visually selected without closing/reopening the form?
For example, I have 4 move slots and want to:
- Click on a move → show a red selection border on that move
- Update a stats panel at the bottom
- Do this WITHOUT the form closing and reopening
Or, do all state changes require the form to be rebuilt?
congratulations You have been starlibified
no i dont ? 😭
yes u do
show me an image of my ui that uses starlib
you might be able to use modal forms and use toggles
well all of your designs are based off of mine either way so
just not though 😭 only thing i took inspo from was the screen ui and hearts icons 🥀
whos is whos 😂
took HEAVY inspo i see
ore ui? no way!
it is funny bc u think u own a style
Is anyone else experiencing ui files not reloading when doing reload all?
i give u permission
i have not yet but i havent edited any ui today
but yesterday it was fine
no
works fine for me
u issue
hmmm maybe its something with manifest
Yes
oh lord
Works fine on the previous version for me, something changed in latest
bruh
strange
My UI survived ! 🎉
Thank you! I managed to get it working
Idk this happens to me randomly sometimes. /reload all doesn't reload everything. I just restart the game and it works again
but this is happening to me always 😭
ig ill just reinstall
yay memory leak too
mine don't, it broke my "string to number" conversion
nevermind, the game refused to reload everything when /reload all
instead, i need to unload and reload a (dummy) pack
idk, doesnt seem like an issue on my end 🤷♂️
Join the club 😭💀
Yes, probably was due to UI cache failure.
Actually this looks like a general cache failure.
My texture doesn't reload and some of my script stuff just doesn't reload without relaunch the game.
even with /reload all it just don't for some reason even though it supposed to.
reload all is now like reloadAll() { return } thats why is now 'faster' 😂
lmao
So they messed it up while "improving"
did anything break?
did anyone chest ui broke after new update?
sseems like aux id items are missing with the new update. any fix?
It probably has something to do with the change about %.ns
i don't think i used string multiplication outside for %.ns stuff in my #1350130244111040593 but multi tab ui might be dead
i think they meant herobrine chest ui
yeah, i know
my message wasn't meant as a reply
btw, there is no way to turn string to number now?
Does anyone know how to make it so that at the beginning of the text titleraw in /title @s actiobar If you write §u§r At the beginning, the background of the action bar will be replaced with my texture.
Beautiful 👍
hi, is it possible to display per-player label text in the hud? Or is using title/actionbar the only solution
What do the tags mean? Can you provide more details?
im trying to make a custom stack panel for rpg-esque quests (which would obviously be different for each player) in the hud, but im not sure if theres a way to access scoreboards/dynamic properties of the player or js variables
Damn, I'll have to do something similar myself. I don't know yet.
X3
%.<numbers>s * 1 this doesn't work. but other methods still work ig. like removing the string in front a number will return that number
a string that start with a number is automatically dealt with as a number?
yeah if you try to do any operations on it
alright, thanks
what i meant here is that if you remove : from :20abc you'll get 20
removing : from :20:10 however will give 2010
yeah, i get it
so stuff like "(#var *1 )" still work? where var is 20, or is *1 not needed?
if #var is a numerical string you will need * 1
it should work, if it doesn't you can try 1 * #form_button_texture
alright, haven't tested anything yet
but someone said that chest ui broke, so i am trying to understand where it may have
these are all the places where * is used
It doesn't seem anything's wrong here. But I haven't tested properly which things still work and which things don't
is item renderer broken? my ui only shows blocks, but not items
🧑🦼➡️
ur blockprint site is sick
yours still working?
my UIs that relay on this didn't break
yeah same
Alright guys so i made a behavior pack whos only job is to alter the loot pool of 1 structure addon by including loot added by another addon. until the Mounts and Mayhem update it worked absolutely fine but now the loot refuses to appear.
Now I tried opening the Structure Addon and simply replacing the files inside with the Loot tables I changed and it works perfect. but it's not what I want. I need it to be a seperate Behavior Pack that works like a patch between 2 addons.
The only files i have for the behavior pack are the Manifest and the loot tables and as I know the loot tables work it must be the Manifest right?
so can anyone have a quick look at this and see if it looks ok
did anyone see the new property for images yet
the scale for ratio thingy?
Why when I put my button factory inside my draggable element, it doesn't work? The button don't appears
does anyone have working chest ui
where?
oh nvm found it
well at least now I know it wasn't my problem
this is disaster 💀
Oh so it was for global packs(?)
Yeah my packs were active in the world, so I didn't face this issue
String multiplication in UI expressions is now limited exclusively to %.<number>s
Anyone know what does this mean? In the stable 1.21.130
you can use only fixed numbers, like %.4s, and not ('%.' + #number + 's')
it still works :)
none of my packs are reloading anymore (/reload all)
i swear it was working the other day
(working again lmao)
yeah it seems fine for me too idk what they did
thats some chatgpt style tl;dr
Mine is not working atm
use a dummy pack to enable/disable each time you want to reload
it got fixed after I relaunched the game 2 times
but before, did one of your project showed somethig like this?
like it's displaying the actual string thingy
aw, nvm, mybad
what's the code in your source_property_name
"source_property_name": "((((((#final_text * '%.30s') - '- Toggled') - '- Unobtainable') - '§5§o') - '- Disabled') - '§f') - 'Has Custom Properties'",
"bindings": [
{
"binding_name": "#hover_text",
"binding_type": "collection",
"binding_collection_name": "$item_collection_name"
},
{
"binding_type": "view",
"source_property_name": "(( #hover_text - ' ' ) - '§r§f§r§f§r')",
"target_property_name": "#final_text"
},
{
"binding_type": "view",
"source_property_name": "(#final_text - '- Default (Unpressed)')",
"target_property_name": "#final_text"
},
{
"binding_type": "view",
"source_property_name": "(#final_text - 'Locked')",
"target_property_name": "#final_text"
},
{
"binding_type": "view",
"source_property_name": "(#final_text - '[Detachment]')",
"target_property_name": "#final_text"
},
{
"binding_type": "view",
"source_property_name": "((((((#final_text * '%.30s') - '- Toggled') - '- Unobtainable') - '§5§o') - '- Disabled') - '§f') - 'Has Custom Properties'",
"target_property_name": "#detail_text"
}
]
Here's the full bindings, it used to work before the update.
how do u do it? i'm new to json ui 😅
you should combine them in fewer binding objects
"bindings": [
{
"binding_name": "#hover_text",
"binding_type": "collection",
"binding_collection_name": "$item_collection_name"
},
{
"binding_type": "view",
"source_property_name": "(#hover_text - ' ' - '§r§f§r§f§r' - '- Default (Unpressed)' - 'Locked' - '[Detachment]')",
"target_property_name": "#final_text"
},
{
"binding_type": "view",
"source_property_name": "(('%.30s' * #final_text) - '- Toggled' - '- Unobtainable' - '§5§o' - '- Disabled' - '§f' - 'Has Custom Properties')",
"target_property_name": "#detail_text"
}
]
ah got it, i was trying to make it into 1 binding, but i found it confusing with many open/close braces 😅
i'll go into this direction now, thank you for the tips
np
although still have issues with the string multiplication, can i see ur example for using string multiplication?
like using property_bag
"label": {
"type": "label",
"text": "#text",
"property_bag": {
"#string": "This is a string containing some words"
},
"bindings": [
{
"binding_type": "view",
"source_property_name": "('%.27s' * #string)",
"target_property_name": "#text"
},
{
"binding_type": "view",
"source_property_name": "(('%.27s' * #string) - ' containing')",
"target_property_name": "#text1"
}
]
}
something like this
i think they did something with character limitation or byte count or something, i can only display this text from an item lore, not sure 100% yet
nvm
i'm dumb
How do you only display the name of an item? Like exluding the lores and stuffs?
Thank you, used this as a reference from mine, i was using "%.ns" after the text like "#text * '%.ns' and somehow it was not workint, after changing the order it worked again, thanks
Writing it afterwards did work before ig but I never use it like that
Are there any known methods for using a binding as the base of a control
"test@#hover_text": {}
I have a significant amount of elements that just get hidden instantly that I dont want the game to have to parse everytime it tries to open my screen, since that takes ages. so I want to try and make an element switch out-able that way it only needs to parse 1 element
It's not possible with bindings but can be done using variables
yea, but is it possible to set a variable based on a binding?
