Enemy Stat Storage

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

Uh that’s it.

6 Likes

Do you mean something like a pop-up or a game overlay? I’ve seen games use overlays for stats, for example, like good fighting games.

1 Like

No, it’s simply just storage for enemy stats. Just so that way I can randomize which enemy is used and refer it its stats.

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

1 Like

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.

2 Likes

(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?

2 Likes

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.

That is what I’m doing right now lol.

2 Likes

Your meaning it gets annoying to go in and change the stats? is what I am reading from this post

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.

1 Like

No that makes sense, I just don’t think that’s generally an improvement. It would take more properties than the current system.

No it just isn’t that great to work with


Well uh I’ll give it the rest of the day and then probably just close this, I think what I have is the best Im gonna get

3 Likes

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.

I probably should’ve helped clarify this earlier :sweat_smile:

2 Likes

Now now wait, Gimme time to think on this and I may have something

How do you get the data in there in the first place? Do you have a trigger loop or do you just have them preset in the property’s?

2 Likes

I’m fairly certain he just has them preset in the properties.

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?

Did I just disprove my idea to help you…

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.

2 Likes

Exactly, I accidently disproved my idea

2 Likes

Heres another idea, what if we just split our stats evenly into new properties instead of making a property for each one which we do not want to do

the part I want to understand is what part of it is hard to access and change?

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.

2 Likes

well while we wait we could just consider more ideas which could MAYBE lead to a breakthrough
so why not try?