Unique Item ID Lottery Draw

I would like to request a script that assigns an item ID for each item gained (including instance items). The ID may or may not be displayed in the description window. I prefer a the ID to be upto 10 digits like XX-XXX-XXXX-X. The format can be set.

I will be using this for a ticket lottery draw. Similar to that in Pokemon Ruby Sapphire Emerald Shopping Lottery.
I think this can be done with a single variable.

Unless you also wanted to add prizes for when the last 3 or so digits match (like in Pokémon), in that case, you need as many variables as there are digits, e.g.
\V[1]\V[2]-\V[3]\V[4]\V[5]-\V[6]\V[7]\V[8]\V[9]-\V[10].
I think you should clarify what you want, especially as each item already has a unique ID, the ID assigned to it in the database. Why can't you use that as that would be auto-assigned and help if you ever want to access its item data?
@Andar I think the thread poster talks about an ID number like Pokémon's Trainer ID number: a five-, later six-digit randomly-generated number used to identify exchanged Pokémon.
Several Pokémon games have a Pokémon Lottery Corner where another ID number is generated and if it matches yours, you win a prize.
I would like to request a script that assigns an item ID for each item gained (including instance items). The ID may or may not be displayed in the description window. I prefer the ID to be up to 10 digits like XX-XXX-XXXX-X. Similar to that in Pokemon Ruby Sapphire Emerald Shopping Lottery.
Started to attempt this. Done for Actors so far...

Spoiler
1587208452489.png
...attempting items now... but that is a whole different process.
@Andar I think the thread poster talks about an ID number like Pokémon's Trainer ID number: a five-, later six-digit randomly-generated number used to identify exchanged Pokémon.
Several Pokémon games have a Pokémon Lottery Corner where another ID number is generated and if it matches yours, you win a prize.

I tried eventing, but i need the item ID to be attached to actual items that can be viewed in the Scene_Item. I was able to mimic the system already but lack the actual "verification"

Started to attempt this. Done for Actors so far...

...attempting items now... but that is a whole different process.

thanks , but i cannot access the plugin atm..
i need the item ID to be attached to actual items that can be viewed in the Scene_Item.
that is what I was talking about - the item IDs of the database ARE attached to those items, in fact that is how the entire engine works - it always works by ID only. So why can't you use the existing item IDs from the database?
I have a plugin-less solution:
  1. Have 21 variables: 10 are the digits of your character's Trainer ID-esque number, 10 are the digits of the lottery's number, and the 21st is to count how many digits match.
  2. At the start of the game, set the player ID like I previously set, i.e. \V[1]\V[2]-\V[3]\V[4]\V[5]-\V[6]\V[7]\V[8]\V[9]-\V[10].
  3. For the lottery, randomly give a value from 0 to 9 for variables 11 to 20 and type it on the text box as such: \V[11]\V[12]-\V[13]\V[14]\V[15]-\V[16]\V[17]\V[18]\V[19]-\V[20].
  4. Check if variables 1 and 11 are identical; if yes, increase the value of variable 21 by one. Repeat the same for whether var 2 and 12 are identical, then 3 and 13, and so on.
  5. Depending on the value of variable 21, which should be a value from 0 to 10, give the player a prize.
thanks , but i cannot access the plugin atm..
Yep that is correct the plugin is not quite released yet.

Only able to test right now. Stay tuned. 🙂
Spoiler: Screenshots
1587268126584.png


1587268164242.png


It is basically done though I think... That seem about right so far?
Yep that is correct the plugin is not quite released yet.



It is basically done though I think... That seem about right so far?

yes just liked that! i like how it is displayed in the help window. the item IDs are attached upon obtaining the new item. i dont have instance items actually in my own game, but i think it would be nice if it is compatible with instance items (like in pokemon each trainer have their own IDs even having the same name).

I just thought there should be a note tag to exclude some items from having an unique ID. thank you very much for taking on this request.
bump! is the script available for public? thanks
bump! is the script available for public? thanks
Still not even close to near the standards I would like but...
...since I haven't really worked on it much more...
I'll release it the way it is at least for now 😉

Now Released: https://ct-bolt.itch.io/rmmv-draw-lotto-plugin
i downloaded the demo and i get errors when i talk to the NPCs. draw actor lotto and draw item lotoo. the ID lotto is not show in help window too. i can wait for the exclude some items from getting lotto ID. and i have not found any instance item plugin for MV.

Original thread: https://forums.rpgmakerweb.com/threads/unique-item-id-lottery-draw.120339/