Script evaluating quantity of an item type +

I am trying to make an item category, as the player accrues more of these type of items the chance of something bad happening through common event increases. I am concerned with figuring out how to have the item category evaluated.

There may be a better way of wording my query, and i may have missed the information somewhere, but any help would be appreciated.

Thank you
There will be a script call you can put in the Control Variables command that can count them up. But what do you mean by "item category"? Do you mean like Key Item 1 and Key Item 2, or are you using note tags? Or are you talking about weapons or armors that have 'types'? Can you give an example and maybe a screenshot of your Item tab if it's something that's not obvious?

How many different items will be in this category? If only a few you could use just a few Control Variables commands and not need a script call.
Screenshot (2).png


Let me know if you need more detail.

I think notetags might be the most versatile route, but i had also considered using the key items, but again, i am not sure which would be optimal for doing what i am looking to do.

Ideally I would like to make all consumable items fall into the same item type.

This would make a soft limit on the recovery and "Magic one use" items that results in active debuffs.

I hope i am making sense.

Thank you for your help.
I think i have figure things out. Thank you so much.
If you're still interested, this is not difficult to create with events only, but it does require a little more patience to calculate the number of items.
After adding all this up, it is necessary to use the value to make a draw (random variable).
The only way I thought now would be like this:
Spoiler: Example of Idea
Code:
Var Item-Unlucky1 = Item A
Var Item-Unlucky2 = Item B
Var Item-Unlucky3 = Item D
Var Item-Unlucky4 = Item H
Var Item-Unlucky5 = Item I
Var Item-Unlucky6 = Item J
Coment: join all unlucky-items in one variable
Var Itens-Unlucky += Item-Unlucky1
Var Itens-Unlucky += Item-Unlucky2
Var Itens-Unlucky += Item-Unlucky3
Var Itens-Unlucky += Item-Unlucky4
Var Itens-Unlucky += Item-Unlucky5
Var Itens-Unlucky += Item-Unlucky5
Var Itens-Unlucky += Item-Unlucky6
Conditional Branch: Itens-Unlucky =< 10
   Coment: Low Unlucky
   Var Randon = 1..1000
End
Conditional Branch: Itens-Unlucky >= 11
   Conditional Branch: Itens-Unlucky =< 20
      Coment: Low Unlucky
      Var Randon = 1..700
   End
End
Conditional Branch: Itens-Unlucky >= 21
   Conditional Branch: Itens-Unlucky =< 30
      Coment: Med Unlucky
      Var Randon = 1..200
   End
End
Conditional Branch: Itens-Unlucky >= 31
   Conditional Branch: Itens-Unlucky =< 40
      Coment: Normal Unlucky
      Var Randon = 1..100
   End
End
Conditional Branch: Itens-Unlucky >= 41
   Conditional Branch: Itens-Unlucky =< 50
      Coment: High Unlucky
      Var Randon = 1..70
   End
End
Conditional Branch: Itens-Unlucky > 50
   Coment: Very High Unlucky
   Var Randon = 1..30
End
Coment: Conditions "Unlucky"
Conditional Branch: Randon = 1
   Coment: Setup Uncluky Type 1
End
Conditional Branch: Randon = 5
   Coment: Setup Uncluky Type 2
End
Conditional Branch: Randon = 15
   Coment: Setup Uncluky Type 3
End
Conditional Branch: Randon = 25
   Coment: Setup Uncluky Type 4
End
I'm away from my computer right now, so I'm sorry that I can't make a more accurate example.
This is great, and I think it will work great! I will play with it and keep you posted.

Original thread: https://forums.rpgmakerweb.com/threads/script-evaluating-quantity-of-an-item-type.135340/