#JSON-UI General

1 messages · Page 43 of 1

oak verge
#

yikes, game crashed

limpid solstice
#

cool, I'm trying to be good at making custom ui and do pixel art stuff like explosions, game ui/hud design

#

some stuff like that

fleet yoke
#

Can you help me make this work?

hexed briar
#

since it's dynamic, it does not like static "100%" size that much

#

this isnt just dynamic grid thing but others aswell, like stack panels, label with backgrounds and so on

oak verge
#

including button_text_max_size?

hexed briar
#

if the parent element is using "100%c" which, scales the element size automatically depends how large the children sizes are.

oak verge
hexed briar
#

you might wanna change it to static sizes.

hexed briar
#

as long the button element that has fixed size, you don't have to worry about children elements from that element

#

since itll follow the parent size as a max size.

oak verge
#

the button itself is fixed size 45
still crashing tho

hexed briar
#

you sure did referenced them right

fleet yoke
hexed briar
#

like, everything not misspell?

oak verge
#

i can send the file if that won't take much of your time?

hexed briar
#

yeah

oak verge
hexed briar
#

yeah that will not work

#

here

"grid": {
                "type": "grid",
                "grid_dimensions": [5, 25],
                "size": ["100%", "100%c"],
                "grid_item_template": "server_form.custom_item_button",
                "grid_fill_direction": "horizontal",
                "grid_rescaling_type": "horizontal",
                "collection_name": "form_buttons",
                "bindings": [
                  {
                    "binding_name": "#form_button_length",
                    "binding_name_override": "#maximum_grid_items"
                  }
                ]
              }```
oak verge
#

ah shit, lol

hexed briar
#

don't put factory on grid type element

#

they will not work either

oak verge
#

oh, nice
that worked

#

thanks a lot Harlow

hexed briar
#

yeah no problem

#

again fyi about dymanic grid -

oak verge
#

that sound like what i want anyway

#

i said 5xn
grid dimensions will just limit that

hexed briar
#

yeah this might be a good change for people but you can change the grid size only to children grid or that button

#

this means that you can change it's size freely.

#

JSON-UI supports decimal size/offset value too, well. technically. only something like 0.5

oak verge
#

good to know

wintry crater
#

how to center stack_panel?

"container": {
    "type": "stack_panel",
    "anchor_from": "center",
    "anchor_to": "center",
    "orientation": "vertical",
    "controls": [
        {
            "dialogue_text@wooden_dungeon_door.dialogue_text": {}
        },
        {
            "dialogue_buttons_panel@wooden_dungeon_door.dialogue_buttons_panel": {}
        }
    ]
}
hexed briar
limpid solstice
#

wdym a game got you asking if you want to enter or not

#

like bro

#

am I going to face some fire eating monster

wintry crater
oak verge
#

the only way to add gap to grid is padding?

hexed briar
#

yeah

#

think of it like file list but just parent element and children element.

your button element
- properly adjust size from there so it can acts like padding
>> actual button
   - use the fixed size for your button```
oak verge
#

dynamic grid only work with panels?
i changed my button to stacked panel to add padding but that crashed my game

hexed briar
#

make sure they're fixed size...

oak verge
#

i can just make the button smaller than the panel so i don't need a padding

hexed briar
#

it depends on the actual size of parent button element really.

#

you make it small, the grid also gets smaller due to dynamic grid.

#

you make it big, the grid gets bigger. you get the idea.

wintry crater
#

how to anchor stack_panel 😵‍💫, it always stays in the middle

oak verge
#

@hexed briar you know how to swap a control element using modifications?
docs show only binding example

hexed briar
oak verge
hexed briar
oak verge
#

alr, thanks

hexed briar
oak verge
#
{
  "namespace": "server_form",

  "long_form": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "remove",
        "control_name": "long_form@common_dialogs.main_panel_no_buttons"
      },
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": [
          {
            "custom_long_form@common_dialogs.main_panel_no_buttons": {
              "$title_panel": "common_dialogs.standard_title_label",
              "$title_size": ["100% - 14px", 10],
              "size": [225, 200],
              "$text_name": "#title_text",
              "$title_text_binding_type": "none",
              "$child_control": "custom_form_grid.custom_panel_main",
              "layer": 2,
              "bindings": [
                {
                  "binding_name": "#title_text"
                },
                {
                  "binding_type": "view",
                  "source_property_name": "((#title_text - '§b§l§o§c§k§s§t§a§t§e§r') = #title_text))",
                  "target_property_name": "#visible"
                }
              ]
            }
          },
          {
            "custom_long_form@common_dialogs.main_panel_no_buttons": {
              "$title_panel": "common_dialogs.standard_title_label",
              "$title_size": ["100% - 14px", 10],
              "size": [300, 250],
              "$text_name": "#title_text",
              "$title_text_binding_type": "none",
              "$child_control": "custom_form_grid.custom_panel_main",

              "layer": 2,
              "bindings": [
                {
                  "binding_name": "#title_text"
                },
                {
                  "binding_type": "view",
                  "source_property_name": "(not ((#title_text - '§b§l§o§c§k§s§t§a§t§e§r') = #title_text))",
                  "target_property_name": "#visible"
               }
              ]
            }
          }
        ]
      }
    ]
  }
}```
#

like this?

hexed briar
#

yeah should be

#

wait

#

remove the @ and the rest after long_form

#

leave only long_form

oak verge
#

in control_name?

hexed briar
#

yeah

#

ima take a nap for little while...

oak verge
#

alright, thanks for the help

#

i might be doing something wrong, this doesn't seem to work for me

hexed briar
#

oh yeah i forgot something.

hexed briar
#

so no you can't delete long form.

#

instead you could replace it with the same one but custom entirely.

oak verge
#

this worked, but not sure it will not mess with other stuff

lean estuary
#

can i change the chest screen background image midst the screen open

#

so if player has the chest open of a custom GUI (e.g all white)

#

if say, uh, a specific item with a specific name gets added into the chest, the background will change to all black

#

possible or nah?

#

e.g smth like this

manic dragon
lean estuary
#

the inventory is right there

manic dragon
#

server form can be made that way
there's chest ui yk

manic dragon
lean estuary
#

looks good. however i work with Pocketmine-MP, not scripting. so converting this into PHP

#

would be a PAIN. perhaps i could work with the Author to make a official plugin version of it for Pocketmine-MP

manic dragon
oak verge
lean estuary
oak verge
jaunty smelt
#

{
"test": {
"type": "label",
"text": "#text",
"font_size": "small",
"size": [
98,
16
],
"offset": [
9,
0
],
"text_alignment": "center",
"bindings": [
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#text",
"binding_type": "global"
}
]
}
} im not an expert on bindings i was wondering how can i make the text only the first 50 characters or in between a certain amount of characters of the title

#

"type": "label",
"text": "#text",
"font_size": "small",
"size": [
98,
16
],
"offset": [
9,
0
],
"text_alignment": "center",
"bindings": [
{
"binding_name": "#hud_title_text_string",
"source_property_name": "('%.8s' * #hud_title_text_string) - ('%.6s' * #hud_title_text_string)",
"binding_name_override": "#text",
"binding_type": "global"
}
]

#

should it look like this?

unreal ravine
#

If bindings were to easy

jaunty smelt
#

it seems to not work if the string is only numbers it seems just to take the numbers away so ig ill have to plop an invisible character after every so letters

wintry crater
#

how can i hide my custom hud if i run /hud @s hide all?

unreal ravine
#

You cannot do that with custom Ui sadly

dusty rune
#

Is there logically a way then to like hide multiples uis without spamming "hide_" to each one

wintry crater
#

how can I make my image appear only if the title includes "custom"?

manic dragon
#

This can be done using some simple conditions
If your title is like update:custom where update: is $update_string
Then you can use (#preserved_text - $update_string = 'custom') as source_property_name to control visibility

#

If this is not what you're looking for then explain further about what you want

sick shell
#

Have you guys seen this new type? tooltip_trigger

unreal ravine
#

Nope

#

And wth can make that?

hollow knot
sinful crypt
#

what is the inventory slot texture name? (Excluding the hotbar)

#

And where is it located

#

and also minecoins texture , how can I change it

sick shell
#

Have you guys seen this before?

#

Only for Education Edition though

floral iron
#

posted to wrong channel (deleted) sorry about that

valid swan
#

When manipulating text in 1 UI (Actionbar), is it possible for me to get 1 texture without having the exact number of characters?

#

Ex:
"$texture": "('%.40s'*$actionbar_text)",
"texture": "('textures/sprites/' + $texture)",
Actionbar: minecraft.sprite

#

would it be possible for me to get the texture even if I don't have 40 characters in the text?

valid swan
#

,-, bruh

manic dragon
sick shell
manic dragon
sick shell
#

Yes

manic dragon
# sick shell Yes

When I tried to do something like that the game stopped taking any input making it impossible to close that drop-down (only hovering was working for drop-down content)

What could be the mistake?

sick shell
#

I am not using any dropdown element, just plain toggles

#

dropdown element is unusable outside vanilla stuff

manic dragon
#

Oh I see now

#

Thanks

manic dragon
whole jasper
sick shell
whole jasper
sick shell
whole jasper
clear lantern
#

I have question related to binding. Currently I've set up binding for buttons so the factory is not reading first 2 buttons. This is set on one interface. But when I try open default form with more than 3 buttons it crash my Minecraft. When I have custom form it allows me to use more buttons. How I can make that in factory I won't see first 2 buttons, but it won't affect rest of my forms?

craggy horizon
#

I'm looking around a few different Discord servers trying to find someone who'd be able to help me out with something, I'm trying to create a Teleport thing for players and a moderation item for the teleport thing for admins, it's meant so players can freely teleport to discovered locations, the locations only appear once you've discovered them, TPL (teleport list) I'm hoping to get to look something kind of like this, what I'm looking is for someone to possibly create a basic template with two of each button or tab so I can learn and add on to it,

#

And a scroll bar for long list

lofty summit
#

Since I've been searching on the server to hide specific messages. None covered both so I decided to figure it out. the $trigger_text only affects tellraws while still allowing all player messages that even include the $trigger_text and all tellraw message that don't include $trigger_text.

#

JsonUI Snippet ^. Not asking for help

#

One with yellow text contains the trigger text. One message is hidden from a tellraw

unreal ravine
#

Basically, u know how to hide messages without affecting chat and tellraw . Just specific messages??

lofty summit
#

It only hides tellraw messages that include the specific trigger_text. Everything else is shown

unreal ravine
#

I see

#

This could be a dev source for those that may need to hide Chat texts and trigger things with it (IG)

lofty summit
#

Add it to the wiki? ¯_(ツ)_/¯

#

oh wait I see

#

Stupid really that is was on one or that changed the outcome

unreal ravine
unreal ravine
lofty summit
#

nope

#

im recording the behavior rn

#

mmmm. this might be an issue

unreal ravine
# lofty summit nope

Oh ok, now the thing is: Try to show images , ill try tomorrow with my lightbulb on

#

Oof

lofty summit
#

fixed it.

hybrid aurora
#

hello @placid geode , i'm trying to implement custom forms
by "custom forms" i mean forms containing inputs, sliders, toggles.. and submit buttons. i'm not using long_form here

when i create a custom form different from the vanilla custom form (using bindings and #title_text), it displays correctly.
but the default custom form (event without modifying it) doesn't display and crashes the game. i think it is related to the fact that the #visible binding doesn't prevent the creation of multiple submit buttons at the same time, and i believe that's where the problem comes from, but i don't know how to explain how the new custom form (which i display from the title) is shown while following this principle...

any idea how i could create multiple custom forms at the same time and avoid crashing when using the vanilla custom form ? i ping you because it seems complex and you're probably one of the few who can help me

surreal cedar
#

Hello i'm new in json ui
What is the documentation for creating a keyFrame
and also what properties can be added?

manic dragon
surreal cedar
manic dragon
#

And yes you can use variables in anims

clever maple
#
    "event_item": {
        "type": "image",
        "anchor_from": "right_middle",
        "anchor_to": "right_middle",
        "size": ["100%c + 10px", "100%c + 5px"],
        "offset": "@hud.event_anim",
        "texture": "textures/ui/hud_tip_text_background",
        "alpha": 0.7,
        "bindings": [
            {
                "binding_type": "view",
                "source_property_name": "(#text - '<' - '>')",
                "target_property_name": "#text_n"
            },
            {
                "binding_type": "view",
                "source_property_name": "(not((#text_n - 'et') = #text_n))",
                "target_property_name": "#visible"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#text_n - 'et')",
                "target_property_name": "#full_text"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#full_text - 'fg50' - 'fg0' - 'fg1' - 'fg2' - 'fg3' - 'fg4' - 'fg5' - 'fg6' - 'fg7' - 'fg8' - 'fg9' - 'fg10' - 'fg11' - 'fg12' - 'fg13' - 'fg14' - 'fg15' - 'fg16' - 'fg17' - 'fg18' - 'fg19' - 'fg20' - 'fg30' - 'fg60' - 'fg100')",
                "target_property_name": "#image_path"
            },
            {
                "binding_type": "view",
                "source_property_name": "((#full_text - #image_path) - 'fg')",
                "target_property_name": "#timer_seconds"
            }
        ],
        "controls": [
            {
                "event_image": {
                    "type": "label",
                    "anchor_from": "center",
                    "anchor_to": "center",
                    "text": "#image_path",
                    "layer": 31,
                    "alpha": 1
                }
            }
        ]
    },

ettextures/btn-br/testfg50

how do I make that it return #image_path = textures/btn-br/test
and for #timer_seconds = 50 bc it doesn't work

manic dragon
#

try this in event_image control
"text": "#text" and

"bindings": [
  {
    "binding_type": "view",
    "source_control_name": "<name of parent (depends on your code)>",
    "source_property_name": "#image_path",
    "target_property_name": "#text"
  }
]
wintry crater
#

how can i make my image only appears if my title contains the word 'show:'

whole jasper
manic dragon
tidal marsh
#

is it possible to put live countdown timer in server forms?

distant seal
#

I've seen a UTC timestamp translation key thing recently, no idea if it works there too xd

sage vessel
hardy lily
#

if you want to add the scrollbar

frigid drift
#

without closing and opening the ui

serene sigil
slim forge
#

The only way is hiding it

#

Or...

#

Creating a Dynamic Property called armor_protection and using values and tests to define his value

#

And mix it with UI

sage vessel
manic dragon
# sage vessel Ohh ok

Try adding this in your armor renderer
"property_bag": { "#use_heart_offset": false }
Don't know if it'll work
It was given by bakedpotato~ in one of the posts here

manic dragon
#

The issue is because of offset but I don't know how to fix it

sage vessel
#

Ohh

slim forge
#

We can't change renders offset in that way

#

It's like a padding stuff you know

slim forge
# sage vessel Ohh ok

Create a dynamic property called armor_protection, and assign a value to it based on the type of armor being worn. Then, create a texture that visually changes in stages depending on the value of armor_protection. You can use either Minecraft’s default textures or your own custom textures to create a personalized look.

#

It's hard and boring but it's possible.

sage vessel
slim forge
#

After you finish it can you send it to me? Just a picture.

#

I would like to see your progress

sage vessel
slim forge
#

Are u a monster?

#

U just need to finish it now

sage vessel
#

now i just need to add another script and it's done

slim forge
clever maple
mellow pike
#

how do you bind a UI to an entity
I have the UI made i just can't figure out how to make the entity inventory display the UI

viral oxide
#

How are you supposed to use preserved title texts on an element that changes its visibility? Once its hidden, the preserved title text setup doesnt update unless this

{
    "binding_name": "#hud_title_text_string",
    "binding_name_override": "#preserved_text",
    "binding_condition": "visibility_changed"
},

gets turned into

{
    "binding_name": "#hud_title_text_string",
    "binding_name_override": "#preserved_text",
    "binding_condition": "always"
},

this causes it to re-appear whenever the text changes again, but the issue is now this doesnt only conditionally update #preserved_text

viral oxide
#

-# hi tom, Ui makes me crazy xD

zenith vortex
#

How i can convert text of title in an float

#

????

#

Any ideas

manic dragon
manic dragon
zenith vortex
#

I already solved it, thanks anyway.

wintry crater
#

chest screen ^

rocky quail
#

They're only for inventory screen

wintry crater
#

🥲

oak verge
safe wing
#

Is there even a single .md documentation file for Ore UI

#

I barely touched Json ui and Mojang wants to remove it already ...

wintry crater
#

is it possible to change slot image if there's an item in it?

manic dragon
wintry crater
#

okay, ill try that, thanks!

manic dragon
clever maple
hybrid bear
#

  "root_panel/hud_actionbar_text_area": {
    "type": "panel",
    "factory": {
      "name": "hud_actionbar_text_factory",
      "control_ids": {
        "hud_actionbar_text": "[email protected]_actionbar_text_123"
      }
    }
  },

  "hud_actionbar_text_123": {
    "type": "panel",
    "controls": [
      {
        "hud_actionbar_text": {
          "type": "image",
          "size": [ "100%c + 12px", "100%c + 5px" ],
          "offset": [ 0, "50%-68px" ],
          "texture": "textures/ui/hud_tip_text_background",
          "alpha": "@hud.anim_actionbar_text_background_alpha_out",
          "controls": [
            {
              "actionbar_message_1": {
                "type": "label",
                "anchor_from": "center",
                "anchor_to": "center",
                "color": "$tool_tip_text",
                "enable_profanity_filter": true,
                "layer": 31,
                "text": "$actionbar_text",
                "$s_text": "$actionbar_text",
                "localize": false,
                "alpha": "@hud.anim_actionbar_text_alpha_out",
                "visible": "($s_text - '§2§4§5§1§2§r') = $s_text"
              }
            }
          ]
        }
      },
      {
        "actionbar_message_2": {
          "type": "label",
          "anchor_from": "center",
          "anchor_to": "center",
          "color": "$tool_tip_text",
          "enable_profanity_filter": true,
          "layer": 31,
          "text": "$actionbar_text",
          "$s_text": "$actionbar_text",
          "localize": false,
          "alpha": "@hud.anim_actionbar_text_alpha_out",
          "visible": "(not (($s_text - '§2§4§5§1§2§r') = $s_text))"
        }
      }
    ]
  }
#

i made this but the background of actionbar_message_2 is still there

warped mason
#

Is it possible to change where the mob effect icons on the right of the screen are located? I found the code for the effects panel (when you press z), but im not sure about these

distant seal
#

it's probably somewhere in hud_screen?

#

that makes the most sense to me

warped mason
#

ive been looking, i haven't found it yet

#

i tried doing ctrl + f find "hud_mob_effect_background" in there because that's the texture it pulls, and it wasn't used

#

(I set mine to an empty texture which is why it's not behind the effect icons)

left yew
warped mason
#

Ooo, ok!!! Tysm!

azure thistle
#

hey uhh a bit of silly question, can you use json-ui in marketplace add-ons?

oak verge
#

no

valid swan
#

in live_horse_renderer is there any way I can make the model rotate towards the cursor?

west dawn
oak verge
west dawn
# oak verge how so?

Something something vanilla. i dont remember the details but not everything is allowed

hexed briar
#

yeah they have a certain limits. but NPC screen and HUD screen is pretty much fine if i recall.

restive hedge
#

How can I show two images at the same time?

  "test": {
    "type": "image",
    "texture": "textures/items/diamond",
    "layer": 70,
    "size": [88, 88],
    "offset": [0, 2],
    "anchor_from": "center",
    "anchor_to": "center",
    "alpha": "@hud.anim_test_alpha_in",
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#hud_title_text_string = 'test')",
        "target_property_name": "#visible"
      }
    ]
  }```
river flower
restive hedge
river flower
river flower
restive hedge
# river flower Just to confirm, you properly defined the image objects within hud_screen.json r...
  "test_1": {
    "type": "panel",
    "controls": [
      { "[email protected]_1_ic": {} },
      { "[email protected]_2_ic": {} }
    ],
    "bindings": [
      { "binding_name": "#hud_title_text_string" },
      {
        "binding_type": "view",
        "source_property_name": "(#hud_title_text_string = 'test_1')",
        "target_property_name": "#visible"
      }
    ]
  },

  "test_1_ic": {
    "type": "image",
    "texture": "textures/items/diamond",
    "layer": 70,
    "size": [88, 88],
    "offset": [0, 2],
    "anchor_from": "center",
    "anchor_to": "center", 
    "alpha": "@hud.anim_test_1_alpha_in"
  },

  "test_2_ic": {
    "type": "image",
    "texture": "textures/items/diamond_axe",
    "layer": 70,
    "size": [88, 88],
    "offset": [0, 2],
    "anchor_from": "center",
    "anchor_to": "center", 
    "alpha": "@hud.anim_test_1_alpha_in"
  },
restive hedge
river flower
#

By default, any component you define is 'visible' all the time

restive hedge
river flower
#

Okay so by default, the images should be visible without any binding

#

Try to comment bindings array from here and it should show the 2 images

river flower
#

Is your goal only to show these images?

#

Do you want to show them all the time?

restive hedge
restive hedge
river flower
river flower
river flower
restive hedge
vocal flame
#

When will oreUI get added ;-;

rocky quail
river flower
#

Btw they will still keep json ui support right?

wintry crater
#

how to move the position of chat message to bottom left?

manic dragon
#

Or remove the chat messages panel from chat_stack and add it to the root_panel directly

wintry crater
#

btw is it the chat_panel inside hud_screen?

manic dragon
wintry crater
#

thanks!

sinful crypt
#

just want to know the full code of how you moved the chat in bottom

wintry crater
#

later, im not at home rn

river flower
manic dragon
#

as simple as that

wintry crater
#

i use the chat_panel

#
"chat_panel": {
    "type": "panel",
    //Uncomment when text formatting is being accounted for in word length
    //"clips_children": true,
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "size": [
        "100%",
        "fill"
    ],
    "max_size": [
        "100%",
        "70%"
    ],
    "controls": [
        {
            "stack_panel": {
                "type": "stack_panel",
                "anchor_from": "bottom_left",
                "anchor_to": "bottom_left",
                "factory": {
                    "name": "chat_item_factory",
                    "max_children_size": 10,
                    "control_ids": {
                        "chat_item": "[email protected]_grid_item"
                    }
                }
            }
        }
    ]
}
#

max_children_size this thing controls how many chat messages are visible

sinful crypt
#

Thanks

sinful crypt
wintry crater
#

idk, its from the default chat_panel code

sinful crypt
#

ah

sinful crypt
wintry crater
#

set this to 100% to align it to the bottom of screen OR use Echo's code

#

if you want to change the font size, add this

"chat_label": {
        "font_scale_factor": 0.7
}
sinful crypt
wintry crater
#

1 is the default size

#

so 0.7 makes it smaller

#

you can also make it bigger if you want xD

#

bao_ext_toldyouso
-# my grandpa's phone font size

sinful crypt
#

lol

#

that's my dad's phone font size

sinful crypt
#

@manic dragon

#

can u tell

manic dragon
#

yeah why not

sinful crypt
#

ah i thought i'd need to put in vanilla UI file

manic dragon
sinful crypt
#

i meant in my debug screen file, i'd put that in a {} in top of all my code? @manic dragon

manic dragon
#

no just paste it as-is
and add a comma at the end depending on where you put it

sinful crypt
#

k

#

json ui been never like that 👼

sinful crypt
#

@manic dragon srry but that myb the last question i ask

wintry crater
#
{
    "namespace": "hud",
    "chat_panel": {
        "type": "panel",
        //Uncomment when text formatting is being accounted for in word length
        //"clips_children": true,
        "anchor_from": "bottom_left",
        "anchor_to": "bottom_left",
        "size": [
            "100%",
            "fill"
        ],
        "max_size": [
            "100%",
            "75%"
        ],
        "controls": [
            {
                "stack_panel": {
                    "type": "stack_panel",
                    "anchor_from": "bottom_left",
                    "anchor_to": "bottom_left",
                    "factory": {
                        "name": "chat_item_factory",
                        "max_children_size": 10,
                        "control_ids": {
                            "chat_item": "[email protected]_grid_item"
                        }
                    }
                }
            }
        ]
    },
    "chat_label": {
        "font_scale_factor": 0.7
    }
}
sinful crypt
#

thx

manic dragon
pale ginkgo
#

ive been trying to add a factor for the animation on the json ive been working on so the animations for attack only play when they are in range of the target but for some reason after trying all the ones i could fine: in_range,varible.attack_time,query.facing_target_to_ranged_attack i havent gotten one to work and i dont know the issue

pale ginkgo
manic dragon
pale ginkgo
#

Well where do I go for this specific problem

manic dragon
#

Probably in #1067869022273667152

pale ginkgo
weak cape
#

Is it possible to use chat messages to preserve its value and display labels instead of titles or actionbars?

weak cape
# oak verge use #chat_text

I noticed that for some reason #text has the content of #chat_text without any modification from my part which is confusing

#
{
    "label": {
        "type": "label",
        "text": "#text",
        "text_alignment": "left",
        "bindings": [
            {
                "binding_type": "view",
                "source_control_name": "data_control",
                "source_property_name": "(#preserved_text - 'test')",
                "target_property_name": "#text"
            }
        ],
        "controls": [
            {
                "data_control": {
                    "type": "panel",
                    "size": [
                        0,
                        0
                    ],
                    "bindings": [
                        {
                            "binding_type": "collection",
                            "binding_collection_name": "chat_text_grid",
                            "binding_name": "#chat_text"
                        },
                        {
                            "binding_name": "#chat_text",
                            "binding_name_override": "#preserved_text",
                            "binding_condition": "visibility_changed"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(not (#chat_text = #preserved_text) and (('%.4s' * #chat_text) = 'test'))",
                            "target_property_name": "#visible"
                        }
                    ]
                }
            }
        ]
    }
}

this literally show the entire message

unreal ravine
weak cape
hybrid bear
#

how can i make an actionbar text resize and offset based on the text?

#

like i want it to be always at the bottom right even if the text is more

manic dragon
unreal ravine
#

Nobody did something like that, or someone did but by obvious reasons, they dont wanna share

manic dragon
manic dragon
unreal ravine
#

Oh i see

wintry crater
#

what's the texture name of the buttons specially the buttons for server form?

manic dragon
#

They are used almost everywhere you see white buttons, toggles or drop-downs

wintry crater
#

ahhh i see, thank you!

manic dragon
unreal ravine
#

I'm very repetitive because I dunno what to say, sorry

manic dragon
#

No worries

sick shell
zenith vortex
#

How do you change the color of the bar?

zenith vortex
# weak cape ```json { "label": { "type": "label", "text": "#text", ...

I have the same problem , te molestas si hablo en español? Jeje , hace rato lo intente y no pude , me di cuenta q por alguna razón eso no funcionaba, te recomiendo tener una fabrica del chat , y en otro archivo llamar al elemento , este elemento q te recomiendo sea un panel , en ese panel trata de poner tus bindings , pero con la condición "once" debería funcionar... Y en los controles pon el texto

wintry crater
#

abc... and ^ are both inside the stack_panel, how can i center the ^ (label element)?

manic dragon
manic dragon
sick shell
manic dragon
# sick shell Huh?

I mean how you made the animation
It depends on some value right and doesn't go from full to empty every time
-# sorry for asking so much

wintry crater
#

how can i fix the position of this(coin and gem) on mobile?

oak verge
#

Make a variable and change it value depending on the mobile binding

wintry crater
#

uhh how to do that depending on the mobile binding...

river flower
#

a different root_panel for pocket?

river flower
#

You can search for that binding in hud_screen

manic dragon
#

you can try it like this

manic dragon
#

np

wintry crater
#

finally :))

wintry crater
#

im currently trying to make hp, and mana bar, how can i change the size of the texture of bar that will fill the empty bar using title?

like if title is
update:mana:currentValue/maxValue
currentValue = 80
maxValue = 100, then the image size will be 80% width or something

wintry crater
#

ohh i see

#

thanks!

dusty rune
wintry crater
#

ahhhhhh i cant add a custom one(mana)

manic dragon
dusty rune
#

huh so this can be used without script?

manic dragon
#

Technically yeah

#

Using commands

wintry crater
#

to convert string to int i just need to multiply it to a number like 1, right?

dusty rune
#

Commands?
well never tried using them, what example command should put in?

manic dragon
dusty rune
#

oh well, thought the whole thing would be automatic by what hp your having

wintry crater
#

how can i pass it to a variable?

#

"source_property_name": "((#preserved_text - $update_string) * 1)", this thing

manic dragon
surreal cedar
wintry crater
#

how can i get the max health of player so i dont need to manually set the $max_health?

"$update_string": "update:hp:",
"type": "image",
"size": [
    "100%",
    "100%"
],
"layer": 1,
"$max_health": 20.0,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/bar/full_hp_bar",
"bindings": [
    {
        "binding_type": "view",
        "source_control_name": "health_data_control",
        "source_property_name": "((#preserved_text - $update_string) * 1)",
        "target_property_name": "#health"
    },
    {
        "binding_type": "view",
        "source_property_name": "(($max_health - #health) / $max_health)",
        "target_property_name": "#clip_ratio"
    }
]
unreal ravine
#

He formula was something like:
(health.currentValue * 100)/health.maxValue or something like that

wintry crater
#

i thought making a custom bar would be easy @.@

unreal ravine
#

It is not

dusty rune
#

Only if the bossbar trick was working
thought it will be funny if I gave player the bossbar's, but it was bug where the bar doesn't move just stays full

#

it was almost perfect

torpid whale
#

What does the code to a custom button look like?

broken trail
#

am I crazy or did they just remove the '%.1s' part from documentation? I mean from wiki.bedrock.dev??

broken trail
#

totally makes sense to put it in intro...

#

I just download this whole piece of crap

#

just to search for %. because I couldnt find it on that site bruh

#

(literally)

broken trail
#

#hatemarkdown

#

or maybe there is fix for it that I dont know

#

whatever...

neat sequoia
#

I don't know if it was a Minecraft problem, but why when I use my custom forms for a long time, open and close it so many times, my game crashes? It's a forms problem or maybe a custom bar problem?

wintry crater
#

is it possible to render other players skin in live player renderer?

manic dragon
wintry crater
#

how can i set the entity id?

manic dragon
#

Through bindings
And to get entity id you'll need script. Both are easy tasks

wintry crater
#

where i can see all the available list for binding_name?

wintry crater
#

thanks!

manic dragon
#

The list is huge

wintry crater
#

uhh am i doing it correctly? also is this gonna work in server form?

"render": {
    "type": "custom",
    "renderer": "live_horse_renderer",
    "layer": 20,
    "anchor_from": "center",
    "anchor_to": "center",
    "bindings": [
        {
            "binding_name": "#entity_id"
        }
    ]
}
manic dragon
#

It works in server form

wintry crater
#

what's the example value for entity_id? i tried passing the #title_text value to #entity_id minecraft:player but it still not showing

#

nvm finallllllllly!!

#

oh so each player has their owm unique entity id

manic dragon
wintry crater
#

why its not showing title2?

"container": {
    "type": "stack_panel",
    "orientation": "vertical",
    "controls": [
        {
            "title1": {
                "type": "label",
                "text": "#title_text",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    }
                ]
            }
        },
        {
            "title2": {
                "type": "label",
                "text": "#title_text",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    },
                    {
                        "binding_type": "view",
                        "source_property_name": "('%.10s' * #title_text)",
                        "target_property_name": "#title_text"
                    }
                ]
            }
        },
        {
            "test": {
                "type": "label",
                "text": "working",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    }
                ]
            }
        }
    ]
}
sick shell
#

u cant use string formatting on numbers

wintry crater
#

ohh

wintry crater
#

how can i make it only show the numbers...

manic dragon
manic dragon
wintry crater
#

its server form title

manic dragon
#

Are you using body text for something else
Cause if not, you can use that for passing entity id

#

Or you can do something like this
First 50 characters for title and after that the entity id

wintry crater
#

yes, im using it to display player data, im trying to add the renderer to the red box

wintry crater
manic dragon
#

So you can do (#title_text - ('%.50s' * #title_text)) in source_property_name
And this will give you the entity id that's at the end

wintry crater
#

😵‍💫
1st: #title_text
2nd: ('%.50s' * #title_text - '\t')
3rd(your sample): (#title_text - ('%.50s' * #title_text))

manic dragon
#

add a string in the front to see if it's working

#

I think it's working

wintry crater
#

uhh after i add 'a' ('a' + #title_text - ('%.50s' * #title_text)), it makes my game lag...

manic dragon
#

i think you made a loop

#

can i see the code?

wintry crater
#

code of ths json ui?

wintry crater
#
"container": {
    "type": "stack_panel",
    "orientation": "vertical",
    "controls": [
        {
            "title1": {
                "type": "label",
                "text": "#title_text",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    }
                ]
            }
        },
        {
            "title2": {
                "type": "label",
                "text": "#title_text",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    },
                    {
                        "binding_type": "view",
                        "source_property_name": "('%.50s' * #title_text - '\t')",
                        "target_property_name": "#title_text"
                    }
                ]
            }
        },
        {
            "title3": {
                "type": "label",
                "text": "#title_text",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    },
                    {
                        "binding_type": "view",
                        "source_property_name": "('a' + #title_text - ('%.50s' * #title_text))",
                        "target_property_name": "#title_text"
                    }
                ]
            }
        }
    ]
}
manic dragon
#

yep you made a loop here, which is causing the lag

wintry crater
#

which part?

manic dragon
#
"title3": {
                "type": "label",
                "text": "#text",
                "layer": 20,
                "anchor_from": "center",
                "anchor_to": "center",
                "bindings": [
                    {
                        "binding_name": "#title_text"
                    },
                    {
                        "binding_type": "view",
                        "source_property_name": "('a' + #title_text - ('%.50s' * #title_text))",
                        "target_property_name": "#text"
                    }
                ]
            }
wintry crater
#

AHHHHHHHHHHHHHH FINALLY, THANK YOU!!!!!

wintry crater
#

weird, why its still not working in live_horse_renderer :/

#
{
    "entity_model": {
        "type": "panel",
        "size": [
            50,
            50
        ],
        "controls": [
            {
                "render": {
                    "type": "custom",
                    "renderer": "live_horse_renderer",
                    "layer": 20,
                    "anchor_from": "center",
                    "anchor_to": "center",
                    "property_bag": {
                        "#id": "-1464583847935"
                    },
                    "bindings": [
                        {
                            "binding_name": "#title_text"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "#id",
                            "target_property_name": "#entity_id"
                        }
                    ]
                }
            }
        ]
    }
}

it only works if i enter the id manually

sick shell
#

😂

#

ngl, i should've told you earlier, im sorry

#

you cant do that, #entity_id only takes strings, not number

#

when u string format that, it turns it to number

wintry crater
#

i tried with and without '§z' it still didnt work, i also tried passing it to property bag with string value like "#id": "" but it still didnt work 🥲

{
    "test": {
        "type": "panel",
        "size": [
            50,
            50
        ],
        "controls": [
            {
                "render": {
                    "type": "custom",
                    "renderer": "live_horse_renderer",
                    "layer": 20,
                    "anchor_from": "center",
                    "anchor_to": "center",
                    "bindings": [
                        {
                            "binding_name": "#title_text"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "('§z' + #title_text - ('%.50s' * #title_text))",
                            "target_property_name": "#entity_id"
                        }
                    ]
                }
            }
        ]
    }
}
manic dragon
undone marsh
#

I thought that was common knowledge lol. json ui ain't hard 🙏

wintry crater
manic dragon
undone marsh
#

Ight

wintry crater
#

is there any other way to do this?

undone marsh
wintry crater
manic dragon
#

ig you can try doing this from button text instead

undone marsh
#

Do paper_doll_renderer or live_player_renderer not work in forms?

#

I have never messed with forms

wintry crater
#

im trying to display other player's skin

undone marsh
#

I'd personally use molang for that

wintry crater
#

i did it :))))

manic dragon
wintry crater
#

i use the .label to store the entity id

#

and use collection index to get the label text value

manic dragon
#

yea that makes sense

wintry crater
#

weird, why other entity display is a bit higher than player :/

surreal cedar
# broken trail

String formating is very confusing
I use %.6s * '123abcd'
only display 123 not 123abc

I had to add §r and remove it again, it doesn't affect the display but for specific data it's a pain

broken trail
torpid whale
#

How many lines of code is a custom button?

hexed briar
#

label does not display value unless are converted to string.

#

but sometimes, a certain screen may have some weird hidden symbols that will make string formatting not so reliable until you find the initial point where it works as intended.

empty tendon
#

anyone know how to show the player name in a label element in hud_screen.json ?

wintry crater
empty tendon
#

can u explain me how to do it 🙏 im trying to learn

#

😂

wintry crater
undone marsh
#

That's a better way

empty tendon
#

"player_name": {
"type": "label",
"anchor_from": "top_left",
"anchor_to": "top_left",
"text": "#gamertag",
"shadow": true,
"font_type": "MinecraftTen",
"size": ["default", 12],
"offset": [ 54, 4],
"bindings": [
{
"binding_name": "#gamertag"
}
]
},

like this @undone marsh ??

undone marsh
#

You also need the collection

"player_name": {
          "type": "label",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "text": "#gamertag",
          "shadow": true,
          "font_type": "MinecraftTen",
          "size": ["default", 12],
          "offset": [ 54, 4],
          "bindings": [
            {
              "binding_name": "#gamertag",
                    "binding_type": "collection",
                    "binding_collection_name": "players_collection"
            }
          ]
    },
empty tendon
#

it crashed

undone marsh
empty tendon
#

🧐

#

how to do it @undone marsh

manic dragon
#

Yeah it crashes the game without a grid

#
"a_grid": {
        "type": "grid",
        "size": [100, 100],
        "grid_dimensions": [1, 1],
        "grid_item_template": "hud.<name_of_gamertag_label_element>",
        "collection_name": "players_collection"
    }
#

This should work

undone marsh
#

Yup, i was about to send the code in a file.

manic dragon
#

Ig that would be better

undone marsh
#

Well I deleted the file now... Since yk you sent it

#

It was just a stripped down version of my player list pack

manic dragon
torpid whale
#

Does anyone have the code of a custom Button? Or a tutorial link?

manic dragon
#

Just use one of the button layouts from ui_template_buttons.json

#

You can modify textures and content etc

torpid whale
#

Where can i find that file? In the sample?

manic dragon
#

Yep

torpid whale
#

I will have a look ty 😁

manic dragon
torpid whale
#

Yeah i only need a single custom Button, do you know what the buttons on the hud-screen.json are called in the files?

manic dragon
#

Which buttons are you talking about?
They are all over the file

torpid whale
#

Like a button that has one texture while its unpressed then changes textures on pressed

#

Sorry i'm a bit of a beginner 😅

manic dragon
undone marsh
# manic dragon But why is the grid so important that it straight up crashes the game

The UI doesn't treat #gamertag as a single variable. This binding:

"bindings": [
  {
    "binding_name": "#gamertag",
    "binding_type": "collection",
    "binding_collection_name": "players_collection"
  }
]

tells the game to pull #gamertag from the current item in players_collection.

Why it crashes without a grid:

If you put the label outside a collection (like a grid or list), there's no current item context. The game doesn't know which #gamertag to use, so it crashes due to a missing reference.

(I used ChatGPT for better English)

torpid whale
#

Is there a custom button that works like the jump button ingame?

undone marsh
torpid whale
#

Ah dang 💔

undone marsh
torpid whale
#

Is a fully custom title bar also a hardcoded feature?

manic dragon
torpid whale
#

Yeah like uhm /title @a newtitle Testing

manic dragon
#

No not hardcoded

torpid whale
#

Great! Do you know of any tutorials possibly?

manic dragon
#

What do you intend to do?

undone marsh
torpid whale
#

Similar to the achievementws but i want to trigger a bar across the top of my screen thats says a text based on what triggered the title bar

torpid whale
#

I want it to appear from the center of my screen though like how a title bar does except higher up on the screen

#

I can try make an example

manic dragon
# undone marsh Damn

How did you guess tho :)
This isn't my actual name just a username generated from random website

torpid whale
#

Like this, very similar to the title bar but higher up alittle animation some text based on something specifc then it goes

manic dragon
#

Then it'll be easier to just modify the current title animation

undone marsh
manic dragon
#

I see

undone marsh
#

Idk if Flarial Client says something to you but he created it

manic dragon
#

Damn I don't use that but that's impressive

torpid whale
#

How big can i make a custom glyph or emoji?

sinful crypt
manic dragon
empty tendon
#

@undone marsh it still crash i think i done something wrong but idk what ; -;

surreal cedar
empty tendon
#

just fixed the bug ***

abstract burrow
#

How can I remove this "x" where the form closes?

torpid whale
#

How do i make a server form?

crimson fox
#

dm me!

hardy lily
# wintry crater

I might need this for my future project. Still don't understand how the horse renderer works 😅

#

Oh yeah, can I use text slice to seperate text from a new line?

broken trail
#

also to text formatting, there arent much useful options so yeah

#

up to you

broken trail
surreal cedar
sinful crypt
#

Ah thanks

wintry crater
#

uhh how can i make the clip_ratio works?

"$update_string": "update:rpg:mana:",
"type": "image",
"size": [
    "100%",
    "100%"
],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/bar/full_mana_bar",
"bindings": [
    {
        "binding_type": "view",
        "source_property_name": "(((#preserved_text - ('%.50s' * #preserved_text)) - ('%.50s' * #preserved_text - '\t' - $update_string)) / ((#preserved_text - ('%.50s' * #preserved_text)))",
        "target_property_name": "#clip_ratio"
    }
]
manic dragon
wintry crater
manic dragon
#

There's no source_control_name here
So that might be the issue
Try using proper source_control_name

wintry crater
#

ohh yeah, wait ill try that

manic dragon
#

Also #clip_ratio is a float
So multiply the numerator and denominator with a float like 1.0

wintry crater
#

hmm still not working

#

the text is separate element

#
{
    "binding_type": "view",
    "source_control_name": "mana_data_control",
    "source_property_name": "(((#preserved_text - ('%.50s' * #preserved_text)) - ('%.50s' * #preserved_text - '\t' - $update_string) * 1.0) / ((#preserved_text - ('%.50s' * #preserved_text)) * 1.0)",
    "target_property_name": "#clip_ratio"
}
#

the full bar texture is showing when there's no title, but when i show the title, it disappears

wintry crater
#

nvm its working now :)))

manic dragon
#
{
                            "binding_type": "view",
                            "source_control_name": "mana_data_control",
                            "source_property_name": "((#preserved_text - $update_string) * $one)",
                            "target_property_name": "#value"
                        },
{
                            "binding_type": "view",
                            "source_control_name": "mana_data_control",
                            "source_property_name": "((#preserved_text - ('%.50s' * #preserved_text)) * $one)",
                            "target_property_name": "#max_value"
                        },
{
                            "binding_type": "view",
                            "source_property_name": "((#max_value - #value) / #max_value)",
                            "target_property_name": "#clip_ratio"
                        }
wintry crater
#

yup

#

i store the max and current value to property bag

#

and use it in source property for clip ratio

manic dragon
#

It's also clean this way

wintry crater
#

im starting to like using property bag now

#

is there any limitation for property bag?

manic dragon
#

I don't really know about any limitations

wintry crater
#

finally custom bar :))

#

i can now make custom exp bar 😌

wintry crater
#

how to change the position of this item name?

manic dragon
#

adjust the offset

wintry crater
#

thanks!

oak verge
#

how to prevent this

weak cape
oak verge
#

text truncation

weak cape
oak verge
#

"$button_font_size": "large"
did work tho, that why i am confused

weak cape
oak verge
#

It will, but it didn't

weak cape
oak verge
#

i checked
it does

#

actually let me confirm it work or not

#

nvm, it was
"$button_font_scale_factor|default": 1.0,

gaunt apex
#

someone pls give emoji like this

#

😢😢

oak verge
#

check the wiki

#

emoji section

wintry crater
#

is there a way to send a text using a script and display it in the inventory?

gaunt apex
#

pls someone give me emoji like left image😢😢😢

unreal ravine
gaunt apex
unreal ravine
#

U can do it by ur self

wintry crater
#

how do i fix this? when the texture is full size (100/100), it looks fine, but when the clip_ratio is changed (50/100), the texture scales up a bit?

river flower
#

Is it okay if you send your json code?

wintry crater
#

should i just separate the empty and full bar into a background, set a fixed size for the empty bar, and place the full bar inside it with its size set to 100%?

nvm, same result

#

i know now the problem 💀

#

i thought setting the size to texture size will fix it 😵‍💫
(i remove the binding and control because of text limit)

"mana_bar_empty": {
    "$update_string": "update:rpg:mana:",
    "type": "image",
    "texture": "textures/ui/bar/mana/empty_mana_bar",
    "size": [
        84,
        8
    ],
    "offset": [
        45,
        -37.5
    ],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "layer": 0,
    "controls": [
        {
            "mana_progress": {
                "$update_string": "update:rpg:mana:",
                "type": "image",
                "size": [
                    "100%",
                    "100%"
                ],
                "layer": 1,
                "clip_direction": "right",
                "clip_pixelperfect": false,
                "texture": "textures/ui/bar/mana/full_mana_bar",
                "$one": 1.0,
                "property_bag": {
                    "#maxMana": 0.0,
                    "#currentMana": 0.0
                }
            }
        }
    ]
}
river flower
#

Nioceee

wintry crater
#

no, its still increasing the scale

manic dragon
#

That's really weird

river flower
#

But the bar you put inside a panel?

gaunt apex
#

well well well

manic dragon
wintry crater
#

btw where i can get the default font texture??

river flower
wintry crater
#

where is it located?

manic dragon
#

in the font folder

wintry crater
#

hmm why its not included in samples

manic dragon
#

oh yeah i forgot it's not in the samples

#

i got it from extracting minecraft

#

i can give you the zip file of that folder if you want

wintry crater
#

sure

manic dragon
wintry crater
#

thanks!!

oak verge
wintry crater
#

that's my code for the bar, i separated it from the background

river flower
#
"shield": {
  "type": "stack_panel",
  "orientation": "horizontal",
  "size": ["100%c", "100%c"],
  "controls": [
    // ...
    {
      "[email protected]_shield": {}
    },
    {
      "[email protected]_shield": {}
    },
    {
      "[email protected]_shield": {}
    },
    {
      "[email protected]_shield": {}
    },
    {
      "[email protected]": {}
    }
  ]
}
"label": {
  "$prefix": "!shield_health:",
  "type": "label",
  "text": "#shield_health",
  "color": [0, 0.71, 0.92],
  "layer": 3,
  "size": [20, 10],

"icon": {
  "$prefix": "!shield_type:",
  "type": "image",
  "texture": "('textures/ui/stats/shield/' + $id)",
  "size": [16, 11],
}

Why is the number over the chestplate and not on the right side of it?

#

FYI wooden_shield extends icon

river flower
#

Man I am 🤏 this close to NOT EVER USING stack panels every again and just positions everything manually lol

gaunt apex
#

why the global variables not work?

#

oh isee

#

solved

wintry crater
#

is it 8x8 per letter?

manic dragon
#

Yes

clear lantern
#

I have question about closing server forms. Is there any possibility to add to JSON thing that if player opens it, it will automaticly close after 3 seconds?

weak cape
clear lantern
#

I would like to remove interaction on chalkboards. I managed to get rid of text and locked button, but the best would be to completly remove interaction with it. I'm looking for ideas how to deal with it

wintry crater
wintry crater
#

oh when using a texture with NineSlice, it's working fine, but when using a custom texture like that(normal texture), it has that kind of problem

oak verge
#

normal texture work fine for me

wintry crater
oak verge
#

sure

wintry crater
#

is it possible to set the hover text to fixed position?

manic dragon
#

No, hover text renderer is a hardcoded thing, it'll follow the cursor

wintry crater
#

is there a way show server form label if i hover to a specific button?

manic dragon
#

Well, you can make a text show up when you hover a button and the value of that text can be fetched from form_button_text
But I'm not sure about another server form label

#

Like this

unreal ravine
#

And it can be splitted with the body of it?

manic dragon
#

I didn't understand sorry

unreal ravine
# manic dragon Like this

I mean , take the text of the body/split it and place it in the thingi when showing the label when hoverimg the button

unreal ravine
manic dragon
wintry crater
#

i'm planning to create something like this for my shop form. i want to display the item description in the text here area.

my current idea is to use a format like button text\t(x20) item description but at the moment i have no idea how to display the text there.

manic dragon
#

Can't think of any way

wintry crater
manic dragon
#

I just added this label element to the hover control of the button

But the position of this label is relative to button position

unreal ravine
wintry crater
#

ahh i see, ill try that

unreal ravine
wintry crater
#

thanks!

oak verge
#

Wrong channel

torpid whale
#

Huh, thought this would of been right because theres requirements for dependencies and manifests for scripts and stuff

untold dawn
#

guys

#

if i add 480 images to the screen (only 10 will have texture, the rest wont)

#

will it be laggy or not?

broken trail
#

I add 16k lines to hud, if correctly done you will only have some delay at opening, but wont have performance issues later or during playing

#

however 480 images might be bigger than that lmao

untold dawn
# broken trail I add 16k lines to hud, if correctly done you will only have some delay at openi...

this thing:

  "hydration_bar_renderer":{
    "type":"stack_panel",
    "orientation":"horizontal",
    "size":["default",9],
    "controls":[
      {"[email protected]_bar":{"$hydration_value":20}},
      {"[email protected]_bar":{"$hydration_value":18}},
      {"[email protected]_bar":{"$hydration_value":16}},
      {"[email protected]_bar":{"$hydration_value":14}},
      {"[email protected]_bar":{"$hydration_value":12}},
      {"[email protected]_bar":{"$hydration_value":10}},
      {"[email protected]_bar":{"$hydration_value":8}},
      {"[email protected]_bar":{"$hydration_value":6}},
      {"[email protected]_bar":{"$hydration_value":4}},
      {"[email protected]_bar":{"$hydration_value":2}}
    ]
  },
```adds 10 elements to the screen as a progress bar, each element contains two images so thats a total of 20 images
#

i am rendering the same renderer 3 times (centered_gui_elements_at_bottom_middle and centered_gui_elements_at_bottom_middle_touch and not_centered_gui_elements)
thats a total of 60 images, right?

#

like all of them are in the screen, but just not visible

broken trail
untold dawn
# broken trail

do i have to use one image and keep changing its texture using titles?

broken trail
#

use 1 image and use whatever

untold dawn
untold dawn
#

ill try it anyway

wintry crater
#

how can i make my image texture stretch?

manic dragon
#

Either use keep_ratio: false
Or fill: true

wintry crater
#

i think i know the problem of my custom bar now

manic dragon
#

What was the problem?

wintry crater
#

yup, i knew it. if the size of the image is 100%, it's showing the actual size of the texture (not stretching the texture), and if it's below 100% or something, it's stretching it to fit the size of the parent

manic dragon
#

Is the green bar for exp or something else

wintry crater
#

exp

#

its custom exp bar, so i can control it

manic dragon
#

Oh so it's not showing actual exp but a different quantity

wintry crater
#

yeah

opal aurora
#

average mojang json ui

#

how is this binding_name even valid

#

that's the main reason why it triggers a lot of content log errors once i re-override $option_tooltip_text_binding_name to default

manic dragon
#

I've seen this kind of binding names in other files too
Idk what they were thinking

opal aurora
#

so i angrily patched that skill issue

#

(same as subpanel_02 but reversed)

#

but not needed because the game acts that as "not an error"

manic dragon
#

So they were using ignored and visibility binding at the same time
Was that even necessary :)

opal aurora
manic dragon
opal aurora
#

and use that binding as normal

manic dragon
#

Oh I see

#

So it was using property bag
I thought the variable somehow makes up a binding lol
-# that was stupid of me

wintry crater
#

is there a way to make background blur effect?

manic dragon
#

Unfortunately no

opal aurora
hexed briar
#

what's even more funny is

#

Vanilla's UI are pretty much HARDCORED to not display any errors.

whole jasper
river flower
#

Oh you mean for UI elements?

hexed briar
#

yeah, it was during me trying to modify vanilla's pause screen. LITERALLY EXACT SAME FILE FROM THE SAME VERSION, just small offset adjusts and it's threw me alot of content log errors that is related to bindings and few.

#

Knew something was wrong so i tried multiple tests by doing exact same thing but different screens, same issue.

#

turned out regardless if vanilla UI has errors or not, the game refuses to show it. literally just straight out ignoring it.

#

even if you did the funny thing aka modifying vanilla UI inside the game's files, it would not show content log error either.

hollow needle
#

Is there any way to get the chat text (chat_screen.json) in bindings?

#

I want to display something in each chat message if the text contains an specific text

#

But just #text doesn't work

unreal ravine
#

Theres Not a estable way to do that

#

I mean , there is but it doesnt work 100% Efficiently

manic dragon
hollow needle
hollow needle
manic dragon
#

oh in chat screen it's messages_text

hollow needle
#

But its just an empty text

manic dragon
#

these #text bindings are only available in the content generated by the factory

#

and afaik cannot be used outside

hollow needle
#

This is what I'm doing

"bindings": [
  {
    "binding_type": "view",
    "source_property_name": "(not ((#text - '§e§x§a§m§p§l§e') = #text))",
    "target_property_name": "#visible"
  }
]
manic dragon
#

or use source_control_name to get #text from it's child text

manic dragon
#

are you using rawtext or normal messages

manic dragon
#

add a '§r' at the beginning and it'll work for any text (I hope)

hollow needle
#

Now I did this to test but the text from #text2 is empty

#

This should be supposed to show the text twice

manic dragon
#

you don't need source_control_name here

hollow needle
#

Wait

#

I forgot to do Ctrl + S

#

Let me test something

manic dragon
#

actually to just show #text you don't even need bindings, just typing text: #text will work

hollow needle
manic dragon
#

then use the necessary bindings, it should work

hollow needle
#

Now the text is completely empty here

manic dragon
#

(('§r' + #text) - ('%.33s' * ('§r' + #text))) if that doesn't work

hollow needle
#

I was wondering why almost every character from the original text was still part of the text after the first 30 characters

#

The player's name is also part of the text

#

I'm gonna try adjusting the script for that

manic dragon
hollow needle
#

But why 33?

#

Shouldn't it be 32?

manic dragon
#

§ counts as 2 characters

hollow needle
#

Really?

#

That one indeed worked

#

Thanks

manic dragon
#

np

wintry crater
#

im still confuse using stack panel 😵‍💫, how can i make it like this?

{
    "container": {
        "type": "stack_panel",
        "size": "$button_size",
        "orientation": "horizontal",
        "anchor_from": "center",
        "anchor_to": "center",
        "controls": [
            {
                "image": {
                    "type": "image",
                    "layer": 10,
                    "size": "$icon_size",
                    "bindings": [
                        //binding
                    ]
                }
            },
            {
                "text": {
                    "type": "label",
                    "text": "#form_button_text",
                    "shadow": true,
                    "layer": 10,
                    "color": [
                        1,
                        1,
                        1
                    ],
                    "anchor_from": "bottom_middle",
                    "bindings": [
                        //binding
                    ]
                }
            }
        ]
    }
}
#

i tried using offset but nothings happening

hollow needle
#

Put the entire stack_panel inside the panel

#

So you don't lose the stack_panel properties

wintry crater
#

thanks!

#

last, how can i make the text move to next line?

hollow needle
hollow needle
#

I think the live_horse_renderer doesn't accept int, but when I parse the text in the binding it turns into an int

wintry crater
#

how to remove the outline of button?

vernal storm
wintry crater
#

thanks!

vernal storm
manic dragon
wintry crater
#

im currently using this, how can i control the size of the texture? i want to add keep_ratio to stretch the texture

"$hover_button_texture"
"$default_button_texture"
"$pressed_button_texture"
manic dragon
wintry crater
#

thanks! ill try that

untold dawn
#

this bar is one full image,

wintry crater
#

how to fix this? its annoying

dusty rune
wintry crater
#

hmm not working

wintry crater
#

how to disable button?

manic dragon
wintry crater
#

okay, thanks!

manic dragon
#

no problem

untold dawn
#

is it possible to modify the player extra health? u know when u get health boost or extra hearts how they will fill up the whole screen, i need to know if u can modify them to make them not filling the whole screen

#

react [bao_act_upvote] to this message if its hardcoded and not possible to adjust

oak verge
oak verge
untold dawn
#

or just a custom health panel for the vanilla health bar?

oak verge
#

If there is nothing to copy the heath value from

cunning bridge
#

Did i just accidentally discover the aux ids of custom blocks?

unreal ravine
#

What? Wdym?

cunning bridge
# unreal ravine What? Wdym?

You know about the item renderer ui element?
you give it a number and it displays an item
that number is usually (65536*aux id of the item or block + data value)

for most vanilla items the aux ids are listed in the wiki
for custom items the aux id is placed in the middle of vanilla item (which shifts all the aux ids after)
and as for custom blocks? for a long time no body knew where they are (or they knew but kept it to themselves)
I was experimenting with ui today and accidentally figured out a way to display the aux id of any item including custom blocks

#

In my addon i have 10 custom blocks and the aux ids of them are from -9745 to -9754

#

and they are sorted in reverse alphabetical order, subfolder name included

#

for example:
-9745: shade.json
-9746: sand_pile.json
-9747: fake_ores/redstone.json
-9748: fake_ores/nether_gold.json
-9749: fake_ores/deepslate_lapis.json
-9750: end_eater.json
-9751: empty_jar.json

untold dawn
oak verge
cunning bridge
#

and custom blocks starting at -9745 are far below any vanilla blocks to cause any shifting issues

wintry crater
#

is there a way to make multiple tabs for server form?

tab 1 only shows
button 1-5

tab 2 only shows
button 6-10

unreal ravine
#

Yep

unreal ravine
#

It is possible

oak verge
#

#1280301965271896124
Check this for example

wintry crater
#

thanks!!

cunning bridge
# oak verge Oh, good to know

I was trying to extract the item aux id of a specific inventory slot and display it as a label for a project, when i was successful i tested a few items to see their ids when i realized i could see the ids of custom blocks too

oak verge
#

You can get the aux id?

whole jasper
wintry crater
#

is there a way to make a custom slider that does something every time I change the slider value?

manic dragon
wintry crater
#

is modal form also use the long_form for server form?

wintry crater
#

thanks!

rough drum
#

Is it possible to control the camera using only a resource pack?

river flower
#

I hate how laggy cameras are when they are server sided

sinful crypt
#

I dont think so

viral oxide
#

Does anyone know how to make hover_text_renderer localize the text thats set directly via a variable in property_bag?

{
  "1": {
      "type": "button",
      "hover_control": "hover",
      "controls": [
          {
              "hover": {
                  "type": "custom",
                  "renderer": "hover_text_renderer",
                  "property_bag": {
                      "#hover_text": "$hover_text"
                  }
              }
          }
      ]
  }
}
hexed briar
#

didn't know we have JSON-UI with HTML format

viral oxide
#

oh wait 1 sec xD, sorry i work with json-ui with some tooling and forgot to convert it to regular

#

fixed now

wintry crater
#

how can i make the mob effect screen can always open even if player doesn't have any effect?

#

nvm

bright gazelle
#

are there any variables that can be changed in-game besides $pocket_screen and $desktop_screen ?

undone marsh
#

To detect the type of input

bright gazelle
undone marsh
bright gazelle
undone marsh
bright gazelle
river flower
#

Okay so I needed a form where the buttons are pretty small; 20x20px and there'd be 30 buttons in a row, and 60 rows all show at once

#

Would that cause fps lag 😅

#

1800 buttons shown at the same time

manic dragon
#

I'm pretty sure that'll cause lag while opening the form

#

but using grid is better in this case

#

grids are well optimized

weak cape
river flower
river flower
#

Or actually

#

It'll be completely transparent

#

But the hover will just have a square border

#

It'll be like showing the outline of the button when you hover over it

wintry crater
#

is it possible to disable a button based on its name? for example, if the name includes the word "disable", the button will be disabled(not clickable)

weak cape
wintry crater
#

okay, ill try that, thanks!

bitter ether
#

does anyone know how to hide the border of a slider?

manic dragon
bitter ether
safe wing
#

is there a single way to make client side json ui contact with server side js

slim forge
unreal ravine
#

Bro intellectual 🙏

torpid whale
#

Is it possible to edit the intro of minecraft bedrock?

torpid whale
#

Yknow like the red background with Mojang studios on it

dusty rune
#

you can't

sinful crypt
#

actually you can

whole jasper
sinful crypt
#

Inside game directory maybe

#

i saw someone doing

#

But idk

dusty rune
#

the imagine doesn't even exists in the pack from what I see
I only saw it somewhere inside the game data

sinful crypt
#

@delicate lotus did this

#

ask him how to edit the screen

dusty rune
#

duh I don't need it

#

just sayin

delicate lotus
#

just not with addons

torpid whale
#

Edit game files?

delicate lotus
#

yea

#

look

dusty rune
#

yeah that's what I meant

torpid whale
#

Oof, im on an android 💔

delicate lotus
#

editing this image is the most you can do

#

gl on android

dusty rune
#

The fact you can even edit friends icons in the files lol

delicate lotus
#

lol

#

and server images

torpid whale
#

Can't change that image into a video i presume?

delicate lotus
#

nope

#

also thats not even the whole screen

#

i changed it to blue once and its just a box around the text

torpid whale
#

Bummer

delicate lotus
#

yea

torpid whale
delicate lotus
#

yeahhhhh

#

same

wintry crater
#

uhhh how to format the name of buttons

#

server form buttons

manic dragon
wintry crater
#

i already fixed it 😁

valid swan
#

  "[email protected]_button": {
    "$button_content": "chat.copy_image",
    "$pressed_button_name": "copy_coordinates_button",
    "$focus_id": "coordinate_copy_button_focus_id",
    "$focus_override_left": "coordinate_dropdown_focus_id",
    "$focus_override_right": "paste_button_focus_id",
    "$focus_override_down": "text_edit_box_focus_id",
    "bindings": [
      {
        "binding_name": "#copy_button_enabled",
        "binding_name_override": "#enabled"
      }
    ]
  },

Is it possible to use this in any text_edit_box?

#

@rocky quail ?

floral iron
#

Uhg. Entire night of digging through inventory screen to completely remove crafting in survival.. and came to the conclusion that it's easier to just hide the recipe book contents. Couldn't figure out

  1. how to make the inventory default to the Survival tab, because even with the recipe book panel disabled in survival it still defaults to it and throws the inventory alignment off

  2. re align the inventory

wintry crater
#

how can i make a preserve title text that acts like a normal title? like it also disappears after a few sec

river flower
#

So you can use animations to scale it into nothingness after 3 seconds

#

Or you can just send another title that's empty (behavior pack)

verbal remnant
#

Hello, I created a button in JSON UI in the chat_screen. Is it possible to run a command without clicking on it?

manic dragon
frigid drift
#

h

#

"buttons_grid": {
        "type": "grid",
        "size": ["100%", "100%c"],
        "grid_dimensions": [3, 3],
        "grid_item_template": "ec_shop.items_button",
        "grid_fill_direction": "horizontal",
        "grid_rescaling_type": "horizontal",
        "anchor_from": "center",
        "anchor_to": "center",
        "factory": {
            "name": "buttons",
            "control_name": "ec_shop.items_button"
        },

        "collection_name": "form_buttons",
        "bindings": [
            {
                "binding_name": "#form_button_length",
                "binding_name_override": "#maximum_grid_items"
            }
        ]
    },

    "items_button@common_buttons.light_text_button": {
        "$pressed_button_name": "button.form_button_click",
        "$button_text": "#form_button_text",
        "$button_text_binding_type": "collection",
        "$button_text_grid_collection_name": "form_buttons",
        "bindings": [
        {
            "binding_type": "collection_details",
            "binding_collection_name": "form_buttons"
        },
        {
            "binding_type": "collection",
            "binding_condition": "none",
            "binding_collection_name": "form_buttons",
            "binding_name": "#form_button_text"
        },
        {
            "binding_type": "view",
            "source_property_name": "(not ((#form_button_text - 'ec.shop.item') = #form_button_text))",
            "target_property_name": "#visible"
        }
        ]
    },

i have this problem wherein i hide the buttons that are not ec.shop.item, it works, but as I make my Minecraft fullscreen it shows the other buttons. it only applies on grid tho. is there a fix for this?

manic dragon
frigid drift
manic dragon
#

Yes

frigid drift
#

one sec

#

same error occurs

broken trail
#

its probably some issuse related to screen stacking, and the best part is its because of oreuI

#

in previous death screen it was alright

manic dragon
#

Ghost buttons or smth

#

Also doing #visible in elements of grid will just make them invisible but their space will still be occupied

frigid drift
hexed briar
#

though generally it's likely failed to load due to screen stacking and missing certain property that leaves the screen once damaged.

#

since Ore-UI load them above the JSON-UI ones anyways, that's why it doesn't hide element or affect them.

wintry crater
wintry crater
#

uhhhh this thing?

manic dragon
#

Yep using entity and materials

wintry crater
#

wait what.... how how how???? 😯

broken trail
broken trail
broken trail
broken trail
#

probably, but its sucks ngl

#

old school jsonUI didnt have such problem

wintry crater
#

how did you make it display on your hud?

hexed briar
#

they don't, but does have a certain bugs for it randomly.

#

most noticable one is not able to respawn and stuck on that respawning.

broken trail
wintry crater
#

wait, so you can also change paper doll entity like the live_horse_renderer?

wintry crater
#

that's soooooo cool!

manic dragon
# wintry crater wait, so you can also change paper doll entity like the `live_horse_renderer`?

It's kinda like this
You add some models, render controllers and animation for the things you want to display (let's say direction)
You add these things in the player.entity.json file and render it when the player model is being rendered as a part of UI (q.is_in_ui) and some other conditions also

In the hud screen you add the paper doll, which has the models that you want to render then offset the paper doll so it's not visible and only the models are shown in the screen

#

And that moving direction thing is one large image that is being wrapped with help of materials and depending on camera_rotation

wintry crater
#

paper doll disappears after a few sec, right? how can i make it always show?

manic dragon
#

hud_player_renderer disappears after a while
But live_player_renderer and paper_doll_renderer doesn't so you can use those

wintry crater
#

ohh i see, okay thanks!! ill try that

wintry crater
#

ahhh so the model(for example the compass bar) is gonna be part of the player entity and i need this q.is_in_ui thing to be able to render it like as paper doll?

wintry crater
#

i did it! now i need to figure out how i can make it scroll/rotate

wintry crater
#

entity

hardy lily
#

use "-query.camera_rotation(1)" at y axis

wintry crater
#

okay, ill try that

#

how can i make it cut the paperdoll?

oak verge
#

You can't

wintry crater
#

🙁

verbal remnant
#

Hello, I created a button in JSON UI in the chat_screen. Is it possible to run a command without clicking on it?

broken trail
broken trail
wintry crater
wintry crater
broken trail
#

are they idiots or what?

#

this is literally vanilla code

#

who the hell even approved these ugly spaces between buttons

left yew
#

Its horrible

broken trail
#

I hope guys from mojang see this piece of shit