Let's say you have the following note on your items:
<mynum:5>
and you use a Select Item command, placing the item id into variable 15.
You could get mynum from the selected item with the following script:
$dataItems[$gameVariables.value(15)].meta.mynum
Note that there should be no space between the : and the 5 (otherwise you'd have to trim it to be able to use it).
But again, because you won't tell me what you're actually trying to achieve here, and won't give me the screenshots I have requested several times, that is the best I can give to you, and hopefully you will be able to figure out how to turn that into something you can actually use, without making mistakes.
Hi yes sorry for not being clear. I am essentially trying to implement numeric values in items and use simple math to manipulate items as a puzzle. Put in simple is that I want to perform math for items using simple math. Does it make sense ?
For example, I wanted to assign value (should numerical in order to do math late) into item (see attached)
Then I wanted to either compare, add, substract into new variables or under if condition
Here what I did
I assigned <mynum:5> into item 1
I assigned <mynum:3> into item 2
Then I wanted to use if condition to use simple math (+) and if condition
For example, first, if item 1 value + item 2 value > 10, do xxx
I used the following codes
If $dataItems[$gameVariables.value(1)].meta.mynum + $dataItems[$gameVariables.value(2)].meta.mynum > 10;
second, if item 1 value < item 2 value, do XXX
I used the following codes
If $dataItems[$gameVariables.value(1)].meta.mynum < $dataItems[$gameVariables.value(2)].meta.mynum;
Third, create new item using script or new variables using script and then use simple math (+) and if condition
$dataItems[$gameVariables.value(10)].meta.mynum= $dataItems[$gameVariables.value(1)].meta.mynum + $dataItems[$gameVariables.value(2)].meta.mynum;