#JSON-UI General
1 messages · Page 7 of 1
Hard to help you if you only give the behavior and not code
now I will give the code, seconds
server_form.json:
"[email protected]_bg_close_button": {
"anchor_from": "center",
"anchor_to": "center"
ui_common.json:
"[email protected]": {
"layer": 3,
"$button_bg_alpha": 0,
"$close_button_panel_size": [
85,
35
],
"$close_button_visible_binding_type": /*4ZfsPnjNf9NV0AIA2sh90NrzquBVn8*/"button",
"controls": [
{
"[email protected]_bg_close_button_panel": {
"$button_bg_color": [
0,
0,
0
]
}
},
{
"[email protected]_bg_close_button_panel": {
"$button_bg_color": [
157,
0.4,
0.4
]
}
},
{
"[email protected]_bg_close_button_panel": {
"$button_bg_color": [
255,
155,
15
]
}
}
]
}
}
"transparent_bg_close_button_panel": {
"type": /*yUjxaWtLCHhrNYq3zwKFD3EJIowN4n*/"button",
"size": /*FSnr7UTR8YsDTUdtB7CCxXJRZvlwo0*/"$close_button_panel_size",
"$button_bg_alpha|default": 1,
"$button_bg_color|default": [
0,
0,
0
],
"layer": 1,
"controls": [
{
"background_image": {
"type": /*gUsTHy7ETRLzDD1Y2I1A9HJ7W6ziwT*/"image",
"texture": /*JDpl3JLIqNQhSbQbnt0SLzfVhd4QcL*/"textures/ui/close_button_pressed_compact",
"size": "$close_button_panel_size",
"alpha": /*V7LDHdvDSViDpyIktSoPjkOskJpz2t*/"$button_bg_alpha",
"color": /*i6XrJhxTG7tOfTsx8nEE2LG8p8hdtV*/"$button_bg_color"
}
},
{
"x_image": {
"type": /*WEV7081BeSbE6yoKybJ8L8Z930Ro0V*/"image",
"texture": /*qvXHB9T44VM6d7MjbAytOCpIdwBIga*/"textures/ui/button_red",
"size": "$close_button_panel_size",
"keep_ratio": true,
"layer": 1
}
}
]
},
Um hey
That code is pissing off the whole chat
Mind if you send it in a file
This file look like its from tlgm, i won't read all of this
What did u add?
I just checked and there's 200 lines in this element, I don't really know which are the ones that concern me 😅
Didn't understand
button, it has already been added there, but unfortunately it does not work quite well if you watch this video excerpt
up
I understand that, but you have to tell what code did you add into these files
For me to find your error and mistake
where did I add these snippets of code that I gave you above?
oh don't pay attention to it
tell you in which files the code for adding the button is located?
What do you mean
I already see a mistake in the server_form file
Can I see what's wrong with my given button?
Well since you don't give a freaking clue about that's button code
her tapa field is abroad for some reason...
ui_common.json?
this is basically the whole button, hover, etc.
I managed to add a button, it seems not, because it does not work quite properly as it should
see the top ones with control as the suffix
@gentle hemlock
A
Already see a mistake
yes i'm so bad
transparent_bg_close_button_panel should be a panel rather than a button
what is it, friend?
^
I thought about making it a panel, but then it completely disappeared
Putting it as a button wont make it work
Your putting a button as a child element of a button
and the panel should manage?
Logically it should
logically, but it should have been not working for me, on the button at least the image of the button itself was
Also
You didnt define the button size
lmao
Yes
Where is your size property
Its syntax is not like that
Also
100% will just make the button become full screen
uhhh
Understand
You can learn more and get started with JSON UI here: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.
ok, should i redo the button on the bar and define the size of the observable?
Bro i can't help you
Like i cannot help somebody who don't even khow about property syntax
You should go learn json ui first
And understand how it works
Ok
@fathom bluff I fixed everything I messed up and got such a lovely button, its fields are working, but hover / pressed do not work, they exist under
"[email protected]_bg_close_button_panel": { "$button_bg_color": [ 157, 0.4 0.4 ]
but it makes no sense at all
Can you give a screen shot of the button code?
Show transparent_bg_close_button_panel code
Looks normal to me
what could be wrong with him?
What is your problem here
when I click on the button / hover over this observer, nothing happens, it has the same state as usual
Hmm
Don't you see it?
There is a clear mistake
sek
Your button's hover state and pressed state work
is it not called from anywhere?
stooop...
I work, but... I don't understand
somewhere I saw $state
You are calling transparent_bg_close_button_panel in all 3 default, hover and pressed
They share the same element
So they show the same thing
ahh, if you add the type "image" to it and send the image in a resource pack?
the translator is not correct...
ok, can you make hover and click link to an image from the resource pack?
not color
Hold on, im writing a example
Ok
Fine
If you are asking for any more support then please wait, is literally 1 am in my country
Sorry
I more or less understand the logic of the appearance, if I make the type "image" and send to the image from the resource pack, excuse me for my requests, if so
I'm sorry for the trouble friend, I asked earlier if it's possible to do what you threw off, thank you so much for your help, sorry again, I'm very grateful
Your translator 😶🌫️
I cannot understand
But ok i don't mind
sorry for bothering you, thank you
I'm sorry that I communicate with you through a translator
Atleast learn some english first before having a conversation with some one who is foreign
English is not that hard to learn
It seems so to you...
Private dm, this is getting off topic
my translator does not understand what you are talking about, nor do I
I will definitely read the JSON ui on bedrock wiki
Direct Message
good luck
???
okay
By the way, how can I make this button an ID or something like that? As if I could do something on it from the server
interaction with the button
Too tired, can't respond
Rest friend
I think there will come someone else who will be able to explain this topic to me
does anyone know anything about the button id, for example I have a button that inherits @common.button, how can I track if this button was pressed and do something from the server side, if I do it for the server (server_form.json)
The simplest way would be to use a stack panel and assign the collection index for each button. The collection index determines which server form button it's tied to, i.e. what action is run.
And if I have a different button, it has a different texture, etc., what should I do?
all buttons are different
@mystic heart, can you tell me how to do it? And how does it work, as I understand it, the buttons can be arranged there in order, even regardless that this button is added via @common.button?
Question! I made a UI but it seems it only supports Scale -1 UI, how can I make it supports both scaling? Given that the size of the UI for Scale -1 is [800, 500]
It's fine if each button is unique (different texture, size, etc.). The collection index just assigns the action to them. I recommend searching "collection_index" in this channel and looking around. There are many examples.
Okey
@mystic heart, My collection index doesn't quite want to work, maybe I'm doing something not like that?
as I understand it, you need to add a stack panel?
Hm
you also need to set the collection in the stack panel
can show what the stack panel looks like, I don’t quite understand something
I'm confused
"button_collection_length": {
"type": "stack_panel",
???
confused
"common_button_stack_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"collection_name": "common_buttons"
????
Ooooo
after adding the stack panel, my button was gone altogether
😑
what could be wrong with him, that even my button was gone, here is a screen with a red button
You need to use the same collection that the server form uses for its buttons.
wrong json
#1134152358113321031 pleeease
I don’t understand how it can be used, you confused me so much that my own button disappeared, first create a stack panel, then use the same collection ...
what could be the problem with this code? Even the button is gone, which I had earlier
did not understand anything from the outcome to use the name of the collection, can anyone help?
have u tried not using zeqas code?
I didn’t quite understand you, this code was given to me as an example, I don’t use its buttons or something, I’m trying to do something of my own, I managed to recreate the button
Could you help me?
._ .
Someone help, the file dosen't work...
Help, I realy need help
Who understands collection_index and name, please help me, after I add this, my button disappears completely
Helpme
helpme...
Put
"namespace": "chest_screen",
Over the
"player_renderer": {}
Basically at the top of the file after the first {
Hi @fathom bluff, I hope you are at the dawn of your strength and can explain to me how to implement, for example, a button action, so that I would add a button on the server and it would be instead of my button, or rather its functionality, and the appearance of my button, position, size, texture?

how can i revive this code? The button completely disappears and is not replaced by the one made by the plugin
ohh...
I'm trying to add an id to my button, but after that it disappears completely, here is a screenshot before and after trying to add it, can you help me with something? I will give you the code
why is it so empty...
.
aaaaaaaaaaa
understand.
It is not needed if it is a modified file
hello, is it possible to make a json ui button run a command?
i basically want to copy the close inventory ui button and make another button to make it run a command to send a script event to open another gui after the first one closes
new to json ui but would a stack panel work for that?
Are you chatting with me?
yeah, dont stack panels stack its children?
I don't even know what children are, I just know how to modify the ui 💀
yeah i believe use a stack panel
I don't even know what stack panel is
So instead of it have a "type": "panel" do "type": "stack_panel"
i cant say this will for sure work since idk what your code looks like but i think that would work
Is it possible to use binding values for #item_id_aux?
Anyone know how to make a screen the size of the player's device?
"size": [ "100%", "100%" ]
?
That does the oposite, It sets the form size the the default size
@vocal urchin why did the message disappear before igniting
?
and here, in general
What u want
look, you need collection to work, but it refuses to do it
When I add a collection that my button worked when adding a button from a plugin, it disappears...
the first screen threw off the wrong one
@vocal urchin i can give you my form code
Who can help me to implement a collection for the button, so that when adding a button from the server side, the added button transfers the functionality of my black button, I added it, but it is useless for now
the black button is mine added using @common.button, the top one is added from the server side, mine doesn't display anything when pressed, and the server one is what you need
use in pocketmine
"collection_index": {your int value}
no problem
👍
you also need to refer to stack_panel with collection_name? I guess but this require knowledge about jsonUI
Oh, this is part of the trouble only, I've been trying to implement it correctly for 2+ days, no one helps, there is a person who understands this, but this is more for a vanilla server and Java Script, and I need to go to PocketMine, can you help me add a stack panel and a collection?
In recent days, as soon as I started asking for something, it became empty...
here
cuz you have to know about jsonUI
like this part with custom buttons, collections, collections indexes is hardest to understand/code
It does not say how to implement this for the server form🥶
so I'm coming here
but that doesn't help either...
Why might it not work? My collection is set up correctly
My black button is not there, when I add its collection, there is one button from the server, and the essence should be like here on the screen
Anyone know how to Restore toggles being able to work left and right on a hud_screen type mod menu?
I was working on one before 1.19-1.20 ish and now I cant restore the going left or right onto another toggle, just up and down (when using the d-pad because it cant use joysticks).
I've personally tried everything I could think of so someone lmk if you have a solution/fix
what's the file for when player is editing its skin?
I want to add img to a "small form"(title). So I added controls on line 78. but if i insert controls, GUIs except my img disappear, and when controls are removed, the screen opens normally but i doesnt have img. I want to display img next to the form, how should I modify this code?
left: added controls | right: removed controls
do you mean custom pressed type buttons on hud?
how can i add a progress bar in a custom ui with 2 inputs? because furnace has only one input im able to use, so both slots are identical
no, so I have a menu that shows on the hud screen (mod menu type) , but now the toggles can’t be used left to right when using the dpad/ I can only go up and down to go to another toggle, not left and right if that makes sense
then just add to elements with type=button
"$focus_id|default": "",
"$focus_override_down|default": "",
"$focus_override_up|default": "",
"$focus_override_left|default": "",
"$focus_override_right|default": "",
also left and right may be reverted due mojang hud modifications, this probably was reason why I "removed" controller keystrokes
It's not quite easy to fix, but try using the method above, it could be better with "focus_container", but it's difficult to understand how it works
Kk I’ll give it a try,
Thank you both
im new to this how would i make something simple
Got it to work, Thanks!
Who can figure out why my buttons stopped appearing?
is it possible to show a progress bar in a chest screen?
Can we get the value typed in a text field?
yeah
JSON UI?
#item_name probably, maybe some property bag is also required.
of course
I added textfield to actionform, idk how to get form Values of the textfield
uhh, If you want to get the text field into the script just check for it in the order you added it and declare the thing. Go to #1067535382285135923
yeah i tried that, didn't work out
why is my second button not being tracked? It is like 0, that is, when you click on my buttons, regardless, it sends a message 0 to the second and 1, and if you press a simple button, then everything is fine
collection_index not work, helpme
maybe it's not possible
idk, search into scripts
when you click on the second button should be 1
"custom_button_panel": {
"type": "stack_panel",
"size": [
"15%",
32
],
"orientation": "horizontal",
"collection_name": "form_buttons",
"controls": [
{
"1@first_custom_button": {
"collection_index": 0,
"size": [
"10%",
32
]
},
"2@second_custom_button": {
"collection_index": 1,
"size": [
"10%",
32
]
}
}
]
},
I assume that you added the text field in the js script and want the text field value, see examples they are everywhere.
I don't think script is the problem?
not a problem with this thing, looks like you are using a file that is provided to you. Try simplifying things with the form and try after.
uhh, try to fix yourself, no one understands what someone trying to do. There is no problem with the collection_index thing though maybe any other problem related to the code.
Can you see my code?
Sorry, A bit busy. Also I'm on mobile.
Okay
What is $is_holographic?
It's mainly for VR
Oh okay, is there more type of this?
You mean hardcoded variables?
Yeah
Occasionally you don't need property bags
There's a lot, like $mouse or $touch or $is_win10_edition..., you can find them in the ui folder inside vanilla resource pack
Make sure the variables you find are readonly, those hardcoded variables can't be overridden by changing value unlike the |default values
I found this in property bag properties, can this help? #property_field
Oh okay noted
what should i do if i want to add padding between the 2 buttons
You add panels between them
And resize it until it reaches the thing you want, might take some trial and errors.
thats what i tested at the start but i cant seem to find a way to add it exactly between
just before or after
it's a server form
Is this some kind of custom buttons or you added the buttons on script
buttons on scripts
Well that's what I don't know.
wait i got an easier question, how do you make a panel fit the entire screen
I mean "fill": true
oh nice, wait do you know how can i put padding between 2 buttons
depends on method how they are "rendered"
it says nothing
if you are using collection indexes just use stack panel with e.g. e buttons inside and empty panel between with some size
whats a e.g
more..?
nvm got it
im not using collection index
im using what default server form uses
Do you use this?
"type": "stack_panel",
"size": ["10%", 32],
"orientation": "horizontal",
"collection_name": "form_buttons",
"controls":[
{
"1@custom_form_button": {
"collection_index": 0,
"size": [ "10%", 32 ]
}
},
{
"2@custom_form_button": {
"collection_index": 1,
"size": [ "10%", 32 ]
}
}
],
"factory":{
}
},
"custom_form_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.form_button_click",
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"size": [ "10%", 32 ],
"$button_text": "#form_button_text",
"$button_text_binding_type": "collection",
"$button_text_grid_collection_name": "form_buttons",
"$button_text_max_size": [ "100%", 20 ],
"$focus_enabled|default": false,
"focus_enabled": "$focus_enabled"
},```
why lmao
why
You should use collection indexes
how
how an aka.ms link leads to rickroll
Idk
Hello, i'm new to json ui, how would i go about making a server form with a specific title look like a player's inventory, but all of the buttons on the server form are the grid cells?
i dont need like, the entire thing, just what should i do first
How do i resize the modal dialog? I can't seem to find it on popup_dialog,json
It is literally in that file
Yeah but what element?
If I remember correctly, find $modal_dialog_size or something like that (inside "variables")
You mean this?
"modal_dialog_popup": {
"type": "panel",
"variables": [{
"requires": "$three_buttons_visible",
"$modal_screen_size": [214, 190],
"$dialog_background_override": "dialog_background_hollow_6",
"$button_panel": "popup_dialog.three_buttons_panel",
"$modal_panel_label_size": ["100% - 16px", "100% - 124px"]
},
$modal_screen_size
Oh yeah it is
How to create a close button that closes a whole screen?
Nevermind, I figured it out. If someone's curious, you could just do this.
"controls": [{
"[email protected]_button": {
"anchor_from": "top_right",
"anchor_to": "top_right"
}
}]
Do you know how you can change the texture of these buttons?
If someone is ready to help me, then I will throw off the code
I would recommend you give the JSON document to a player that know's there stuff
hey guys... is there a way to change the texture of a panel?
all panels use this texture on default: "textures/ui/background_panel"
But can I change it to someting else?
is it possible to show a progress bar in a chest screen?
you mean it would not change its state?
then could there maybe be more than one input in the furnace? (because the others have item type restrictions)
But progress bar for what
like the progress of smelting - I used furnace window for this but the problem is, that I cannot set two slots as input
in this case, the slots are clones
How do I fix my title staying suck on my screen? Whenever I use title ```json
{
"hud_actionbar_text": {
"offset": [-6, "-2%"],
"size": ["100%cm", "100%c"],
"anchor_from": "top_right",
"anchor_to": "top_right",
"alpha": 0
},
"hud_title_text": {
"offset": [-30, "-50%"],
"type": "panel",
"size": ["100%cm", "100%c"],
"anchor_from": "middle",
"anchor_to": "middle",
"alpha": 1.0,
"controls": [{
"sidebar": {
"type": "panel",
"size": ["35%c", "100%c"],
"offset": [-5, 5],
"controls": [{
"title_background": {
"type": "image",
"alpha": 0.45,
"layer": 0,
"size": ["100%cm", "100%c"],
"texture": "textures/ui/hud_tip_text_background",
"controls": [{
"title": {
"type": "label",
"text": "$title_text",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"color": "$tool_tip_text",
"shadow": false,
"localize": true,
"font_size": "medium",
"layer": 1,
"alpha": 1.0
}
}]
}
}]
}
}]
}
}
well thats probably because you removed the alpha animation lol
AH thank you
you could display the XP bar in there and retexture it a bit if u know what I mean
how do i get an entity to have alot of inventory slots more then 54?
flag the entity name in the chest screen and make more slots
@grizzled crypt i haven't done this inventory expansion before.
nah this cant be the only way...
what do you mean by this? something like the pumpkin blur?
In this case, use item naming trick
You could also make it so that it only looks different on the inventory and not on the hotbar
it is nothing just a blurry type of texture, similar to pumpkin blur
darn
i was hoping you had perhaps another idea
considering it only darkens the screen
thanks though
hey guys... is there a way to change the texture of a normal gray panel?
How can I change the background of the button according to the button text?
how could i handle every item in a container different? a grid does not allow it sadly
You can manually overwrite grid items using grid_position. Or you can just use a stack_panel instead
how do i use grid position / set child elements in stack panel
For stack panel you just set the collection index of the controls. For the grid it's the same, except it's grid position, and is in the format [ #, # ]. You can check vanilla inventory screen, it's used quite a bit there
Here's a example of stack_panel
#1067870274894172260 message
I would also like to know
How to change ui color
Hello, I'm new to json ui, and I have a question. Everything you do in server_form.json changes all interfaces? including other addons?
Like its name, server_form.json only changes the server form, not all the interfaces and other addons
what if another addon has the same file, only modified?
is there any way to just change the background of a specific interface?
if it does not modify the content related to the file, they will merge without any conflict.
okok
I have 2 interfaces made with 2 actionFormData in the api script, how do I change the backgroud color of the first and second, how are you going to "identify" each interface by json ui to change colors?
you specify two forms and change their background seperately with "$custom_background"
https://www.youtube.com/watch?v=3X9Oq2BvLck <- witj $custom_background var to set a imgae element as bg
Hello Why do I have this error?
#1067535382285135923
okkk
I'll see, thanks for the support
How can I make an invisible slot like this one here?
is there anyway to summon/open a JSON UI menu without doing the script part?
Could someone tell me how the #text binding from the chat works?
I want to make something close to this.
so can anyone help, im trying to make different pictures on my minecraft server for the scoreboard, so that in the lobby it displays the server icon on the scoreboard, but on bedwars that it shows a bedwars image on the scoreboard, does anyone know how to do it
Seems simple enough ¯_(ツ)_/¯
Perfect

You can just use something like this. Might want to make it a bit better though
how does one get started with json ui
step 1: break down
there is no step 2
a
Honestly, I just read other peoples examples
It's a lot easier than it looks. The hard part isn't the editing, its figuring out what you're supposed to edit
Agreed
Having to find the parents and children of different elements and stuff takes a while, but actually editing all of it takes less time (typically)
honestly, I could not figure out what I was supposed to edit for server forms haha someone had to tell me. everytime I tried it ended up either invis or missing body text
but actual forms are done in like 30mins
depending on how much detail is in them ofc
I tend to spend days just because I am testing stuff and have no idea
I want to learn how to conditionally render better though. I've only gotten to the point of multiple pages of forms based on title text
that is conditional rendering though
I want to learn how to conditionally render better
how does one press buttons on a keyboard better?
well
pressing different keys to do different things
like detecting certain words in the title text or buttons/body text instead of just testing if it is 1:1 to something like "test button"
maybe something like "test button that is big" where it conditions "test button" and removes that text and makes a big button that says "that is big"
This may or may not help you then idk "(not(('%.5s' * #title_text) = 'form.'))"
This way you don't have to list all of your forms to display the vanilla one
just use the prefix form.
🤷♂️
so
let me understand better instead of being spoonfed, but
(not(('%.5s' * #title_text) = 'form.'))
%.5s
what does that do?
Selects the first 5 letters
which is form.
maybe it is, maybe it isnt thats for the ui to decide
so it can be
Yes
4 letters and a .
then you can have multiple forms like:
form.menu_0
form.menu_1
form.menu_2
and none of them will render the vanilla form
I still have no idea what language its from though so Im not sure how to customize it
apparently, you can use regex but idk how
what about body text, where I want to move like half the body to another element or area of the form based on a specific word in the middle?
I am assuming that'd be the regex then
have you tried regex notation?
like the /regex/
I have tried nothing, I learned that you could do it abt an hour ago
damn, valx lieing??
well no
"regex doesn't work in json ui" just probably means not /regex/
like javascript
but conditional rendering type, yea
you can use regex thing
usage is something like this: "$var": "abcdefghijklmn"
'%.5s' * $var this will return abcde
$var - ('%.7s' * $my_var) this will return hijklmn
but I found this, showing some different ways of "regex"
which shows that you can get the start and end of strings with %.#s
I get what they meant by some regex stuff or whatever lol
yea but it's gonna take a bit to learn for me
not ((#hud_title_text_string - $update_string) - becomes true when the current title text includes the update string (JSON UI docs)
ngl it sort of looks like the powershell thing where you can use match lol
so, what I understand now is that you can get the beginning and end of a string
but I don't know how to detect a certain word and everything after it
If you figure it out, ping me, id like to know
so you make another element, just like the existing body text, but then you use some of these modifications to move/replace some of the text to the 2nd element
and remove that part from the first element
i’m not quite sure if it’s possible
^ this thread might be worth reading through, someone in it said that it’s not possible
you might just need to add filler characters and then remove from the beginning/end??
you need to know the position of the word first
How would you do that in the image i sent? The name tag length is unknowable
probably seperated by filler characters in the body text and detect it by subtracting the whole filler text, they must have given some space to the health like 10 characters or something
I supposed that could work. I'm a little thrown off by what valx said though
you still had to use that regex to remove like 10 chars for health https://wiki.bedrock.dev/json-ui/json-ui-intro.html#string-formatting
I know it's a bit complicated
what part?
so you make health say like health: 50
Flag a certain string, everything after it will get taken makes it sound like you can do something similar to regex or actual string manipulation
he doesn’t actually know json very well, he might’ve just guessed?
idk
but yea pretty sure there’s no way that’s very simple 🤷♂️
Let's say that someone reserved 10 space of characters for health so in the script body text he puts health: ${gethealth()} so after in the json ui to get the health of the player you'll just do '%.10s' * #form_text to get the health
yea so like a few spaces after health?
yea something of the sort
basically a way to always make it so the starting half of the text is always the same length via fillers
forgot scripting api was different channel but yea padEnd seems to be good
string.padEnd(10)
yeah
yea that could be better
thing is, it would end in § sometimes
since health can be an odd length like 1-9 or 100
nah, you'll use javascript for it
wdym
you can see in this, I used $ sign as a filler for the button descrption
its more on the script side 🤷
I hope you got it.
so is it like "button name$$$$$$$$$$$"?
yes ofcourse
and wouldn't that just make the button say "button$$$$$$$$$$$$$$$$$$$$$$$$"?
yeah whatever
...
I have limited the button text to 25
so the text cannot pass 25 length so you just add like 25 dollar signs?
the length of the text is always 25 characters, but whatever the other text is subtracts from the amount of $
so the string is always the same length
uhhh, It is like, I know my button text will not be more than 25 so i just used 25, so if the text is a there will be 24 $
it just has $ added to it to turn it into 25 characters if it isn’t already
understood
sir this is #1067869374410657962
Json ui is not related in any way to game modifications.
its just ui.
idk, this is probably some entity file error
Im not a mod maker
Thanks alot!!! What's inside the cmd block BTW?
Probably /say?
My gui 😮
Yes but the player name doesn't show up.
I just wanted to get help, I'm sorry.
Your template doesnt seem to work on my end.
It also just cuts off
Hmm
Maybe ur image is too big?
It is because of a 20% offset to the right
but I have trouble resizing the background
Try not adding a offset?
To see where its located?
I know where its located its 20% to the right
What's the px of the image your loading? Maybe try testing it with vanilla textures?
It works for me.. idk what's wrong.
Oh it worked?
No you see the text is still cutoff at the end
Idk what goes wrong
because if u used 20% offset, it takes your screen height or width, your screens may be different so offset is not same
use something like 16 or 32
This is the result
Can anyone help the heart renderer is stuck there I used -120 for the heart and hunger idk why it's glitched someone help
Hmm using any normal number doesnt change anything
only % changes something
h
h
h
h
h
h
h
then something is wrong
also h
Well, these renderers use their own custom offsets which make them a bit weird. try testing with stuff, you'll probably do it
there is a binding for that but i forgot
"property_bag": {
"#use_heart_offset": false
}
the max text width is longer than the actual display
so if that's an option, or if you have some sort of text width vs message width and stuff
How can I move the text from the chest in the middle?
yo @raven wigeon canu help me with something rq
Depends haha
i was looking to remove the +5 Attack Damage thing on swords and kb resistance on armor, and i saw u helped soemone about a year ago on it
but when i set the stuff in the text file to nothing it gives me this
a +1
#1067869136606220288
Or do you want the text to be gone?
Im not sure anymore what I did
text to be gone
Ah
Edit the lang files.
thats what this is
this is all i got in my lang file idk if i need anything more
Did you define your lang file?
languages.json
idk what ur asking me 😭
this is my file name
idk whatchu askin though
Did you define it in languages.json?
no... i dont even have a languages.json
what is that
so i jst gotta make a languages.json then define the stuff in the json file?
oh wait
yea sorry
i dont think u do tbh
it is defined
ive edited the lang before
never had to define it
sometimes things just dont work lmao
i mean either way i have it defined i jst got this issue
but try making it an invis letter
oo
you could get the color code of the background for the hud_tip texture
make a custom color that matches it
so it blends in and you dont see it!!
im so smart
well
yeaaaa...
probably bad idea I think
json is made of objects, arrays, keys and values
object notation
the only problem for minecrafts json is u have to find what the variables are LOL
mhmm
well tbh not feelin like learning json rn 😭 im jst tryna get rid of the dumb number
variables seems reasonable for me
like is there actually no way to remove that
damn
yeah, hardcoded. or maybe?
not sure if the text hider does work on one string or not
i mean theres def ways around it but i dont think its possible with json
idk anything abt lang but im pretty sure thats for everything
and im doin something wrong
this what i got rn
what does it show
just make custom items at that point
i cant so many of my items have alreayd been made, like that would be hours of work lost ://
days even
just use script api
replace certain tools with the new ones
that are in ur inventory
i could, but hella laggy
??
constantly looping 10 players inventory and checking every single item if to see iof theyre id matches the reg mc id
very laggy
what are u making?
w this?
what type of realm
kit pvp
then just give the custom item when they buy it..?
i wanna do server though
yea but players already have items in theyre echest, vault etc
like this is new season release
then do a wipe
also u could just replace the item when they hit a player lol
like on hit replace all minecraft: with new items
idk alota work jst to get rid of some dumb attack damage thing
tbh dont think its worth the work
dooka how did u use reg text on ur sidebar and still make it look so gah damn clean
like show me ur ways 😭
regular text > small trash bold doodoo text
valx how do i do it
nineslice
without the sidebar changing when a number gets too big or some
huh 💀
look it up
what is nineslice
u can create a label, then the background of the label will be the size of the text box
basically u can stretch an image to something
like if u had a 5x5 image u could stretch it to the background of a label
oh i see
^
ik
just use normal
im tryna dfix that
minecraft five and seven are the way to go
ik it isint
do you have jager black ice?
just the actual text
and even then if i re-position the sidebar, whenever nuumbers get too big for a objective then it reshapes the siedebar
bro idk the words coming out ur mouth rn
tf is a static size 😭
well theres nothing in json ui that defines that but static means it doesnt change
the text needs to be anchored to the side instead of middle, so that the text resizes in a single direction as opposed to both
so u have a preset size that doesnt change at all depenging on something
dawg can i jst send my hud_screen and u fix it, like i said i know nthing about json
@obsidian crest would be MORE THAN GLAD to!!
💀 💀
is it alot of work?
i’m not at home atm but i’d do it if i wasn’t
that’s one i made that someone else posted if you wanna use it
it’s perfect
so do you just copy the scoreboard code and put it in the title ui? not exactly copy but yk
no it seems you just kinda made it yourself
what??
W tysm
i was just asking if you went to the scoreboard.json ui thing and copied the code there but no, it seems you just replace the way it displays as a title
😩
custom nineslice, and textures
what does nineslice do though?
There is no need to show the owner. Removing stuff like that will give you more space to work on a clean sidebar. A sidebar should be used for displaying main values like the realm currency, and state values. No need to display for example the discord code or realm code. Once you have the scores you only need in place you can create a tiny simple sidebar.
then start thinking about the color theme and pallet you can use to have everything match on the sidebar.
yea showing owner and stuff is dumb. I've seen a clean sidebar that uses subtitle too, and has 2 panels on the right for server and personal info or something
pretty much like this
It defines the space inbetween the border of the image and where u want the image to start scaling in size in pixels
ohh
so for like forms
the background has a nineslice inside the border, so the inside is scaled
Everything defined in the niceslice doesn't scale with the size
so what's the format of nineslice?
for example
{
"nineslice_size": [
2,
2,
2,
2
],
"base_size": [
6,
6
]
}
That is
1 sec
any thoughts?
still working out the colours and kinda need help w it
not many hot colours i can use
Nice
Does anyone know how to move the text that is shown in the menu when u open a chest in the middle
⬜⬜⬜⬜⬜⬜
⬜🟦🟦🟦🟦⬜
⬜🟦🟦🟦🟦⬜
⬜🟦🟦🟦🟦⬜
⬜🟦🟦🟦🟦⬜
⬜⬜⬜⬜⬜⬜
nineslice?
?? that only uses title or actionbar
Your FAQ search is not appropriate for this discord
Kindly get back to making Bedrock Add-Ons and making the world a better place for everyone.
no subtitle?
nope its just one image and title or actionbar
and he just uses \n?
yup
crazy
wait
so the image is the "haven" part, and the "quest" part
1 image
man this is something
yup its one image
man i need to code it to test
I keep thinking it's using the nineslice and stuff to stretch it down cuz of the text
but it's not
i suck at putting thought into words
so it's ninesliced but the size is something like "size": [50, 150]
i suppose yes
but does the size for the text areas stay the same?
yes
Yes
How to get the text inside a text field?
What do you mean, inside text edit box?
Yeah
Is there a way to do it?
@opal aurora I searched a little bit, made this code but doesn't work. Why?
{
"custom_input@settings_common.option_text_edit": {
"$option_label": "#custom_text",
"$option_place_holder_text": "#custom_placeholder_text",
"$text_edit_box_placeholder_content_binding_name": "$option_place_holder_text",
"$text_edit_box_placeholder_content_binding_type": "collection",
"$text_edit_box_grid_collection_name": "custom_form",
"$max_text_edit_length": 100,
"$text_edit_box_content_binding_type": "collection",
"$text_edit_box_content_binding_name": "#custom_input_text",
"$option_binding_name": "#custom_input_text",
"$text_box_enabled_binding_name": "#custom_input_enabled",
"$text_box_name": "custom_input",
"$label_bindings": [{
"binding_name": "#custom_text",
"binding_type": "collection",
"binding_collection_name": "custom_form"
}]
}
},
{
"image_test": {
"type": "image",
"texture": "textures/items/apple",
"size": [80, 80],
"bindings": [{
"binding_type": "global",
"binding_name": "#custom_input_text"
},
{
"binding_type": "view",
"source_property_name": "(not ((#custom_input_text - 'test')) = #custom_input_text)",
"target_property_name": "#visible"
}]
}
},
i have custom text edit boxes samples, but haven't done that (contain entered texts)
Can you send yours?
edit box example
{
"[email protected]_edit_box": {
"$text_box_name": "example_custom_text_box",
"$text_edit_text_control": "example_custom_text_box_text_display",
"$place_holder_text": "this text should be shown if text input is empty",
"$text_edit_box_label_size": [ "default", 10 ]
}
}
(note, it's not hardcoded or run with bindings)
What does $text_edit_text_control do?
to be used inside "view" binding types
There's a "$text_edit_content_binding_name". Maybe I could do like $text_edit_content_binding_name": "#custom_input_text"
?
probably
💀
Is it possible to display an image if a players scoreboard is set to 1?
Is scorehere the objective?
"source_property_name": "((#scorehere > 99) and (#scorehere < 1000))"
yeah the objective displayed on the screen
scoreboard are not viable for detecting and displaying with condition rendering.
What I want to do is display an image if the scorehere objective for the player is one so display an image if it's 0 hide it
having too many list on scoreboard can make condition rendering go brrrrr.
e.g 4 players on scoreboard list can already make condition render go haywire
just use titleraw with tag instead, it's better.
How can I get the letters to come one by one when I use dialog?
Using this example:```json
"test_txt": {
"type": "label",
"text": "#player_score_sidebar",
"bindings": [
{
"binding_name": "#player_score_sidebar",
"binding_type": "collection",
"binding_collection_name": "scoreboard_scores"
},
{
"binding_type": "view",
"source_property_name": "(#player_score_sidebar * 1)", // convert score from string to number
"target_property_name": "#score"
},
{
"binding_type": "view",
"source_property_name": "((#scoreHere = 1 ))", // visible if score is 1 for player objective scoreHere is 1
"target_property_name": "#visible"
}
]
}
you had a "dialogue test" video, how were the texts written there one by one?
scripts
I'm very new to working with JSON-UI and so far have just been throwing myself at it wildly. Can anyone help me as to why this binding isn't working? I do not understand how they are supposed to work but my goal was to get the title to disappear upon being set to "aaa" to test bindings.
{
"title": {
"size": [
170,
230
],
"bindings":[
{
"binding_type":"view",
"source_property_name":"(not ($title_text = 'aaa')", //Testing with "aaa"
"target_property_name":"#visible"
}
],
"font_type": "Ariel",
"type": "label",
"text": "$title_text",
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"color": "$tool_tip_text",
"text_alignment": "center",
"offset": [
0,
19
],
"layer": 1,
"shadow": false,
"localize": false,
"font_scale_factor": 0.93,
"alpha": 2
}
}
?json ui
You can learn more and get started with JSON UI here: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.
np
@hexed briar can you give me your script please?
No.
Is this an error?:```js
{
"namespace": "hud",
"test_txt": {
"type": "label",
"text": "The score is 1",
"bindings": [
{
"binding_name": "#player_score_sidebar",
"binding_type": "collection",
"binding_collection_name": "scoreboard_scores"
},
{
"binding_type": "view",
"source_property_name": "(#player_score_sidebar * 1)",
"target_property_name": "#score"
},
{
"binding_type": "view",
"source_property_name": "((#test = 1))",
"target_property_name": "#visible"
}
]
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"[email protected]_txt": {}
}
]
}
]
}
}
It's not showing
Add size
Yes
Oh
I need the text to display without any other requirements like needing the objective on the sidebar, Any documentation on that?
{
"namespace": "hud",
"test_txt": {
"type": "label",
"text": "hud text",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [
-4,
4
],
"bindings": [
{
"binding_name": "#player_score_sidebar",
"binding_type": "collection",
"binding_collection_name": "scoreboard_scores"
},
{
"binding_type": "view",
"source_property_name": "(#player_score_sidebar * 1)",
"target_property_name": "#score"
},
{
"binding_type": "view",
"source_property_name": "((#test = 1))",
"target_property_name": "#visible"
}
]
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"[email protected]_txt": {}
}
]
}
]
}
}
Actionbars
I ment an image
Add size to the text
It will still work with the image
Should I remove ```json
{
"binding_name": "#player_score_sidebar",
"binding_type": "collection",
"binding_collection_name": "scoreboard_scores"
},
{
"binding_type": "view",
"source_property_name": "(#player_score_sidebar * 1)",
"target_property_name": "#score"
},
no
To display the image or text to show it without needing the scoreboard sidebar
Or change player_score_sidebar
Oh, I need to modify the hud action bar?
You can learn more and get started with JSON UI here: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.
@halcyon spear read the docs about conditional rendering here.
And there's also an examples there.
{
"namespace": "hud",
"black_conditional_image": {
"type": "image",
"texture": "textures/ui/Black",
"size": [
16,
16
],
"layer": 10,
"$atext": "$actionbar_text",
"visible": "($atext = 'hello world')"
},
"black_conditional_image_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_conditional_image"
}
}
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": {
"[email protected]_conditional_image_factory": {}
}
}
]
}
}
?
Is there an error?
I did /title @a actionbar hello world
In a command block
I just did a quick test of this and it worked fine for me.
💀
What version are you in?
1.20.12
Is json ui updating? Does it matter?
What? That's the name of the file?
It updates often enough to break things, especially with the hud if you're not careful.
oh lol
Uhh.. how do we know this? Like do they mention it on changelogs?
Hii , i saw json ui will be replaced by ore ui. Someone have any doc for how to use ore ui ?
Anyway can I just use a scoreboard to display the image if the score is 1?
Here
As arcdustry said, if there's more than 1 player in scoreboard, it gotta break/glitch your thing.
I believe someone made a git that displays all the changes made for each version (but that's for BP and RP overall). I don't remember where it is though. But if you check the latest releases of the packs you can see all the changes they made. Usually you just find out when something stops working lol
Oh.. okay then
A change they've been making a lot recently is moving bindings directly into where the control is defined in the root panel, rather than the element itself (which is how it should have been in the first place imo). But that makes if you are using bindings to control individual elements, a lot of the time they will end up getting overwritten by the root_panel definition.
no ?
I have a lot 💀
You can, but you need to make sure you're checking the correct player name. Unless it's a global score, you're better off using title/actionbar/etc.
Yeah I'd either change them now to be root panel element modifications or just keep an eye on it, because it seems like every update they make the change for a few of them.
Thanks, I'll do.
How can I remove the image from the screen after the title @s actionbar hello world
You could use animations to slowly/instantaneously remove the image.
Specifically fading animation
{
"namespace": "hud",
"anim_size": {
"anim_type": "size",
"easing": "linear",
"from": [
"100%",
"100%"
],
"to": [
"100%",
"100%"
],
"duration": 5
},
"anim_alpha": {
"anim_type": "alpha",
"easing": "linear",
"from": "100%",
"to": "100%",
"duration": 5
},
"black_conditional_image": {
"type": "image",
"texture": "textures/ui/frozen_effect",
"size": [
"100%",
"100%"
],
"layer": 10,
"$atext": "$actionbar_text",
"visible": "($atext = 'hello world')",
"anims": [
"@hud.anim_size",
"@hud.anim_alpha"
]
},
"black_conditional_image_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_conditional_image"
}
}
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": {
"[email protected]_conditional_image_factory": {}
}
}
]
}
}
How can I show the background (the gray thing) in a scroll bar?
wdym by show background, it is already there?
Huh.. it doesn't show for me
weird, it shows as default
Make sure it is scrollable and there is content inside it
Is there another thing to make the image the screen size?:```js
"type": "image",
"texture": "textures/ui/frozen_effect",
"size": [
"100%",
"100%"
],
Does this scroll bar same as yours?
"[email protected]_panel": {
"anchor_to": "top_left",
"anchor_from": "top_left",
"$show_background": false,
"size": ["100%", "100%"],
"$scrolling_content": "server_form.long_form_scrolling_content",
"$scroll_size": [5, "100% - 4px"],
"$scrolling_pane_size": ["100% - 4px", "100% - 2px"],
"$scrolling_pane_offset": [2, 0],
"$scroll_bar_right_padding_size": [0, 0]
}
@normal moat
yeah
Put it inside the root panel of the screen with size 100%, 100%
Did you mess with scrolling_panel in ui_commons.json?
nope
Huhhhh.. why it doesn't show for meee
you can try: "$scroll_bar_contained": true
root_panel": {
"size": [
"100%",
"100%"
]
}
```?
uhhh, every screen has its own 'root' panel in which all the other elements are referenced like:
hud_screen has root_panel (hud_content)
start_screen has start_screen_content
for hud screen:```json
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"img": {
"type": "image",
"texture": "textures/ui/frozen_effect",
"size": [
"100%",
"100%"
]
}
}
]
}
]
}
{
"namespace": "hud",
"black_conditional_image": {
"type": "image",
"texture": "textures/ui/frozen_effect",
"size": [
"100%",
"100%"
],
"layer": 10,
"$atext": "$actionbar_text",
"visible": "($atext = 'Frozen!')"
},
"black_conditional_image_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_conditional_image"
}
}
},
"root_panel": {
"size": [
"100%",
"100%"
],
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": {
"[email protected]_conditional_image_factory": {}
}
}
]
}
}
yeah try it
remove the size 100% on root panel
💀 I have been trying to make it fit to scale all day
{
"namespace": "hud",
"black_conditional_image": {
"type": "image",
"texture": "textures/ui/frozen_effect",
"size": [
"100%",
"100%"
],
"fill": true,
"layer": 10,
"keep_ratio": false,
"$atext": "$actionbar_text",
"visible": "($atext = 'Frozen!')"
},
"black_conditional_image_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_conditional_image"
}
}
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": {
"[email protected]_conditional_image_factory": {}
}
}
]
}
}
``` try this
The sides fill but top and bottom not there
maybe because of safe screen area?
I see no safe screen area
yes
I see that the 4 corners fit the screen correctly
working?
No, The hud image is not displaing correctly
It needs to be adjusted a little
It's almost there, It must have been the game glitch in the safe zone
try full screen the game
well, try to replace root_panel with hud_content
or add "keep_ratio": false to image
None of these additions change the hud image
{
"namespace": "hud",
"black_conditional_image": {
"type": "image",
"texture": "textures/ui/frozen_effect",
"fill": true,
"layer": 10,
"keep_ratio": false,
"$atext": "$actionbar_text",
"visible": "($atext = 'Frozen!')"
},
"black_conditional_image_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "[email protected]_conditional_image"
}
}
},
"hud_content": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": {
"[email protected]_conditional_image_factory": {}
}
}
]
}
}
```idk finally try this or my brain is not working today
💀 It looks like your brain expensed all energy
Is it not working?
No, It didn't work

Maybe there is something not related to code idkk, try to set size 100% on the factory also
you can use 9-slice size to fix that with "fill": true in ui
💀 💀 ahhh, try this 👆🏻
textures/ui/frozen_effect.json ```json
{
"nineslice_size": 255,
"base_size": [
256,
256
]
}
_Nice 👍🏻 _
yeah by §l
But it doesnt work
If I do ('%.14s' * #text) = 'Travis Jenkins' without bold text it works
but when I do this to detect bold text
('%.16s' * #text) = '§lTravis Jenkins'
It doesnt detect anything
@hexed briar no
I say I drew it by looking at others
I just tried to do the same
I don't know the English language very well (I write the articles in translation)
so basically you just kinda stole and remove all of labels
No
Why
wdym why you literally redraw that person with exact color and draws
that's like copying someone work
I can change the colors if you want, what's the difference?
The art style already self-explanatory enough
how about I bring the creator here and you sort it yourself?
Look, I draw in this style.
what are you trying to prove here
i don't know ksjsjssj
it doesn't change the fact that you're literally copying that atlic scoreboard thing
look now you say you copied me you know ok
what are you even trying to say
but i shared it like that why don't you be understanding
i mean i copied it yes
I made it for you to use
of course if you want
because:
- you copied the scoreboard art style, removed the labels
- you don't even give the original creator credit for it
Look, I'm writing these in translation, I want, he can't translate the sentences correctly, so you may not understand
Ok, let's close, let's not prolong the topic.
I wanted anyone to use it, I just didn't have any bad intentions
then atleast give the original creator credit of that scoreboard art
that's on you for using translators
🤡
I don't know who the original creator was, my friend sent it to me, I drew it, so I didn't use it, so I said throw it here
My friend sent me that photo, I drew it for him, but since he didn't use it, I threw it here.
I am Turkish
I know very little English
"Axoyl" is the original creator I think
