Version: v4.2.2.stable.official [15073afe3]
Hello, this is my first post, bear with me.
I’ve recently started the Godot journey, coming from another engine that was not Object-Oriented. To learn, I’ve been following the “recreate your favorite game” path. I chose Etrian Odyssey, a series of first-person dungeon crawlers with tile-based, turn-based RPG combat goodness.
It’s been working so far. I found out how to make sprite fonts with kerning to use the official games’ font, utilising Astar for pathfinding, getting a 3D maze generated from a 2D tilemap with Terrain, making use of composition to dictate what inputs menus can use, etc.
Now getting to the point: I want to get started on the battle system, but that requires entities to fight. I originally had this Autoload that fills up an Array of Dictionaries containing the stats of everything… but it looks gross. I eventually learned about Resources, but I’m not sure I’ve got a grasp on how I’m meant to use them.
Player characters (built from standard RPG classes like Warriors, Mages, Healers, etc.) and enemies have:
- a name;
- about 8 values for stats (Strength, Agility, etc.);
- resistances to the 6-7 elements at play (Fire, Ice, etc.);
- resistances to the 10-ish ailments (Poison, Paralysis, etc.);
- and more.
So, the way I think I understand Resources is that I’d make a new Script that extends Resource, have it declare a new Class and define its exported variables for my needs… but now what?
Do I just go into my FileSystem Tab and fill up a folder with instances of that new Class, one for every character/monster stat combination, knowing there’ll be hundreds of them? Is that it?
Assuming so, I can have an Autoloaded Array that just stores their path so that, in battle, some generic battler Node knows what set(s) of stats to copy onto itself based on an ID.
I could also go farther and make separate “sub” Resources for resistances and such, to have presets for the occasional common patterns (for example, every type of player character has neutral affinities to everything, unlike monsters which tend to have their own unique set).
All that to ask… is this a valid way to use Resources? Or am I severely misunderstanding the idea/their purpose?
Thank you in advance… and my apologies for this wall of text.