Skill Affinity Stat Building


I didn’t even really know what sort of keywords to use in the forum search option, but I haven’t caught anything about it in the tutorials as far as I’ve read. (Which, likely means there’s no coding for it, but gotta ask in case I missed something!)

So, I’d like the angle of “what are you most natural at?” to have some influence as the game progresses. It’s my life experience personally that if someone is natural at something, that it’s more than just a point or two put in a column once and there’s no lasting effects thereof. At the same time, I don’t want to just plop 25 points into one at the very beginning and unbalance the first half of the game.

I was thinking of there being a silent extra point or two added in every time the player chooses to invest in that skill. So if they’re a natural at fighting, when they go do sword training they get an extra skill point from it. Or … perhaps just some sort of added benefit that can have some discernible effect later on. Natural skills, although stronger at base level than other skills, also don’t just magically develop typically without ever using them. I just don’t know how to approach it, and would love some suggestions!


The way you illustrated it in the last paragraph sounds quite good, perhaps you could also lower DC’s for things related to that stat.


Could you say a little more? I’m not certain how to set something like that up code-wise. Like, creating another stat to set and using if/then statements throughout it all? I’m currently in the process of trying to learns the ins and outs as I go, and would rather load the learning curve very early on so I don’t have to do extensive code additions later that will make the playtesting that much more a challenge to debug. I have the basics of some *if statements that I’ve been using with different race and gender options, but I don’t yet know how to use them fully I’d wager.


I had thought about this some in the context of a magic ring, for exactly the reasons you mentioned. If my character chooses the magic ring to give me extra stealth BECAUSE I know my character is rubbish at sneaking about, then I need a way to keep the stealth stat reasonably high - or even gradually increase it.

The best solution I came up with at the time was to check that stat at the beginning of every scene and adjust accordingly. So, something like:

*create ring true
*create sneaky 55
*if ((ring) and (sneaky <=50))
  *set stealth %+25
*elseif ((ring) and (sneaky <= 60))
  *set stealth %+20
  *goto carryon
  *set stealth %+10
  *goto carryon
*label carryon

Anyway, that was my thought… I’m a quite new coder myself though, so I’m sure there are simpler and more elegant ways to put a system like this into practice.


Thanks! Every reply helps ideas rolling!

I just put a
*create Stat_Affinity “”

In my start-up, and when they pick their skills a
*set Stat_Affinity “Fighting”

And thus tossed in an
*if (Stat_Affinity !=“Fighting”) #Fighting.
For what they’re bad at. I’m now thinking of creating a Stat_Aversion to also track those things we just can never seem to get quite right. But I hadn’t even considered using stat %'s with the *if’s later on.

I think in this way I could toss in more *if checks later for additional point additions (or subtractions).


The wonderful thing about CS is there’s a lot of different ways you can approach something like this

*create strength "20"
*create strength_affinity "0"
*create strength_bonus "2"
*create agility "20"
*create agility_affinity "0"
*create agility_bonus "2"

*label stats

Strength ${strength}

Agility ${agility}

    #Increase stats
        *gosub affinity
        *goto stats
    #Set affinity to strength
        *set strength_affinity 1
        *set agility_affinity 0
        *goto stats
    #Set affinity to agility
        *set strength_affinity 0
        *set agility_affinity 1
        *goto stats

*label affinity

*if strength_affinity = 1
    *set strength + 3
    *set strength + strength_bonus
    *set agility + 3
*if agility_affinity = 1
    *set strength + 3
    *set agility + 3 
    *set agility + agility_bonus

*if (strength_affinity = 0) and (agility_affinity = 0)
    *set strength + 3
    *set agility + 3

*goto stats



So, this sounds absolutely doable. Just by having a little inclusion whenever one of your stats would go up in some manner. For example:

At the beginning, in that ‘What are you best at?’ question, if you answer swordplay, you have it *set swordbest 1

*label swordtraining
*set sword %+4
*if swordbest = 1
  *set sword +1

You could do the same for swordplay being what you’re worst at by having another *if swordbest = 2, with an *set sword -1