#JSON-UI General

1 messages · Page 18 of 1

hexed yacht
#

someone should write one in python or js

coarse torrent
#

lol

#

just looking at it, it seems definitly better than writing json ui code by hand

#

although maybe a drag&drop elements application might be better idk

hexed yacht
#

tbh... drag&drop is a bit too overrated

#

using php/python/js sets an entry brarrier... that might be good

#

tools like these aren't for newbies learning json ui, they are rather for pros who are way too tired to write them

coarse torrent
#

yeah...

#

although i wouldn't mind if json ui was a bit more accessible

hexed yacht
#

well there should definitely be more resources for learning it

#

but on the other hand.. it is already deprecated

hexed briar
#

honestly not surprised

coarse torrent
#

yeah but mojang probably needs 2 years to implemt oreUI fully, 2 years to make it actually usuable by the community and data driven and maybe 1 year to get it out of experimental

#

my point is, there's no real alternative

hexed briar
#

at that point this UI thing becomes more of geometry dash 2.2

#

pretty sure it has been in development for about 5 years now.

hexed yacht
#

5 years?

#

what the hell have they been doing in these 5 years?

hexed briar
#

Bedrock new UI was announced 5 years back then since they showcase some E3 stuff

#

then it gone radio silence for some reason

coarse torrent
#

they probably made small progress in these 5 years on it since they are focusing on other aspects of the game

hexed briar
#

then few years later, achievement screen got replaced by ore-ui and after next 1 year, world creation screen would take place.

coarse torrent
#

we will see gta6 before data driven OreUI

hexed briar
#

yeah, idrk why would new UI are so ridiculously long development

#

if ore-ui reaches 6+ years then that's pretty bad.

#

it's basically a studio failed something that one single developers singlehandedly made a giant update for 6 years.

hexed yacht
hexed briar
#

even worse is, that is just UI.

#

there's no insane game changing whatsoever

#

but yeah, it is what it is.

tropic badger
coarse torrent
#

i bet they tried to implement too much and didn't successed, oreUI honestly it could have been anything that is not messy and a pain to use, it didn't have to be some fancy html/react bs

hexed briar
#

and it even surprising when a minecraft knockoff called minecraft legends, somehow has more ore-ui screens than current bedrock we have.

#

both uses the same engine besides legend uses 1.17 branch.

#

idrk anymore

tropic badger
#

It what makes UI being unique

#

Even java players are amazed because how are bedrock players editing UI with JSON

tropic badger
quasi acorn
#

I know the channel is JSON UI but I think it's still the best place to ask
Is it possible to create custom OreUI yet ?

tropic badger
#

lmao, JSON-UI being unsupported?

tropic badger
quasi acorn
hexed yacht
hexed yacht
tropic badger
hexed yacht
#

skill issue

#

should switch to bedrock edition

tropic badger
hexed briar
hexed briar
tropic badger
hexed briar
#

going your way through game cache and modifying ore-ui aren't what i call modifying.

#

not like you can load the modified ore-ui screens through resource packs

tropic badger
#

someone made a docs about it..

#

hm

hexed briar
#

well idk, why modify UI through the game assets when you can just load modified json-ui through resource packs like legacy shaders does

#

that's essentially "modding" at this point

oblique gust
#

How to make math with variable

#

For example my default value is 15,and i want to add +2 for certain key

#

number: $num + 5 something like this

hexed yacht
#

skill issue

floral sapphire
#

How can I change the exit button texture and offset

tender flare
#

can you put the item name as a label instead of the normal item?

sturdy hinge
#

how can I change xp bar size

last pollen
#

Where do i learn json-ui

still sundial
#

Also you can watch Dingsel's videos on YouTube

tropic tangle
quasi acorn
#

Hey, any way to trigger an entirely custom JSON UI element via commands ?
Via /dialogue perhaps ?

mental crystal
#

Hey just wanna ask if you can rotate the button in different direction.

mental crystal
hexed yacht
#

Wdym?

hexed yacht
mental crystal
hexed yacht
#

Thats where symbols become handy

#

And we have symbols for china 1.16.. and bds

mental crystal
hexed yacht
tropic tangle
tropic tangle
quasi acorn
#

Asking again because answer seems to have been deleted?
Is there any way to trigger an entirely custom JSON UI element via commands?
Via /dialogue perhaps?

hexed yacht
hexed yacht
tropic tangle
#

Its not really suitable for modern games

tropic tangle
hexed briar
#

sure you can make java games but good luck porting it on some platforms.

#

even hytale originally being a java has been rewritten to c++ because it kinda sucks for porting things.

tropic badger
hexed briar
#

idrk why would he do that but yeah, hypixel studio is basically a sellout.

#

then this year simon went ahead and started another game studio.

tropic badger
hexed briar
#

probably, not sure but although it's pretty clear that he's starting a new game.

#

he announced his new studio (still unnamed) on his twitter.

hexed yacht
hexed briar
#

it's nice but no one uses it nowadays.

#

well, still kinda mostly used for apps ofc. not games.

tropic badger
#

Ye C# and C++ is a better option if talking about it's compatibility

hexed yacht
#

Nah not C#

#

Nobody likes C#

#

Just use Java, it is the better C#

#

But using C++ instead of Java, is like saying to put out a fire with a wale... both langs are for very different use cases

tropic badger
undone marsh
hexed yacht
hexed yacht
# tropic badger Unity is based c sharp

The funny thing is, existing C# compilers weren't good enough.. thats why the devs at unity wrote their own tools for everything, jit compilers, c#2c++ thingy.... iirc

#

Anyway..

#

Lets not talk about c# and java

#

What do y'all use for ui/ux design?

lapis holly
mental crystal
lapis holly
#

i am not trying to bring it up...just correcting you.

undone marsh
hexed yacht
#

figma is great!

coarse torrent
#

is there a way to set #collection_length to a constant number instead of it listening to #custom_form_length?

#

i'm talking about server form, custom form btw

hexed briar
#

vanilla's control section are getting me a headache now

#

2 freaking buttons on the same spot like why does this exist

#

is this what we call unoptimized

weary wind
#

As they would do the animation lol is that I don’t know about the animations

tropic badger
#

lol

hexed yacht
#

You don't design it in photoshop or figma and then try to create it in css?

tropic badger
#

I eyeball it

vital edge
# hexed briar

the thing with JSON UI is that it was designed neatly:

  • JSON structure/language -- matches with the rest of data-driven stuff like entities
  • it can merge with other resource packs (when done correctly)
  • its like HTML and CSS combined

its like its supposed to be good enough, but they gave up partway through

#

bold enough for them to develop a UI engine, that supports JSON. i cant believe my eyes

hexed briar
#

Well it was supposed to have a docs but although they just kinda gave up after ore-ui started development. which about 4-5 years ago

vital edge
#

well the only bad thing about JSON UI, or anything data-driven really, is that you cant create your own custom thing. for instance, in JSON UI, that would be custom screens, and a way for calling them. but its the same years ago for blocks, entities -- we cant create our own, only modify existing ones. and if Ore UI cant fix that, then i wouldnt think its any better. honestly i think its a misconception

hexed briar
vital edge
hexed briar
#

i'd assume it already started even before v1.0 since there's json-ui even beta/alpha

vital edge
#

its something they dont even mention in changelogs i think

hexed briar
#

some cases where json-ui variables and textures somehow supported on death screen

vital edge
hexed briar
#

some changes is like "maybe they'll be modifiable" and then some changes are "eh maybe no"

#

at that point i gave up on guessing.

vital edge
#

lets just say they have other things to be doing for now

hexed briar
#

yeah, let's hope that this thing "worth" our performance being intensive

vital edge
#

i mean we still have custom block/item components being worked on. after that, im not sure. hopefully it'll be the UI's turn

hexed briar
#

It's kinda worrying about the UI side of thing

#

since ore-ui is more of using web techs and having built-in browser into the game, this effectively yeets the performance and probably overheating some devices aswell

#

that also kinda poses to some exploits like maybe opening some sketchy site if they allow modifying.

#

tbf that's what people are really against with even discord mobile turning into react native

tropic tangle
#

but opening the settings in the pause menu while in-game also takes a good time right now

wraith bluff
#

did bindings get fucked up in a new update or something?

#

they don't seem to be working the same way anymore

hasty hamlet
#

hi shanewolf, sorry for rescuing it... but do it works for server forms too or only hud?
I m trying some examples from here but nothing is working, I m trying to change the values manually on the json first before advance on the APIs, but anything I do it doesnt take effect on the offset at all: json "location": { "type": "panel", "size": [ 280, 280 ], "anchor_to": "top_left", "anchor_from": "top_left", "offset": [ 0, 0 ], "controls": [ { "[email protected]_image_border_white": { "size": ["100%", "100%"], "color": [ 0.0, 0.0, 0.0, 1.0 ], "layer": 3 } }, { "current_offset": { "type": "panel", "size": [ 16, 16 ], "anchor_from": "top_left", "anchor_to": "top_left", "use_anchored_offset": true, "property_bag": { "#anchored_offset_value_x": 0.0, "#anchored_offset_value_y": 0.0 }, "controls": [ { "[email protected]_image_border_white": { "size": ["100%", "100%"], "color": [ 0.0, 0.0, 0.0, 1.0 ], "layer": 3 } } ], "$percent": 0.01, "bindings": [ { "binding_name": "#form_button_text", "binding_name_override": "#text" }, { "binding_type": "view", "source_property_name": "((50) * $percent)", "target_property_name": "#anchored_offset_value_x" }, { "binding_type": "view", "source_property_name": "((50) * $percent)", "target_property_name": "#anchored_offset_value_y" } ] } } ] }

wraith bluff
#

which is barely anything

#

unless you tried larger numbers

hasty hamlet
#

but dont the anchored_offset_value_x and y use the percent like 0 = 0 and 1 = 100? so 0.5 would be actually 50% from the parent?

hasty hamlet
#

I think the problem is with the operation itself, how can I multiply? I did some tests like so: json { "binding_type": "view", "source_property_name": "('§z'+(3 * ('%.33s' * #form_text) - ('%.30s' * #form_text)))", // Y "target_property_name": "#newtext" }
And the result supposed to be 240, but is actually returning 3, so the number before the multiply signal, what am I doing wrong here?

wind estuary
#

How can I hide the hunger bar with a title I don't want to use /hud @s hide hunger, I want to hide the hunger bar with a title when I want and show it again with another title when I want

wind estuary
#

xd

chilly yacht
#

so

mental crystal
# wind estuary How can I hide the hunger bar with a title I don't want to use /hud @s hide hung...

Use a binding in hud_screen.json. But I don't think this will work but yeah just a hunch though...

  "hunger_renderer": {
    "type": "custom",
    "size": [
      1,
      1
    ],
    "renderer": "hunger_renderer",
    "layer": 1,
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not((#hud_title_text_string - 'hunger') = #hud_title_text_string))",
        "target_property_name": "#visible"
      }
    ]
  }
}```
wind estuary
mental crystal
wind estuary
mental crystal
#

That's what you want right?

wind estuary
mystic heart
mystic heart
# hasty hamlet I think the problem is with the operation itself, how can I multiply? I did some...

Parentheses/order of operations in UI is very awkward. It's not just left/right and evaluate parantheses first like traditional math is. For example, putting 4+ parentheses around an operation can make it stop working entirely. Just weird stuff. I never really tested it properly so usually when I have an issue I just kind of trial and error till it works. In this case, I think you need another set of parentheses before you have 3 * and to possibly another set of parentheses around the one before the 3. You might also need to add + '' at the end for the amount of parentheses to not cause it to bug out.

daring kiln
#

'%.#s' seems to have different number of digits per character depending on the Unicode number.
If the Unicode number is '0xnum',
If num<128(2^7), the length is 1, if num<2048(2^11), the length is 2, if num<65536(2^16), the length is 3, and if num=65536 or more, the length is 4.
You need to be careful when using script API or servers to convey information.
But I don't know why this is the result...
(Sorry for my poor English).

whole jasper
hasty hamlet
# mystic heart Parentheses/order of operations in UI is very awkward. It's not just left/right ...

thanks, really good tips that I would take forever to figure out 🙂
I spent the day yesterday doing tries after tries and I finished with it working after splitting into two different operations, one first to remove the strings and convert the percent from the #form_text into number, then I used it to set the #anchored_offset_value_y, but after your explanation I think the problem was the parentheses, because I did some tries also using the binding #form_text and it was not working too json "bindings": [ { "binding_type": "global", "binding_name": "#form_text" }, { "binding_type": "view", "source_property_name": "(('%.27s' * #form_text) - ('%.23s' * #form_text))", "target_property_name": "#loc_x" }, { "binding_type": "view", "source_property_name": "(('%.33s' * #form_text) - ('%.29s' * #form_text))", "target_property_name": "#loc_y" }, { "binding_type": "view", "source_property_name": "(#loc_x * $percent)", "target_property_name": "#anchored_offset_value_x" }, { "binding_type": "view", "source_property_name": "(#loc_y * $percent)", "target_property_name": "#anchored_offset_value_y" } ]

mystic heart
quasi acorn
#

Hy, if I wanted an NPC to always have a specific button when it's called some specific name, what would be the way to go?

wicked juniper
#

not worth a whole showcase post but just what i got done so far

#

wrong image

#

button image is placeholder from google

coarse torrent
#

i need to do a grid with toggles(filling horizontal then going down and so on)

here's the code for the grid

{
                            "item_selection_panel": {
                                "type": "grid",
                                "grid_rescaling_type": "horizontal",
                                "grid_item_template": "server_form.custom_toggle",
                                "maximum_grid_items": 28,
                                "size": [
                                    "100%",
                                    "100%c"
                                ],
                                "collection_name": "custom_form"
                            }
                        }

wicked juniper
#

do you need help fixing the suff going off menu?

coarse torrent
#

yes

wicked juniper
#

im not the best but

coarse torrent
#

i need it to be in a grid-formation

wicked juniper
#

🔗Links :
Like What I Am Doing? Concider Supporting Me! : https://ko-fi.com/dingsel
Last Video Part: https://youtu.be/CWm-KU5ALOQ
Join My Discord! : https://discord.gg/tzrmH56JXC
My Website And Code: http://skyls.de
Music : https://www.youtube.com/watch? v=tEzYsaLm7nw&ab_channel=SimonChylinski-Topic | Breathing Break from the Riot Creator Playl...

▶ Play video
coarse torrent
#

going left until end and then down

wicked juniper
#

this is where i learned scrolling grid

coarse torrent
#

did the same thing but with custom form and it still doesn't work


{
                            "item_selection_panel": {
                                "type": "grid",
                                "anchor_from": "center",
                                "anchor_to": "center",
                                "grid_dimensions": [
                                    3,
                                    3
                                ],
                                "grid_rescaling_type": "horizontal",
                                "grid_fill_direction": "horizontal",
                                "grid_item_template": "server_form.custom_input",
                                "size": [
                                    "100%",
                                    "100%c"
                                ],
                                "factory": {
                                    "name": "buttons",
                                    "control_ids": {
                                        "input": "@server_form.custom_input"
                                    }
                                },
                                "collection_name": "custom_form",
                                "maximum_grid_items": 30
                            }
                        }

#

oh yeah i removed the binding of the collection_length because then it didn't show me anything

#
"bindings": [
                                    {
                                        "binding_name": "#custom_form_length",
                                        "binding_name_override": "#maximum_grid_items"
                                    }
                                ]

wicked juniper
#

hm

coarse torrent
#

that's how i wrote if you are curious

wicked juniper
#

its got to be an issue with your scrolling parent then

#

or mb, no scroll

#

try setting size manually other then 100%

#

like width of content area

coarse torrent
#

okay i found the issue, apparently all custom_form ui elements strech themselfs to the end of the panel size:["100%, something] which makes it not possible to have 2 elements in the same row thus leaving the grid no other choice other than to place an element and wrap the next element in the next row, the reason it worked for this guy in that video is because he changed the button size to a constant

wicked juniper
#

or put them on a panel for parent (overlap)

#

not a stack panel

coarse torrent
#

or you could change the size of the element to a constant like the dude in video lol

#

or like 50% or something

wicked juniper
#

just going to ask before i try because why not

#

how could i "bind" a prefix of my button text to enable a custom image

#

like if my text starts with "LOCKED" i would show button without the locked text and then toggle a lock image

#

going to try this

#

i already see a bug i made lmao

wicked juniper
#

ok im going to say screw that

#

and just use glyphs

chilly yacht
#

form button text - text = form button text

wicked juniper
#

ill keep messing around with it

wicked juniper
#

how do i move the close button?

#

cant find any code for it in default stuff

warm schooner
#

the fdroid version doesnt have ads

mental crystal
#

umm i need help. i have this problem for a very long time

mental crystal
mental crystal
wicked juniper
#

#1 im using a normal form

#

#2 i tried putting a close button on the normal form and the closest i got to it working was x buttons on every form button

#

so im like stuck

oblique gust
#

Put it on the parent panel,not on dynamic button

wooden needle
#

i wanna put an element on the top right corner of the hud screen, how do I do it?

mental crystal
#

how do i make that the server form ui isn't affected by GUI Scale... you know the scale 0, 1 and etc. but idk how to do that... can someone help?

mental crystal
tender flare
#

can you change the green hover texture that appears when hovering over a slot?

simple crystal
#

guys i put this in my hud screen

#

and its not showing up

#
    "random_text": {
      "type": "label",
      "text": "abcdwfapwhfpahw",
      "size": [
        "100%",
        "100%"
      ],
      "anchor_from":"top_right",
      "anchor_to":"top_right",
      "layer": 0
    },```
mental crystal
simple crystal
#

what

mental crystal
#

Change the size to 50 to know if it's there

mental crystal
simple crystal
#

like this

#
      "bindings": [
        {
          "binding_name": "random_binding_name"
        }
      ]```
mental crystal
# simple crystal ```json "bindings": [ { "binding_name": "random_binding_...

I put bindings cause of there's none it will be forever on your screen

{
  "label": {
    "type": "label",
    "text": "acdefghigjklmnop",
    "offset": [0, 0],
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 10,
    "bindings": [
      {"binding_name": "#hud_title_text_string"},
      {
        "binding_type": "view",
        "source_property_name": "(not((#hud_title_text_string - '<text>') = #hud_title_text_string))",
        "target_property_name": "#visible"
      }
    ]
  },
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": {
          "[email protected]": {}
        }
      }
    ]
  }
}```
simple crystal
#

i have all the other default code

#

for hud_screen

mental crystal
#

What?

simple crystal
#

its saying dupe bindings root_panel

#

i just deleted it

mental crystal
simple crystal
#

its not working

mental crystal
simple crystal
#
      "label": {
        "type": "label",
        "size": [50, 50],
        "text": "acdefghigjklmnop",
        "offset": [0, 0],
        "anchor_from": "center",
        "anchor_to": "center",
        "layer": 10,
        "bindings": [
          {"binding_name": "#hud_title_text_string"},
          {
            "binding_type": "view",
            "source_property_name": "(not((#hud_title_text_string - '<text>') = #hud_title_text_string))",
            "target_property_name": "#visible"
          }
        ]
      },
    ```
#

current

mental crystal
#

It doesn't work?

simple crystal
#

what do i do to make it work

mental crystal
#

Just read this

simple crystal
#

i have tried

#

every tutorial in the lands

#
    "root_panel": {
      "type": "panel",
      "$xp_control_offset|default": [ 0, -13 ],
      "variables": [
        {
          "requires": "$education_edition",
          "$left_helpers": "hud.left_helpers_edu"
        },
        {
          "requires": "(not $education_edition)",
          "$left_helpers": "hud.left_helpers"
        }
      ],```
#

this is the default root panel

mental crystal
#

Just add this

simple crystal
#

what

mental crystal
#

Wait n

simple crystal
#

its all red

mental crystal
#

This should be the format

simple crystal
#

still dont see the text

mental crystal
simple crystal
#

what

#

backups?

mental crystal
#

Just backup

#

Copy your previous code and paste it on other files

simple crystal
#

ok i backed it up

mental crystal
simple crystal
#

am i suppose to delete?

#

and backup

#

or no

mental crystal
#

Step by step

  1. Backup your previous code on hud_screen.json and paste it on different folder
  2. Copy my code and paste that to the RP/ui/hud_screen.json
#

And that's it

simple crystal
#

still dont see it

mental crystal
#

try this instead

{
  "label": {
    "type": "image",
    "texture": "textures/ui/Black",
    "size": ["100%", "100%"],
    "offset": [0, 0],
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 10,
    "bindings": [
      {"binding_name": "#hud_title_text_string"},
      {
        "binding_type": "view",
        "source_property_name": "(not((#hud_title_text_string - 'test') = #hud_title_text_string))",
        "target_property_name": "#visible"
      }
    ]
  },
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": {
          "[email protected]": {}
        }
      }
    ]
  }
}```
simple crystal
#

my hud_screen already has a root_panel

#

it defaultly comes with one

mental crystal
#

The image will be visible once you put test using title @s title test

#

I don't really understand what you're saying tho

mental crystal
simple crystal
#

bruh

#

i got it from the vanilla files

mental crystal
#

Yeah I know

simple crystal
#

so it has a root panel

#

by default

#

wait

#

i think it worked

mental crystal
#

Huh?

simple crystal
#

was it suppose to turn black

mental crystal
#

Yes

simple crystal
#

it did it

mental crystal
#

See it works, idk why the label doesn't show up tho

simple crystal
#

ima test with the label

#

btw i didnt need the root panel

mental crystal
#

Nope you really need to put that on root panel

simple crystal
#

coddy

#

i already have one

mental crystal
simple crystal
#
      "label": {
        "type": "label",
        "text": "hi",
        "size": ["100%", "100%"],
        "offset": [0, 0],
        "anchor_from": "center",
        "anchor_to": "center",
        "layer": 10,
        "bindings": [
          {"binding_name": "#hud_title_text_string"},
          {
            "binding_type": "view",
            "source_property_name": "(not((#hud_title_text_string - 'test') = #hud_title_text_string))",
            "target_property_name": "#visible"
          }
        ]
      },```
mental crystal
#

That pretty much should worj

simple crystal
#

but it doesnt

mental crystal
#

Idk then, remove the "size"

#

And try again

#

If still not, idk what's the problem

simple crystal
#

it works

#

yay

#

so it was the size

mental crystal
#

Hahahaha

#

I think you can't put "100%" on label so I guess you need to put a value

simple crystal
#

i put a value

#

it still doesnt work

mental crystal
#

Ok I can't help you with that now, cause I use images mostly

mental crystal
#

Hello can anyone answer if it's possible to detect WASD on ui

still sundial
#

With scripts you use player.getVelocity

#

And then from vector guess which buttons are pressed

mental crystal
snow acorn
#

Question: I can't seem to change the icon size. Could I get a hint what it is called in the hud file please.

mental crystal
hexed briar
#

you can change that.

#

will try to help if i get back home

mental crystal
#

Oh yeah you could change that hahahaha

hexed briar
#

even better is, hotbar are actually in grid.

#

so, you can pretty much change one slot as large or small if you will, vice versa

bitter ether
#

Does anyone know how to use Aseprite Animations?

quasi acorn
#

Hey, if anyone here has ever modified the NPC interact screen for whatever reason, could you send the file here to help me understand how it works please ?

hexed briar
snow acorn
spice nebula
#

is there any way to use dynamic property in json ui?

bronze plover
quasi acorn
#

thx!

snow acorn
#

Question: Could I enlarge the icon on mouse over/hover?

hexed briar
#

possible, although may reduce the UI loading time and may cost performance.

#

even though they look kinda simple, it's just that they're a renderer, not an image element that automatically selects them.

the more renderer you have on UI, the longer UI will able to load. which hence the longer loading time.

#

so, not really recommended. that may increase annoyance.

snow acorn
#

How would I go about doing it?

daring kiln
#

Is it possible to pass values to other namespace?
I want to use #hud_title_text_string from hud_screen with inventory_screen.

still sundial
#

whats the actionbar text binding

wild mason
snow acorn
chilly yacht
#

nope

#

you have to somehow use chat, actionbar, title, subtitle

#

wdym?

#

yes

#

either use chat, or use preserved text

mental crystal
#

Ok how do I make the image only visible once the text in chat matches?

rocky quail
mental crystal
# rocky quail cobtrol property name (not (#text = 'text that it will match')) target property ...
{
  "ui": {
    "type": "image",
    "texture": "textures/ui/Black",
    "size": ["100%", "100%"],
    "offset": [0, 0],
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 10,
    "bindings": [
      {"binding_name": "#chat_text"},
      {
        "binding_type": "view",
        "source_property_name": "(not((#chat_text - 'test') = #chat_text))",
        "target_property_name": "#visible"
      }
    ]
  },
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": {
          "[email protected]": {}
        }
      }
    ]
  }
}```
#

I tried this but it doesn't work the image is in my my screen permanently

tropic badger
#

I will spoil you, using chat bindings will make you insane

mental crystal
#

No joke the black image is stuck on my screen, even if I didn't type the rest yet

tropic badger
mental crystal
#

Imma retest it later

mental crystal
tropic badger
mental crystal
#

Idk cause when I use hud title text string it works perfectly, the image will only shows up when there's 'test'

mental crystal
tropic badger
#

And also try preserving

mental crystal
#

Hahaha it trigger me always

simple crystal
#

anyone know how to set the font on the form text

simple crystal
#

yo anyone know how to fix the gui scale modifier?

whole jasper
#

Bruh wrong server sorry

simple crystal
whole jasper
still sundial
#

"(not (#title_text = 'storia_server_form')) and (not (#title_text = 'storia_diary'))"

Whats wrong here?

#

nvm

#

fixed it

#

spaces really matters in json ui

still sundial
#

nah

simple crystal
coarse torrent
#

so i'm trying to make a toggle that changes a label's text when the toggle is turned on. Now i could bind the label to the toggle's state and decide then wether to change the label or not however this doesn't work in my situation because the toggles are going to be generated by a grid and every generated toggle is supposed to be able to change the text

#

i've seen in the settings screen json that the settings section toggles are able to change the title of the settings dialog via

"Propertybag":{
"#panel_title" : "<some_text>"
}

but i don't know how to use that for my toggles

#

it smells like some harcoded bs but i'm not sure, it would be nice if there was a similar mechanics that is usable

#

should i create a post about it?

mental crystal
#

Yes make a post

coarse torrent
#

done

nocturne salmon
#

How can I scale down the doll for this custom entity? (Plz ping)

tropic tangle
#

maybe check if player is in ui and then make it smaller per animation? idk

nocturne salmon
tropic tangle
#

You can check it with an animation controller i think

red creek
#

Why isn't the title at the top??

"start_menu": {
    "type": "panel",
    "controls": [
      {
        "title_label": {
          "type": "label",
          "text": "title",
          "color": "white",
          "offset": [
            0,
            "5%"
          ],
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "layer": 4
        }
      }
      }
    ]
  }
red creek
#

Just top instead of top_middle?

mortal monolith
#

add size

chilly yacht
#

so anchor the panel not the label

#
"start_menu": {
    "type": "panel",
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
      {
        "title_label": {
          "type": "label",
          "text": "title",
          "color": "white",
          "offset": [
            0,
            "5%"
          ]
          "layer": 4
        }
      }
      }
    ]
  }```
chilly yacht
wild mason
#

any way to fix buttons from a factory having the animation not play correctly?

tired smelt
#

My crafting table custom ui only appear in classic ui and not in pocket how do I fix it?

coarse torrent
#

i have a question, in the JSON UI section of the bedrock wiki in the preserv titles chapter, they preserv title using bindings and visibilty changed bindings condintions,however when i do it with always it still works. Any reason why wiki did what they did instead of this?

"preserved_title_display": {
    "$update_string": "update", // title must include this string to update the element
    "type": "label",
    "text": "#text",
    "controls": [
      {
        "data_control": {
          "type": "panel",
          "size": [
            0,
            0
          ],
          "bindings": [
            {
              "binding_name": "#hud_title_text_string" // reads in the current title string
            },
            {
              "binding_name": "#hud_title_text_string",
              "binding_name_override": "#preserved_text", // updates #preserved_text when visibility of this element changes
              "binding_condition": "always"
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "data_control", // reads bindings from the "data_control" child element
        //"resolve_sibling_scope": true,                                 // required if "data_control" is a sibling of the element that pulls the binding
        "source_property_name": "(#preserved_text - $update_string)", // remove string update text from the text to be displayed
        "target_property_name": "#text"
      }
    ]
  }


spice nebula
#

Can someone help me how to take out the letters in the middle? (I don't know how to code)

wispy cipher
spice nebula
#

I have no idea how to combine it

wispy cipher
#

its basic logic lol

#

'%.5s' * $var gets the first 5 chars of $var

spice nebula
#

Earlier I tried subtracting the first 3 numbers from the first 5 but I don't know how to make it work

#

as I said I don't know how to code :>

wispy cipher
#

that dont make no sense lol

wispy cipher
spice nebula
wispy cipher
#

you either gotta first take the string and remove the first three chars and then take the first two chars from that or take the first five chars of the string and remove the first 3 chars from that

you would pick which of those options you want to use based on the data you are working with

#

so like

('%.2s' * ($var - ('%.3s' * $var)))

or

(('%.5s' * $var) - ('%.3s' * $var))

#

actually wait do you want to remove the chars in the middle or only keep the chars in the middle

spice nebula
wispy cipher
#

ok good

#

you also have to know how to use json ui bindings

spice nebula
#

no

#

Im using actionbar so only variables

wispy cipher
#

you still have to use bindings to edit the variables tho no? idk i havent worked with json ui in a while

spice nebula
#

and this

wispy cipher
#

does that work?

spice nebula
#

yea

wispy cipher
#

hmm

#

idk as i said i havent worked with json ui in a while

spice nebula
wispy cipher
#

i noticed

tender flare
#

is it possible to lock a slot, so players can only take out items but are not allowed to put any inside the slot?

wispy cipher
#

at least from what i know

#

but you could probably do it with scripts

tropic badger
#

Scripts nah it would flicker

#

JSON UI yes

tender flare
wispy cipher
tropic badger
#

Oh I misread lol

wispy cipher
#

yeah

wispy cipher
chilly yacht
#

since u cant add lock in slot component in chests/non entity containers

wispy cipher
#

you just gotta constantly check the item

#

and if something changes then do actions to revert that or do something depending on what the end goal is

chilly yacht
#

yes.. its not any different from setting the item

#

both grab the inventory

chilly yacht
#

and if u constantly set the item it wont allow the player to actually take it

wispy cipher
#

why would that make the item flicker lmao

chilly yacht
#

idk thats probbaly what they meant

wispy cipher
#

not set it

wispy cipher
wooden needle
#

how do I add internal padding to an element?

tropic badger
#

Edit the content

#

Size

coarse torrent
#

how can i start an animation on element when an element turns form invisible to visible?

wind walrus
#

is there a way to pass the collection index of the element that has the animation to an animation?

wind walrus
#

nvm figured out

mental crystal
#

Yeah umm is it not possible to create a selection wheel? A literal wheel

tender flare
#

how to set the starting index of a grid?

cunning bridge
#

why does size: [fill, 100%] leave a space in the parent element that has the width of the element?

#

i suppose it's counting the width of invisible elements

tropic badger
#

Nope

#

It doesnt

hexed briar
#

fill is best used on a stack panel that has too many elements or puddings aren't fit that well

#

if you're using non-stack panel, it's probably best to use "100%" or "default" rather than that

coarse torrent
#

i know that to reset the animations i need to reset the whole element using factories, i figured out how factories work but still need to figure out the reseting element part

whole jasper
# coarse torrent i know that to reset the animations i need to reset the whole element using fact...

For now I also haven't found a solution, maybe it can be done with play events on anim, and trigger using the button name
I only use factories like this

        "profile_content_factory": {
          "type": "stack_panel",
          "size": ["100%", "100%"],
          "factory": { "control_name": "start_profile.profile_content" },
          "collection_name": "profile_collection",
          "bindings": [
            {
              "binding_type": "view",
              "source_control_name": "profile_toggle_open",
              "source_property_name": "(#toggle_state * 1)",
              "target_property_name": "#collection_length"
            }
          ]
        }
tropic badger
#

That works

#

But what if it's clicked continuously

whole jasper
hexed briar
#

kinda wondering how that works

tropic badger
#

crazy cus this was a amazing discovery because I can now return strings with toggles lol

tropic badger
#

Oh mb

#

Which

#

??

hexed briar
#

i meant about toggle with animation.

#

nor proper button animations without being glitched aka stops working after playing it's animation for spamming/too much.

hexed briar
#

good job.

#

as i expected on these json-ui general "nature", i shall figure myself out then.

tropic badger
#

ain't everyone lol

#

everyone gotta figure it out themselves

#

also ironic cus you do it yourself

coarse torrent
coarse torrent
hexed briar
#

wtf am i gonna do with javascript in json-ui?

#

slam that javascript code into json-ui and expecting it to work?

#

hell no.

coarse torrent
#

idk what that other guy was trying to do with js in json ui lol

unique swan
#

#text > '§b§r' and #text = '§b§r' What are their differences?

tropic badger
#

Its a concept man

#

#toggle_state * 1

hexed briar
tropic badger
#

sure lol good for you ig??

hexed briar
#

still needed quite alot of time by trying to do the reverse operator.

#

so i can somehow do "anim-out" instead of "anim-in"

#

Nevermind already figured myself out.

tropic badger
#

the above code of andro already explains everything

hexed briar
#

eh probably, but already did it myself tbh

#

just some factories with oddly toggle, looking at andro's code after finishing mine. it kinda do looks identical.

#

i guess that's also solved one of my oldest issues with animations like probably years ago

#

minor that - next property on anim does not work with factories for idrk reason

#

this is going into my json-ui scrap yard because i have probably no use case for it as for now

coarse torrent
#

is there a way to overwrite values of a property in an element from another element? like instead of a view binding, a write binding or something?

tropic badger
#

bro why would you do that

coarse torrent
#

let's say i have a toggle factory. Each toggle is supposed to change the value of a certain label when it's turned on. how would i do that? i can't just bind every toggle to the label because the amount of toggles will be differnt

coarse torrent
#

I can modify text property with source_control?

#

Or what do you mean

cunning bridge
cunning bridge
#

regardless, this is what i did so far

final grove
#

does anyone know how to manipulate subtitle text?

whole jasper
hexed briar
#

idk magic i guess

hexed briar
#

maybe we're using the same method, who knows

jovial summit
hoary cedar
hexed briar
#

forgot to crop the video whoops

hoary cedar
hexed briar
#

Both.

hoary cedar
#

Bc I'm having trouble making a toggleble popup panel with an animation

hoary cedar
hexed briar
#

factory with toggle bindings abuse.

#

Apparently they do reload the whole element when it's collection index elements are not visible or "destroyed"

#

hence, they reload animations along with it.

hoary cedar
#

how can i do that

hexed briar
#

with abit of con - Factory elements are quite like sandboxed, so. some stuff like next property on animation or sometimes the toggle collection index just doesn't work.

hoary cedar
#

ive never worked with factory elements

#

can u show me how to do it

#

w example code or smt

hexed briar
#

factory element are designed to reload and destroy elements via collection index or hardcoded. (e.g actionbar/title etc)

hexed briar
#

although mine version are probably different and works differently so uh, i suppose thats it for now

#

"never make me figure out by myself smh"

hoary cedar
#

can u give me an example

hexed briar
#

cool so what

tropic badger
#

you literally say "probably same" in the every sentence

snow acorn
hexed briar
#

not like i can pop an eye on your walls or something

#

also, "literally"? congratulations, that's such a false statement because I didn't even say "probably same" in every sentence.

#

the last i said "probably same" was 16 days ago.

hoary cedar
#

Stop yapping

hexed briar
#

Make me.

hoary cedar
past stirrup
#

Let's move on please.

hoary cedar
tropic badger
tropic badger
# hoary cedar Stop yapping

He won't, he will always be adding unnecessary rhetorical sentences that makes you question why did you ask in the first place

#

anyways I discovered something

#

Old information

#

Before size_bindings are even a thing 😂

hoary cedar
hoary cedar
#

😭 🙏

whole jasper
# hexed briar

interesting, can I see the anim code,
and will the first time the screen load the close animation will be played too?

fierce cove
#

#1230478598469587036 please

graceful lantern
#

Into type:image

hexed briar
whole jasper
hexed briar
#

well honestly after what i just got myself involved here yesterday, I don't think I'm able to help anyone here anymore.

#

I came here to ask some basic help like how did y'all do something like those and all i get is literally just a hint ("factories", literally just it), so i figured it out myself from that hint and that's where i was now.

#

either way, doesn't matter since that's how people is.

tropic badger
#

🤓☝️

hexed briar
#

🤡☝️

graceful lantern
mental crystal
graceful lantern
#

So now it’s only into buton ?

mental crystal
graceful lantern
#

Yeah but for texture we can do it with button image so

mental crystal
graceful lantern
#

The texture file system binding

mental crystal
tropic badger
tropic badger
whole jasper
rocky quail
whole jasper
tropic badger
tropic badger
whole jasper
tropic badger
frigid echo
#

someone can explain me the usefulness of binding_type

last pollen
#

how to do a row of text using label

#

rows

coarse torrent
#

i have a problem, i'm creating toggles via a factory, for some reason when i set $toggle_group_default_selected to 0, the first toggle doesn't get selected, here's code

"categorie_selector_toggle@common_toggles.dark_content_toggle": {
        "type": "input_panel",
        "$content_toggle_image_panel": "shop_ui.toggle_group_content",
        "$toggle_name": "group_toggles",
        "$toggle_group_default_selected": 0,
        "$ignore_content_toggle_icon": true,
        "$toggle_view_binding_name": "categorie_toggle_0",
        "$radio_toggle_group": true,
        "$toggle_grid_collection_name": "group_selection",
        "size": [
            "100%",
            30
        ],
        "$group_toggle_text": "toggle_one",
        "$group_toggle_image": "textures/items/brick",
        "$group_toggle_background_image": "textures/ui/shop_textures/building_background"
    },
    "group_selection_content": {
        "type": "stack_panel",
        "orientation": "vertical",
        "size": [
            "100%",
            "100%c"
        ],
        "collection_name": "group_selection",
        "factory": {
            "control_name": "shop_ui.categorie_selector_toggle"
        },
        "bindings": [
            {
                "binding_name": "#title_text"
            },
            {
                //first 3 digits of the title text will describe how many categories we need to make
                "binding_type": "view",
                "source_property_name": "(('%.3s' * #title_text) * 1)",
                "target_property_name": "#collection_length"
            }
        ]
    }```
dusk drift
#

In which file is the alpha of the entity nametag located?

ebon phoenix
whole jasper
hexed briar
#

Looks like we're on same method.

last pollen
#

bruh why did they have to bring a goofy ahh realm stories tab to the pause screen

whole jasper
#

uh mojang add day counterbao_mob_hoglinyes

undone marsh
mental crystal
undone marsh
undone marsh
mental crystal
cosmic oxide
#

If anyone knows of a discord server where I can get a commission done for json UI please dm me the link. Thank you in advance.

tropic badger
coarse torrent
#

what is tts? i've seen it multiple times in json ui but no one explained it, not even wiki

#

for example what is tts_dialog_title?

hexed briar
coarse torrent
#

ahh

vital edge
runic portal
#

Can anyone help me in my post

mental crystal
#

Is there a way to hide the watchdog? Like it hide a specific watchdog while the other one is still visible

hexed briar
hexed briar
whole jasper
hexed briar
#

I've tried to add or implement TTS in the past but seeing how insanely annoying they are, i'd ditch it.

whole jasper
hexed briar
tropic badger
mental crystal
#

Lmao, I wanna do this on chats too

tropic badger
hexed briar
mental crystal
hexed briar
#

ultimate operator string

whole jasper
#

Does this splash renderer have a property to change the text?

hexed briar
#

They also used to be rotatable label, although that now belongs to really old legacy of pocket edition. (or likely ported as custom type) which, probably no longer exists.

hollow tapir
#

Guys

#

How to get old json death screen ?

whole jasper
hexed briar
#

it's probably older version aswell, i'd assume that's no longer possible.

#

it's definitely somewhere in #old-json-ui.

#

nevermind found an legacy label rotation type (carousel_label) in case you're looking for.

tropic badger
whole jasper
warm schooner
#

i guess you could use images

hollow tapir
hexed briar
#

how to move actionbar

coarse torrent
#

so i'm testing resolve_sibling_scope and i'm currently seeing no differnce on wether it's set to true or false.

#

here's how i tested it

#

the label still turns (in)visble when the toggle is toggled

#

what i expected was that the label wouldn't be able to read the toggle_state of the toggle since it's not a child of the label

coarse torrent
#

can someone explain factory_variables to me?

#

like what do they do? how do they work?

tropic badger
#

I didn't even know that exists ;-;

#

Oh it just passes variable to each child

coarse torrent
#

but if i declare the variable in the stack panel, the children already have access to it

hexed briar
# coarse torrent can someone explain factory_variables to me?

i'd assume this is more of connecting variables together. Although it doesn't seem to be anything useful despite you can pass variables without it.

Store or marketplace screens are filled with them indicating this could be used on mojang's server-side thing to pass variables real-time.

tropic badger
tropic badger
#

Does anyone notice the huge amount of lag when placing packs on create world screen?

#

Also the new recipe unlocking produces lags

chilly yacht
#

it crashes my game

tropic badger
#

I think it's the ore-ui

#

It's written in JS now that's why it's slow as hell

hexed briar
#

last time it crashes entirely in previous preview before getting out as stable. ||assuming that i wasn't blocked||

hexed briar
#

Actual question no bogus -
What's the mapping key for 'select' controller button?

unkempt nest
#

"tg bouffon" @warped oxide

#

who is it @warped oxide

#

in english is "shut up jester"

#

u need hel for what

mental crystal
#

The purple color?

#

Can anyone give me a snipsset where if the chat text matches the image would show up in my hud screen?

#

I can't seem to make it work.

#

Or any other ideas on how to show image on screen without using title, subtitles, actionbar & soreboard. Pls

red creek
#

How to move just these two buttons there??

red creek
#

Wouldn't that move all the buttons?

red creek
#

I used grid

chilly yacht
#

if has certain flag put them in 1 grid, hide them in the other grid

red creek
hexed briar
#

didn't quite work, maybe it was the way I'm setting my button mapping. but I'll try it again (if i get back to my home ofc)

hexed briar
#

Although button.controller_start do work for me.

whole jasper
hexed briar
#

it's just a glorified stack panel with abilities to reload the element and breaks lots of stuff.

tropic badger
whole jasper
tropic badger
#

Ye agree grids are better much more flexible than stack panels

hexed briar
#

Hmm, there's collection_panel type.

whole jasper
tropic badger
whole jasper
tropic badger
#

It's probably used for optimization if you only want to get one thing from a collection

hexed briar
#

im guessing it's just kinda like grid but regular panel.

#

don't find it quite useful but annoyance.

tropic badger
#

I use it for positioning multiple collection index without it being in a parent element

mental crystal
tropic badger
#

It's all above everything

mental crystal
# tropic badger Yes

Thanks! I can use that instead of the HUD screen. I want to show an image without any titles, action bar subtitles, or scoreboard. I can use the HUD screen for chat text, but I'll have to set the server form to render the game behind it to see the image.

whole jasper
#

but for the number of elements that don't need to be changed with bindings, grid is better

small vessel
#

How can I make the mob that was interacted with appear in this place?

#

like the npc

#

if anyone knows pls tag me

coarse torrent
#

is it possible to make the first entry of a array be controlled by a variable?
like this? "size" : [30, "$var"], this example doesn't work but is there a way to get it to work?

hexed briar
#

instead, you can do something like this.

"$var": [ <array>, <array> ],
"size": "$var"```
#

variables does not work inside of square bracket if it contains just regular string like that.

coarse torrent
#

well this isn't helpfull

hexed briar
#

first time?

still sundial
#

why isnt this working?

coarse torrent
#

are you sure #title_text contains the entity id?

#

i would make a label and bind the title_text just to be sure

#

if it's correct then try to remove the property_bag thing and see if it works

cunning bridge
#

is there any known is_Even check for ui element visibility?
otherwise i will have to use this:
if (x= 2 or 4 or 6 or 8 or 10...etc)

coarse torrent
#

if there was it would contain many operators

#

but i have somthing in mind, give me a minute

still sundial
#

it says just 'w'

coarse torrent
#

also what's with the weird characters you are subtracting there?

still sundial
still sundial
still sundial
coarse torrent
#

hmm

coarse torrent
#

it will give false when odd, true when even

still sundial
cunning bridge
coarse torrent
#

yes

cunning bridge
#

i didn't know that was possible

coarse torrent
#

json ui isn't that bad lol

cunning bridge
#

does multiplication work too?

coarse torrent
#

yes

cunning bridge
#

Yooo!

coarse torrent
#

look at wiki, there's an operator list

#

it's under intro json and then operators

coarse torrent
# still sundial ?

try removing the property_bag thing and write entity_id = "#entity_id"

coarse torrent
#

yes,sorry

still sundial
coarse torrent
#

send code

still sundial
# coarse torrent send code
"entity_portrait_renderer": {
                      "type": "custom",
                      "renderer": "live_horse_renderer",
                      "offset": [0, 0],
                      "layer": 10,
                      "entity_id": "#entity_id",
                      "bindings": [
                        {
                          "binding_name": "#title_text"
                        },
                        {
                          "binding_type": "view",
                          "source_property_name": "(#title_text - '§3§2§a§c§r')",
                          "target_property_name": "#entity_id"
                        }
                      ]
                    }
coarse torrent
#

ok revert what i told you to do earlier and write this ( 1 * (#title_text - '§3§2§a§c§r'))

#

in the "source_property_name"

cunning bridge
coarse torrent
#

or are you telling me it's working?

still sundial
#

not working

#

also 'w'

still sundial
coarse torrent
coarse torrent
still sundial
#

or no

still sundial
coarse torrent
still sundial
#

also label is still 'w'

coarse torrent
#

idk honestly, i will try sometime and see if it's working with me

still sundial
#

ill try replacing default and my form

coarse torrent
still sundial
#

what the heeeeeeelll

coarse torrent
#

the hell

cunning bridge
cunning bridge
still sundial
#

"((not (#title_text = 'storia_diary')) and ((#title_text - '§f§2q§a§c§r') = #title_text) and ((#title_text - '§c§h§e§s§t') = #title_text))"

coarse torrent
#

scroll to the variables part

still sundial
#

somewhy jsonui requires to have some prefix

#

otherwise it displays that mess

#

i need help with that

#

my brain isnt braining

still sundial
coarse torrent
#

@still sundial i got it to work

{
                                        "horse_custom": {
                                            "type": "custom",
                                            "renderer": "live_horse_renderer",
                                            "size": [50,50],
                                            "layer": 8,
                                            "anchor_from": "center",
                                            "anchor_to": "center",
                                            "property_bag":{
                                                "#entity_id": "#entity_id"
                                            },
                                            "bindings":[
                                                {
                                                    "binding_name":"#title_text"
                                                },
                                                {
                                                    "binding_type":"view",
                                                    "source_property_name":"#title_text",
                                                    "target_property_name":"#entity_id"
                                                }
                                            ]
                                        }
                                    }
#

idk how to make it stop looking at the cursor though

mental crystal
coarse torrent
#

yes

mental crystal
#

Not sure if correct lmao

coarse torrent
#

nope

#

i tried #look_at_cursor: false in property_bag but it still follows cursor

mental crystal
coarse torrent
#

go ahead

nocturne salmon
#

Does anyone know how I can make a custom exp bar with scripting?

cunning bridge
cunning bridge
tropic badger
whole jasper
mental crystal
#

And put it on the title

whole jasper
#

Entity id is number?

tropic badger
#

Very sensitive number though

mental crystal
whole jasper
#

Then how do you get a specific entity?

mental crystal
#

Server form?

whole jasper
#

No, I just want to show Armorstand

#

on any screen

tropic badger
coarse torrent
#

what is use_anchored_offset? and what is it used for?

#

also is it possible to convert a string to an array if the string is like this "[5,5]"? and are there some operations that we can do on arrays? like adding 2 arrays together or something?

still sundial
#

But i still have a problem with hiding the def server form

still sundial
still sundial
still sundial
#

so its my custom server form

#

and want to get the id which is after the prefix

#

somewhy when the title starts not with a letter its not parsed properly

#

why cant it?

hexed briar
still sundial
#

when i pass it into a label

hexed briar
#

Most bindings and even variables are expecting some strings on the first character, maybe something like §f should do. otherwise bindings/variables would likely think that it's value and not string, which returns to invisible or maybe throws some content errors.

hexed briar
#

maybe do something like
('§f' + (#title_text - 'something')) and see if it works.

still sundial
#

it worked

#

but how to remove it now

#

i want it to be the id of entity

#

for paper doll

#

well

#

ill better rewrite my uis fully

theres a complete mess currently

hexed briar
#

you can use multiple operators btw.

#

do that.

hexed briar
still sundial
#

thanks for help, anyways!

still sundial
#

whats the binding for form buttons id?

#

sorry

#

by id i mean the index

tropic badger
# still sundial it says nothing

It's because the entity id is long number string. If you do something like subtract, add, multiply in a long int value it would crash out or just dissapear. I think JSON-UI can only hold such numbers. I've discovered this while playing with multiplications. So your only solution is a binding that literally has nothing else in it but the entity id

still sundial
#

now i want the binding name for button index

#

or how do i check it?

tropic badger
still sundial
#

source control name seems not to work

still sundial
#

why is the button like this?

#
 
{
              "form_button@common_buttons.light_text_button": {
                "$pressed_button_name": "button.form_button_click",
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "size": ["1000", 32],
                "$button_text": "#form_button_text",
                "$button_text_binding_type": "collection",
                "$button_text_grid_collection_name": "form_buttons",
                "$button_text_max_size": ["100%", 20],
                "bindings": [
                  {
                    "binding_type": "collection_details",
                    "binding_collection_name": "form_buttons"
                  },

                  {
                    "binding_type": "view",
                    "source_control_name": "image",
                    "resolve_sibling_scope": true,
                    "source_property_name": "(not (#texture = 'storia_paper_doll'))",
                    "target_property_name": "#visible"
                  }
                ]
              }
            },

Heres the code

coarse torrent
#

Write size as size:[1000, 30] not ["1000",30]

#

Or ["1000px", 32]

#

But i think you wanted to write as this ["100%",32]

still sundial
#

thx

#

i already found out thats the problem

whole jasper
tropic badger
#

It the same

#

Just using px adds more readability

hexed briar
#

although px allows some maths.

#

but that's something mojang usually do anyways as i read their vanilla template code.

dark adder
#

i have some hud elements that will display text from $msg, and $msg will take the text from $actionbar_text. is there a way to filter if the $msg is start with "prefix:" and remove the "prefix:" part?

tropic badger
whole jasper
tropic badger
cunning bridge
#

can we change the ui of an entity inventory depending on the name of the entity?

agile shale
#

That is possible yes
You mean like the nametag right?

nocturne salmon
#

Is there a server out there that is dedicated to just Json UI?

tropic badger
agile shale
#

Quick question
I remember that mojang said that they are gonna replace json ui to HTML
Is that still a thing that they are aiming for or did that get canceld?

undone marsh
#

Like there's an inbox button in start screen

#

Which is OreUI(Html)

agile shale
#

I remember seeing it in the preview
It was really bad optimized tho

undone marsh
agile shale
#

So why even trying?
Sure json ui is complex in the beginning
But once you get the hang of it, you can do lots of crazy stuff with it

hexed briar
mental crystal
hexed briar
#

they're html, at the same time are react native to do some designs things.

mental crystal
hexed briar
#

it probably gonna take 2+ years or just forever.

#

because well, ore-ui been there for half of decade.

#

you could technically modify them through the game assets, although that's out of question about data-driven anyways

mental crystal
agile shale
#

As far as I know, they are planing to replace json ui inirerly with oreUI

#

Which makes me pritty sad
Ive spens hours of learning json ui into it

mental crystal
agile shale
#

Lmao

mental crystal
#

I learn all except JSON ui

agile shale
#

There are only a few developers who actually understand json ui
Which gives us some sort of value in the bedrock community
Cause UIs can sometimes change the feeling of the game compleatly

#

Im not saying that we are worth more
Im just saying that we are rare

mental crystal
#

Only limit is we can't make containers and other things like java has

agile shale
#

Well technically you can

tropic badger
#

ye

mental crystal
#

Etc.

#

I know that you could increase the container cause I did it before 😅

agile shale
#

You can change the look of an UI based of an entities nametag
So for example:
You can make 30 different mobs with 30 different nametags
All displaying different UIs

agile shale
#

You can change the 3x3 crafting grad
But it wouldnt function

mental crystal
#

You could increase it but it wouldn't function

#

Except container I guess

agile shale
#

You could make custom server forms
But yeah
There is not a real way to connect it to any sort of logic behind it

#

(As far as I know correct me if In wrong)

tropic badger
#

anyone can make UI soon

mental crystal
#

or just ui generally

tropic badger
#

JSON UI

whole jasper
coarse torrent
#

is there a way to make a toggle on and of when a user is holding right click on it?

hexed briar
#

eh, probably no.

#

unless json-ui has a right click mapping, which it doesn't seem to have.

nocturne salmon
#

I can do it with scripting but I want a custom UI that displays that change

#

Unfortunately I don't know enough UI to actually make this happen

surreal snow
#

please tell me how I can put the text highlighted in the red circle in a separate panel

mental crystal
#

Or others not sure about that tho... ||@tropic badger|| or ||@hexed briar||

ionic vapor
#

does anyone know how i could fix this in hud_screen? not sure what it is since i wasnt the maker of the json file and im not the best at json. i saw this exact issue in other packs as well, must be some sort of new bug

#

just as i posted this, i fixed the missing texture ui bug. if anyone else has this issue, it was the game_tip panel (at least for me), not sure what that is honestly but it seems like i cheaply fixed it by simply removing it in rootpanel

rocky quail
chilly yacht
#

anyone know whats wrong with this?? json "bindings": [ { "binding_type": "collection", "binding_collection_name": "form_buttons", "binding_condition": "visible", "binding_name": "#form_button_text", "binding_name_override": "#form_button_text" }, { "binding_type": "view", "source_property_name": "((#form_button_text - ('%.9s' * #form_button_text)))", "target_property_name": "#form_button_text" } ]
its supposed to show the characters AFTER the first 9 but its showing NOTHING

#

@mystic heart

#

sorry for ping i just got it 🥲

#

guess i cant reassign to button text even tho i can do it with another one but oh well

tropic badger
nimble jungle
tropic badger
#

ok

chilly yacht
whole jasper
#

looping in bindings makes game performance very bad

tropic badger
#

if anyone is suddenly just want to see the arrival of JSON-UI, here #old-json-ui message

#

and while I am wandering around, it turns out there's a ignored property in a bindings array which ignores a binding object. I honestly don't know what's the use.

anyways I have played around with the ignored change in the latest beta. it seems it refers to ignoring the binding object itself by doing something like this:

{
...
  "control_element": {
    "bindings": [
      {
        "binding_name": "#example_binding",
        "ignored": true
      }
    ]
  }
...
}

so you still need a $variable to be passed to the ignored property if you want to ignore the binding :/

mental crystal
coarse torrent
#

But somehow toggles update them, then they loop 19 times again, then stop until a toggle updates

languid wigeon
#

Does anyone know how to fix this issue? I'm extremely new to modding and there isn't many tutorials on how to create this kind of stuff, I was able to make the custom UI and block, but I don't know how to get rid of this purple splotch.

whole jasper
whole jasper
small vessel
#

There are 2 different things so I don't know if this works, one is npc_interact_screen and the other is server_form
If anyone knows how to do this, please tell me

coarse torrent
# whole jasper I made the addition and repetition button, I know clearly that it doesn't repeat...

oh, i thought it was in 19 steps because you made it like this

{
                            "binding_type": "view",
                            "source_property_name": "(((#neg*0)+1)+#decrement_value)",
                            "target_property_name": "#decrement_value"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(((0*#pos)+1)+#increment_value)",
                            "target_property_name": "#increment_value"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "('§z' + ((#pos*0) + (#increment_value/19) - (#decrement_value/19)))",
                            "target_property_name": "#text"
                        }

#

i assumed it was because a loop happens 19 times until a toggle updates it and thus needing to divide by 19 to get the actual times it got updated

broken trail
broken trail
#

imagine this logic in e.g. .js

#

i++

#

i--

coarse torrent
#

yeah i get it but why is he dividing by 19

broken trail
#

and there is another case, let me know how much hair did you or idk who created this code lost :DD`

broken trail
coarse torrent
tropic badger
# broken trail no idea its ugly

I have done the same thing, if you do toggle * 0 then add 1 to property bag it returns 19 then completely multiplying by itself(e.g 19²) thats why each he adds something, he needs to divide it with 19.

charred viper
#

I want a different texture if value is even or not. tried % method and it seems not working. the first condition always return true no matter the value is

tropic badger
#

you'd have to check every odd number

coarse torrent
#

or do this

#
(($num - ($num / 2)) = ($num / 2))
#

false when odd, true when even

#

@charred viper

tropic badger
#
        "label": {
          "type": "label",
          "text": "#str",
          "size": [ "default", "default" ],
          "property_bag": {
            "#str": "completelyNormal"
          },
          "bindings": [{
            "binding_type": "view",
            "source_property_name": "(#str - ('%.1s' * #str) + 1)",
            "target_property_name": "#str"
          }]
        }
coarse torrent
#

What is your output