Hello, everyone,
I’m trying to build a dynamic skill library that makes it easy for us to build out skills as our server develops, and one of those core functions is simply getting the number of skills the PC knows. It seems like it would be the easiest part of this whole thing. However, I’ve no idea how to run down a list of variables that are defined as they’re meant to be.
As written, my entries are:
SkillCount (number of skills the player has in total. This is iterated every time they pick up a new one.)
SKILL(X) these are the names of the skills I want to add to the character’s journal. The string of this, uh, string would be the title of that particular skill which is run through its own script. This is to prevent me from adding a bunch of dummy strings to the skill journal and just hoping we have enough as well as bogging down the CPU with variables.
SKILL_(X)_RANKS a 1-100 variable that will be used for skill checks when the skill is invoked.
This seems like it’d be really easy to implement-- iterate the SkillCount variable by one, add new skill name/rank strings to the skill journal when a PC gains them and you’re done. But when I go to make a script for the player to get that information, I’m completely lost as to how to get those strings.
Some possible solutions that come to mind is to write those strings as something like Skill1, Skill2, etc. Using the SkillCount variable to know how many skills the item has written to it, I just don’t know how to use wildcards to get the right skill number in the list since these would be picked up and checked randomly. There’s no way to know that say, ‘Bread Making’ will be in slot 2 at all times, or ever.
I think ‘get string right’ would get me what I want, but every time I try to use it it keeps returning " " instead of a value.
Any thoughts would be greatly appreciated!