Jump to content

New Town Scripts

Recommended Posts

I'm trying to play around again with the editor, and see if I can't at least set up a simple dungeon and town. But I am having a problem (actually a few), with the scripting.


My first question is: Is the editor itself suppossed to create a dialogue script when you place a character with it's memory cell set to 3? Or am I supposed to make one from scratch?


I followed Jeff's editor help file and (unless I missed something), it doesn't really say.

Link to comment
Share on other sites

You have to make them yourself. The script needs to be in this format:


(name of town script)dlg.txt


For example, in my scenario, there is a town called Fort Bluebird. The townscript is:




So the dialogue script is called:




I presume you know how to format the scripts?

Link to comment
Share on other sites

I believe this warrants a post of its own.


Following the help file Jeff included to get people familiar with the editor, I created a dungeon called "Icky Dungeon". I included a character that I intend to talk with the party, but as luck would have it, my dialog scripts are not working right. Or maybe I just stink at scripting.


As I enter "Icky Dungeon", I get hit with this:


ERROR: Tried to call a non-existant town script state.


ickydlg Error: No body declared..


And if memory serves:


Error: Tried to call a non-existant creature script state.


I don't really know what I'm doing wrong, I copied another town and dialog script so I could use it myself, and put down what information I beleive I needed into the blanks.




 // TOWN SCRIPT//    Town 1: Icky Dungeon// This is the special encounter script for this town.// The states INIT_STATE, EXIT_STATE, and START_STATE have// meanings that are described in the documenation. States you write// yourself should be numbered from 10-100.begintownscript;variables;int i,j,k,choice;body;beginstate INIT_STATE;// This state called whenever this town is entered.	enable_add_chars(1);	set_crime_tolerance(2);break;beginstate EXIT_STATE;// Always called when the town is left.break;beginstate START_STATE;// This state is called every turn the party is in this town.break; 
I really did not change it after I copied it, I did not think I had to.




// TOWN DIALOGUE SCRIPT//    Town 1: Icky Dungeon// This is the dialogue for this town.// You can use states numbered from 1 to 99.begintalkscript;variables;int i,j,k,r1,choice;begintalknode 1;	state = 1;	personality = 27;	nextstate = 1;	condition = 1;	question = "Who are you?";	text1 = "This man seems as old as time.";	text2 = "_I am John._";	text5 = " _Is there anything this old man can do to help you?_";	action = INTRO;begintalknode 2;	state = 1;	personality = 27;	nextstate = 1;	condition = 1;	question = "How old are you?";	text1 = " _Too old._";  
Some dialog text was removed to keep my post size down, but all the important stuff is there.
Link to comment
Share on other sites

the twonscript error you mentioned (tried to call a nonexisting town script state), is given when the game tries to acces a certain state but can't find it. this doesn't mean that something is wrong with the script, but with the scenario .bas file. It means that a special rectangle has the wrong number declared to run a specific state in a townscript. So, if you have a special rectangle calling for state 34, but you don't have one, it will display that error.


the error "no body declared" means that you forgot the line "body;" in your script. it should read:


 begintalkscript;variables;int i,j,k,r1,choice;body; //You forgot this linebegintalknode 1;//put here all the other stuff 
Link to comment
Share on other sites

Originally written by Nikki xx:
Make sure that in your creatures editing box, the script defined is basicnpc, or even better, leave it blank. Then make sure that basicnpc.txt is in your scenario folder.

Otherwise, it does it say which state it can't run?
I figured it out. I had the creature using a creature script I did not have (I had forgotten to put it in there). That seems to have fixed my problems with this, so now I'm off to continue my tinkering.

Thank you Nikki xx.
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...