Conversation Topics

From Stardew Modding Wiki
Jump to navigation Jump to search

One of the easiest and best ways to add compatibility between other custom NPC mods and even the vanilla game are through Conversation Topics.

Have you ever wondered how the villagers all know to greet you and introduce themselves the first time you speak to them? Or they know to comment on you choosing the Joja Route? It's easyǃ Conversation Topics. Conversation Topics are essentially a temporary, one-time topic that villagers will discuss after the player has seen a specific event or received a specific flag. Some of the best examples would be the Introductions, where the first cutscene following your character creation will introduce an Introduction conversation topic and note it will be active for 2 weeks. This means that the first time you speak to villagers during that two week period, they will introduce themselves.

However, introductions are not all that Conversation Topics are used for. They can be added into every event as an easy manner for villagers and NPCs to commentate on current events.

Generally, Conversation Topics are not repeatable, in the sense that when you talk to a villager, a mail flag gets stored recording that they said their Conversation Topic dialogue, and it won't be repeated after that. However, you can use More Conversation Topics as a framework to add repeatability to Conversation Topics with a Content Patcher edit. See the mod page for an example pack that does this.

Adding Compatibility through Conversation Topics

Making Vanilla Villagers comment on Custom NPCsː

It can often be difficult to make vanilla villagers comment on new NPCs as adding new dialogue keys may conflict with other mods, and often result on neither being applied. This problem can easily be circumvented by using Conversation Topics. Because CTs are essentially a new, unique dialogue key that youd mod creates, so long as you keep your CT name unique you can easily make any vanilla villager comment on your mods events through adding CT dialogue.


Exampleː This is how ARV makes Pierre comment on Sterling looking so happy after having taken the player on a bike ride.

 //Pierre
   {
    "LogName": "Conversation Topics - Pierre",
    "Action": "EditData",
    "Target": "Characters/Dialogue/Pierre",
    "Entries": 
        {
        
            "SterlingBike":"Tch. What's got that boy looking that happy all of a sudden?",

        },
   },

This is essentially telling CP to add dialogue to Pierre using a key that is entirely unique, and thus ensuring compatibility with other mods that might add dialogue to Pierre.

Making Custom NPCs acknowledge other Custom NPCsː

Instead of being stuck adding a plethora of "HasMods" in order to have your NPC acknowledge others, you can simply using Conversation Topics to have your NPC comment on the important events of other NPCs.


Exampleː This is how Henry reacts to Sterling having been out late.

{
    "LogName": "Conversation Topics - Henry",
    "Action": "EditData",
    "Target": "Characters/Dialogue/Henry",
    "Entries": 
    {
           "SterlingSwim":"Sterling got home late last night. I never can sleep when he's out to such late hours.#$b#But when he told me that he was with you, I realized that maybe I don't have to worry about him so much. I'm glad to see him starting to make better choices in company.",
    },
},

As you can tell, the process is entirely identical to that of vanilla villagers, all that needs be changed is which dialogue is being targetted. In this case, since I want Henry to say this line, the dialogue is targetting Henry's dialogue file.

Conversation Topic List

Vanilla conversation topics

The list of vanilla conversation topics (for events such as the community center completion, or spouse 14 heart events) can be found on the official wiki.

Mod conversation topics

The list of mod-added conversation topics has been moved to its own page.

Using Conversation Topics Creatively

So you read through the conversation topic list and you don't think you can have your character comment on some of the happenings. Well it's no problemǃ You can still use conversation topics to add compatibility creatively and organically.

Exampleː

 {
    "LogName": "Conversation Topics - Harvey",
    "Action": "EditData",
    "Target": "Characters/Dialogue/Harvey",
    "Entries": 
        {

              "SterlingSwim": "Mia came by with the sweetest looking biscuits I have ever seen. They were shaped like a bird.$7#$b#They were even sugar free! We're some lucky neighbors.$4",
            "SterlingBike": "I wonder if I could convince Sterling to come sign on for a yearly checkup.#$b#Now he's back home it's important we start taking care of his health.",
            "SterlingDrugs": "Have you heard of Mia's Starshot... Cappuccino?#$b#It's this funky little coffee drink that's officially made for my monthly's intake of sugar.#$b#She insisted she wanted me to try it.$7",
            "SterlingSobriety": "Maru said Mia came by to drop off some cookies. It's a shame I missed her.$4#$b#To thank her myself, of course.$7#$e#Have you ever had a chance to try them?$4",
        }
},

These are ways in which Harvey now acknowledges Mia's existence through the use of Sterling's conversation topics. Though they do not relate to what just happened in Sterling's story, now Harvey will easily acknowledge Mia in a very simple, and random-looking fashion.


Another Exampleː

{
    "LogName": "Conversation Topics - Evelyn",
    "Action": "EditData",
    "Target": "Characters/Dialogue/Evelyn",
    "Entries": 
        {
            "SterlingTrain": "Oh dear. I just heard Sterling is back in town.#$b#A good kid he is. Shame about his father.#$e#Did you know George used to babysit him?",
            "SterlingRelapse": "Mia brought some cookies yesterday. They were so delightful.#$e#It's a shame George refused to try one."
        }
},

As you can see, Evelyn's comments also do not have anything to do with the events that transpired during the specific Sterling cutscenes; they only relate to his prescence in the valley. Through using CTs in a random, scare fashion UI can have her acknowledge Sterling in a natural-feeling way. In the same vein, many creative ways to achieve compatibility can be achieved through CTs.

Have fun experimenting and making the valley feel like a more cohesive place

Debugging Conversation Topics

If you are struggling to determine which conversation topics are active, you can install More Conversation Topics (version 1.1.1 for the full set) for some debugging commands

    • vl.mct.current_CTs, which prints a list of the current active conversation topics and their durations to the console.
    • vl.mct.has_flag <flagName>, which tells you whether or not you have that mail flag.
    • vl.mct.add_CT <topicName> <duration>, which adds the specified conversation topic with a duration of 1 day by default, or can specify duration.
    • vl.mct.remove_CT <topicName>, which removes the specified conversation topic.
    • vl.mct.is_repeatable_CT <topicName>, which tells you whether or not the specified conversation topic is repeatable.
    • vl.mct.repeatable_CTs, which prints a list of the repeatable conversation topics to the console.