Sooooooo… its been a while so lemme see if I can still explain things.
I’m working on this system where there are unique enemies with different stats, which need to be referenced and effected while the system is running. When an enemy is “chosen” I have a property for each of its stats, just to keep it easy, however since I have a multitude of different enemies having 8 stats each, and I have to work within the property limit having 8 properties per enemy isn’t gonna cut it.
Right now I have a property per “area” which holds enemy stats in a fashion like this: Frog|20|15|7|5|3|8|100||Bunny|15|5|3|1|8|11|100
Each number represents a stat (all separated by | and enemies are seperated by ||. When an enemy is chosen, all of its stats are moved from this to a property per stat, making the full system have 12 properties total.
Now this works and all but also working with stats as shown in the above paragraph is really sticky and annoying. If anyone has any better suggestions on how to store them I’d be glad to hear them P
Uhhhh it’s been like 10 days so I’m gonna bump this-
idk if its cause no one has any solutions for it or it was just lost in the depth of help posts BUT if goes another ~10 days without a solution i’ll probably just close it
It’s probably 'cause there aren’t a ton of active technical users right now.
But from what I’ve read here, the way you currently have it setup is probably the best way you could do it without using an excessive amount of memory or encroaching on the property limit.
One thing you could do to make things slightly easier on yourself would be to have 8 properties for each enemy that is currently relevant, and just slot the stats for that enemy into those properties when said enemy becomes relevant.
(I’m a little confused on what you need help on)
Do you only need help figuring out how to store the information in a way that is more readable and clear (instead of the | and || formatting)?
Or do you also need help with the randomization (choosing an enemy to “spawn” and referencing their stats when doing so)?
Or decreasing the number of properties used (instead of 8 properties per enemy)?
Or a better system for editing and reading the different stats?
This one (sorry if I wasn’t clear its been a while lol).
The way I have works, and is fairly okay with memory but its a hassle to work with and was wondering if anyone more technical than me had any better ideas.
That’s what I figured.
I thought so too but a second opinion never hurt anyone.
You could try having the stats all stored in a separate property instead of stuffing them into one property. For example you could have one property that stores all of the enemy’s data of one type. For example you could have one for storing all of the enemy’s names, and one for storing all of the enemy’s health. That way you could just make it so you could just find like item 2 of all the properties, and that would give the enemy’s name, health, etc.
Does that make sense? Or do I need to explain it better.
His problem is whenever he wants to refer to an enemy stat, he has to pull a substring from that enemy’s property, and when he wants to change the stat, he needs to do some shenanigans with concatenation to change one specific stat.
Hmmm y’know how those “save codes” we made here are a jumble of numbers that mean certain stats?
would it be possible if you just make that same result and mess around with the numbers
or is that limited to the player when they finish, Because from my immediate assumption rn I feel the Save code system makes a custom jumble based on your stats. and not already a pre-existing jumble of numbers?
I think I remember what you’re referring to. I think the save codes were a fairly advanced mechanism that was essentially just a compression algorithm. However, compressing and uncompressing the stats would likely take up more memory and be more difficult to manipulate than his current system.
He mentioned this earlier, and commented that this would require a lot of memory for each stat, and he would be encroaching on the limit for properties.
The part that is hard to access and change is any individual stat on its own.
I think this topic was solved a while ago actually, we’re just waiting on OP to mark a solution.