Jump to content

[WIP] Companion Influence Framework


becauseofreasons

Recommended Posts

I'm working on a mod that I'll need quite a bit of help with in order to finish. It's nothing difficult or technical, anyone can help — you don't even have to know what the Creation Kit is, just be an avid player of Skyrim and know the characters and quests.

It's a framework for adding an influence system to characters within Skyrim. Put briefly, it gives characters the ability to care about what the player does, and allows that to have a concrete effect on stories and characters (primarily written by other modders, but hopefully to a modest extent in the vanilla game).

All followers will have preferences toward various types of actions, and those types will be used to characterize the words and deeds of the player. Then those action will affect the disposition of the character toward the player by affecting the NPCs' positive and negative (and cumulative) influence scores.

change = preference × magnitude

In other words, characters like you more when you do things they like, and like you less when you do things they don't.

If someone really, really hates the Altmer, they might have an Altmer preference of -1.0 (-100%). On the other hand, if they don't really care about them one way or the other, they might have a 0 — meaning any action taken for or against the Altmer won't sway their opinion either way.

Example: Say Serana has a mild preference (30%) toward honest behavior. Telling Camilla the truth about a fake letter from Sven might be an Honest action of magnitude 5. The player gets 1.5 positive influence with Serana (0.3 × 5) and of course, +1.5 to cumulative influence. Now, perhaps the player lied to Camilla. The player then gets 1.5 negative influence with Serana, and -1.5 to cumulative influence. Keeping positive and negative influence on separate scales allows the player to have truly dysfunctional relationships with his or her followers, and writers can and should capitalize on that.

The player maintains a reputation independent of their influence on followers, so at sufficiently high levels of fame or infamy, characters might have positive or negative reactions to them based on their past words and deeds.

I'm working on going through quests at the moment and adding what I'm calling influence 'hooks' — they're one-line scripts that tell the influence framework that something of interest is happening — with an ID, a type of action and the magnitude of the action. Here's an example:

cifMain.cifInfluence("cifEvent_074A83_001", 3, -3)

This means the first influence event for the quest 074A83 (A Lovely Letter), a -3 Honesty (i.e., mildly dishonest) action. This will trigger an event in the framework that all current followers subscribe to that modifies their influence score.

Types of Influence Events

There are a number of different influence types, each based on different types of actions.

cif_altruism (0 - altruism / selfishness)
cif_brave (1 - courage / self-preservation)
cif_daedric (2 - influence / aversion)
cif_honest (3 - honesty / duplicity)
cif_humble (4 - humility / pride)
cif_intellect (5 - intellectualism / anti-intellectualism)
cif_kind (6 - kindness / cruelty)
cif_lawful (7 - lawfulness / lawlessness)
cif_loyal (8 - loyalty / betrayal)
cif_magic (9 - magic / anti-magic)
cif_passion (10 - passion / stoicism)
cif_patience (11 - patience / eagerness)
cif_polite (12 - politneness / curtness)
cif_purity (13 - purity / corruption)
cif_religious (14 - religiosity / areligiosity)
cif_temperance (15 - temperance / gluttony)
cif_thievery (16 - thievery / straightforwardness)
cif_trusting (17 - credulity / suspiciousness)
cif_war (18 - warlike / peaceful)

The following are less complex - positive indicates a support or like, negative indicates an opposition or dislike.

cif_race_argonian (19)
cif_race_altmer (20)
cif_race_bosmer (21)
cif_race_breton (22)
cif_race_dunmer (23)
cif_race_khajiit (24)
cif_race_imperial (25)
cif_race_orc (26)
cif_race_nord (27)
 
cif_faction_bards (28)
cif_faction_brotherhood (29)
cif_faction_college (30)
cif_faction_companions (31)
cif_faction_dawnguard (32)
cif_faction_imperial (33)
cif_faction_stormcloak (34)
cif_faction_thieves (35)
cif_faction_volkihar (36)

Why would this be helpful?

Very few characters in vanilla Skyrim -- with the major exception of Serana and maybe a couple others who I've not met because I haven't finished the game / DLC -- are interesting ones - they mostly exist to look pretty/ugly (if you're playing vanilla) and carry stuff.

This is a reflection of a mechanical fault as much as it is a writing one. There's no system in-game to model meaningful personalities or relationships between characters, so there wasn't any point in spending time writing as though there were. You do a quest, you get 'em as a follower. You do another quest, you can get married. Wham bam, thank you, ma'am. Not really any subtlety there at all.

But in Knights of the Old Republic II: The Sith Lords, (which is one of the best RPGs ever made and you should play it right now if you haven't) the influence mechanic created a foundation for some really interesting character moments. It allowed the writers to sequester away bits of dialogue and character abilities behind Influence checks, encouraging players to spend time getting to know their companions as the game progressed. And not even necessarily in the romantic sense — even Kreia, perhaps among the least romanceable characters in the history of video games, was a hugely interesting and enigmatic figure who had a meaningful relationship with the player, and KOTOR II's influence system played a large part in making that relationship an interesting mechanic.

In the same way, this could be a huge boon for modded characters, or even some of the vanilla ones, if treated with a bit of TLC.

What would this mean for the vanilla game?

Apart from adding influence hooks to the main game — which would be kept entirely separate from the scripts in place — the .esm would have no effect whatsoever. It's a framework, that all it is — something to hook into for mod authors seeking a little more mechanical depth in their characters' relationships.

With the optional .esp, all the vanilla followers would be registered with the framework. Marriageable figures who are not followers by default would become followers and the requirements for companionship / marriage would be tied into the influence system.

What would this mean for modded quests?

Add an influence hook wherever you'd like in your quest and characters using the framework will automatically respond to actions with influence hits or boosts — no need for compatibility patches.

What would this mean for modded characters?

Add a single script and use the UI in the Creation Kit to edit the influence preferences for your character. Then you can access the character's influence properties to change which dialogue is said to the player as their influence increases or decreases, set requirements for marriage/stewardship or make the follower leave if Influence gets too low.

 

Or just about anything, really. Think of it as a mechanical model for the player's relationship with the NPC, and go from there. I'm in the process of making an NPC that uses the framework to demonstrate how it works.

What can I do to help?

 

There are a ton of quests in Skyrim which have the kinds of decisions that I'm talking about. It's a lot for one person. There are also a lot of followers in Skyrim that should be brought into the system (through an optional .esp) that should have preferences added.

If you'd like to help with either of these things, let me know. Again, it's super non-technical, you don't even need to crack into the Creation Kit (though it'd probably make things easier).

  • For quests, all I need is at what point in which quest the event happens, what kind of event it is and its magnitude.
  • For characters, all I need is a line of dialogue justifying a preference (in context, please :tongue:) and a value for it (-100% to 100%, or something between -1 to 1 if you're more into floats than percentages).

If you're a scripter who has experience making high-performance mods, I'd love to hear from you. It's pretty lightweight as it is, but I have no experience with best practices for writing performant mods in Skyrim. I'm looking to eventually integrate the mod with MCM and (maybe) some of the more popular follower / overhaul mods, so if you have experience with that and would like to share your wisdom, I'd greatly appreciate it.

 

Also, if you have opinions on the event types chosen or if you think the whole idea is bad and should go die in a fire, please let me know! The only way something gets better is with criticism!

 

Progress

 

1-4-15: The core mechanic is working! (albeit by overriding topic info scripts, seeking to fix that ASAP) The quest "A Lovely Letter" has been marked up with influence events.

Edited by becauseofreasons
Link to comment
Share on other sites

I'm a scripter and quest designer myself, working on Immersive Quests.

 

I don't think I'll be able to help directly, but I can provide advice and possibly make you an MCM when the time comes.

 

Now, you say there's no need for a compatibility patch. Without making the mod inherently dependent on your mod .esm, you would need to have a patch. Because the script doesn't exist without your mod, correct? So it would cause errors if I put in one of those lines of codes in my quest.

 

Then again, it wouldn't break anything, just spout a few Papyrus errors.

 

I wouldn't mind including this in IQ, though I recommend some documentation as not everyone would know off the bat how to incorporate this into their own mod.

 

Also, I'm working on a follower mod as a side project right now and he has a very similar influence system going on. I intend to give him his own as it's not quite the same and is hooked in with a bunch of different stuff unique to him. But it's good to see someone else is thinking of this.

 

Aside from extra dialogue, what would this influence system give? New features? No paying for hirelings if they like you? Them leaving you? Etc.

Edited by Matthiaswagg
Link to comment
Share on other sites

I'm a scripter and quest designer myself, working on Immersive Quests.

 

I don't think I'll be able to help directly, but I can provide advice and possibly make you an MCM when the time comes.

 

Now, you say there's no need for a compatibility patch. Without making the mod inherently dependent on your mod .esm, you would need to have a patch. Because the script doesn't exist without your mod, correct? So it would cause errors if I put in one of those lines of codes in my quest.

 

Then again, it wouldn't break anything, just spout a few Papyrus errors.

 

Awesome, thank you so much.

 

I mean there wouldn't need to be a compat patch between quests that used the system and characters that used the system. For example, you could have a character from quest mod X reacting (albeit indirectly) to events in character mod Y without needing a "X Meets Y" patch in the middle, or without either modder even being aware of the other. But yeah, you're entirely correct.

 

 

I wouldn't mind including this in IQ, though I recommend some documentation as not everyone would know off the bat how to incorporate this into their own mod.

 

Also, I'm working on a follower mod as a side project right now and he has a very similar influence system going on. I intend to give him his own as it's not quite the same and is hooked in with a bunch of different stuff unique to him. But it's good to see someone else is thinking of this.

 

Aside from extra dialogue, what would this influence system give? New features? No paying for hirelings if they like you? Them leaving you? Etc.

 

Absolutely. I'd like this to be as end-user-friendly as possible - part of the original purpose was for this to help out writers who might not otherwise be comfortable scripting something like an influence system, by letting them use it in their own mods and have more complex interactions than might have otherwise been possible.

 

I'm looking at it mostly as a "here you go, make something of it" framework. From a purely mechanical perspective for the 'vanilla .esp', I'll probably end up including the features you mention, as well as things like buffed skills or stats, special abilities (for the NPC and/or player) that are only unlocked once you've reached a certain influence with the NPC, influence requirements for marriage and following, things like that.

 

It's mostly of interest as tool for character-building - at least from where I'm standing. When I played the Arissa mod I thought it was really neat that she was reacting to things, and realized that there was room for a middleware to take some of the scripting load off of more inexperienced modders who still might want to have more reactive characters.

Link to comment
Share on other sites

Just wanted to chime in with an update. The companion site for the mod is up and ready to go and will serve as the primary base of operations for the mod. The site has a web-based editor for the NPC and Quest .json files, the former of which will eventually be used to generate the mod via SkyProc. Each quest and NPC has a Disqus comment thread to allow folks to chime in on features/mechanics they'd like to see or discuss.
If you'd like to contribute, go ahead and use the Quest or NPC editors to add content, download the files with the download button, then PM me your changes or make a pull request to the git repository linked to on the site. It's really that simple, no programming experience needed.

I'd really love to see some folks chip in, if just because this might take a while otherwise. :smile:
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...