heyo,
Im creating a game where you basically have to go around having interactions with different people and build friendships, and whatnot. And with that comes that I wish to track all kinds of stats about all the different individuals roaming around that you can interact with - for instance, how many times you made a joke to that person, what their current friendship level is, how many times you failed an interaction, etc, etc.
With my current knowhow - the only method i can think of to actually store all that data, is to create switches and variables specifically for each individual person; and with all that i wish to track, id have about a total of 40ish switches and variables distributed to each person available, and with approximately about 30-40 people, those variables/switches will take up alot of space.
Now ive also thought about something to try to store 4 switches in one variable to make each switch one of the four digits, for example:
if player has ever talked to said person + 100 = true. if player has ever hugged said person + 10 = true. etc. Which would make the variable 0110, which would basically tell me that both those "fake switches" are both true. So for that solution id also like to know if theres a good math solution to efficiently make the game realise that 1000, 100, 10 and 1 are all individual switches. Instead of me having to go through all the trouble of making conditional branches like these:
So bottom line is: Im looking for a way to store alot of data, without having to make a ton of variables, and switches.
Im creating a game where you basically have to go around having interactions with different people and build friendships, and whatnot. And with that comes that I wish to track all kinds of stats about all the different individuals roaming around that you can interact with - for instance, how many times you made a joke to that person, what their current friendship level is, how many times you failed an interaction, etc, etc.
With my current knowhow - the only method i can think of to actually store all that data, is to create switches and variables specifically for each individual person; and with all that i wish to track, id have about a total of 40ish switches and variables distributed to each person available, and with approximately about 30-40 people, those variables/switches will take up alot of space.
Now ive also thought about something to try to store 4 switches in one variable to make each switch one of the four digits, for example:
if player has ever talked to said person + 100 = true. if player has ever hugged said person + 10 = true. etc. Which would make the variable 0110, which would basically tell me that both those "fake switches" are both true. So for that solution id also like to know if theres a good math solution to efficiently make the game realise that 1000, 100, 10 and 1 are all individual switches. Instead of me having to go through all the trouble of making conditional branches like these:
Code:
conditional branch:
if $gameVariable.value(24) === 1000 || if $gameVariable.value(24) === 1100 if $gameVariable.value(24) === 1010 if $gameVariable.value(24) === 1001 if $gameVariable.value(24) === 1110 etc etc
Switch 1 = on
So bottom line is: Im looking for a way to store alot of data, without having to make a ton of variables, and switches.