Jump to content

Ending a scenario


Dyng

Recommended Posts

Ok, so I'm gonna try this editing/scripting-your-own-adventure-thingy.

 

However I don't want the Warrior's Grove, so I decided to make an own starting town (so far it's just dirt and a few walls). But I still want you to be able to end the scenario by walking out of the starting town (to the north). My question is: how do I do this? I scanned through the editor docs, but I could find no mention of how you'd do this, and it doesn't seem to be implemented in the editor (as with its opposite, the starting location).

 

It's probably a real stupid question (and dead simple), but I'd appreciate all help I can get anyway...

Link to comment
Share on other sites

Either do what he said, or open up the "t0forttalrus.txt" file in the Valley of Dying Things folder. Look for the states that pertain to leaving the scenario (somewhere around 19, IIRC). When it is checking an SDF, that is to see whether the party won or not. Look in the editor docs appendix. The call you need should be in the "most important calls section."

Link to comment
Share on other sites

I use the following script at the bottom of my town script:

 

Code:
 beginstate 11;	reset_dialog();	add_dialog_str(0,"Do you wish to leave the scenario already?",0);	add_dialog_choice(0,"Keep Fighting");	add_dialog_choice(1,"Chicken Out");	choice = run_dialog(1);	if (choice == 1)		end();	if (choice == 2)		set_state_continue(12);break;beginstate 12;	end_scenario(0);break; 
This I more or less stole from Warrior's Grove. In town details I make exiting to the north call special state 11. However, when I run the scenario and enter the town (executing the town script) it says something about "unknown command choice". What have I missed?
Link to comment
Share on other sites

Quote:
Originally written by Dyng:
Code:
 beginstate 11;	reset_dialog();	add_dialog_str(0,"Do you wish to leave the scenario already?",0);	add_dialog_choice(0,"Keep Fighting");	add_dialog_choice(1,"Chicken Out");	choice = run_dialog(1);	if (choice == 1)		end();	if (choice == 2)		set_state_continue(12);break;beginstate 12;	end_scenario(0);break; 
I didn't start reading about scripting, so I might be saying no-sense, but I noticed the following in your script:

You give two choices (0 and 1)
The "if choice" part refers to choices 1 and 2, instead of 0 and 1...

It's just a mater of logic but, as I said, I know no scripting. So I'll let someone who knows to tell you. smile

edit: I checked the VotDT script for fort talrus, and it's just like you have there, so i'm wrong... hummm...
Link to comment
Share on other sites

Archimage Micael (which is not much of an improvement over "archmagi," by the way -- there's no I in archmage), I know what you're trying say and even I had trouble understanding what you're saying.

 

Long story short, Overwhelming, the code is right. Choosing dialog choice 0 makes run_dialog return 1, and choosing dialog choice 1 makes run_dialog return 2, and choosing dialog choice 2 makes run_dialog return 3. It's weird, but that's how it works.

 

EDIT: Posted at the same time as Flamefiend.

Link to comment
Share on other sites

Quote:
Originally written by Just Call Me Kel:
Archimage Micael (which is not much of an improvement over "archmagi," by the way -- there's no I in archmage)
My dictionary includes "Archimage" but not "Archmage". "Archimage" is quite correct; however, considering the way Spiderweb Software spells it, "Archmage" would be a better choice. Not that it matters. :p
Link to comment
Share on other sites

Ok, follow-up question.

 

That neat piece of script works just fine (I just forgot to declare the variable 'choice', I got too happy cutting and pasting), and I'm starting to get the hang of dialogue scripts. But now I've noticed that if I exit the town in qustion to the north (thus executing the end-scenario question-dialog-thingy) and choose not to exit the scenario the party really exits the town to the north. I don't want this to happen since this places the party outside my map. How do I correct this?

That is: I want the party to stay in town should they choose to continue the scenario, thus making it impossible to exit the town to the north...

 

Any ideas or suggestions?

Link to comment
Share on other sites

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