Choicescript Relationships feature tips

Hey eveyrone!
Listen, I’m in need of tips of how to make relationship functions work in choicescript
I use choicescript IDE and it works well,

But I don’t seem to be doing well with the feature coding for relationships

Like seeing how well the player’s character’s friendship is with your friends, family, or even rivals (if possible that is,)

Does anyone have any helpful tips?

Can you explain what exactly the problem is? Are you unable to see the relationships in the stats section? Does the coding just break the stats screen when you try to open it? Are you trying to figure out how many relationship points should be awarded and added?

Remember to be specific about your problems so that you can get better help on the forums.

So you want to find a way how to differentiate relationship level, I assume?

You can use numerical variable, in a way so
0 = not met
1 = just met
2 = acquainted
3 = friend
Etc.


In mainstream, ppl use percent to track the relationship value. The way I see it, there’re 2 ways they do this

  • Starting from 0-100: a simple progression, where 0 is “not met” and 100 is usually “in relationship.”
  • Starting from 50: less than 50 is non-friendly relationship, vice versa.

In the end, it’s up to you which system you want to adopt. Each has its own pros-cons.

I meant how to put in the proper coding of relationship stats and how they are activated as the game goes,

As Szaal pointed out, there are multiple ways to go about coding relationships.

The one I personally favor is the percentage starting from 50, where 50 denotes the character having a neutral relationship with the player character.

To code that in the stats screen, I do:

*stat_chart
	percent A

where A is the character we’re looking at. To code for a relationship at 50 in that case, I would do this on the startup page:

*create metA false
*create A 50

which establishes that the PC has yet to meet A. It also establishes that A and the PC will have a neutral relationship (though depending on the circumstances in which they meet, you could probably make it so that A already approves or disapproves of the PC ahead of time). Then follow up with this on the stats screen

*if metA
        *stat_chart
	         percent A

At that point you have a stat chart that hides the PC relationship with A. Next, when you meet A in the story, you would change the variable:

*set metA true

From there, you have A showing up in the stats screen.
Finally, to change the PC’s relationship with A, you can do any of the following:

*set A -5
*set A %+5

Of course you can choose numbers other than five and whether you want the relationship to get better (with +) or worse (with -). Some people prefer to use points, some people prefer to use percentages.

2 Likes

It can sometimes be helpful to take a look at other writers’ coding, when you’re trying to learn how to make your game do things, especially when you’re as new to it as you are.

Here’s a (very old) public test of one of my WIPs. By going to …/scenes, you can click on any of the ones listed and take a look at the coding.
…/scenes

and, to see what they do, you can just remove the …/scenes.
…/mygame

edit: note, this is only a viable option though DashingDon

1 Like