#Chest Screen

1 messages · Page 1 of 1 (latest)

halcyon kite
#

I have a custom inventory texture and i want to apply it if the name of the inventory is skills but it doesnt work, just doesnt show

halcyon kite
whole topaz
#

Store $container_title in another variable first. Then use that variable in conditions

halcyon kite
#
{
  "namespace": "chest_screen",

  "chest_background_large": {
    "type": "image",
    "variables": [
      {
        "requires": "default",
        "$custom_title": "$container_title"
      },
      {
        "requires": "($custom_title = 'skill_tree')",
        "$chest_texture": "textures/gui/l_skilltree_gui",
        "$chest_size": [ 256, 256 ]
      },
      {
        "requires": "(not $custom_title = 'skill_tree')",
        "$chest_texture": "textures/ui/generic_54",
        "$chest_size": [ 176, 276 ]
      }
    ],
    "texture": "$chest_texture",
    "size": "$chest_size",
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 1
  }
}

#

Like this

whole topaz
#

Where did you find "default" for requires in variables array

Just define the variable normally outside the variables array

halcyon kite
#

That gonna be all?

#

Gonna work?

#
{
  "namespace": "chest_screen",

  "chest_background_large": {
    "type": "image",
    "$custom_title": "$container_title",
    "variables": [
      {
        "requires": "($custom_title = 'skill_tree')",
        "$chest_texture": "textures/gui/l_skilltree_gui",
        "$chest_size": [ 256, 256 ]
      },
      {
        "requires": "(not $custom_title = 'skill_tree')",
        "$chest_texture": "textures/ui/generic_54",
        "$chest_size": [ 176, 276 ]
      }
    ],
    "texture": "$chest_texture",
    "size": "$chest_size",
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 1
  }
}

whole topaz
#

yeah should work

halcyon kite
#

Thank i

#

U

whole topaz
#

np

halcyon kite
whole topaz
#

What's your code?

halcyon kite
tulip void
#

Maybe try changing the layer @halcyon kite

tulip void
whole topaz
#

oh I totally forgot about this

#

if the code is the whole chest_screen,json file then that is the reason
it needs to be in some way included in the screen element

halcyon kite
#

that was my issue

#

What should i do

halcyon kite
#

(Chatgpt code)

halcyon kite
tulip void
halcyon kite
#

how should it make the chest screen

whole topaz
#

What were you trying to do?