New Town Scripts

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: New Town Scripts
Warrior
Member # 4599
Profile #0
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.

--------------------
"Yeah-- you're right. You christians are far too persecuted nowadays. I mean it. We really should stop feeding you to the lions." --TM

"Ancient Blessings" My unfinished (and likely to remain that way) BoA scenario.
Posts: 135 | Registered: Tuesday, June 22 2004 07:00
Shaper
Member # 3442
Profile Homepage #1
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:

FortBlubeird.txt

So the dialogue script is called:

FortBluebirddlg.txt

I presume you know how to format the scripts?

--------------------
And when you want to Live
How do you start?
Where do you go?
Who do you need to know?

Posts: 2864 | Registered: Monday, September 8 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #2
If you don't know how to format it, copy a dialogue script out of VoDT and delete all but one of the nodes (leaving the other things in place, like the begindialogscript or whatever it is). Then use that node as a guide to your format.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Warrior
Member # 4599
Profile #3
Thank you both. I'll see if I can do it now.

EDIT: 100 posts...and I think I've been here two or three years.

[ Sunday, March 05, 2006 08:20: Message edited by: Commodore Redmark ]

--------------------
"Yeah-- you're right. You christians are far too persecuted nowadays. I mean it. We really should stop feeding you to the lions." --TM

"Ancient Blessings" My unfinished (and likely to remain that way) BoA scenario.
Posts: 135 | Registered: Tuesday, June 22 2004 07:00
Warrior
Member # 4599
Profile #4
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.

icky.txt

// 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.

ickydlg.txt

// 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.

--------------------
"Yeah-- you're right. You christians are far too persecuted nowadays. I mean it. We really should stop feeding you to the lions." --TM

"Ancient Blessings" My unfinished (and likely to remain that way) BoA scenario.
Posts: 135 | Registered: Tuesday, June 22 2004 07:00
Master
Member # 5977
Profile Homepage #5
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 line

begintalknode 1;
//put here all the other stuff


--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Warrior
Member # 4599
Profile #6
EDIT: I managed to fix the the body problem as well as the town script error, but I still can't figure out what's wrong with the creature script. If it is referring to the basicnpc.txt, I have not tampered with it.

[ Sunday, March 05, 2006 12:38: Message edited by: Commodore Ashby ]

--------------------
"Yeah-- you're right. You christians are far too persecuted nowadays. I mean it. We really should stop feeding you to the lions." --TM

"Ancient Blessings" My unfinished (and likely to remain that way) BoA scenario.
Posts: 135 | Registered: Tuesday, June 22 2004 07:00
Shaper
Member # 3442
Profile Homepage #7
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?

--------------------
And when you want to Live
How do you start?
Where do you go?
Who do you need to know?

Posts: 2864 | Registered: Monday, September 8 2003 07:00
Warrior
Member # 4599
Profile #8
quote:
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.

--------------------
"Yeah-- you're right. You christians are far too persecuted nowadays. I mean it. We really should stop feeding you to the lions." --TM

"Ancient Blessings" My unfinished (and likely to remain that way) BoA scenario.
Posts: 135 | Registered: Tuesday, June 22 2004 07:00