Jump to content

Need help adding affinity to a companion so they can react to actions that I perform in game.


Recommended Posts

Like the title says, I'm messing around in the Creation Kit, and want to try and figure out how to "add" affinity to a companion that has no likes/dislikes.

Specifically I want to give Ada her own likes/dislikes, as well as her own companion perk (which I already have made) to make her stand out more from the Automatron robots you can create (beyond her occasionally giving you junk items).

Tried posting this on r/FalloutMods but got no response whatsoever.

Link to comment
1 hour ago, CPU said:

Not an expert on FO4, but on Skyrim (very similar engine) you do this by adding factions and faction relationships.

But what about actually getting the game to say, "Ada <insert reaction here> that>" whenever I perform certain actions? I looked around on Google for a tutorial/explanation on how to give a custom companion affinity (since Ada has no defined likes/dislikes by default I figured I could use it as a reference), but could only find mountains upon mountains of people asking how to edit a companions' appearance.

Link to comment

Not sure.

Check the dialogues (usually they are generic dialogues or specific to a NPC.)

Edit one you know it is doing what you are looking for.

And check its conditions.

Link to comment
7 hours ago, CPU said:

Not sure.

Check the dialogues (usually they are generic dialogues or specific to a NPC.)

Edit one you know it is doing what you are looking for.

And check its conditions.

Alright. I guess I'll try to poke around and see what I can figure out on my own then.

Link to comment
46 minutes ago, smtc said:

Alright. I guess I'll try to poke around and see what I can figure out on my own then.

All affinity for companions in Fo4 is handled through the companion script. If you want to use 'vanilla' affinity, you'll need to add the companion to the companion framework, by adding the proper scripts to the NPC's. In the script for the companion, there is an array of 'events' called 'CA' events (I think CA, in this instance, stands for Custom Affinity but I could be wrong.. I mean who knows? There's no 'real' documentation on all of this).

 

Anyway, these CA events are global and called during certain player actions, vanilla dialogue, etc.. Then when these events are added to the array of the companion, the companion picks it up and some kind of counter is raised or lowered.

 

The companion ALIAS uses this script:

afbeelding.png.a15b08eb9afefc1ce742109212b5d581.png

 

Then, in the ACTOR/NPC tab, the CompanionActorScript is added, which holds the EVENT array that defines what the companions like:

afbeelding.thumb.png.f505509af6309ba9bd20265bb6cb78a8.png

 

Of course, for full affinity there's a bit more going on in the background. For instance, what one companion sees as murder might be fine for another, this will depend on their faction. For instance, Strong doesn't care if you kill off the entirety of Diamond City, but Piper will NOT be O.K. with that. The same for what's considered as theft or not, etc..

 

Link to comment
59 minutes ago, Reginald_001 said:

All affinity for companions in Fo4 is handled through the companion script. If you want to use 'vanilla' affinity, you'll need to add the companion to the companion framework, by adding the proper scripts to the NPC's. In the script for the companion, there is an array of 'events' called 'CA' events (I think CA, in this instance, stands for Custom Affinity but I could be wrong.. I mean who knows? There's no 'real' documentation on all of this).

 

Anyway, these CA events are global and called during certain player actions, vanilla dialogue, etc.. Then when these events are added to the array of the companion, the companion picks it up and some kind of counter is raised or lowered.

 

The companion ALIAS uses this script:

afbeelding.png.a15b08eb9afefc1ce742109212b5d581.png

 

Then, in the ACTOR/NPC tab, the CompanionActorScript is added, which holds the EVENT array that defines what the companions like:

afbeelding.thumb.png.f505509af6309ba9bd20265bb6cb78a8.png

 

Of course, for full affinity there's a bit more going on in the background. For instance, what one companion sees as murder might be fine for another, this will depend on their faction. For instance, Strong doesn't care if you kill off the entirety of Diamond City, but Piper will NOT be O.K. with that. The same for what's considered as theft or not, etc..

 

Thanks for the detailed response! This'll definitely be helpful to reference. Do I have to define what number = what stage of affinity (Infatuation = 1000..etc) or does the game automatically do that on its own? Hopefully that made sense.

Edited by smtc
Link to comment
5 minutes ago, smtc said:

Thanks for the detailed response! This'll definitely be helpful to reference. Do I have to define what number = what stage of affinity (Infatuation = 1000..etc) or does the game automatically do that on its own? Hopefully that made sense.

Those stages only define when for instance a romance kicks off. If you want to influence the likes and dislikes of companions, you can use the second script (companionactorscript) and the event array of CA_Events inside there.

 

Also, make sure to test ANY script changes on a clean save always!

Edited by Reginald_001
Link to comment
1 hour ago, Reginald_001 said:

Those stages only define when for instance a romance kicks off. If you want to influence the likes and dislikes of companions, you can use the second script (companionactorscript) and the event array of CA_Events inside there.

 

Also, make sure to test ANY script changes on a clean save always!

Alrighty, I'll see what I can do with it now!

Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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