MZ SRD Hud Maker Ultra custom code Help

I'm trying to make custom battle hud work with custom condition, but I can't. It works well with any preset conditions, but when I try to use custom code it seems not to work. I read so many pages and copied a lot of diferent scrip calls, but hud just doesn't show as soon as I put any custom code in condition even like "1 + 1 === 2". Am I missing something? Is there any special syntax? Please help... ;_;;_;;_;
2024-09-19_10-44-36.png

2024-09-19_10-52-33.png


2024-09-19_10-49-09.png
I think it should be javascript code, "1+1 = 2" is not a code, also I think it should have "==", not "===", but not sure it a problem or not. What condition are you trying to put there...?
I think it should be javascript code, "1+1 = 2" is not a code, also I think it should have "==", not "===", but not sure it a problem or not. What condition are you trying to put there...?
I try to show screen variable for every battler on his turn. Like if current actor is Actor ID 1, then show Variable, if Actor 2 then show another variable and so on. I tried something like:

Code:
BattleManager.actor() && BattleManager.actor().actorId() === 1

and many other things, but no success with any code. ((
Can you try this?

Code:
$gameParty.battleMembers()[1]

or this:

Code:
$gameParty.members()[0]
Just tried with two party members in battle. It doesn't show the variable (
$gameParty.battleMembers()[1]
2024-09-19_12-08-26.png
What about the second code?

Code:
$gameParty.members()[0]
$gameParty.members()[0]
Also nothing((
That's weird 🙁 Can you please make sure that after disabling that code conition the text is on the screen?
That's weird 🙁 Can you please make sure that after disabling that code conition the text is on the screen?
Yes, I removed display condition and now the text is visible on the battle screen...
Then try now with a simple condition, like the switch one:

Code:
$gameSwitches.value(X)

Then turn on the switch X and check if it works.
Then try now with a simple condition, like the switch one:

Code:
$gameSwitches.value(X)

Then turn on the switch X and check if it works.
Doesnt work with any switch number(
In such a case, I would look for the cause in something else, it seems that no condition simply works for some reason. Do you use other plugins? Try to disable each of them one by one and check if the condition works, maybe there is a conflict between the plugins.
I think what is going wrong is the logic applied.

If you are using code, I suppose it is checking if the code is returning true.
So simply using $gameVariables.value(1) would not do the trick.

I suppose you would need to write it conditionnally :
JavaScript:
let i = 1 + 1;
if (i == 2){return true);
I think what is going wrong is the logic applied.

If you are using code, I suppose it is checking if the code is returning true.
So simply using $gameVariables.value(1) would not do the trick.

I suppose you would need to write it conditionnally :
JavaScript:
let i = 1 + 1;
if (i == 2){return true);
OMG, it works!!! Thank you very much guys for the help!

Original thread: https://forums.rpgmakerweb.com/threads/srd-hud-maker-ultra-custom-code-help.172002/