Finishing touches

There's just a handful of things to do before we're finished. First, open z0tunneldlg.txt and add the following talk nodes:

begintalknode 9;
  state = 2;
  nextstate = -1;
  condition = get_flag(0, 1) == 2;
  question = "The goblins have been dealt with. Here is your necklace.";
  text1 = "_Finally!_ She snatches the necklace from your hands and spends a minute inspecting it for damage.";
  text2 = "After a while, she notices you're still there. _Oh, I suppose you want a reward of some sort._";
  text3 = "She gives you an insultingly small number of coins. Well, at least you did the right thing...";
  code =
    set_flag(0, 1, 3);
    toggle_quest(0, 0);
    change_spec_item(0, -1);
    change_coins(5);
    award_party_xp(50, 5);
  break;

begintalknode 10;
  state = 2;
  nextstate = -1;
  condition = get_flag(0, 1) == 2;
  question = "Um, still looking for that necklace. (Lie)";
  text1 = "She scowls. _Get back to work then! What else are you good for?_";

Now the player can finish the necklace quest and get rewarded for it. Now change state 11 in z0tunnel.txt so that it's possible to leave the scenario and win:

beginstate 11;
  reset_dialog();

  if (get_flag(0, 1) < 2) {
    add_dialog_str(0, "Should you leave this merchant and her troubles behind, and look for work elsewhere?", 0);
  } else {
    add_dialog_str(0, "Now that you've dealt with the pesky goblins, do you continue with your adventures?", 0);
  }

  add_dialog_str(1, "(Do you want to leave the scenario?)", 0);
  add_dialog_choice(0, "Yes.");
  add_dialog_choice(1, "No.");
  choice = run_dialog(1);

  if (choice == 1) {
    if (get_flag(0, 1) == 3) {
      message_dialog(
        "You leave the merchant behind and head to the nearest town.",
        "Here's hoping your next job will be a little bit more substantial."
      );
      end_scenario(1);
    } else if (get_flag(0, 1) == 2) {
      change_coins(100);
      message_dialog(
        "You leave the merchant behind and head to the nearest town.",
        "Once you get there, you sell the necklace for a decent amount. The adventuring life has its perks."
      );
      end_scenario(1);
    } else {
      end_scenario(0);
    }
  } else {
    block_entry(1);
  }
break;

It's good design to change the scenario exit message after the player has completed the main task of the scenario. That way, the player knows they aren't missing anything important.

That's the last bit of scripting we'll be doing for this scenario (yay!). The last step is to set the credits information and intro text. Open the Editor and click on Scenario > Basic Scenario Details. You'll see the following screen:

[IMAGE]

Leave the version number at 1.0.0; you only need to update it if you make a change to a scenario after it's been released to the public. In the credits field, put your name (or the names of your team if you're working with other people). Put a short description of the scenario in the description field. This will show up in the scenario selection screen. The level range for this scenario is simple: it was tested with a level 1 party, so give it the very small range of 1-5. For other scenarios, you'll have to do a fair bit of playtesting before you setting on a good range. Lastly, designers are able to set their own content rating for their scenarios. Imagine what rating your scenario would have if it was a movie, then pick accordingly. Nothing in this scenario is child-unfriendly, so let's pick "Everyone".

You can also choose the icon for your scenario listing. Click on Scenario > Set Label Icon, then put the icon number. You can find a list of all possible icons on page 14 of the appendix. We'll use 1920, a picture of a goblin:

[IMAGE]

Finally, click on Scenario > Intro Text 1/2/3 to set the introduction text for your scenario. If there's any backstory you need to tell, here's the place to do it.

[IMAGE]

And that's it! The designing work is done, but there's still testing to do.