Hi! Thanks for taking the time to read this meow.
I am wondering how to make an enemy drop a "variable" instead of an "item". Say you are fighting a creature your character might like the meat of, and you win the fight, and instead of getting an item that says "random creature meat" you get a variable drop in it's place, and you can cook it and eat it at a different location later. It could drop like an item in that it could be 1/55 chance of dropping.
If need to be more descriptive please tell me, meow.
Well, considering that an item is a variable, you definitely need to be more descriptive. I mean, how is it different if the thing that drops is called "random creature meat" or "variable xyz"? In both cases you can cook and eat them at a different location later, as long as you implement the cooking & eating feature properly.
But regardless of what it is you're trying to achieve, I think you could create a simple "meat" item and give it a <variable> metatag. After that, all you need to do is look for meta.variable and attach whatever extra data you want onto the object.
Since save games are created by serializing the variables into JSON, the extra data will also be saved with the item.
Ok, let me be more descriptive..
I do not want the drop I am describing to be an item you can select from the "Item" tab in any menu. I realize there is Hidden Items as well..
I have a system in place where you can go buy food items from a shop and instead of receiving an item, you just add to a variable. You can use that item and take away from the variable. But, what I would like is instead of buying an item, just be able to add to a variable in the place of buying the item from a store. I hope this makes more sense, meow.
Meow i would just let enemy drop an item as usual, and then modify BattleResult a little.
For example, instead of saying "Got 1 Potion" i will store total number of Potions into var[1]
and make it say "Total Potion/ Meat/ Whatever = 88 + 1"
Hmm, purhaps I can run a common event that takes the item away, and turns it into a variable +1.