Please note, that this utility has been rewritten from scratch and the information that you find on the
zdoom wiki will not be accurate. Please read for the major changes in this tool.



KSSC is a script compiler for Rouge Software's Strife with support for Vavoom, Zdoom and SvStrife.
To compile a script, drag and drop a text file on KSSC.exe to compile it into a binary lump file.
Output file will be the named whatever your input file is. To use the script for your wad,
rename the lump to SCRIPTXX where XX is the number of the map you want to use it on.
For example if you wish to use it on Map02, then rename the script to SCRIPT02.lmp.
Simply import the lump into your wad after your done renaming.

In scripts, they are stored as dialog blocks for a NPC, each NPC can have multible dialog blocks,
and each block sets the text, name, choices etc for that NPC. 

Each dialog block is divided into two sections: NPC info and Choice info. NPC info is used for the name,
voice, panel, item thats droped, and dialog text for the NPC. While the Choice info describes the
various choices, items to check/buy, and used to jump to the next dialog block. 

When a NPC jumps to the next block, it displays another set of text/info for the NPC.


Refer to the KSSC wiki page at http://zdoom.org/wiki/index.php?title=KSSC_and_Strife_Dialog_Scripts

===============Changes========================

The major change in this version is the change in the scrpting syntax. Here are the major changes:

KSSC will begin checking for tokens, ONCE the ACTOR token is specified, followed by the Conversation ID,
afterwards it begins checking for the NPC information.

NPC tokens:

DROP - Mobj ID of the item to drop when killed 
IF_ITEM - Item to check
IF_ITEM2 - Alternate Item check.. not used in Strife
IF_ITEM3 - Same as IF_ITEM2
GOTO - Dialouge to jump to if IF_ITEM passes 
NAME - Name of NPC (16 character limit) 
VOICE - Voice file to play (8 character limit) 
PANEL - Panel to display (8 character limit) 
DIALOG - Text to display (320 character limit)

When defining choices, they no longer require brackets, instead, you must type the token CHOICE,
then afterwards begin entering the choice options.

Choice tokens has changed as well, here are a list of the new choice tokens:

GIVE - Item ID to give to player once this choice is selected. If not used, use -1 as the ID
TEXT - Choice text display
LOG - Log # to give
YES - Text displayed on hud when selecting choice
NO - Text displayed when the choice fails (no money or missing item)
COST - The item required to proceed with the choice. To specify the amount of that item, you must
add a * sign follwed by the number of that item to check for. Example: 168 * 25. This means to check
for 25 gold coins.
NODISPLAYCOST - Same as COST except the choice text will not display the 'FOR #' that follows
after the actual choice text.
ALTCOST - Same as COST, not used in Strife.
LINK - Next block to go to when choice succeeds.

To end a CHOICE block, you must type a semicolon to end the choice block.

To end a NPC block, you must type END to end the NPC block.

Example:

=========================================================================

ACTOR	27
	DROP		301
	NAME		"TESTMAN"
	IF_ITEM		160
	GOTO		3
	VOICE		"HA000"
	PANEL		"PA000"
	DIALOG		"I see. The only way out is past the control center, which is to your right after you step out of the tavern. But that place is always locked up tight. You will need to talk to a higher offical to give you clearance."

	CHOICE
		GIVE		-1
		TEXT		"I see. Where is this official?"
		YES		"_"
		LINK		2
	;

	CHOICE
		GIVE		-1
		TEXT		"Are you human?"
		YES		"What does it look like? Sheesh..."
		LINK		-2
		LOG		1000
	;

	CHOICE
		GIVE 		160
		TEXT		"SHADOW ARMOR"
		COST		168 * 13
		LINK		1
		YES		"HERE YOU GO"
	;

	CHOICE
		GIVE 		169
		TEXT		"Give back shadow armor"
		NODISPLAYCOST	160 * 1
		LINK		1
		YES		"HERE YOU GO"
		NO		"hey! You haven't bought it from me yet!"
	;
END

ACTOR	27
	DROP		301
	NAME		"TESTMAN"
	VOICE		"HA000"
	PANEL		"PA000"
	DIALOG		"Second Block!"

	CHOICE
		GIVE		-1
		TEXT		"Heh"
		YES		"_"
		LINK		1
	;
END

ACTOR	27
	DROP		301
	NAME		"TESTMAN"
	VOICE		"HA000"
	PANEL		"PA000"
	DIALOG		"Nice Armor!"

	CHOICE
		GIVE		-1
		TEXT		"Heh"
		YES		"_"
		LINK		1
	;

	CHOICE
		GIVE 		169
		TEXT		"Give back shadow armor"
		NODISPLAYCOST	160 * 1
		LINK		1
		YES		"HERE YOU GO"
	;
END