How would i organize my Enemies module?

Hi guys, I am pretty insecure about how i should organize Data from modules to retrieve from, what would be a good way to sort it?

-- Enemies/NPC Info
return {
	["dumme"] = {
		Stats_ = {
			
		}
	}
}

Also I question i have is, What’s the difference from

dumme = {
}

from the first code, does it affects on something?, the brackets

1 Like

Is it just a big list of data that gives your enemy attributes, or is there going to be more such as controllers and etc?

If the former, then the first option would be similar to what I would do personally.

All in all it’s up to preference though.

What do you mean by this? The difference between

t = {
    a = something
}

and

t = {
    ['a'] = something
}

? If so, those are the exact same thing, it is just that using square brackets and quotes will allow you to add special characters and spaces to the index, ie:

t = {
    ['!@#$%^&*()'] = something
}

whereas it wouldn’t be valid syntax without the quotes

2 Likes

image
(what the skibidi??? source code leak?!)

and then you do moduleName[enemyName]["DATA_YOU_WANT_TO_USE"]

2 Likes

Thank Yall, this Really Helped me to lock in again, really appreciate it

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.