#calling on a JSON UI using scripts
1 messages ยท Page 1 of 1 (latest)
activated with using a custom item
the custom ui is a modified server form file
namespace is of "server_form"
how could i cativate this ui using my custom item instead of a regular form?
anyone?
I can explain how it's done but I can't show you ๐คก
You need a binding within the server_form checking for the title. Then you just need to set that same title you set in the json file in the .title() of your ActionForm. Once you've done that, your custom form should display instead of the default server form.
So, how about opening many different forms?
You'll have to create additional json files. From there you pretty much have to reference each and every form you're trying to use inside of the server_form file. I actually managed to find some of my old code but here's how you go about creating a custom form that you can use from another json file.
"controls": [
{
"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": "server_form.long_form_panel",
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "((#title_text - 'custom_form') = #title_text)",
"target_property_name": "#visible"
}
]
}
},
{
"custom_form@custom_form.main_panel": {
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "(not ((#title_text - 'custom_form') = #title_text))",
"target_property_name": "#visible"
}
]
}
}
]```
From the code I provided of course you'll need the extra file I mentioned with the namespace being "custom_form" and you'll need to reference the file path inside of the ui_defs.json file so that the game can also find that file ๐
well you'll have to add more to the source_property_name to make sure it filters out the other custom forms
like custom1, custom2
yeah, you can keep doing that technically
it's all about making sure the source property name is correct otherwise it wont work
I've always hated figuring out how to write that part properly though
You're welcome ๐ I'm trying lol
uh strange
i have an issue
@gusty raft
this is NOT the ui that is supposed to showe
this is the default form which i edited
i used what you told me
the file of the custom ui is
"doll.json"
it is defined in ui defs
"controls": [
{
"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": "server_form.long_form_panel",
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "((#title_text - 'custom_form') = #title_text)",
"target_property_name": "#visible"
}
]
}
},
{
"custom_form@custom_form.main_panel": {
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "(not ((#title_text - 'custom_form') = #title_text))",
"target_property_name": "#visible"
}
]
}
}
]
}```
used this
I would lend you mine to make an advanced one, but I find it difficult to understand
thats ok
the one im working with is pretty advanced too.
"source_property_name": "(((#title_text - $maps) = #title_text) and ((#title_text - $emojis) = #title_text) and ((#title_text - $cosmetics) = #title_text) and ((#title_text - $grid) = #title_text) and ((#title_text - $rank) = #title_text) and ((#title_text - $rules) = #title_text)))",
this is a snippet from server form
various custom ui forms
this is default
so i dont have to do any special title things to get this
i made a large grid form
that i am trying to call on
but dont know hopw
I will send mine in a file, for you to study
What is the problem?
the problem is this
the title is "custom_form'
which should trigger my custom grid form
and is not
I understand that you want to call the UI, but I don't understand where it is
Oh, I think I understand
Do you want to change the name "custom_form"?
And that?
I'll give you two ways to fix this
this is what i had before
"source_property_name": "((#title_text - 'grid') = #title_text)",
it just dispolays the text 'grid" rather then actually displaying the UI
I can't understand what you want
Can it be direct?
I don't speak your language and that's making things difficult
all i want is to activate my json grid ui
i dont care how
i dont know how to get it to trigger
i dont mind what method i use
how can i do that
Your interface isn't showing up and you want it to show up, but you don't know why it isn't showing up
And that?
Yes
im so confused
"source_property_name": "((#title_text = 'grid')",
"target_property_name": "#visible"```
taht should work
but it doesnt....
@deep prawn
can i send u the grid form so u can take a look at it
bc i have no damn clue how to fix this
ive been working on this for hours
custom_form@custom_form.main_panel is what you also need to be changing to display different forms
- custom_form is whatever you want to call it
- @custom_form is the namespace at the top of your custom form
- .main_panel is the chunk of code you're referring to from your custom form
tysm
it worked
new problem....
"binding_type": "view",
"source_property_name": "((#title_text = 'grid')",
"target_property_name": "#visible"```
thats what im using
it is showingt my custom form
however it is also showing the default form underneath...
wait nvm i fixed it
๐
๐ glad you got it working
might wanna go careful on the zeqa ui though
How did you get the player to render like that on the top left corner?
Also does that overwrite the doll? That shows up
And is that a stamina bar too?
I've been looking for help on making a stamina bar using scripts but no luck
@ruby moon lol
๐
So happy you got the skidded ui working โค๏ธ
How do you make the player head appear like that on the top left corner?
๐ skidded zeqa
