#JSON-UI General

1 messages · Page 42 of 1

lean estuary
#

how do i remove the ugly black background from the jukebox popup text?

placid geode
lean estuary
placid geode
#

"hud_actionbar_text": { "alpha": 0 }

#

or "hud_actionbar_text": { "texture": "" }

lean estuary
#

what a smarty

#

thank you very much

placid geode
#

yep

whole jasper
#

What is contained used for?

cunning bridge
#

i have no idea, there is no documention for it anywhere

whole jasper
ashen lantern
#

is it possible to build this?

untold dawn
#

unless if u can modify the oreUi

#

unless...

hybrid bear
#

im pretty sure you can still modify that panel but not add custom functions to it

untold dawn
hybrid bear
#

yeah

untold dawn
# hybrid bear yeah

unless, if u can make specific images from the hudscreen visible only when u go to the inventory screen (possible or not, idk)

#

and making the hudscreen always visible (possible)

dusty rune
#

Stuff like this is like
it's possible but you don't know how or why

ashen lantern
#

i mean this

scarlet sequoia
dusty rune
#

gonna guess you want me to do the json ui stuff
no I don't really accept proposals

#

plus not that expert tbh

#

I have damn one issue I still don't know how to fix

#

told ya my answear

scarlet sequoia
#

i dont wanna dirty the json ui channel about not related stuff thats why i do dm thank you for replying

dusty rune
#

ay it's fine
I'm just busy guy that's all I guess

timber harness
#

is it possible to make custom server form without interfering other custom form? (different pack)

timber harness
#

how

#

is it work for other packs

tall trellis
#

wheres the block , view xbox profile etc buttons located?

vernal storm
#

How to move it

manic dragon
#

You can't. That's hardcoded

wintry crater
#
"background": {
    "type": "image",
    "size": [
        "100%",
        "35%"
    ],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "texture": "textures/ui/Black",
    "alpha": 0.7
}

is there a way to change the size value depending on the device? It's too small on mobile, but it looks fine on pc.

oak verge
#

is this the right way of doing this or is there a better way?

  • edit the vanilla toggles so only one can be active at a time
  • make the toggles into buttons that hide it current panel and show the next/previous panel
viral oxide
#

I think you’re describing radio toggles, and yeah that’s possible

viral oxide
oak verge
true elm
#

why to use sliders @oak verge

oak verge
#

eh, never worked with sliders so i am not sure how to achieve that with them

wintry crater
#

how can I make my button show all the text? right now, it stops at "p" and the rest "qrstuvwxyz" isn’t showing.

sick shell
#

that is how npc button text is programmed somehow

#

idk why they did that

outer stag
#

I made a UV animation for the hud_screen that shows up, but it's stuck on the first frame. Has anyone had this issue before?

outer stag
#

Do aseprite animations play on the hud?

dusty rune
#

it works but uhh
not expert but I wanted the thing to be vertically, it's horizontally rn
Anyway lol, guess it's up to how you did it

untold dawn
#

the new copper golem is kidna interesting, the way he function is by checking if the container has a specific item or not, which we did get the ability to do a while ago,

#

like they gave us the ability to check if the container has a specific item or not, and after a while they added the copper golem that just do that

#

was that a teaser or something?

dusty rune
#

Let them cook

#

Wait this is the first time I see this lmao

outer stag
dusty rune
outer stag
outer stag
#

It'd be weird if that'd worked, because in the past it's only worked vertical for me

dusty rune
untold dawn
#

uh, is it possible to change the game volume via scripts?
-# stupid question, just like the asker

outer stag
untold dawn
outer stag
untold dawn
untold dawn
#

i need to sleep

dusty rune
#

sounds like ui related still

#

I can confirm

untold dawn
#

i also hope that mojang add one single simple thing to the jsonUi, which is: detecting the player dynamic properties to do something to the ui (show/hide images for example)

dusty rune
#

imagine if player gets like a tag, image shows
instead of spamming title

untold dawn
#

like instead of using titles or chatmessages, we can use something like a dynamic property and change its value using scripts to control the images

dusty rune
#

you know there's one thing I hate about titles in fact

hexed briar
#

-# feeling funny might open-source the undertale textbox thing /jk

outer stag
#

Thanks for your help!

dusty rune
#

if you press F1, like hiding ui stuff

#

the title thing won't show during it

#

making images not appear evenn if you press F1 again

#

I hate that

hexed briar
#

you can disable that i think

dusty rune
#

How da hell

#

I need the source

hexed briar
#

ah yeah found it

#

it's my source

untold dawn
hexed briar
#

joke aside — if you're using root_panel as a base. this element has a bindings that changes it's visibility.

The workaround? don't use the root_panel element i guess lmao

dusty rune
#

damn that leaves with another issue

how do I make more than one image appears

#

if I won't use that

#

hmmmmmmmmmm

#

wait how tf do I even do title thing without that

hexed briar
#

this also not just have visibility with f1 and stuff, this also carries with hud alpha (that slider on video settings that changes the HUD transparency)

dusty rune
#

thanks for the hint I guess

hexed briar
#

instead

#

just use hud_content

#

instead of root_panel

#

that'll work too

dusty rune
#

hmmmm

#

I will keep that in mind

hexed briar
#

i also made a funny thing with UT/DR dialog that allows me to move anywhere with just numbers on actionbar

untold dawn
#

so i have this thing:

  "loop_size":{"anim_type":"offset","duration":1,"from":[0,"-100%c"],"to":[0,"-100%c"],"next":"@hud.loop_size"},
  "weak_damage_hide_anim":{"anim_type":"wait","duration":0,"destroy_at_end":"chat_grid_item"},

  "weak_damage_panel":{
    "type":"panel",
    "anchor_from":"center",
    "anchor_to":"center",
    "layer":0,
    "size":["100%","100%"],
    "controls":[
      {
        "weak_damage_image":{
          "type":"image",
          "texture":"textures/ui/damaged/damaged",
          "bindings":[
            {
              "binding_type":"view",
              "source_property_name":"('@' + #text - 'Hello' - 'xVisWeakDamage' = '@' + #text)",
              "target_property_name":"#destroy"
            },
            {
              "binding_type":"view",
              "source_property_name":"(not #destroy and not ('@' + #text - 'xVisWeakDamage' = '@' + #text))",
              "target_property_name":"#visible"
            }
          ]
        }
      },
      {
      "weak_damage_hide":{
          "type":"collection_panel",
          "size":[0,0],
          "factory":{"name":"empty","control_name":"hud.weak_damage_hider"},
          "bindings":[
            {
              "binding_type":"view",
              "source_control_name":"weak_damage_image",
              "source_property_name":"(#destroy * 1)",
              "target_property_name":"#collection_length",
              "resolve_sibling_scope":true
            }
          ]
        }
      }
    ]
  },
  "weak_damage_factory":{
    "type":"panel",
    "controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","control_name":"hud.weak_damage_panel"}}}]
  },
  "weak_damage_hider":{
    "type":"panel",
    "anims":["@weak_damage_hide_anim"]
  },```that show/hide images using chatmessages, but it has one issue
#

the image will be flashing when u send any message

dusty rune
#

wha

hexed briar
#

my discord is not rendering those code.

dusty rune
#

that's the one thing holding me back from this

untold dawn
elder tapir
#

Heya! Does anyone here have a tip how I could hide the title background if the subtitle has a specific text?

hexed briar
#

with like couple of images.

elder tapir
#

damn, that's cool

dusty rune
#

put them anywhere

elder tapir
#

Ideally, I'd like to hide the background of the title, but not the subtitle - as that's the only thing actually containing text

dusty rune
outer stag
#

Is there an animation play_event for when the element becomes visible? So it always resets and starts over when it becomes invisible and visible again?

hexed briar
elder tapir
untold dawn
dusty rune
#

you could normally disable it in game settings

#

or that ui thing

elder tapir
#

Yeah, it's an accessibility setting

outer stag
untold dawn
dusty rune
#

true

elder tapir
untold dawn
dusty rune
untold dawn
hexed briar
outer stag
hexed briar
#

haven't tested it but should in theory be.

elder tapir
untold dawn
hexed briar
#

if you want the opposite,

"hud_title_text/title_frame/title_background": {
    "bindings": [
      {
        "binding_name": "#hud_subtitle_text_string",
        "binding_name_override": "#text",
        "binding_type": "global"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not((#text - '<your text to hide.>') = #text))",
        "target_property_name": "#visible"
      }
    ]
  },```
hexed briar
untold dawn
#

its better than hiding the background completely

elder tapir
#

My confusion was around how I'd target the background of the title based on the subtitles text :p
This makes it quite a bit clearer, thanks!

hexed briar
dusty rune
#

I'm just expert with json entities that's it lol
to the point I'm creating funny stuff without scripts like fully working sidewalks bit of offtopic I guess

#

I feel sleepy

outer stag
#

I'm just searching right now, could screen_animation_reset do it?

#

But I think that is for the whole screen, not just one element, so it probably doesn't reset when it's made invisible and visible again?

#

It feels like there has to be a good way to send a trigger for an onscreen animation.

hexed briar
#

title and actionbar has them.

#

but you can certainly change animations within conditions.

#

so there's not much needed.

dusty rune
#

holy shit

outer stag
#

If I create a factory for the element, and then create an instance from the factory, it will reset automatically when visibility changes?

hexed briar
dusty rune
#

This is so peak

hexed briar
#

btw screen_animation_reset resets animation when the screen is unloaded.

outer stag
#

I have very limited experience with factories.

hexed briar
#

that might not help anything too much tbh.

#

since hud does not unload.

untold dawn
# hexed briar since hud does not unload.

hmm, is it possible to render an image from the always visible hudscreen only inside the inventory screen?
-# once again, stupid question bec the answer is 90% no

hexed briar
untold dawn
#

-# another stupid question

#

-# i need to sleep really bad lmao

hexed briar
outer stag
hexed briar
#

but you can overlay behind the screen.

outer stag
hexed briar
#

it doesnt help much tbh

untold dawn
#

probably no, bec they've not connected

hexed briar
#

and screens do not get collapsed each other.

#

so no, probably not.

#

doesnt matter if you have like layer 999999 or not

outer stag
#

Thank you so much.

hexed briar
#

it will not work.

untold dawn
# hexed briar they're screens.

hmm, what about adding a new image using a new file (_ui_defs.json thing) and use inventory_screen to render it and the always rendering hudscreen to control it?

hexed briar
#

it's like 2 html pages trying to combine into one.

#

which, obv not possible.

untold dawn
#

-# im just making sure

outer stag
hexed briar
#

honestly i don't know why people are skipping factories everytime they're working on title.

#

while yes, they work. but they do not work as mojang intended which, is actually from factory.

outer stag
hexed briar
#

though actionbar is the only thing that required you to have factory since there's no bindings for that.

outer stag
#

99% of my JSON UI knowledge comes from hitting things with a rock and finding stuff that works some of the time.

#

That's not a way to be proficient or efficient in anything you make.

hexed briar
#

I'll add a small tutorial about how to add custom title and stuff properly in the future if I'm not busy though

#

it's obviously gonna be on wiki.

#

maybe how to render images and stuff with that aswell

outer stag
#

I also hope that what I said didn't come off as shaming or passing off resposibility; the people in this discord & especially you have already done so much for that issue. I owe so much that I have learned to this community.

#

I was more intending to say that all of the effort is just unfortunately not enough; there is just too much to cover and not enough time and effort to do so.

sick shell
#

What is this? Only used in server form.. most probably ModalFormDataSliderOptions.valueStep?

wintry crater
#

is it possible to render the hotbar when the server form is open?

rocky quail
manic dragon
wintry crater
#

okay, thank you!

hoary orbit
wintry crater
untold dawn
# hexed briar I'll add a small tutorial about how to add custom title and stuff properly in th...

is it possible to make this stack factory:

  "weak_damage_factory":{
    "type":"panel",
    "offset":[0,"100%"],
    "controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","control_name":"hud.weak_damage_panel"}}}]
  },
```stack two images using one chtmessage instead of sending two?
clever maple
# hoary orbit

bruh xD, I had the same idea but I gaved up bc of the custom blocks they use too much performance

vernal storm
#

Does anyone have a hive server style scoreboard? (use titleraw to display)

red creek
#

Why do multiple buttons keep appearing? There are only 3 in the script

neat sequoia
#

Anyone knows why my scroll has a empty space??

gusty tide
manic dragon
broken trail
manic dragon
#

The binding #form_button_length gives the correct value once at first but then for some reason it gives incorrect value which generates those ghost buttons

#

So when binding condition once is applied the binding maximum_grid_items update only once that is with the correct value of form_button_length

vernal storm
clear lantern
#

I have question, because I've never worked with draggable stuff: Can I use draggable for example on some image and detect if it it's positioned in the right place? Like for Memory game?

manic dragon
#

I don't think so

dusty rune
#

How to make animated ui frames vertical?
It's horizontal rn and I don't really know how to change that

#

I could be blind dunno

hardy lily
#

Like this:

Oak log x1 | $1

neat sequoia
vernal storm
red creek
#

Is it possible to do something like this?

sick shell
#

super simple, its just offset anim

#

on a big wall of text inside a panel

hardy lily
inner drum
#

How would i make this entity not be able to take damage&knockback??

{
    "format_version": "1.16.100",
    "minecraft:entity": {
        "description": {
            "identifier": "neptune:cratesnpc",
            "is_spawnable": true,
            "is_summonable": true,
            "is_experimental": false
        },
        "components": {
            "minecraft:physics": {
                "has_gravity": true,
                "has_collision": true
            },
            "minecraft:pushable": {
                "is_pushable": false
            },
            "minecraft:push_through": {
                "value": 1
            }
        }
    }
}```
#

whoops wrogn channel

final grove
#

yo

#

any1 know how to make my chat item factory only be fed info that starts with "toast,"

#
        "type": "panel",
        "size": [
            "100%",
            "100%"
        ],
        "binding_condition": "(('%.6s' * #text) = 'toast.')",
        "factory": {
            "name": "chat_item_factory",
            "max_children_size": 1,
            "control_ids": {
                "chat_item": "[email protected]_panel"
            }
        }
    },```
#

this is the factory

#

the issue is i have a custom hud elemsnt controlled by chat (specifically prefix toast. to update it)

#

but the factorykinda sees all chat messages as a update or something of that nature and causes the hud element to flicker

#

esp if i have a repeating command block like this

#

/tellraw @a {"rawtext":[{"text": "toast.hud element"}]}

#

and then someone were to send a chat message that hud element would flicker

hexed briar
#

"binding_condition" is a invalid element property.

#

secondly, that is a binding's property.

final grove
#

ty

#

so whats the solution?

#

im still dont know a whole lot im only trying diffrent things and hoping something works

#

ik what the issue is

#

i need the factory to only revice and be fed "toast." msgs not ALL chat messages

#

i just dont rlly know how to go about that

hexed briar
#

put this on your @hud.test_panel element.

"bindings": [
  { "binding_name": "#chat_text",
    "binding_name_override": "#text",
    "binding_type": "collection",
    "binding_collection_name": "chat_text_grid",
    "binding_condition": "once"
  },
  { "binding_type": "view",
    "source_property_name": "(not((#text - 'your thing') = #text))",
    "target_property_name": "#visible"
  }
]```
final grove
#

alr ill try that and lyk

#

you mean toast. right

#

when u put "your thing"

hexed briar
#

literally.

final grove
#

alr heres what i got

#
        "type": "panel",
        "size": [
            "100%",
            "100%"
        ],
        "bindings": [
  {
    "binding_name": "#chat_text",
    "binding_name_override": "#text",
    "binding_type": "collection",
    "binding_collection_name": "chat_text_grid",
    "binding_condition": "once"
  },
  {
    "binding_type": "view",
    "source_property_name": "(not((#text - 'toast.') = #text))",
    "target_property_name": "#visible"
  }
],
        "factory": {
            "name": "chat_item_factory",
            "max_children_size": 1,
            "control_ids": {
                "chat_item": "[email protected]_panel"
            }
        }
        
    },```
hexed briar
#

...

final grove
#

i added those bindings u provided to the factory

final grove
final grove
#

mb lol

#

anyways this is what i have for test_panel

#
        "type": "panel",
        "anchor_from": "top_right",
        "anchor_to": "top_right",
        "size": [
            "100%",
            "100%cm + 0.5px"
        ],
        "bindings": [
  { "binding_name": "#chat_text",
    "binding_name_override": "#text",
    "binding_type": "collection",
    "binding_collection_name": "chat_text_grid",
    "binding_condition": "once"
  },
  { "binding_type": "view",
    "source_property_name": "(not((#text - 'your thing') = #text))",
    "target_property_name": "#visible"
  }
],
        "controls": [
            {
                "[email protected]": {}
            }
        ]
    },```
#

the issue seems to be persisting

#

do you wanna see the full file? maybe i meessed sum up

hexed briar
#

you forgot to rename the your thing

final grove
#

😂

#

ok im actually stupid td sorry lol

hexed briar
#

jesus christ mate

final grove
#

mb bro i barely had no sleep 🙏

#

i was up all night on a survivial world 💀

dusty rune
#

Hey chill of course this whole thing is complicated

#

still don't know how I somehow learned this

final grove
# hexed briar you forgot to rename the `your thing`
        "type": "panel",
        "anchor_from": "top_right",
        "anchor_to": "top_right",
        "size": [
            "100%",
            "100%cm + 0.5px"
        ],
        "bindings": [
  { "binding_name": "#chat_text",
    "binding_name_override": "#text",
    "binding_type": "collection",
    "binding_collection_name": "chat_text_grid",
    "binding_condition": "once"
  },
  { "binding_type": "view",
    "source_property_name": "(not((#text - 'toast.') = #text))",
    "target_property_name": "#visible"
  }
],
        "controls": [
            {
                "[email protected]": {}
            }
        ]
    },```
#

this should be it?

hexed briar
#

all i did is just gave a code example and where to place, and yet fumbled the entire thing atp idk anymore

hexed briar
final grove
#

alr

final grove
dusty rune
final grove
#

yeah ive only just recently started

dusty rune
final grove
#

thanks

dusty rune
#

np mate

final grove
#

i found a great example in #1072983602821861426 and kinda reverse engineered it and learned a few things

#

just cant get over this one error

#

its fustrating beacuse i KNOW whats causing it i just dont know how to fix it

hexed briar
#

send me a file

final grove
#

dms or here?

hexed briar
#

ill check in next few mins since my game is crashing all over again

final grove
#

alr ill dm it\

#

nvm looks like im not able to

#

ill just send it here

final grove
hexed briar
#

i def disabled dm here ig

#

ill check it in few mins

#

if i can get my game working ofc

final grove
#

alr thx man just lmk

final grove
#

@hexed briar did u find the issue that was casing it

#

sorry to bother

hexed briar
#

the game still not working.

#

Where did you get this UI from?

#

it's looking oddly too advanced and not extremely friendly to modify with.

untold dawn
#

technically it is possible, but kinda glitchy

#

since i have some codes that will make an image visible and trigger its animations, but its kinda bugged now bec for some unknown reason u cant use more than one 'next' on the animation, so all u can do with that thing animations is fade in/out

hexed briar
#

fyi i done quite alot with chat messages but idk where did this guy get a UI from.

hexed briar
untold dawn
hexed briar
#

this one is actually readable JSON-UI file aside from them slapping binding_condition and expecting them to work.

#

even the entire bindings is actually usable.

untold dawn
#

maybe the ai is getting better?
or maybe he's just doesn't know what to do
-# just like me

hexed briar
#

they found it on #1072983602821861426

#

but idk which one.

untold dawn
#

make sense

#

anyways,

hexed briar
#

ain't no way dude just picked a most advanced working chat messages or "notification" and somehow doesn't work on their end.

#

it's funny.

untold dawn
#

i have those codes:
"loop_size":{"anim_type":"offset","duration":1,"from":[0,"-100%c"],"to":[0,"-100%c"],"next":"@hud.loop_size"},
"image_hider_anim":{"anim_type":"wait","duration":0,"destroy_at_end":"chat_grid_item"},
"image_hider_panel":{"type":"panel","anims":["@image_hider_anim"]},

"weak_damage_panel":{
"type":"panel",
"anchor_from":"center",
"anchor_to":"center",
"layer":0,
"size":["20%","20%"],
"controls":[
{
"weak_damage_image":{
"type":"image",
"texture":"textures/ui/damaged/damaged",
"alpha":"@weak_damage_in",
"bindings":[
{
"binding_type":"view",
"source_property_name":"('@' + #text - 'Hello:true' - 'xVisWeakDamage' = '@' + #text)",
"target_property_name":"#destroy"
},
{
"binding_type":"view",
"source_property_name":"(not #destroy and not ('@' + #text - 'xVisWeakDamage' = '@' + #text))",
"target_property_name":"#visible"
}
]
}
},
{
"weak_damage_hide":{
"type":"collection_panel",
"size":[0,0],
"factory":{"name":"empty","control_name":"hud.image_hider_panel"},
"bindings":[
{
"binding_type":"view",
"source_control_name":"weak_damage_image",
"source_property_name":"(#destroy * 1)",
"target_property_name":"#collection_length",
"resolve_sibling_scope":true
}
]
}
}
]
},
"weak_damage_factory":{
"type":"panel",
"offset":[0,"100%"],
"controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","max_children_size":2,"control_name":"hud.weak_damage_panel"}}}]
},
that will make a-

#

an image visible

#

by sending 'xVisWeakDamage' on the chat, twice

hexed briar
#

i can't read.

untold dawn
#

it works fine

hexed briar
#

totally not apparent by sandwiching codes

untold dawn
untold dawn
#

like why does the first 'next' works but the second doesn't?

hexed briar
#

i have no clue what are you talking about rn

untold dawn
#

uh,

red creek
untold dawn
hexed briar
#

"weak_damage_in":"@hud.weak_damage_in"

???

untold dawn
#

my bad lmao

hexed briar
#

which are you displaying though.

untold dawn
#

but somehow it doesn't

hexed briar
#

title or what

untold dawn
#

chatmessages

untold dawn
hexed briar
#

chat messages? yeah maybe

#

i have not encounter any issues with anims not looping so far in my end

untold dawn
#

i tried it in the old system i have, the looping does work

untold dawn
#

like fade in/out or even looping

#

currently, it does fade in/out
but not looping

untold dawn
#

my issue is there lmao

hexed briar
#

it's not like this is my 20th time making another chat messages with factories and not even encounter any animation issue once.

#

chat message supposed to be stack factory.

#

unless you're putting another factories inside it.

untold dawn
hexed briar
untold dawn
# hexed briar You're adding factory inside a factory?

u can see it here ig

"weak_damage_panel":{
"type":"panel",
"anchor_from":"center",
"anchor_to":"center",
"layer":0,
"size":["20%","20%"],
"controls":[
{
"weak_damage_image":{
"type":"image",
"texture":"textures/ui/damaged/damaged",
"alpha":"@weak_damage_in",
"bindings":[
{
"binding_type":"view",
"source_property_name":"('@' + #text - 'Hello:true' - 'xVisWeakDamage' = '@' + #text)",
"target_property_name":"#destroy"
},
{
"binding_type":"view",
"source_property_name":"(not #destroy and not ('@' + #text - 'xVisWeakDamage' = '@' + #text))",
"target_property_name":"#visible"
}
]
}
},
{
"weak_damage_hide":{
"type":"collection_panel",
"size":[0,0],
"factory":{"name":"empty","control_name":"hud.image_hider_panel"},
"bindings":[
{
"binding_type":"view",
"source_control_name":"weak_damage_image",
"source_property_name":"(#destroy * 1)",
"target_property_name":"#collection_length",
"resolve_sibling_scope":true
}
]
}
}
]
},

"weak_damage_factory":{
"type":"panel",
"offset":[0,"100%"],
"controls":[{"weak_damage_sfactory":{"type":"stack_panel","size":["100%","100%"],"offset":"@hud.loop_size","anchor_from":"bottom_middle","anchor_to":"top_middle","factory":{"name":"chat_item_factory","max_children_size":2,"control_name":"hud.weak_damage_panel"}}}]
},

hexed briar
#

Okay so you did put factory inside a factory

#

no wonder why it's broken lol

untold dawn
#

the animation supposed to be like this:
A → B → A → B~ ~ ~
but it works like this
A → B-
it just stop

hexed briar
#

i.e
wait > a > b > loop etc

untold dawn
#

the whole issue is in the 'next' inside the animations

#

like this 'next' does work
"next":"@hud.weak_damage_out"
it does go from the A to B

#

but this 'next' that is inside B
"next":"@hud.weak_damage_in"
doesn't go from B to A

#

the whole 'next' thing doesn't work

#

thats my whole issue

#

i thought it was from the stack factory or from the panel or whatever the hell that is,
but it was from the image animations, it just doesn't work right for absolute no reason

untold dawn
# hexed briar i.e wait > a > b > loop etc

even if i make an animation with 3 points
A - starts
B - wait
C - ends
so it should go from A to B to C
but it stops at B bec the 'next' that will make the animation go from B to C doesn't work
-# trying to explain the issue.

hexed briar
untold dawn
#

what the actual fuck, it does work now

#

im so freaking confused

hexed briar
#

¯_(ツ)_/¯

untold dawn
#

maybe cuz I changed the texture from my custom image to White?

#

or this animation just somehow fixed it

"weak_damage_in":{
"anim_type":"alpha",
"easing":"linear",
"duration":4,
"from":0,
"to":1,
"next":"@hud.weak_damage_out"
},
"weak_damage_out":{
"anim_type":"alpha",
"easing":"linear",
"duration":4,
"from":1,
"to":0.5,
"next":"@hud.weak_damage_i"
},
"weak_damage_i":{
"anim_type":"alpha",
"easing":"linear",
"duration":6,
"from":0.5,
"to":0,
"next":"@hud.weak_damage_in"
},

#

idk im so confused, hold on lemme try it again

hexed briar
hexed briar
#

yeah i can't replicate the issue still

untold dawn
#

im so damn confused

hexed briar
#

this is def your end rn it seems. i suggest you rewrite it lol.

#

i can't replicate the issue no matter what i do so, i don't have a clue how to fix it.

untold dawn
#

-# idk why i made the file as javascript

hexed briar
untold dawn
#

so u can see the code better and try it

#

bec it works and it doesn't work at the same time

#

like the codes are quite unstable

#

especially for the first image, sending a message will make it flickering, so i have to render the second one by lowering the entire factory and sending two messages to render the unaffected image.

hexed briar
#

you wrote the code

untold dawn
#

currently, leave the offset inactivated

untold dawn
untold dawn
hexed briar
#

idk

#

im feeling sleep as heck rn

#

maybe later

untold dawn
# hexed briar maybe later

try the codes later, they do work (make the image visible by sending 'xVisWeakDamage' and making it invisible by sending 'Hello:true'
but its animations are bugged, that's all.

wintry crater
#

is it possible to get specific scoreboard value and use it as text value?

mortal monolith
#

Helo

#

Is it possible to play an animation when a toggle is pressed?

wintry crater
#

how to increase scoreboard limit? currenlty it only shows 15 lines

manic dragon
#

It's in the scoreboards.json file where there's the factory that generates these lines

wintry crater
#

okay thanks! i can't find a way to remove that at the moment, so I'll experiment with it later

vernal storm
#

What should I do if two form servers conflict?

coral solstice
vernal storm
final grove
clear lantern
#

Can someone explain me how the factories work and give an example how to implement them in server forms?

untold dawn
# hexed briar

hmmm, fuck the hide method, show me how did u do this and if i can use it to render my images without causing lag (like the image is keep generating by sending any messages but it wont be visible only when u send a specific message) bec that is the old system, which is quite laggy

untold dawn
# hexed briar lol no

if i use stack factory thing to render the images with the animations and give it 10 max child thing, it will generate the image normally but it will keep generating it by sending any chatmessage, right?
like i have sent one chatmessage to render the image, and after i send the other 10 my first image will be hidden or not?

#

-# sorry if my questions/explanations needs alot of explanations, im kinda drunk currently bec i have a stupid otitis media

hexed briar
#

wrong time to ask.

untold dawn
#

after i gave it that max child thing

#

i think it will work better with stack factory, lemme try it ig

untold dawn
#

its not happening bec of the image destroy system or anything related to the image itself

#

so all i have to do is try changing the stack factory system from the current one:

"weak_damage_factory": {
"type": "panel",
"offset": [0,"100%"],
"controls": [
{
"weak_damage_sfactory": {
"type": "stack_panel",
"size": ["100%","100%"],
"offset": "@hud.loop_size",
"anchor_from": "bottom_middle",
"anchor_to": "top_middle",
"factory": {
"name": "chat_item_factory",
"max_children_size": 10,
"control_name": "hud.weak_damage_panel"
}
}
}
]
},

to something better

oak shoal
#

Is there any way I can modify the UI that shows the vanilla hearts? For example, if the player has a hunger effect, I want the heart to be green.?

frigid drift
#

how to get rid of the extra spaces? i just made the button start from collection index 6

"dynamic_button": {
    "type": "stack_panel",
    "size": ["100%", 32],
    "orientation": "horizontal",
    "controls":[
      {
        "form_button@common_buttons.light_text_button": {
          "$pressed_button_name": "button.form_button_click",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "size": [ "100%", 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_name": "#collection_index",
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
                },
                {
                "binding_type": "view",
                "source_property_name": "(not (#collection_index < 5))",
                "target_property_name": "#visible"
                }
          ]
        }
      }
    ]
  },
frigid drift
#

what part

#

oh wait

#

i see

#

thanks

hybrid bear
#

okay

untold dawn
untold dawn
#

like its not working properly, keep crashing the game

hexed briar
#

can i like

#

do my own things uninterrupted.

untold dawn
#

at least tell me what i have done wrong with this

  "waok_damage_panel":{
    "type":"panel",
    "layer":0,
    "size":["20%","20%"],
    "controls":[
      {
        "waok_damage_image":{
          "type":"image",
          "texture":"textures/ui/White",
          "anims":["@weak_damage_in"],
          "bindings": [
            {
              "binding_type": "view",
              "source_property_name": "(#text = 'xVisWeakDamage')",
              "target_property_name": "#visible"
            }
          ]
        }
      }
    ]
  },
  "waok_damage_factory":{
    "type":"panel",
    "anchor_from":"center",
    "anchor_to":"center",
    "size":["100%","100%c"],
    "controls":[
      {
        "waok_damage_sfactory":{
          "type":"stack_panel",
          "anchor_from":"bottom_left",
          "anchor_to":"bottom_left",
          "factory":{"name":"chat_item_factory","max_children_size":3,"control_name":"hud.waok_damage_panel"}
        }
      }
    ]
  },
hexed briar
#

or i have to maybe use discord ignore thing.

untold dawn
hexed briar
#

gotta love that I'm getting pinged for 5th times IN A DAY even though im busy asf

untold dawn
#

uh,

hexed briar
#

"oh lets ping harlow more just to help me fix my own factory panel for 5th times today"

#

yeah dude

#

jesus christ

untold dawn
#

umm, then just don't help igbao_icon_entities

#

or respond or anything

hexed briar
#

my brother in christ, you PINGED me. 5TH TIMES

#

don't do that maybe

untold dawn
#

alright, I'll keep trying ig

lethal wind
#

does anyone know how to fix this? im trash at json ui

#
"hud_actionbar_text": {
    "type": "image",
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "offset": [
      4,
      -10
    ],
    "size": [
      "100%c + 12px",
      "100%c + 5px"
    ],
    "texture": "textures/ui/hud_tip_text_background",
    "alpha": "@hud.anim_actionbar_text_background_alpha_out",
    "controls": [
      {
        "actionbar_message": {
          "type": "label",
          "anchor_from": "left_middle",
          "offset": [
            8,
            0
          ],
          "anchor_to": "left_middle",
          "text_alignment": "left",
          "color": "$tool_tip_text",
          "layer": 31,
          "text": "$actionbar_text",
          "localize": false,
          "alpha": "@hud.anim_actionbar_text_alpha_out"
        }
      }
    ]
  },
  "hud_actionbar_text_round": {
    "bindings": [
      {
        "binding_name": "(query.scoreboard('round_show') == 1)",
        "binding_name_override": "#visible"
      }
    ],
    "type": "image",
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "offset": [
      4,
      -10
    ],
    "size": [
      "100%c + 12px",
      "100%c + 5px"
    ],
    "texture": "textures/ui/hud_tip_text_background",
    "alpha": "@hud.anim_actionbar_text_background_alpha_out",
    "controls": [
      {
        "actionbar_message": {
          "type": "label",
          "anchor_from": "left_middle",
          "offset": [
            8,
            0
          ],
          "anchor_to": "left_middle",
          "text_alignment": "left",
          "color": "$tool_tip_text",
          "layer": 31,
          "text": "$actionbar_text",
          "localize": false,
          "alpha": "@hud.anim_actionbar_text_alpha_out"
        }
      }
    ]
  },

and...

#
{
        "hud_actionbar_text_area": {
          "type": "panel",
          "factory": {
            "name": "hud_actionbar_text_factory",
            "control_ids": {
              "hud_actionbar_text": "[email protected]_actionbar_text",
              "hud_actionbar_text_round": "[email protected]_actionbar_text_round"
            }
          }
        }
      },
#

im trying to make it so the round counter actionbar only shows when ur round_show score is 1

#

and im also tryna make it separate from the normal actionbar

#

but it aint workin

#

anyone know why?

neon slate
#

Has anybody got a ui template for a custom block

fresh summit
#

How the _ui_defs.json actually works The literal inside is like this:
"ui_defs": [
"ui/bosses_bar.json"
]
And inside the ui folder
is _ui_defs.json
And
example.json
But it doesn't read that. I've already tried setting it as a hud screen, and it works if I change it to hud_screen , but I want to make it more organized, so I want it to read it with _ui_defs, but it doesn't work. Please help me 😿

clear lantern
#

Where I can find json ui for Camera item? Or is there possibility to add/make screenshot in the server forms? So it will add to portfolio or in the folder with ss?

limpid solstice
#

seems familiar 🤨

chilly yacht
#

Whole year ago bro

wintry crater
#

how can i split text on the action bar? like

actionbar text "text1::text2"

label_1
text1

label_2
text2?
floral iron
#

Is there a more efficient way of doing server forms other than the visible property? If I understand correctly it will render all of them, then hide the ones that don't match. Seems like a pretty bad limitation if we want more than one or two new forms.

south ravine
#

is it possible to make 2 different resourcepacks with server form work together ?

hardy lily
south ravine
#

complicated as in will it make other issues ?

hardy lily
# south ravine how ?

I don't know how to tell you, because the complex part is knowing the server pack resource code. Because that's another hard part

#

if you don't know how it's works and how it's behave, then you may break the form

#

anyway, you can split the resource only and then UI pack only. make sure the UI pack only is on top

#

assuming the resource only doesn't have UI form and it's component inside

sullen falcon
#

@normal moat sry for @,but i really want u help me. I want modify item hover text,i tried edit ui_common.json(highlight_slot_panel)but not use. The effect I want is to be able to add more elements to the hover panel. please save me.tks alot

normal moat
sullen falcon
#

@normal moat please save me!

sullen falcon
normal moat
#

I said I can't help, I'm busy. Just ask here and wait for an answer

whole jasper
#

How does the server/realm know what global resourcepack we are using?
I use "coordinates hud" which displays coordinates even though the server has that feature turned off, that's against the rules, but how does the server know?

graceful veldt
#

Yooo that's me... don't use that pls.

unreal ravine
graceful veldt
unreal ravine
fresh summit
#

How the _ui_defs.json actually works The literal inside is like this:
"ui_defs": [
"ui/bosses_bar.json"
]
And inside the ui folder
is _ui_defs.json
And
example.json
But it doesn't read that. I've already tried setting it as a hud screen, and it works if I change it to hud_screen , but I want to make it more organized, so I want it to read it with _ui_defs, but it doesn't work. Please help me 😿

manic dragon
#

do it like this:

{
  "ui_defs": [
      "ui/bosses_bar.json"
  ]
}```
worn raptor
manic dragon
wintry crater
#

how do I add a background image to labels?

clear lantern
#

Is there possibility to recreate screenshot button from pause menu into server form? And it should do screenshot like normal one

sick shell
#

No

graceful veldt
oak shoal
#

What is the name of the texture that appears in the background of the inventory? The white part

gray skiff
#

Hello Guys

#

Anyone knows any Sites that can easy build a JSON UI or any wrappers?

#

And how do i even create one, never did it yet.
So is there any tutorial or introduction

cunning bridge
#

I want to ask this again, Can we make a ui element escape its parent? if i have a button and i want the hover control be anchored to the corner of the screen instead of the corner of its parent, how can i do that?

fresh summit
#

I want to change the text font of the boss bar text, do you think this will work?

"boss_name_panel": {
    "type": "panel",
    "size": [
        "100%",
        "100%c"
    ],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "controls": [
        {
            "boss_name": {
                "type": "label",
                "color": "$boss_name_text_color",
                "text": "#bossName",
                "anchor_from": "top_middle",
                "anchor_to": "top_middle",
                "shadow": true,
                "bindings": [
                    {
                        "binding_name": "#bossName",
                        "binding_type": "collection",
                        "binding_collection_name": "boss_bars"
                    }
                ]
            }
        },
        {
            "@bar_progress_revil": {
                "font_type": "MinecraftTen",
                "layer": 20
            }
        }
    ]
}
"bar_progress_revil": {
    "type": "panel",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "offset": [
        -260,
        0
    ],
    "size": [
        256,
        32
    ],
    "bindings": [
        {
            "binding_name": "(#bossName = '§bRevil')",
            "binding_type": "collection",
            "binding_collection_name": "boss_bars",
            "binding_name_override": "#visible"
        }
    ]
}```
hardy lily
#

is it possible to play sound effect using bindings?

wintry crater
#

how can i render player's inventory inside the server form?

hardy lily
#

Ok

hybrid bear
wintry crater
#

okay, will try that later!

wintry crater
#

how can i add a hover text to a server form button?

untold dawn
#

guys, is it possible to make animated images inside the horse screen?

#

bec i tried making one and it just didn't work, like the image or the panel couldn't reach the animation for some reason

unreal ravine
#

I guess, but idk how

oak verge
#

It shouldn't be any different

untold dawn
oak verge
#

Share your code and full error

untold dawn
# oak verge Share your code and full error

uh, its in my laptop, and i have already removed it,
but it basically just doesn't work like the animation is fine, nothing is wrong with the animations but when i try to apply it to the image or panel, it just doesn't work

#

i tried a flip_book animation and alpha
and used "anims":["@flipbookAnim"] and "alpha":"@alphaAnim"

#

and both just doesn't work

#

and the log just says:

| newPanel | couldn't find the animation 'alphaAnim'```
#

something similar to that

thin mantle
#

What's the best way to learn JSON UI?

sick shell
#

There is no best way since learning is subjective, you know yourself better than anyone.

However, if I would need to relearn it again I'd probably go:

  1. Learn JSON (very basic part but crucial to avoid errors)
  2. Head towards the wiki and learn about elements.
  3. Combine those information with your goals/ideas and produce a working UI. The quality doesn't matter.
  4. Repeat until you learn and learn.
untold dawn
frigid drift
#

can i make the uv slice vertically for flipbook anims

lethal wind
#

how do I make a separate actionbar, where it doesn't effect the normal actiobar

jovial hemlock
#

And? Leave it alone, he can sell it for the price he wants, the pack is not for you, you are a developer who knows how to make stuff, this pack is for normal users who doesn’t know anything about UIs

#

Idk why are you blaming him, it’s the customers fault, if he wants to pay a lot of money for that

#

I do have some customers that they do know my services are expensive, but they still decide to hire me because they feel more secure and liked my worked

#

It may look generic for you, but not for them

hexed briar
#

and again, "replicate" people work does certainly not worth more than that.

#

don't exactly have time to argue since i have a job and stuff so get ghosted for now.

jovial hemlock
#

That was the last I looked at this channel a month or so

jovial hemlock
jovial hemlock
wintry crater
#

is it possible to rotate the model of live_player_renderer?

wintry crater
#

pain 🥲

river flower
#

I want to show number in a specific font
How to do it? With glyphs and unicode?

river flower
#

Okay but like-

#

Let's say I am showing #health in label

wintry crater
#

is there an easy way to add padding buttom on the panel?

river flower
#

How do I convert each digit of #health to its unicode

#

"20" -> "\uE002\uE000"
How do I do that (to reference the glyph)

river flower
#

If in this case you anchored your button exactly in the center of the panel, your padding will be 2.5 in each direction

manic dragon
#

Separating the digits is no problem but converting them into Unicode I don't know about that

river flower
manic dragon
#

Yeah

river flower
#

Hmm

#

What if

#

I replace the glyph that minecraft uses to show its numbers?

manic dragon
manic dragon
river flower
manic dragon
#

Yes

river flower
#

Cool

#

What about separating text? Let's say I got text1:text2:text3
And I want to separate it and get the middle one text2

manic dragon
#

There's something in the dev resources for this

river flower
#

Awesomee, can you link it?

#

I've been searching for it in the documentation for a while now lol

hexed briar
#

touch some grass mate

#

atleast i make more than trying to scam people with it ¯_(ツ)_/¯

dusty rune
#

Does anyone know how to remove actionbar background? in json ui

jovial depot
manic dragon
river flower
#

Isn't this a shadow? Why would minecraft have it as a texture-

#

Also is it possible to round up/down or just remove decimal places?

jovial hemlock
manic dragon
manic dragon
river flower
#

Ohh

#

I see

river flower
manic dragon
#

working with floating point is kinda hard as it cuases crash sometimes

#

what are you trying to do with it?

river flower
hybrid bear
#

like im gonna make a script that have prolly millions of different strings to display

#

for the other action bar

manic dragon
river flower
manic dragon
#

aren't you getting the value from scripts?

#

also are the numbers in [0, 100] integers?

river flower
river flower
#

No scripts should be required for this

manic dragon
#

i believe #health isn't a hardcoded binding and also it doesn't give the player's health

river flower
#

Then what does?

#

There must be a way to get the player's health

manic dragon
#

the heart renderer in the hud_screen is a hardcoded renderer and it doesn't even use bindings

#

so idk if there's a way

manic dragon
river flower
wintry crater
#

how can i adjust the clip of this render?

manic dragon
#

make a panel of with the size of the area you want to keep, apply clip_children: true, and put the paperdoll inside that, adjust offsets accordingly

wintry crater
#

ah okay, thanks!

wintry crater
#

how can i get the collection of inventory slots?

#

i want to add some image on it

sinful crypt
wintry crater
#

me trying to change the slot 0 texture

wintry crater
manic dragon
# wintry crater anyone 🥲

one thing you can do is make all the item cells have the image but display it conditionally based on their collection index using #collection_index binding

wintry crater
#

i gave up on editing the inventory ui bao_mob_fox_sleep

wintry crater
wintry crater
#

what's the texture name of this green thing?

dusty rune
#

I think

wintry crater
#

ah okay, thanks! ill try that

wintry crater
#

is this still part of "$item_collection_name": "inventory_items"?

wintry crater
oak verge
manic dragon
river flower
#

Let's say I have 10 separate data I need to transfer to json UI through title

Whcih is better? Sending each data separately in it's own title with a unique identifier as the prefix?
e.g.
sendTitle(data1:<data 1 value>)
sendTitle(data2:<data 2 value>)
sendTitle(data3:<data 3 value>)

OR

a single sendTitle(<prefix for preserving title>: <data 1 value> : <data 2 value> : <data 3 value> : etc)
And I parse it and fetch the data I want?

chilly yacht
#

personally i use a single one since sending each title different ticks is annoying to work with and sometimes doesnt work

sick shell
#

Yeah, you need 1 tick difference per set title

wintry crater
river flower
river flower
river flower
wintry crater
wintry crater
#

who knows the texture name of the green hover in the inventory? i’ve already tried editing every green texture in the ui folder, but none of them worked

manic dragon
wintry crater
#

wait what, thanks! but how can i remove the white outline?

manic dragon
#

That's probably the focus_border_white.png

#

But straight up removing that will also remove the white border from some buttons

wintry crater
#

thanks!

manic dragon
#

That looks nice!

gaunt apex
jovial hemlock
#

And performs better since you are not sending all the data in a single tick

#

Also it shouldn’t be hard to work with that, it’s just skill issue

#

Just send all the data in different ticks

hardy lily
gaunt apex
oak verge
#

how to use size_binding_<x/y> to change size?
also, can it be used in other places? (offset and so on)

neat sequoia
#

whats happens with the new version 1.21.93? my form, my buttons with glyph text is broken

river flower
jovial hemlock
#

Of course depends on how much stuff you call in your sidebar

#

From the api

river flower
jovial hemlock
#

Why?

#

Unless it’s in cache don’t do that

#

For example, calling getAllPlayers(), getAllEntities() and stuff like that takes a lot of ms

#

Now imagine sending all that data per player

river flower
river flower
#

Each player will have their own 'data cache'

#

I'm using dragonfly (software similar to pocketmine), so I'm used to creating caches

manic dragon
oak verge
rancid garden
#

how can I make this animation stop on the last frame?

  "settings_hover_anim": {
    "anim_type": "flip_book",
    "initial_uv": [ 0, 0 ],
    "frame_count": 2,
    "frame_step": 14,
    "fps": 8,
    "reversible": false,
    "resettable": false,
    "easing": "linear"
  },
neon slate
#

I'm struggling with this UI stuff. Anyone able to create a template I want a new table that has 2 inputs to create a recipe like this

whole jasper
#

@manic dragon sorry tag
I want to ask about preserved text which is often used in title

Can preserved text be used to hold the value of a #hover_text?
Because when the inventory slot is clicked, the binding name #hover_text will disappear completely.
I want to hold the previous value so that it doesn't blink, and update the value again when the #binding_name appears again.

manic dragon
whole jasper
#

To control #visible I'm still a bit confused,
because when the #hover_text binding disappears there is no #visible update
and when #hover_text reappears it updates #visible whether it's false or true

#
[#hover_text && #hover_text != #preserved_text]

Maybe this is possible, but it will only update if the item is moved

manic dragon
sinful crypt
#

EchoRif single handly helping the JSON UI community 🫡

manic dragon
#

I only help with the things I know 🙂

rancid garden
#

how can I create state transition flipbook animations?
(I want to play one animation when going from default to hover and another one going from hover to default)

neon slate
#

After a full bloody day learning this stuff (never done it before), seperate inventory space for each block, scrollable bars, all the rest.... finally got all my chest to work. also got my image working too, thanks @versed lichen for the helppul; vids

oak verge
hexed briar
#

Feels like just a glorified donkey/horse screen to me tbh

#

that's only reasonable way to add more slots than chest itself.

#

and since there's many of that chests with diff variants, yeah i can tell why it is loading too long.

broken trail
broken trail
#

because extending default limit simply should not work lol

wintry crater
#

where is entity inventory ui located?

river flower
smoky crystal
#

i made a custom Health HUD that replaces the hearts render, but when i start the game the custom Healthbar UI doesn't appear, ¿some help?

manic dragon
oak verge
versed lichen
rocky quail
neon slate
hexed briar
#

you could just edit donkey entity to have more slots, modify the UI just to display more slots and that would be it.

#

No server crashes or anything whatsoever as they do work like what it should.

#

such a odd oversight but that's pretty much been abused for "chests with more slots" many times now.

wintry crater
#

does the entity inventory also use small_chest in chest_screen.json?

oak verge
oak verge
wintry crater
#

but for "container" type?

oak verge
#

I meant from container_type

wintry crater
#

yeah

"minecraft:inventory": {
    "container_type": "container"
}

does this container type use small_chest?

neon slate
river flower
#
  "icon": {
    "$prefix": "data:",
    "type": "label",
    "text": "#player_health",
    "size": [
      150,
      10
    ],
    "controls": [
      {
        "[email protected]_control": {}
      }
    ],
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "data_control2",
        "source_property_name": "('§z' + (#preserved_text - $prefix))",
        "target_property_name": "#player_health"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#player_health = '§z100')",
        "target_property_name": "#visible"
      }
    ]
  },

The main issue is that it always makes the element not visible even though it shows in text that it's 100

wintry crater
#

Is there a way to change the image size depending on the title? For example, the default size is size: [0, 5], but if the title includes the word 'half', the size changes to something like size: ["50%", 5]?

broken trail
#

but as you said it requires to edit entity

#

I am not sure where entity exactly but I guess its in behaviour pack somehere

hexed briar
#

kinda like player ones

#

although player is more hardcoded so that's why you can't increase it's slot.

broken trail
hexed briar
#

it been like that for years now.

broken trail
#

lol

#

maybe then it's not an issue

hexed briar
#

yeah and it's unfortunately not great either

#

but yeah it works

versed lichen
wintry crater
#

ahhhh finally i did it! entity inventory now shows 5 layers :))

wintry crater
#

100%c means its gonna adopt the size of the elements inside, right?

manic dragon
#

size of all the child elements combined

wintry crater
#

how can i make this container scrollable?

manic dragon
#

Make a scrolling_panel and then put these as $scrolling_content

neon slate
# wintry crater how can i make this container scrollable?

"iron_chest_panel_top_half": {
"type": "panel",
"size": [ "100%", 132 ],
"offset": [ 0, 11 ],
"anchor_to": "top_left",
"anchor_from": "top_left",
"controls": [
{ "[email protected]_label": {}},
{
"[email protected]_scroll_panel": {
"offset": [ 3, -2 ],
"size": [ 170, 110 ],
"$scrolling_content|default": "stylax.iron_chest_grid"
}
},
{
"image_27": {
"type": "image",
"texture": "textures/ui/iron_chest",
"layer": 2,
"alpha": 1,
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [ 72, -30 ],
"size": [ 32, 32 ]
}
}
]
},
"[email protected]_root_panel": { "size": [ 190, 220 ], "$chest_panel": "stylax.iron_chest_panel_top_half" },
"gold_chest_grid": {
"type": "grid",
"size": [ 162, 162 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"grid_dimensions": [ 9, 9 ],
"grid_item_template": "chest.chest_grid_item",
"collection_name": "container_items"

This is what imm using in my iron chest, see the crollable part

neon slate
#

size 32, 32 is what i use to achieve this size

wintry crater
neon slate
#

Ah ok, not a problem, im not a pro at this only started learning yesterday, but if you need help ill try my best

#

all done, not to release it 🙂

neon slate
#

what people thing about the upgrade item texture? too simple?

#

did have this one first?

dusty rune
neon slate
#

oooh great idea, thanks

dusty rune
#

👍

neon slate
#

or maybe diagonal? you choose lol

dusty rune
#

idk up to what you find good

neon slate
#

I'll have a dabble with both

wintry crater
neon slate
#

Yeah it's similar to how some java ones are. But not a direct port of any as there's too many choose from to ask for permission so I've created my own textures and stuff (behaviour)

valid swan
#

How can I leave 1 menu open after interacting with the form button?

surreal ridge
neon slate
dusty rune
#

i like this one

neon slate
#

this one it is then , cheers

wintry crater
#

add glass chest :))

neon slate
#

currently adding these and the double variant

oak verge
#

how would i display an element using preserve text without is getting removed when i display another title.

wintry crater
oak verge
#

wdym?

wintry crater
#

#1394088567281811596 message

oak verge
#

i need the element to not get removed when another title don't have the flag

neon slate
wintry crater
wintry crater
#

its gonna be something like this

{
    "title_1": {
        "$update_string": "update:one",
        "type": "label",
        "text": "#text",
        "controls": [
            {
                "title_1_data_control": {
                    // ...
                }
            }
        ],
        "bindings": [
            {
                "binding_type": "view",
                "source_control_name": "title_1_data_control",
                "source_property_name": "(#preserved_text - $update_string)",
                "target_property_name": "#text"
            }
        ]
    },
    "title_2": {
        "$update_string": "update:two",
        "type": "label",
        "text": "#text",
        "controls": [
            {
                "title_2_data_control": {
                    // ...
                }
            }
        ],
        "bindings": [
            {
                "binding_type": "view",
                "source_control_name": "title_2_data_control",
                "source_property_name": "(#preserved_text - $update_string)",
                "target_property_name": "#text"
            }
        ]
    }
}

this is how i do it, title 1 will show when titles include update:one and if i run another title with update:two, title 1 still showing(no other changes) and title 2 will show

oak verge
wintry crater
#

nothing's gonna happen to the titles

#

to update it, run a title again with "update:one New Text"

#

to remove the title "update:one§z"(this is how i hide the title)

oak verge
#

but the elements will get removed
any work around this?

like for example i want to show a text with 'show-' and only hide it with 'hide-'

wintry crater
#

i still haven't tried that, the only way i hide my preserve title is by adding §z at the end of update string like this "update:one§z" its like empty value

glad sluice
#

@pine matrix

#

this is useing chest ui but it dont work

pine matrix
#

That does not look like a chest to me

dusk drift
#

How to remove the background from entity nametags?

unreal ravine
#

And i dont think is possible to remove it

dusk drift
#

Rayos 😦

unreal ravine
#

Lo siento buddy -\ ( ,/') /-

lean estuary
#

there has to be a place where the background gets set no?

fleet yoke
#

Can anyone tell me if there is a way to drag the coordinate bar to another side?

#

And how?

fleet yoke
wintry crater
#
"more_info": {
    "type": "image",
    "texture": "textures/ui/tooltip_default_background",
    "size": [
        "100%c + 10px",
        "100%c + 10px"
    ],
    "layer": 0,
    "controls": [
        {
            "text": {
                "$update_string": "update:info:",
                "type": "label",
                "text": "#text",
                "layer": 1,
                "controls": [
                    {
                        "subtitle_data_control": {
                            "type": "panel",
                            "bindings": [
                                {
                                    "binding_name": "#hud_subtitle_text_string"
                                },
                                {
                                    "binding_name": "#hud_subtitle_text_string",
                                    "binding_name_override": "#preserved_text",
                                    "binding_condition": "visibility_changed"
                                },
                                {
                                    "binding_type": "view",
                                    "source_property_name": "(not (#hud_subtitle_text_string = #preserved_text) and not ((#hud_subtitle_text_string - $update_string) = #hud_subtitle_text_string))",
                                    "target_property_name": "#visible"
                                }
                            ]
                        }
                    }
                ],
                "bindings": [
                    {
                        "binding_type": "view",
                        "source_control_name": "subtitle_data_control",
                        "source_property_name": "(#preserved_text - $update_string)",
                        "target_property_name": "#text"
                    }
                ]
            }
        }
    ]
}

how can i make my image appears only if my subtitle contains the update string?

whole jasper
# river flower

simple use binding clips and binding color
and you forgot #

wintry crater
#

i changed the position of player_position_text, how can i remove this?

manic dragon
#

Don't change visibility of the image keeping subtitle_data_control as its child
And also subtitle only updates when title does so keep that in mind

#
"player_position": {
 "ignored": true
}

This should remove the current player position text

wintry crater
#

thanks!

#

how to add background image for the elements inside the stack panel?

"background": {
    "type": "image",
    "size": [
        "100%c",
        "100%c"
    ],
    "texture": "textures/ui/tooltip_default_background",
    "layer": 0,
    "controls": [
        {
            "stack": {
                "type": "stack_panel",
                "orientation": "vertical",
                "controls": [
                    {
                        "quest_title@quest_indicator.quest_title": {}
                    },
                    {
                        "quest_objectives@quest_indicator.quest_objectives": {}
                    },
                    {
                        "quest_rewards@quest_indicator.quest_rewards": {}
                    }
                ]
            }
        }
    ]
}

quest_title, quest_objectives, quest_rewards is just a label element

manic dragon
wintry crater
#

like this?

"stack": {
    "type": "stack_panel",
    "size": [
        "100%",
        "100%"
    ],
    "orientation": "vertical",
    "controls": [
        {
            "background": {
                "type": "image",
                "size": [
                    "100%c",
                    "100%c"
                ],
                "texture": "textures/ui/tooltip_default_background",
                "layer": 0,
                "controls": [
                    {
                        "quest_title@quest_indicator.quest_title": {}
                    },
                    {
                        "quest_objectives@quest_indicator.quest_objectives": {}
                    },
                    {
                        "quest_rewards@quest_indicator.quest_rewards": {}
                    }
                ]
            }
        }
    ]
}
manic dragon
#

I meant adding an image for each control of the stack panel
Only then there would be different background for quest_title, quest_objective etc.

wintry crater
#

actually, what I want to do is make my background responsive, so if I add more text, the background adjusts based on the elements inside my stack_panel

#

is that possible?

manic dragon
wintry crater
#

thank you!!!

manic dragon
#

No problem
I got your question wrong the first time

neon slate
wintry crater
#

btw what does cm means in json ui, still centimeter?

manic dragon
#

Width or height of the largest control

wintry crater
#

ahh i see

#

finally bao_ext_toldyouso

#

what is thing called, and in which file is it located?

dusty rune
#

or maybe not dunno I just typed achievement

wintry crater
#

i want learn how to make animation like that pop up achievement thing

safe wasp
unreal ravine
fleet yoke
#

I want to learn more about hud_screen does anyone know where I can learn?

wintry crater
#

how can i get the offhand slot display and render it somewhere?

manic dragon
#

As for the offhand slot you'll need either script or player.entity.json
You can't do that with only json ui

neon slate
fluid obsidian
#

oh just that the chests didn't close when you exited them, and some didn't open till you replaced them

#

but the uis look great if that's what you meant

wintry crater
neon slate
#

And the closing is also fixed. Now closes after exiting the inventory

fluid obsidian
#

oh that's good

wintry crater
#

does collection_name only work with stack_panel?

river flower
oak verge
wintry crater
#

i didn't know that existed, its not showing in my autocomplete, anyway, thank you!!

long torrent
#

not sure if this is the right channel to ask but

is there a way to add custom ui buttons and listen for their click events

manic dragon
lean estuary
#

what’s the variable name for the item name?

#

for inventory count, it is #inventory_stack_size

#

or smth like that

#

what is it for the item name?

floral iron
#

when using

                    "ignored": "$menu_style != 5"

will it skip the creation of all other menus? I remember seeing -somewhere- that the default bahaviour, and a reason not to create too many server forms is that the conditional system will create every form when the script action is called, then conditionally render only the one that is met.. trying to think of a way to avoid wasting memory and processing 😵‍💫

#

It is not currently an issue and I know pre-optimization is usually a waste/etc, but working on the player auction house and banking system which uses HTTP to get from a postgres database and then is pulling in pretty large JSON strings, so I want to absolutely make sure I have the headroom to make that system work

hexed briar
#

I wonder what am i doing rn

#

i think i went overboard with that one.

hybrid bear
hexed briar
#

it's my debugging texts, i did not intend to make it for debug screen

broken trail
hexed briar
#

this also means i can make a several weird text bubbles like maybe hive scoreboard thing without the need to change %. value ever.

#

it has no text limits and works with linebreak (\n), doesn't lag, can use many split texts as you want (maybe 200?)

#

this is basically weeks and months of progress on what am i doing with this with endless crashes and somehow memory leaks.

#

I have stress tested about 20 splitting texts and i seen no lag so far, not even a stutter too.

wintry crater
#

how can i adjust my 1st panel position if 2nd panel appears? like this

#

and if panel 2 disappears, the 1st panel will go back to its original position

broken trail
hexed briar
broken trail
#

idk if its even worth it because of this, in way where you just ignore string when it doesnt match sounds better without any loops etc, however requires more complex logic to script side

hexed briar
#

Currently i have no plans to use this stuff as for now since i'd rather stick with my preferred way to render.

broken trail
hexed briar
#

unless i have no choice to certain projects i work for people

hexed briar
#

alternatively i can use it without factory.

#

but sometimes that doesn't always work due to the fact that i need to increase one character just to make the thing visually change.

broken trail
#

test it with different data every next tick maybe, well I just saw how loops may create lag, and thats why I didn't really try to make it that way

hexed briar
#

while it does look like very complicated, i also make sure that the binding only ran once, so it doesn't loop that often.

hexed briar
#

casually i may also use ignored on bindings aswell just to not make them run in conditions.

broken trail
#

well, if I created such a thing I would test it in literally all ways to see if it doesnt break or crash game and all that stuff

hexed briar
#

same

#

funny that i also got memory leaks during that too

broken trail
hexed briar
#

i also found out that you can combine stuff and bindings would think that it's actual function

#

i.e '%.'+#thing+'s' would make it usable like splitting text for some reason

#

that's where i took advantage of that.

#

and for whatever reason bindings condition may not work if you don't have a space to certain part, idk what weird JSON-UI stuff going on with this

#

i think this probably is gonna be my final of exploring json-ui and go do something else entirely as for now.

fierce tulip
hexed briar
#

i have no use for it.

fierce tulip
#

Haha

broken trail
#

I use something like this in high amount and its working in not only this experssion

#

you can also bind offsets this way btw

hexed briar
#

yeah i did that quite alot

broken trail
#

sizes color whatever

hexed briar
#

for me it still doesn't make sense but if it works, it works lmao

broken trail
#

yea

fresh summit
#

What is the UI file where the frozen effect is located?

unreal ravine
#

Is hardcoded, you cand edit or find it

#

Just the texture in the files

fresh summit
#

Ah, I needed that, because my image has to fill the screen, from corner to corner, do you know how I could do it?

unreal ravine
#

Just use the setting
"fill": true

fresh summit
unreal ravine
fresh summit
# unreal ravine Not really

I set the fill to true, it connects perfectly from side to side but not from top to bottom, ay skipes 38 pixels and it makes it much bigger

unreal ravine
#

Ik, i dont really know how to fix that

fresh summit
#

😓

manic dragon
oak verge
wintry crater
#

lmao that happened to me so many times while editing the inventory ui

#

anyway, is there a way to get the player's pfp from the pause menu and render it in server form?

unreal ravine
hexed briar
hexed briar
#

lemme experiment little bit

#

yeah nevermind no.

#

you can display player's skin instead but not profile icon.

oak verge
oak verge
wintry crater
#

you can use clip

hexed briar
oak verge
#

not all skins are same height tho

fleet yoke
#

Someone who can help me with a simple thing that is how I do for the two bars not bug
((#preserved_text - 'level:') * 1)

oak verge
#

anyway, how do i make a grid of 5xn?

fleet yoke
#

I'm new to json ui

wintry crater
#

how to get the value of server form label?

.title("Title Screen")
.label("test") // this
.button("Play");
wintry crater
#

how about the body?

hexed briar
wintry crater
#

im using ActionFormData

hexed briar
#

i think .label also is a factory thing

#

so yeah its collection index

#

you can fetch form body as usual.

hexed briar
hexed briar
# oak verge

factory is a property where they basically store them as collection index.

unreal ravine
#

Guys I wanna ask something

hexed briar
#

it basically allows you to create mulitple clone of your elements by changing how many indexes you want

unreal ravine
#

How can i prevent server form Close after clicking buttons?

oak verge
unreal ravine
hexed briar
#

this means you can't just fetch and expect it to work without indexes

hexed briar
#

if you wondering what the actual size that the UI rendering, you can use debug property (i.e "debug": "red") to show a element size like a hitbox debug thing.

oak verge
#

oh, didn't know that

#

thanks

hexed briar
#

you can change its color aswell i think

#

red, green, yellow, orange white etc

#

there's a list on wiki in which colors you can choose for debug property.

oak verge
#

i will check that

#

how do i hide an element if it has not text (a form button that was not defined)

wintry crater
#

thanks!!

hexed briar
#

you may need to use dymanic grid order to make the button actually disappear or otherwise it will leave a empty space.

hexed briar
# oak verge dynamic grid?

Dynamic grid fills button and act like stack panel. instead of seeing a dummy buttons, dynamic grid will remove them instead.

#

there's obv few cons - you can't use grid dimensions, which you will have to rely on element size instead.

#

and it can't be vertically filled.

oak verge
#

i am doing
but it is not working

limpid solstice
#

it's impressive

#

the fact that u also know how to do pixel art stuff like texturing

#

and u could even make a model

#

it's impressive really

hexed briar
#
"grid_fill_direction": "horizontal",
"grid_rescaling_type": "horizontal",```
#

to your grid parent element.

#

oh my god i hate discord on desktop

wintry crater
fleet yoke
oak verge
hexed briar
#

you need to replace the size property value to [ "<whatever>", "100%c" ] to make them work properly.

oak verge
hexed briar
hexed briar
#

oh god i messed alot of details

fleet yoke
#

Then I wanted to add another bar but only one appears

hexed briar
#

however, here's the example of dynamic grid because im too focused on many work atm @oak verge

"dynamic_grid_example": {
    "type": "grid",
    "size": [ "100%", "100%c" ],
    "grid_item_template": "namespace.yourelement",
    "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