Jump to content
  • entries
    2
  • comments
    4
  • views
    4,033

Talking about a Relationship Framework


Heromaster

1,317 views

After writing a background story to some NPC's we came across a problem. The way relationships are working in the vanilla game. It is rather useless to simulate a way of becoming friends or enemies. So we are working on a system which will be set on top of what the Skyrim provides.

The plan is to provide a layer over the existing vanilla relationships.

 

Why?

 

Well, why would we need such a layer? Isn't the vanila relationship system sufficient enough?

 

Short answer: No, it isn't.

 

Long answer: No, it isn't good enough for deeper relationships. The problem is, it is all or nothing. After a positive thing happened, you suddenly are befriended with a NPC. Same applies to the opposite. It just isn't subtle enough to build a long-term relationship.

 

That's where the relationship layer kicks in.

 

What it does?

 

Before we talk about what it does, let me explain how the built-in relationships work. It uses an integer value with a range from -4 to 4. You are usually neutral to every NPC which is represented by the value of 0.

Usually you can only use the range from -2 to 2 to represent a relationship. If the value is lesser than -2 you will probably get attacked by this NPC. If the value is 3 then they can follow you and 4 is usually used for marryable NPC's.

 

There is no way to put a value in the middle between two relationship ranks to slower down the process of becoming a friend or an enemy to a NPC.

 

Now the relationship layer will allow you to do it. Simple put it stretches the value from one relationship rank to another by 100 (Lets call this value Relationship Points or short RP). It will be synchronized with the real relationship. So if you have reached 100+ RP the relationship rank will be synchronized and goes up by 1 and RP will be reset to 0. It can also go to -100 RP and that would mean, the relationship rank will be lowered.

 

A multiplier will be applied that will make it harder to reach the next rank in either direction.

 

An example to illustrate it

 

Let's say the way beggars are working should be changed. The initial situation is, that if you give a beggar a coin you are suddenly befriended with him and on top of that you get a speechcraft buff. Wut???

 

Ok, we change it. Lets say the action giving him a coin will be worth 20 RP. The multiplier for going up from neutral to friend is 1.0. That means to befriend him you have to give him 5 septims overtime. Now the multiplier from friend to best friend is 0.5. The action is of giving him septims is still worth 20 RP but it is a relative value and the absolute value for reaching the next rank is 10.

Conclusion to make him a friend it would need now 5 times as long as in the vanilla game. And to make him a best friend it would need another 10 times handing him out a coin (Apart from the fact, in vanilla you only can befriend him).

 

Framework functions

 

Keep in mind, this is framework is in an early development stage and therefore any functions which are planned to provide are subject to change.

 

Bool RegisterMod(String asModName)

 

Registers a mod. This is needed to resolve conflicts in the grand scheme. Most setting functions requires you deliver your mod name as an argument to change a setting. Without registering it is impossible to resolve conflicts. What it does is to help identify a conflict and let the user have the control to resolve it through the MCM menu.

 

Bool UnregisterMod(String asModName)

 

If you have registered a mod, you can unregister this mod if you provide an uninstall routine. The user also will have the option in the MCM menu to unregister your mod. This is a game wide setting. Once done, it is registered for all savegames.

 

Int GetGlobalSyncMode()

 

Returns the global synchronization mode between vanilla relationship framework and APPS. This affects all unique actors when no local setting could be found. This is a game wide setting. Once done, your mod is unregistered for all savegames.

 

0 - No synchronization is done

1 - Only sync values towards vanilla

2 - Only sync values from vanilla

3 - Sync in both ways

 

Bool SetGlobalSyncMode(Int aiSyncMode, String asModName)

 

Sets the synchronization mode for all unique actors. This requires your mod to be already registered beforehand.

 

Int GetSyncMode(Actor akNPC)

 

Returns the synchronization mode for this specific actor. Returns -1 if no local sync mode is set.

 

Bool SetSyncMode(Actor akNPC, String asModName, Int aiSyncMode = 1)

 

Sets the synchronization mode for this specific actor. This requires your mod to be already registered beforehand.

 

Float GetRelationshipPoints(Actor akNPC)

 

Returns the actual relationship points. The range is from -499 to 499. Use Math.Ceiling(ReturnValue / 100) to get the corresponding relationship rank (You would need it if you do not want to synchronize RP with relationship ranks).

 

Float ModRelationship(Actor akNPC, Int auiRelationshipPoints, Bool abIsSurplusCarryingOver = True)

 

Modifies the relationship points and returns the its new value. By default if the value is more than enough to increase the next rank, it will be calculated too. Otherwise the surplus will be cut.

 

Float SetRelationship(Actor akNPC, Int auiRelationshipPoints, String asModName)

 

Sets the absolute value of relationship points. The value can be in the range from -499 to 499. This requires your mod to be already registered beforehand.

 

Float GetGlobalRelationshipMulti(Int auiFromRelationshipRank, Int auiToRelationshipRank)

 

Returns the actual multiplier for transition from one rank to another. This value affects all unique actors when no local multiplier is set.

 

Float SetGlobalRelationshipMulti(Int auiFromRelationshipRank, Int auiToRelationshipRank, Int aiMultiplierValue, String asModName)

 

Sets the multiplier for this specified transition stage and returns its new value. This requires your mod to be already registered beforehand.

 

Float GetRelationshipMulti(Actor akNPC, Int auiFromRelationshipRank, Int auiToRelationshipRank)

 

Returns the actual modifier for this actor. Returns -1 if no local multiplier is set.

 

Float SetRelationshipMulti(Actor akNPC, Int auiFromRelationshipRank, Int auiToRelationshipRank, Int aiMultiplierValue, String asModName)

 

Sets the multiplier for this specified transition stage for the actor and returns its new value. This requires your mod to be already registered beforehand.

 

SetRelationshipRankCap(Actor akNPC, Int aiMaxRelationshipRank, Int auiMinRelationshipRank, String as ModName)

 

Sets the min and max rank a relationship for an actor can be reached. By default, all actors will be restricted to -2 and 2 and will be automatically changed if the vanilla game changes the relationship rank itself (For example, doing the Dragon Rising main quest will raise the rank towards Jarl Baalgruuf to 3. If that happens, APPS will change and save the new cap itself). This requires your mod to be already registered beforehand.

 

-------------------------------------------

 

That's it. I'm working now on implementing the logic and will provide an little mod where you can play with this framework and see it results. It needs some extensive testing before releasing it as a full version.

3 Comments


Recommended Comments

Not to mention that it works in all directions.
From a best friend relationship over a romantic relationship to a master-slave relation, covering as many fetishes and possibilities as possible.

Link to comment
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use