LogicalD Posted June 17, 2020 Share Posted June 17, 2020 I'm trying to figure out how you change the PotentialMarriageFaction via script. I would think it would be simple like: Alias_NPC.GetActorReference().AddToFaction(PotentialMarriageFaction) But that doesn't work. It has no idea what that faction is and says it's an unknown variable. So then I thought ok I'll just start the NPC in that faction already and then boost the rank after the quest completes. But I can't find a single example of how to do that. I thought I would check Sylgja because she is so simple. Do 1 fetch quest for her and BOOM she's ready to marry. But in her quest Special Delivery – FreeformShorsStone02 the code when you complete her quest simply says: Game.GetPlayer().RemoveItem(Alias_FFSS02VernerSatchelAlias.GetRef())Game.GetPlayer().AddItem(pReward)Alias_FFSS02SylgjaAlias.GetActorRef().SetRelationshipRank(Game.GetPlayer(), 1)CompleteAllObjectives()Stop() That's it. Set Relationship Rank to 1 and she is ready to marry you? This doesn't make sense to me. Does anyone have a working code example of making an NPC marriable after completing a quest? I hope this makes sense. Thanks! Link to comment Share on other sites More sharing options...
LogicalD Posted June 18, 2020 Author Share Posted June 18, 2020 After searching through the marriage quests I see that a relationship rank of 1 is all that is required to ask an NPC to marry you...as long as they are in the potential marriage faction. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 18, 2020 Share Posted June 18, 2020 Alias_NPC.GetActorReference().AddToFaction(PotentialMarriageFaction) This is correct to add them to the faction. However, if the script does not already have a property pointing to the faction, it will need to be added. If regular script: add Faction Property PotentialMarriageFaction Auto to the empty state outside of any events / functions then be sure to assign the faction to the property via the properties window in the CK.If existing fragment script: there should be a properties button somewhere in the CK UI for that record, add a new property then assign it correctlyIf new fragment script: insert a single semi-colon and compile the fragment. This causes the CK to create the script thus allowing properties to be added. After that you can add in the AddToFaction line and then relationship change line and you should be good. Link to comment Share on other sites More sharing options...
Recommended Posts