User Tools

Site Tools


create_a_new_quest_line_for_the_npc_regarding_fishes_and_krapfens_pt.2

Create a new quest line for the NPC regarding Fishes and Krapfens pt.2

In the last tutorial we created a brand new quest for our modded NPC, now we will create the actual localized entries for the text of the dialogues and the buttons. Ready?

Creating a new lang file

Ok, to do this we have to create a new file in our mod's lang folder

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\Lang\English\ModQuests.json

Lets edit it and let's put this content into it

{
  "items": [
 
	{
	  "key": "mod_quest_1",
	  "value": "My Awesome Quest pt.1"
	},
	{
	  "key": "mod_quest_1-TASK-DESCRIPTION",
	  "value": "Bring a beer to the newly created NPC to get a Krapfen hoven in reward."
	},
   
 
	{
	  "key": "My Awesome Quest pt.1",
	  "value": "My Awesome Quest pt.1"
	},
	 
 
	{
	  "key": "mod_quest_1_start_dialogue-DESCRIPTION",
	  "value": "Hey hi! Did you see I'm a modded npc? And do you know what modded NPCs do desire all of the time?\n   *** Beer!! *** \nBring me a beer my friend and I will give you in return a nice and useful Hoven for your Krapfes.\nDo you like the idea?"
	},
	{
	  "key": "mod_quest_1_start_dialogue_btnB",
	  "value": "I don't ask for anything better!"
	},
	{
	  "key": "mod_quest_1_start_dialogue_btnC",
	  "value": "No way."
	}
  ]
}

Now the structure of this file should be already familiar to you: it's just a standard Hatd Times lang file.
Just lets note some things.
We can see also that we have provided entries for the task manager panel to be shown when we use the task manager panel (key T). Please note the “-TASK-DESCRIPTION” suffix we used to define the description we will find in the task manager, and the use of the quest id for the name of the enrty: After that we provided an entry for the title panel we set in the quests file dialogues:

	{
	  "key": "My Awesome Quest pt.1",
	  "value": "My Awesome Quest pt.1"
	},

After that comes the actual dialogues lang entries. Each formed of several entries. We have the first dialogue (mod_quest_1_start_dialogue) data already in place there, so lets look at how is organized:

{
  "key": "mod_quest_1_start_dialogue-DESCRIPTION",
  "value": "Hey hi! Did you see I'm a modded npc? And do you know what modded NPCs do desire all of the time?\n   *** Beer!! *** \nBring me a beer my friend and I will give you in return a nice and useful Hoven for your Krapfes.\nDo you like the idea?"
},
{
  "key": "mod_quest_1_start_dialogue_btnB",
  "value": "I don't ask for anything better!"
},
{
  "key": "mod_quest_1_start_dialogue_btnC",
  "value": "No way."
}

The logic is quite simple. We have the actual panel's text in a key formed with the quest's id and the “-DESCRIPTION” suffix (just like items and all other entities do). After that we have an entry for each button present in the dialogue panel: mod_quest_1_start_dialogue_btnB and mod_quest_1_start_dialogue_btnC. When we will start the quest, in game, we will find this as the result: (Please note the use of “\n” as a line break)

Adding the remaining dialogues

At this point we have the first dialogue with it's labels in place, the other dialogues we configured in the last tutorial, however, are still with no labels. We have to add their data to complete our job. Lets do it for the second dialogue:

  {
    "key": "mod_quest_1_dialogue2-DESCRIPTION",
    "value": "Cool my friend! Then bring me a beer and i will give you a brand new Krapfen Hoven."
  },
  {
    "key": "mod_quest_1_dialogue2_btnA",
    "value": "What's this mod thing you said before?"
  },
  {
    "key": "mod_quest_1_dialogue2_btnB",
    "value": "I'll be back soon!"
  },
  {
    "key": "mod_quest_1_dialogue2_btnC",
    "value": "I already have it with me!"
  }

As we can see this is pretty much the same as we did before. The only difference now is that we have defined also the button A since this dialogue was defined with three interaction buttons. All we have to do now is to repeat this process for the remaining three dialogue panels we defined in the quest file. At the end of this process we will have a finished lang file for our quest:

{
  "items": [

	{
	  "key": "mod_quest_1",
	  "value": "My Awesome Quest pt.1"
	},
	{
	  "key": "mod_quest_1-TASK-DESCRIPTION",
	  "value": "Bring a beer to the newly created NPC to get a Krapfen hoven in reward."
	},
  

	{
	  "key": "My Awesome Quest pt.1",
	  "value": "My Awesome Quest pt.1"
	},
	

	{
	  "key": "mod_quest_1_start_dialogue-DESCRIPTION",
	  "value": "Hey hi! Did you see I'm a modded npc? And do you know what modded NPCs do desire all of the time?\n   *** Beer!! *** \nBring me a beer my friend and I will give you in return a nice and useful Hoven for your Krapfes.\nDo you like the idea?"
	},
	{
	  "key": "mod_quest_1_start_dialogue_btnB",
	  "value": "I don't ask for anything better!"
	},
	{
	  "key": "mod_quest_1_start_dialogue_btnC",
	  "value": "No way."
	},
	
	
	{
	  "key": "mod_quest_1_dialogue2-DESCRIPTION",
	  "value": "Cool my friend! Then bring me a beer and i will give you a brand new Krapfen Hoven."
	},
	{
	  "key": "mod_quest_1_dialogue2_btnA",
	  "value": "What's this mod thing you said before?"
	},
	{
	  "key": "mod_quest_1_dialogue2_btnB",
	  "value": "I'll be back soon!"
	},
	{
	  "key": "mod_quest_1_dialogue2_btnC",
	  "value": "I already have it with me!"
	},
	
	
	
	{
	  "key": "mod_quest_1_ok_dialogue-DESCRIPTION",
	  "value": "Super cool! Here is your reward. Happy Krapfens!"
	},
	{
	  "key": "mod_quest_1_ok_dialogue_btnC",
	  "value": "Great!"
	},
	
	
	
	{
	  "key": "mod_quest_1_ko_dialogue-DESCRIPTION",
	  "value": "Not fair! Not cool! You didn't follow the modding guide on the Hard Times official wiki?"
	},
	{
	  "key": "mod_quest_1_ko_dialogue_btnB",
	  "value": "What? Whats modding?"
	},
	{
	  "key": "mod_quest_1_ko_dialogue_btnC",
	  "value": "I just wanted to check if you were focused."
	},
	
	
	
	{
	  "key": "mod_quest_1_help_dialogue-DESCRIPTION",
	  "value": "Yeah, minimodding, datadriven, do you understand the lingo? Are you lingo boys?"
	},
	{
	  "key": "mod_quest_1_help_dialogue_btnC",
	  "value": "I think you're mad, mate."
	}
	
  ]
}

Test it out

If everything went well you should now be able to start again the game with no errors(!). Be sure you have your new mod active and start a new game.
Our guy will have a fully fetured task to give us, so we can go on and try to solve it!

If you have problems or find errors in this guide please get in touch at info@tempi-duri.net.

You could leave a comment if you were logged in.
create_a_new_quest_line_for_the_npc_regarding_fishes_and_krapfens_pt.2.txt · Last modified: 2019/02/12 11:07 by thorfinio