Inventory & % Chance


#1

Hello,

I’m making a survival based CoG, but I can’t figure out the inventory. Thought about doing this:
Water Purifier: No/Yes
Firestarter: No/Yes

But that seems too simple. Plus, i want there to be matches, a water purifying device, iodine tablets, different kinds of clothing, ect. & I want to make each firestarter have a different chance of working, the clothing affect how fast your heat/cold stats go up/down, & things like that.

Any tips?


#2

Are you asking how the variables should work? Or, are you asking how to have the inventory displayed?


#3

I guess both. New to this program :frowning:


#4

Variable-wise, boolean variables are a good way to go. (True/False Variables are fine.)

For how to display it in the Stat Sheet…That is a bit different. I’d probably use a series of *if statements built into a series, so that it displays the items whose variable are ‘yes’ on a list. But…I’ve never done an inventory in the Stat Sheet, so I’m not sure if I’m the best to answer the programming side of the question…


#5

You’re better off using numeric variables for items. That way items can have quantities (e.g. you can specify that the player has 5 iodine tablets, rather than just saying you have/don’t have them) and it will make coding easier. If you ever find yourself asking “should I use a boolean or numeric variable” go for numeric because there is disadvantage in doing so.


#6

Try give it a shot