First, add these top two lines in the file:
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
I forgot what SCRIPT00 does, but you need to put it or you'll get an error.
Now for the dialogues. Each one begins with a conversation block:
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
conversation
{
//Code
}
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
conversation
{
actor = "ScriptedMarine";
}
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
conversation
{
actor = "ScriptedMarine";
page //The page block here marks the first page
{
name = "CDR. Keen"; //Name of the actor you are talking to (by that I mean the name that appears in the dialogue box, not the actor name)
dialog = "What are you here for, marine?"; //The text that appears in the main dialogue box
panel = "KEENPIC"; //This is the lump of the graphic used as a portrait (think Strife character portraits)
voice = "KEENDIA1"; //The voice lump (like the Strife characters)
drop = "Clip"; //Should the actor die while on this line of dialogue, this is what he/she will drop
link = 4; //This will be explained later on
}
}
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
conversation
{
actor = "ScriptedMarine";
page //The page block here marks the first page
{
name = "CDR. Keen";
dialog = "What are you here for, marine?";
panel = "KEENPIC";
voice = "KEENDIA1";
drop = "Clip";
link = 2;
choice
{
text = "I want to buy a weapon"; //The text that represents the option
nextpage = 2; //The page that comes next if you chose this option (represented by order in the conversation block)
}
choice
{
text = "I'd like to report a broken pipe in Sector 8.";
nextpage = 3;
giveitem = "Questitem1"; //You'll see why this is here later
}
}
}
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
conversation
{
actor = "ScriptedMarine";
page //The page block here marks the first page
{
name = "CDR. Keen";
dialog = "What are you here for, marine?";
panel = "KEENPIC";
voice = "KEENDIA1";
drop = "Clip";
link = 2;
choice
{
text = "I want to buy a weapon"; //The text that represents the option
nextpage = 2; //The page that comes next if you chose this option (represented by order in the conversation block)
}
choice
{
text = "I'd like to report a broken pipe in Sector 8.";
nextpage = 3;
giveitem = "Questitem1"; //You'll see what this is for
}
}
page //This second page block counts as page 2
{
name = "CDR. Keen";
dialog = "Here's what I got on in the inventory:";
panel = "KEENPIC";
voice = "KEENDIA2"; //A second voice lump
drop = "Clip";
choice //Each choice will now represent a shopping choice
{
text = "Shotgun";
giveitem = "Shotgun"; //This is the inventory item given to the player if this choice is selected and can be afforded
yesmessage = "Here you go!"; //This is a message printed on the screen separate from the dialogue box if you can afford it and the purchase is made
nomessage = "Sorry, you cannot afford that"; //And this is shown if it fails, and you cannot afford it
nextpage = 2; //Stay on this page
displaycost = true; //Adds "for 20" after "Shotgun", showing the cost
cost
{
item = "Coin"; //The item you spend in (for the sake of the tutorial I'll use the stock Strife gold)
amount = 20; //How much of aforementioned item you need to spend
}
}
choice
{
text = "Super Shotgun";
giveitem = "SuperShotgun";
yesmessage = "Here you go!";
nomessage = "Sorry, you cannot afford that";
nextpage = 2;
displaycost = true;
cost
{
item = "Coin";
amount = 40;
}
}
choice
{
text = "Chaingun";
giveitem = "Chaingun";
yesmessage = "Here you go!";
nomessage = "Sorry, you cannot afford that";
nextpage = 2;
displaycost = true;
cost
{
item = "Coin";
amount = 20;
}
}
choice
{
text = "That's all.";
nextpage = 1;
closedialog = true;
}
}
page
{
name = "CDR. Keen";
dialog = "Thank you for reporting that. I'll have a crew fix it in no time!";
choice
{
text = "OK.";
nextpage = 1;
closedialog = true;
special = 80; //Executes special 80, or ACS_Execute
arg0 = 2; //Sets the first argument as 2, or script 2
}
}
}
Code: Select all
namespace = "ZDoom";
include = "SCRIPT00";
conversation
{
actor = "ScriptedMarine";
page //The page block here marks the first page
{
name = "CDR. Keen";
dialog = "What are you here for, marine?";
panel = "KEENPIC";
voice = "KEENDIA1";
drop = "Clip";
link = 2; //This jumps to the page specified (in this case, 2) if the ifitem standards are met
ifitem //This checks for the item specified below
{
item = "QuestItem1"; //And it's our dummy item from before!
}
choice
{
text = "I want to buy a weapon";
nextpage = 2;
}
choice
{
text = "I'd like to report a broken pipe in Sector 8.";
nextpage = 3;
giveitem = "Questitem1";
}
}
page //This second page block counts as page 2
{
name = "CDR. Keen";
dialog = "Here's what I got on in the inventory:";
panel = "KEENPIC";
voice = "KEENDIA2";
drop = "Clip";
choice
{
text = "Shotgun";
giveitem = "Shotgun";
yesmessage = "Here you go!";
nomessage = "Sorry, you cannot afford that";
nextpage = 2; //Stay on this page
displaycost = true; //Adds "for 20" after "Shotgun", showing the cost
cost
{
item = "Coin";
amount = 20;
}
}
choice
{
text = "Super Shotgun";
giveitem = "SuperShotgun";
yesmessage = "Here you go!";
nomessage = "Sorry, you cannot afford that";
nextpage = 2;
displaycost = true;
cost
{
item = "Coin";
amount = 40;
}
}
choice
{
text = "Chaingun";
giveitem = "Chaingun";
yesmessage = "Here you go!";
nomessage = "Sorry, you cannot afford that";
nextpage = 2;
displaycost = true;
cost
{
item = "Coin";
amount = 20;
}
}
choice
{
text = "That's all.";
nextpage = 1;
closedialog = true;
}
}
page
{
name = "CDR. Keen";
dialog = "Thank you for reporting that. I'll have a crew fix it in no time!";
panel = "KEENPIC";
voice = "KEENDIA3";
choice
{
text = "OK.";
nextpage = 1;
closedialog = true;
special = 80;
arg0 = 2;
}
}
}
https://www.dropbox.com/s/3952rrn2bfp6k ... uedemo.wad
Questions? Let me know below. If you read this whole thing, thank you! It means a lot to me, and I hope it helped.