Hello,

I wonder how i could or should do the skills, in a top down RPG. I want the NPC to have the same abilities too, and lots of them are not combat oriented such as move speed, medicine, construction, trade... Each have 5 ranks (or 6 if you count "0" when you don't have the skill), and you can get or lose ranks depending on some situation, event, injury...

Example, on my design document, i have herbalist: 1 point and you get 0 to 1 unit of the plant, 2 pts = 0 to 2 units, 3 pts = 1 to 2 units, 4 pts = 1 to 3 units 5 pts = 2 to 3 units

Should i do scenes ? One scene for one skill and i child the ones that belongs to a specific NPC ? Should i do scripts only ? Something completely different ?

Where can i find hints, tips, documentations and all ?

I think this is hugely subjective. But I'll give my 2c. You're talking about game design right? Personally, over the years I've seen stuff like that(essentially 'Game Data') be contained inside classes and each instance would 'inherit' from those classes and set its own local values. It's how I've seen this sort of thing done since I was a kid and ppl thought C was cool, while c++ was the shiz.

Using scenes to do this would be novel, and very Godot centric. In the end it's your design decision really. Do you want something that will be the same across everything? Something that will be local only? You could just 'extend', like I said, with gdscript. I'll link a few articles for you to read and think about. One of them suggests something like a node system, which could be done with godot's nodes for visual input. I've just always seen everything done in code, but you can be inventive. You have to think about 'where/how does godot hold data' and 'what do i want to do with it'.

I'd read this: web.eecs.umich.edu/~soar/Classes/494/talks/Schumaker.pdf It talks about some of the things i mentioned. I'd also look into MVC, MVVM, etc. They'll give you other ideas.

http://www.gamasutra.com/view/news/128271/The_Craft_of_Game_Systems_General_Guidelines.php http://gamedev.stackexchange.com/questions/8327/character-stats-and-power https://gamedevelopment.tutsplus.com/articles/lets-spec-into-talent-trees-a-primer-for-game-designers--gamedev-6691

Hope my post gives you a lot to read and think about. ;)

Thanks, good ressources

I've read all the documents, and they are somehow nice even if i thought about a lot of this already. Not the technical stuff (inheritance, component, instance...), but the gameplay and goal...

My question was more about "how to do it with Godot" and less about generic game design. I don't have any computer programming knowledge, only some very basic "hello word" stuff, so behing Godot centric is quite meaninless for me at this stage

It depends on how exactly you want your skills to work what your personal preference is for how to organize things. There's lots of ways to do things.

You could have each skill be its own script and put them on nodes on your character (nodes that just exist to hold scripts). Then when you want to use the skill, you just get the node for that skill and tell it to activate. That way your character script wouldn't be cluttered up with functions for all your different skills.

If your skills just apply modifiers to other actions, you might only need a dictionary of skill names and their ranks. So for your Herbalism example, when you attempt to gather herbs, that function just checks the value of "Herbalism" and uses that to determine the number of herbs you gather. (Maybe a range from floor(rank/2) to rank). Or if it's even simpler, maybe each skill just adds its rank as a bonus to certain actions.

I guess I'd say it boils down to: how complicated and unique are your skills' functions? If they all work the same you just need one function to use them all. But if they're all totally different and complicated, you'll want to split them up so you can deal with them one at a time and keep things manageable.

6 years later