Coding Romance as related to friendship

Hey y’all,

Apologies if something like this has been asked before.

I’m working on the bare bones of a game right now, and I want to make it so that your romantic relationship with a character is related to your overall friendship with them - I haven’t figured out details yet, but I’m thinking something like your level of friendship (out of 100) divided by three or four, plus however many points you’ve earned towards romance. It should be a simple enough equation - Romance = (friendship/3) + (however many points you’ve earned from romantic interactions with the other character). I’m having trouble figuring out how to code for it. I’m also open to discussion on other ways to code for romance - as a very bisexual writer type with lots of very bisexual writer friends, I sometimes forget that a lot of people are only attracted to one gender.

Any tips?

12/09/2019: As of right now, I’m coding it like this:

Friendship (given on a scale of 0 - 100)

Flirtation (a hidden variable, where you can earn up to 65 points across the game).

Romance = ((friendship/3) + flirtation), where romance only appears on the stats screen and only starts affecting character interactions once it hits 35 or higher. That way, if your characters are perfect friends, but you have never chosen a romantic interaction, they won’t randomly start flirting with you, but being good friends with a person will still give you a significant leg up if you later decide to romance them.

4 Likes

When you give out the romance points only for clearly romantic interaction, you could just check if a character has these to check if they might be interested in a RO. Or you could ask the people in the part of the game where they form their character. Personally I would prefer the first way, but that is just my opinion.

For your other question, if you choose a variable for the romantic points and enter it into your calculation, it should just work.
so it should look a bit like:
romance= (firendship/100) + romance points

I’m very tired right now, so I want to double check to make sure I’m interpreting this right.

A) Are you thinking I should do a sort of romance check earlyish on to see if they’re interested in a character, and only proceed with the flirtatious interactions if they say they are attracted to the character (do some sort of Boolean check to see if the romance bar is relevant to that character before providing flirty/romantic options).

OR

B) Continue to offer the flirty options, assuming that the player will only select the romantic options if they are interested in the character.

I guess I could also just ask the player their sexuality early on, but I’ve always preferred games where they don’t specifically ask, probably mostly because I don’t care if I’m romancing a guy or a gal. I feel like it might break immersion if you’re trying to play as gay or straight and it keeps giving you options to flirt with your non-preferred gender.

1 Like

I meant it in the B type. I think until now I read only complaints when a character hits on you after you stated you are not interested, not that there was a romantic option in the choices. So it might also be a good option, that when a character hit on the mc and they decline, to fill a variable with a not interrested.
There are a lot of vriables to handle, but it might be worth it. But that is only my opinion and no guide^^

I like B) because it gives the player the chance to change their mind in case they chose not to flirt the first time around, for whatever reason unrelated to sexual orientation (there was something else more important going on at the time, they didn’t know the character well enough to care about them, etc.)

It also avoids having a “are you attracted to this person you just met?” sort of choice, which always strikes me as a bit awkward (Gee, I don’t know! Give me some time to get a sense of what they’re like).

I think you would have to be careful around character descriptions, though. It won’t do for the MC’s internal monologue to dwell on the hotness of a RO that isn’t the right gender.

6 Likes

Remind me, what is your game about? Is it VN-like dating sim, open-ended romance sim (where you give gifts to raise love points)?

If romance isn’t the focus, I’d advise against triggering romance based on friendship points. Some people out there prefer platonic romance, others just wanted bro/sis style friendship, and the rest just simply want to bone.


Otherwise, looking at your equation model, I have some questions. What will be the difference between romance lvl and friendship lvl? Does this implies polyromantic path?

2 Likes

I think it is easier to check for both romance and friendshippoints.

Such as:

If romance above 3 and friendship above 60

Making a complicated equation just makes it much, much more diffficult for you to figure out how many points the player would really have at any point in the game.

4 Likes

Aside from the general discussion about if this would work for your story, code wise, you’d want something like this:

*create person_romance 0
*create friendship_points 0
*create romance_points 0

*create friendly_romance false
*create unfriendly_romance false
*create friendship false

[all your story goes here]

*set person_romance ((friendship_points/3) + romance_points)
*if person_romance >= [whatever]
    *set friendly_romance true
    *goto friendly_romance_path
*elseif romance_points >= [whatever]
    *set unfriendly_romance true   
    *goto unfriendly_romance_path
*elseif friendship_points >= [whatever]
    *set friendship true
    *goto friendship_path
*else
    *goto regular_path

but as other people have said there ar many many ways to code this sort of thing - it all depends what you actually want to do :slight_smile:

6 Likes

Would it work to have a relationship 0-100 tracker describing how much the character likes you in general, and then having a romance variable that’s only true or false? If you wanted to track straight or gay characters or PCs, you could then switch the romance variable to false if they weren’t compatible.

My usual recommendation would be to make it as straightforward as possible, especially as it’s something that will be tracked throughout the game.

5 Likes

Hey - I haven’t posted much about my game yet, but it’s a fairly typical quest-style adventure set in a generic fantasy medieval Europe analogue. I’m not inclined to have an enormous focus on romance, but I’m planning for your two companions (one male and one female) to be romanceable. My initial concept was to create a slow, sweet lifelong adventure in the spirit of a book I read recently, ‘The Life and Adventures of John Nicol, Mariner,’ but I think this particular adventure will diverge a fair bit - it’ll be a bit faster paced and more intense.

My parents will probably try the game once I finish, so there will be plenty of romantic tension, but no boning whatsoever. I want to be able to look them in the eye at our next family gathering.

If you have a high enough romantic relationship with a character, it will unlock additional scenes or affect the way existing ones play out. It’ll hopefully make for a satisfying subplot, but I don’t see it affecting the main plot in any major way.

By polyromantic path, I assume you mean the ability to either romance more than one character or to even create a polyamorous relationship? I think you could romance more than one person if you wanted, but I think plotting out a polyamorous relationship would be beyond my coding capabilities and the scope of this project.

1 Like

This helps a lot! Has anyone told you recently that you’re pretty much the best person ever?

1 Like