Jump to content

Companion Help


Recommended Posts

The Companion that I am making in my mod, has a backstory and well hates raiders.

She doesn't take up on of the companion slots, but how would I implement the function that she will not follow with you whilst Gage is also a Companion, and that if you side with raiders in the Nukaworld story that she will permently dismiss as a companion but not become hostile?

How do I make sure she speaks her quest dialogue too and not her companion lines?
And when setting conditions.
As she has lines on companion opinions, would the condition be run on subject or on player for example
Get Quest Completed Min00 = 1 , which is the condition i need to set for her views on preston to unlock

Link to comment
Share on other sites

Register for CompanionChange custom event and dismiss her as necessary. Don't know if there is a specific event for SetPlayerTeammate() function, which would be more reliable because anyone can be hired without being a Companion, but still GetPlayerTeammate Conditon can be useful before hiring.

 

What i remember, there are DisallowedCompanionFaction and HasLeftPermanently script variable, though probably have no meaning for a companion who is not managed by FollowersScript, so needs manual handling in a similar manner. Gotta track NW story and find if there's an event or something else suitable to serve as trigger.

 

Subject conditions run on speaker, Target - on dialogue target. Doesn't matter for impersonal Conditions like GetStageDone etc.

Link to comment
Share on other sites

I would make use of FollowersScript as mentioned by hereami. It is a great tool when dealing with followers and companions in almost any regard.

You can easily access it by creating an instance of it like this:
FollowersScript FScript = FollowersScript.GetScript()

 

But this works too:
FollowersScript FScript

You can then access globally relevant properties such as:

Faction property CurrentCompanionFaction Auto Const
Faction property HasBeenCompanionFaction Auto Const
Faction property DisallowedCompanionFaction Auto Const

(To check on Gage in this case. Just query him, he has a static RefID, to see if he is in any of the relevant factions.)

 

You can get Gage by creating this variable

Actor Gage = Game.GetForm(0x<his refID>) as Actor

And:

RefCollectionAlias Property ActiveCompanions const auto

 

(Loop through it using GetAt(i).ActorRef() to see if his Ref comes up)

 

You reach them like this after creating an instance as before
FScript.CurrentCompanionFaction (will be a Faction)
FScript.ActiveCompanions (Will be a RefCollectionAlias)

etc

The Raider alignment is trickier. You will technically be allies throughout the DLC until you choose to become enemies with them. There is probably a property somewhere among the DLC4 scripts that will tell you more precisely if the "final" stage has been set and whether you chose to definitively join them or not. Unpack the DLC4 script zip and have a look or check the DLC4 keywords in CK.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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