MV SRD's Menu Status Customizer Error

Hello, I'm trying to use this script, but I keep getting an error when opening my menu.

Error.png


Here are the custom fields I've used:

Custom Stats.png


And here are the plugins I'm using:
Plugins installed.png


(There are two not shown at the top: CP_Star_Passibility_Fix and CP_Large_Sprite_Fix).

Any help would be grand!
I'm not a coder, but I suspect SRD's menu plugin clashes with other menu plugins.
Also happens to me when using SRD SuperTool to customize battle aesthetic, while also using other battle plugins.
Copy the project folder, try to turn off or delete other menu plugins in the copied project.
That way you can find which plugins clashes with SRD's menu.
Hope it helps!
I turned them off one-by-one, but the error still persists.

Thanks though!
The first three Eval fields are incorrect, you need a plus sign to join the values together e.g.
Code:
"Strength: " + actor.atk
Then if the actor has, say, 25 ATK, this will display in-game as Strength: 25. 🙂

Not sure about the Status 4 Eval, since the code is cut off. 😅
The Status 4 Eval is:

actor.weapons()[0] ? actor.weapons()[0].name : "None"

That's not showing up at all.

(I also don't know what it would be called for armor and accessory)
👋 That looks OK to me (I just tested it in the console to be sure). It should show the name of the first equipped weapon, or "None" if no weapons are equipped. Things to check:
  • Do any of your weapons have a blank name?
  • I notice you've got it displaying on row 13, maybe that's outside of the visible area? Try temporarily swapping weapon and agility, i.e. weapon at row 3, column 3; agility at row 13, column 1.
You can reference armors (and/or weapons) like this:
JavaScript:
var slotId = 1; actor.equips()[slotId] ? actor.equips()[slotId].name : "None"
Here, slotId is a temporary value used for convenience. It corresponds to the Equipment Types list defined on the Types tab in the database. slotId starts at 0 (weapon); slot 1 is either an armor or a weapon depending on whether they're dual-wielding; slots 2+ are armors. 🙂

(Certain plugins might affect this, but looking at your plugin list I don't think you're using anything like that.)
Nothing is showing.

NOTHING SHOWING.png


Here are the plugin deets:
Locations.png


custom example.png
It might not be showing because "row 4" is outside of the visible area.

Just as an experiment, try putting one of these Statuses that don't show up
in row 1 - 3 and see if it shows then.

For instance, try swapping the Locations of Status 4 with 1.
It still doesn't show up.
@StrawberrySmiles What Caethryl said, on

var slotId = 1;
actor.equips()[slotId];

slotId = NOT 1, but slotId while that is called from "var slotId"
else you dont use the "var slotId" =)

read carefully 🙂
Code:
var slotId = 1; actor.equips()[slotId] ? actor.equips()[slotId].name : "None"

I entered this exactly as written and put it into row 1, column 1 -- yet nothing shows up. I tried changing the 1 to 0 (for weapons) and other numbers, but... I get the same result...
Yea, ShadowDragon's suggestion shouldn't change the result of the eval: the variable is just for convenience, so you only have to edit one value rather than two. 😅

Status 1 is displaying correctly, right? In that case, try temporarily changing Status Eval 1 to this:
JavaScript:
actor.equips()[1] ? actor.equips()[1].name : "None"
Do not change Status 1 Location from its current value! Save your project and test. If that doesn't work then I'm out of ideas. 😴
Whoa! It shows up! Thanks! I wish the icon was there, but this is pretty good!
I suspect the problem was that you hadn't swapped the status locations as suggested, but rather tried to set two different status locations to the same thing, and that resulted in a conflict causing only one of them to display. 😅

As for the icon, it looks like SRD's plugin allows escape codes (like \i[x] to draw an icon) so long as you set the corresponding Status X Codes parameter to true. With that in mind, you could try setting an Eval field to something like this:
JavaScript:
var e = actor.equips()[1]; e ? '\\i[' + e.iconIndex + '] ' + e.name : '\\i[0] None'
Change the 1 if you want to reference a different equip slot, otherwise I think it should be good~
That worked perfectly as well!

Thanks!!

Original thread: https://forums.rpgmakerweb.com/threads/srds-menu-status-customizer-error.128287/