Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Conversations and Populating Custom Options

Hello there,

I am looking into two things as a POC I am working on, which relates to Conversation/Dialogue trees:

1. I am aware that you can set up and use <CUSTOM> Tokens in conversations, but you are always limited to the number of tokens you set up. Is there some way to dynamically set the conversation to show X number of options? Say I have a script that runs and one time wants to show only 3 Custom options and sometimes 4.... And sometimes 8. Is that possible? How can it be done?

2. Is there a way to capture the actual text used in the conversation even if its Private, so that this text can later be used in a script?

Thanks in advance!


  • AncarionAncarion Member Posts: 143
    I'm not really clear on what you'd like to accomplish. Maybe a little more concrete example would be helpful, or maybe someone else might understand better than I.

    As far as custom tokens, the number of them that you can set up is pretty vast, so I don't see that as any kind of limitation.

    Setting the number of options to appear seems like something you'd control will the TextAppearsWhen field in the conversation node, unless I'm misunderstanding what you mean...

    "Capturing the actual text..." Do you mean keeping track of which conversation response the player chose? If so, that would be done in the ActionTaken field of the response node itself. Again, if I'm understanding you correctly.

  • WilliamDracoWilliamDraco Member Posts: 88
    Ancarion has covered all of the default options available.
    If you are using nwnx, there are further options available for each of these, but that's a more complicated matter.

  • Strife_and_DiscordStrife_and_Discord Member Posts: 16
    Sorry, I would give a more concrete example.

    I want to script a Custom Faction System, where the DMs can use a wand to "wand" someone for that Faction. I want to avoid hardcoding the factions in the code, and instead use a container placeable that holds Faction Setting Token Items. These Token items will have the setting variables used for the Faction setup.

    When our DMs use the wand/tool, and select the Set Faction option, I would want the placeable to be scanned for all the current available choices(Token items) and then he Conversation tree will account for said options. If I add/remove a Token item from the container, the list should behave accordingly.

    The only way I found I can do that is to setup a very large number of CustomTokens in the conversation and only set them up if needed. I was hoping there is another cleaner way to do that, hence my question :)

    In regards to the second question:
    I want to be able to detect what Setup CustomToken text the user actually selected, for additional usage in the code.

    I hope it clarifies it better.

    Thanks in advance!

  • AncarionAncarion Member Posts: 143
    I would definitely try to simplify the entire approach to your project, because it seems to be a somewhat convoluted way of setting up custom factions, and may not achieve the results you want in any case.

    Keep in mind that any "faction" set on a player doesn't really behave the same way as it would on non-player objects. The hardcoded "Player" faction is a distinct thing, that follows its own rules. In general, factions only determine how NPCs react.

    Of course, you could implement some kind of pseudo faction system for RP purposes, much like a subrace or religion, but it won't behave like the built-in system. In that case, I'd store the information on a player skin or other such non-droppable inventory item.

    The fact that you mention DMs also leads me to think that the whole system could be streamlined merely by having the DM talk to the player. Let the DM ask the player what faction they want to join (or create), and then set the appropriate variables on them as needed.

  • Strife_and_DiscordStrife_and_Discord Member Posts: 16
    I will consider that. Thank you @Ancarion and @WilliamDraco for your time and help :smile:

  • meaglynmeaglyn Member Posts: 71
    What Ancarion said regarding factions not withstanding, a general way to make scripted conversations that would do what you describe would be with a system like zdialog. (Another excuse to drop this into a thread ;)

    You could also do it with a more traditional conversation with it's own conversation specific scripts but it would be complicated and a bit of re-inventing the zdialog wheel.

Sign In or Register to comment.