Script evaluating quantity of an item type +

ChaosGameMaker

Villager
Member
Joined
Apr 10, 2021
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMZ
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
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,665
First Language
English
Primarily Uses
RMMV
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.
 

ChaosGameMaker

Villager
Member
Joined
Apr 10, 2021
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMZ
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.
 

ChaosGameMaker

Villager
Member
Joined
Apr 10, 2021
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMZ
I think i have figure things out. Thank you so much.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
446
Reaction score
197
First Language
PT-BR
Primarily Uses
RM2k3
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:
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.
 

ChaosGameMaker

Villager
Member
Joined
Apr 10, 2021
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMZ
This is great, and I think it will work great! I will play with it and keep you posted.
 

Latest Threads

Latest Posts

Latest Profile Posts

If you're an artist of illustrations, you're doing fine.
If you're an artist of writing, you're doing fine.
If you're an artist of programming, you're doing fine.
But if you are all three above (and more) you cannot allow any distractions in your life.
Anyone had school furniture?
After working out some initial confusion, I managed to get Yanfly's Improved Battlebacks successfully working on a test battle, changing the battleback and getting it to scroll during combat. This means that I can have graphically dynamic battles on moving platforms, like the roof of a train or the deck of a ship/airship...
Place Events Like Tiles Through Replacement, & Take Notes Free Form | RPG Maker News #41

the singularity is upon us:
1621133810311.png

Forum statistics

Threads
111,398
Messages
1,060,810
Members
144,741
Latest member
Styrale
Top