Skip to content

Contributing

dgengin edited this page Jul 10, 2016 · 2 revisions

Contributing

Because most of the game is in JSON files, you can contribute some things that are missing that don't involve code.

Quests

To add a quest, you need to edit level/quests.json:

{
  "quest": [
    {
      "id": "butcher",
      "name": "The Butcher"
    },
    ...
  ]
}

Add a similar block as the butcher one. The id is used to identify the quest. The name is what appears in the quest log.

Then, add 2 new files in the quests folder:

butcher.json
butcher.txt

Use the same filename as the id you gave above. The game files expect that.

The text file is the text that is displayed in the scrolling window in the game.
You can open the original diablo.exe with notepad++ and search for the dialogs.
It's easier to get the dialogs this way.
You don't need to split the text. The game files are configured to do that automatically.

butcher.json

{
  "load": [
    "ui/level/showText.json",
    "questText",
    "50",
    "quests/butcher.txt"
  ],
  "audio": {
    "id": "wound01",
    "file": "sfx/Towners/wound01.wav",
    "play": true,
    "volume": "|game|soundVolume|"
  }
}

Change the text file in butcher.json to point to butcher.txt.
Use the quest's audio track here as well.

This will play the quest in the quest log.

Add quests to town players

To add quests to the town players, go to towners/strytell/quests and add these 2 files:

butcher.json
butcher.txt

The text file is the quest's text for that town player.

butcher.json

{
  "load": [
    "ui/level/showText.json",
    "smithText",
    "50",
    "towners/strytell/quests/butcher.txt"
  ],
  "audio": {
    "id": "storyt10",
    "file": "sfx/Towners/storyt10.wav",
    "play": true,
    "volume": "|game|soundVolume|"
  }
}

Change the text file in butcher.json to point to the butcher.txt of that town player.
Use the quest's audio track for that player here.

This will play the quest in that town player's quest log when you talk to him in town.

Clone this wiki locally