Using String Variable instead of Numerical to Track Relationships

Wordy title, sorry! :sweat_smile:

I’m really not a fan of tracking numbers in variables as an author (neutral on it as a reader), but I’m wondering if it’s just as effective to use a string variable to determine narrative text for NPCs, both ROs and non ROs?

Thoughts? Comments?

I’ve been seriously considering it for my WiP but I’m wondering what others think (both readers and authors alike).

Numerical Relationship Values

*create relAsh 50
*create relDylan 50

*if relAsh < 30
          Ash doesn't bother to attempt to hide her distaste for you.
*else
         Her face is carefully neutral as she considers your words.

String Relationship Values

*create relAsh "neutral"
*create relDylan "neutral"

*if relDylan = "good"
        The next morning you find a 'get well soon' basket at your bedside. It's filled with all sorts of goodies, even your favorite candy!

*else
       Ouch. You hurt so much to the point you don't know where the pain begins and you end.
2 Likes

I think that works in some cases better than others. For instance, I have two (+) stats for measuring a relationship so that no matter how high your relationship is with a character, if you do this one thing, they won’t forgive you (edit: to clarify this is the string, it could function more cleanly as a numerical stat too tbh, but the string helps me remember). They can respond differently based on how high the numerical stat is. It helps keep things easy to remember.

On the other hand, how do you measure a string throughout a long narrative? Can dialogue choices make it go from neutral to bad to good too quickly? In one conversation, I can gain and lose several points and stay within a range, but with strings like that, how do you make the movement reasonable without having twenty strings denoting various degrees of a relationship?

I think showing relationship stats as strings is great and more immersive, but I think recording them as strings is a lot of work for no real payoff or, with less work, too volatile to manage well. I mean, if you only interact with a character a few times, that’s one thing, but I assume you’d be aiming for a more nuanced development.

11 Likes

This is actually something I’ve thought about lately.

String variables are easier to track, which makes it a lot easier to initiate a change in a relationship. Lord knows my head could do well with less numbers.

The con in that is that, well, does it jump between neutral and good during choices? How many strings should be added? Neutral, disliked, hated? There’s a big gap between those emotions, and I’m the type to teeter on relationship variables since I make dumb decisions the ROs and others hate lmao.

Alright my typing has gotten way slow, but this was my question as well. You got it out more eloquently too :joy:

4 Likes

This, in particular. If you want to portray a numerical stat as a string, that’s awesome, but using descriptive strings as the stats is probably a bad idea. Tin Star’s narrative mode is a great example of the former.

10 Likes

This is something I would have to wrangle if I implemented this system, but for a starter I’d probably lean more heavily towards actions or major decisions that affect an NPC’s opinion on the MC.

For simplicity’s sake, I just used ‘neutral’ and ‘good’ but in practice I’ll probably refine it a bit more. Maybe in the stat’s screen I’ll have something where there’s a blurb summarizing your standing with the NPC but with a bit of variation based on if certain variables were made true or false.

Edit: So something like this…

*if relAsh = "neutral"
         She doesn't particularly hate you, but she doesn't particularly like you either. A win in some of your coworkers eyes. @{(comfort_witness = true) You've noticed she seems to have softened some of her words with you ever since you helped calm down the witness.|}
3 Likes

I will say that I do think this could work. Not as a primary way to measure the relationship but as a sort of… modifier? Say you have two variables for one character: rel and type (or whatever). Perhaps you want to measure what the character thinks of MC (rel) and what the MC thinks of the character (type). So if rel is 10/100, is type “disagree but tolerate,” or “hate” or “rival.” Or maybe even if rel us 90/100, type is “manipulating to get ahead” or something. So I don’t think the idea behind using strings to clarify is bad at all, would make things way more nuanced. But even then, you could do that with a number too and it would make multireplace cleaner.

I think that would definitely work better, but I think you’d still end up grappling with smaller things not making any impact. Like I can imagine players being super nice to a character, assuming it was building the relationship, then be upset when a singular action knocks them down farther than they were anticipating because they wouldn’t have those smaller interactions to sort of buffer? Not necessarily a bad thing (I mean actions do speak louder than words), especially if relationships are a very minor aspect of the game, but still maybe something to consider in terms to audience appeal.

You definitely can do it, I just am having a hard time finding a pro that outweighs the cons or couldn’t be more easily achieved another way.

1 Like

To add to my earlier point, now that the brain has actually caught up.

I think string variables would work extremely well with NPCs you meet at one point, impress them (or don’t), and that string would shape itself through that scene and would hang on until you meet them again. For ROs it might be a bit more complicated if you spend a lot of time with them, and numerical gives a tad of a nuance to handing those.

It’s a bit like Telltale Games. Clementine will remember that.

Okay honestly that would give a game so much depth? I actually love that.

2 Likes

A valid criticism. I haven’t written that far into the story where smaller actions could have an influence so I can’t comment if they would or would not have an impact in my story since I haven’t gotten there yet.

1 Like

This is interesting, but I also see the complications of a variable that is either too volatile or not sensitive enough. Perhaps a way to address that is to consider the string variable a composite. For example, there’s a scene I’m writing right now with a character that can choose to accompany the MC or not. Here’s a generic version of the code that determines what decision that character makes:

*comment Character attendance
*if (relationship_points >= 6)
  *if (((character_quality_time1 = true) or (character_quality_time2 = 1)) or (character_quality_time3 = 2))
    *set attend true
*if (a >= 5)
  *if ((character_quality_time1 = true) and (character_quality_time2 = true))
    *set attend true
  *if ((character_quality_time1 = true) and (character_quality_time3 = true))
    *set attend true
  *if ((character_quality_time2 = true)) and (character_quality_time3 = true))
    *set attend true
*if (a >= 4)
  *if (((character_quality_time1 = true) and (character_quality_time2 = true)) and (character_quality_time = true))
    *set attend true

So basically, the higher the MC’s numeric score, the fewer hoops they have to jump through. But even an MC who has a lower numeric score (perhaps from having fewer superficial interactions with the NPC) can get this character to accompany them by pursuing a greater number of “high quality interactions” with the character.

If you did something similar to set your string variable, you would get all the benefit of the numeric tracking with the nuance of the string. So instead of a choice that looks like this:

*choice
  #Good option
    *set character_relationship "good string"
  #Neutral option
    *set character_relationship "neutral string"
  #Bad option
    *set character_relationship "bad string"

After every interaction or major “cross roads” you could have a set of *ifs under the hood that are evaluating what the string should be based on the “sum” of all other variables. It could allow you to make a single variable (“cheated_on_partner = true”) more important than the rest and allow you to equate otherwise disparate variables (5 casual conversations = 1 gift, or whatever). Of course, for this to work, you have to create a shit ton of variables to track specific story choices (*set went_with_character_a_to_the_store true"), but I do that already anyway.

I hope that makes sense!

2 Likes

I use a combination of both “strings” and numerical variables to track relationships.

I say “strings” because they’re numbered 1 to 5. They’re basically like/neutral/dislike in essence (with 1/2 & 4/5 more nuanced versions of like/dislike), but I don’t like using strings if I can easily remember the order. Plus I can use them for multireplace too.

I track the relationship changes from choices via number variables normally, but I also have a “starting relationship” variable that is established when the character is introduced. This is useful for those times where you need to reference the characters’ earlier relationship/dynamic. If the characters are meeting for the first time, it’s basically my “first impression” variable.

This way, you can also track relationship developments (bad to good or good to bad) easily without too many variables.

6 Likes

Yeah, this. I mean, numbers are not that bad and you can write comments to help you remember thresholds. Or you can write a subroutine to “convert” a numerical stat to the equivalent textual stat. But actually using only strings as stats sounds more of a nuisance than a blessing. I’m just imagining the amount of if statements… :sweat_smile:

3 Likes

The string based variable (a real string like good or bad) get complicated when you try and adjust them. You have either know how the relationship is, which would then be the same for every one. Or ein a rather long and unnerving If Loop

Like If rel good then neutral
If neutral than Bad
If Bad then horrible
And that every time you change them, for me that would be to much work for little gain.

A string is best used for variables that do not change, like a first Impression.
If you have Problems with to many number stats, use the comment. Personally I would recommend using comment a lot. No matter how clear a variable is for you now, are you sure you remember it in half a year? Or in a year when you try to eliminate a Bug? Comment is your friend use them :grin:

5 Likes

I would say that numerical values are better than strings for this simply because they are more granular and it’s easier to handle small relationship bumps that are awkward to deal with if you’re using strings.

As an example, let’s say you and I are both brand new coworkers somewhere. We have never met before. At one point in the day I let you borrow my good pen when you need to write something down in a hurry. Later on, I go out for coffee and bring you back a cup. These are two entirely separate minor things.

If you are using strings, there’s a whole lot of stuff to consider. Do these two things bump me up two entire string ranks, so that I go from “Neutral” to “Okay” to “Good” in a couple of minor actions? Do you just ignore them because they’re not enough to justify a full rank bump? It would be awkward if every minor thing threw me up a rank, but it would also be awkward if minor things never added up. So maybe you implement some kind of backend system to track stuff like “If KZV ends the workday with a total of three small favors he gets bumped up a rank?”, so that small things are accounted for without causing rank inflation

Sure, with enough work on the back end you could probably make a system like that work just fine if you really wanted to, but you’d be doing an awful lot of work just trying to match the innate granularity of a number variable.

8 Likes

While numeric representations offer a lot more flexibility and less complication, this is actually something that I’m doing in my current WIP that’s nearing the finish line. I find it much more pleasant to have a string stating your current relationship with someone rather than just a set of numbers. I personally think it also enhances storytelling, but this is really just a personal preference.

Sure it requires more work and effort, but I think transitions between ranks can be smoothened so it’s not just a jump from hated to loved within 3 actions. After all, the thresholds are also based on numeric values.

I also use a set of variables similarly to @levviathan , so even if you have reached a “loved” status by someone they will not forget something memorable you have done previously, whether that impact was good or bad.

1 Like