Jump to content

Trade Dialogue


Recommended Posts

When you set an NPC as player teammate (setPlayerTeammate()) you will get 4 dialogue options on activation and also dialogue lines for command state. You can voice those options by populating "Command Dialogue" for the Player and "Favors" for NPCs (in a quest):

 

2023-03-04-2.png
2023-03-04-1.png

 

Follow, Stay, Retrieve... -> Agree/Refuse

Call -> Show

...

 

But as you can see, there is a "trade" response option for NPC but nothing for the player. I can't move the trade dialogue to the scene (not using XDI and the dialogue tree is more than full) so any idea how i can make the player say something when i choose the trade option (using player dialogue maybe ? is there a special keyword for trade).

"ShowRelationships" should definitely be "ShowInventory"

Edited by lee3310
Link to comment
Share on other sites

If there really is no way to do this in CK you should still be able to invoke a topic using Papyrus. It'll be a bit of work, involving identifying specific topic FormIDs, because unfortunately SayCustom() can't be used, as the lines aren't blessed with keywords. Say() must be used, wherein you pass specific forms which can be found in xEdit under Quest > DialogueGenericPlayer (179EF) > (1F5D3) Dialog Topic > *here you should be able to see each individual barter-related comment/topic).

 

Actor PlayerRef = Game.GetForm(0x14) as Actor
Topic[] BarterPositive = new Topic[1]
BarterPositive[0] = Game.GetFormFromFile(0x026577, "Fallout4.esm") as Topic
Int i = 0
; If-switch relating to reply option, While-loop to randomize among possible comments
PlayerRef.Say(BarterPositive)

 

But I have a hunch there is an actual way to achieve this in CK, or at least in a simpler way, perhaps using some workshop vendor script and/or any of its associated keywords applied to your companion.

Link to comment
Share on other sites

I have published several SetPlayerTeammate() based solutions and in messing around trying to reuse the base game shared follower/workshop systems have always reverted to creating my own dialog topics / scenes or simply AddActivate menus for consistent outcomes, notes in code include:

 

";Default [E] talk topics are inconsistent so abCanDoFavor = false"

";Shared trade depends on WorkshopDialogueFaction which causes unpredictable faction reactions."

Link to comment
Share on other sites

unfortunately SayCustom() can't be used, as the lines aren't blessed with keywords.

Any Info can be specified as Shared info for own Topic with keyword. Although there can be side effects, if targeted Info has script or has wrong conditions. Trade lines are Shared by itself, i think, so are trouble-free. But is there a way to detect what dialogue option is chosen, event or else?

Edited by hereami
Link to comment
Share on other sites

I have published several SetPlayerTeammate() based solutions and in messing around trying to reuse the base game shared follower/workshop systems have always reverted to creating my own dialog topics / scenes or simply AddActivate menus for consistent outcomes, notes in code include:

 

";Default [E] talk topics are inconsistent so abCanDoFavor = false"

";Shared trade depends on WorkshopDialogueFaction which causes unpredictable faction reactions."

using your own player dialogue in a scene is ideal but i already have a dialogue tree full to the brim with a lot of conditions to display the appropriate option (recruit, dismiss, follow, wait (sandbox), lure, collar)...). The only shared topics i can use are for player open inventory which ironically, have no place for them (all the other lines are extracted/renamed .fuz)

Edited by lee3310
Link to comment
Share on other sites

If there really is no way to do this in CK you should still be able to invoke a topic using Papyrus. It'll be a bit of work, involving identifying specific topic FormIDs, because unfortunately SayCustom() can't be used, as the lines aren't blessed with keywords. Say() must be used, wherein you pass specific forms which can be found in xEdit under Quest > DialogueGenericPlayer (179EF) > (1F5D3) Dialog Topic > *here you should be able to see each individual barter-related comment/topic).

 

Actor PlayerRef = Game.GetForm(0x14) as Actor
Topic[] BarterPositive = new Topic[1]
BarterPositive[0] = Game.GetFormFromFile(0x026577, "Fallout4.esm") as Topic
Int i = 0
; If-switch relating to reply option, While-loop to randomize among possible comments
PlayerRef.Say(BarterPositive)

 

But I have a hunch there is an actual way to achieve this in CK, or at least in a simpler way, perhaps using some workshop vendor script and/or any of its associated keywords applied to your companion.

My problem, is how to identify the "trade" option displayed when you activate the NPC. First, i thought that setPlayerTeammate(true) triggers a quest with a scene and a player dialogue to display the 4 options (trade,talk,cancel,stay) but apparently it's an internal mechanism. I don't know how to hook a script to the trade option. There is no event or keyword to do so, even OnCommandModeGiveCommand() has nothing for "trade".

PS

Bethesda didn't do it for companions in CK or script. Try the trade option with your follower (after recruiting him/her) and you will see that the player say nothing (only the companion).

Edited by lee3310
Link to comment
Share on other sites

  • Recently Browsing   0 members

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