Ending a scenario
Author | Topic: Ending a scenario |
---|---|
Warrior
Member # 3905
|
written Friday, July 9 2004 08:54
Profile
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... Posts: 56 | Registered: Tuesday, January 20 2004 08:00 |
BANNED
Member # 4623
|
written Friday, July 9 2004 09:03
Profile
Homepage
Don't know the exact script (I suck at coding in general, and am too lazy to really try to learn), but take a look at the town script that comes with the Warrior's Grove. The scripts that come with the package are a good read for a begginner, I've gathered. :) -------------------- The Great Mister kommari@gmail.com[/url] Posts: 417 | Registered: Sunday, June 27 2004 07:00 |
Shock Trooper
Member # 4445
|
written Friday, July 9 2004 09:19
Profile
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." Posts: 293 | Registered: Saturday, May 29 2004 07:00 |
Agent
Member # 4506
|
written Friday, July 9 2004 09:26
Profile
Homepage
Here's the codes: end_scenario(0); This code means that you leave the scenario, but do not win it. end_scenario(1); This code means that you end the scenario and win it.-------------------- "You dare Trifle with Avernum?" ~ Erika the Archmage -------------------- My Scenarios: Undead Valley : A small Undead problem, what could possibly go wrong? -------------------- Richard Black - PROOF of his existance (the Infernal one's website). -------------------- MY FORUM! Randomosity at it's highest! :) Posts: 1370 | Registered: Thursday, June 10 2004 07:00 |
Warrior
Member # 3905
|
written Saturday, July 10 2004 02:04
Profile
I use the following script at the bottom of my town script: 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? Posts: 56 | Registered: Tuesday, January 20 2004 08:00 |
...b10010b...
Member # 869
|
written Saturday, July 10 2004 03:35
Profile
Homepage
Sounds like you forgot to define choice as a variable. Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Infiltrator
Member # 4637
|
written Saturday, July 10 2004 04:24
Profile
Homepage
quote: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. :) edit: I checked the VotDT script for fort talrus, and it's just like you have there, so i'm wrong... hummm... [ Saturday, July 10, 2004 04:27: Message edited by: Overwhelming ] -------------------- Visit the Blades of Avernum Center and the Beta Testing Center -------------- "Beware lest anyone cheat you through philosophy and empty deceit, according to the tradition of men, according to the basic principles of the world, and not according to Christ." Colossians 2:6-9 Posts: 483 | Registered: Tuesday, June 29 2004 07:00 |
Agent
Member # 4506
|
written Saturday, July 10 2004 04:43
Profile
Homepage
With langyages like this, 0 = 1, 1 = 2, 2 = 3, etc. So basically Choice 0 means Choice 1, And Choice 1 means Choice 2. Understand? - Magic and Technology are NOT a good mix -------------------- "You dare Trifle with Avernum?" ~ Erika the Archmage -------------------- My Scenarios: Undead Valley : A small Undead problem, what could possibly go wrong? -------------------- Richard Black - PROOF of his existance (the Infernal one's website). -------------------- MY FORUM! Randomosity at it's highest! :) Posts: 1370 | Registered: Thursday, June 10 2004 07:00 |
Warrior
Member # 3905
|
written Saturday, July 10 2004 08:17
Profile
quote:=D Yup! That's very likely it. Thanks. (I'm feeling pretty stupid right now...) Posts: 56 | Registered: Tuesday, January 20 2004 08:00 |
Warrior
Member # 286
|
written Saturday, July 10 2004 17:12
Profile
Overwhelming - Yeah, the numbering when you set up the buttons starts at 0, but the value you get back starts at 1. Jeff admits that was a pretty stupid thing for him to do; it was basically a rather large oversight. :P -------------------- Z: "I just feel so insignificant." Psych: "You ARE. You're an ANT." --Antz Posts: 104 | Registered: Saturday, November 17 2001 08:00 |
Off With Their Heads
Member # 4045
|
written Saturday, July 10 2004 17:14
Profile
Homepage
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. [ Saturday, July 10, 2004 17:15: Message edited by: Just Call Me Kel ] -------------------- 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 # 4202
|
written Sunday, July 11 2004 08:49
Profile
Homepage
quote: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 -------------------- Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game. Posts: 192 | Registered: Sunday, April 4 2004 08:00 |
Warrior
Member # 3905
|
written Sunday, July 11 2004 08:52
Profile
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? Posts: 56 | Registered: Tuesday, January 20 2004 08:00 |
Warrior
Member # 4202
|
written Sunday, July 11 2004 08:59
Profile
Homepage
block_entry(1); -------------------- Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game. Posts: 192 | Registered: Sunday, April 4 2004 08:00 |
Warrior
Member # 3905
|
written Sunday, July 11 2004 09:42
Profile
Where in the script does that go exactly? Posts: 56 | Registered: Tuesday, January 20 2004 08:00 |
Off With Their Heads
Member # 4045
|
written Sunday, July 11 2004 16:42
Profile
Homepage
Right before the end call. So... -------------------- 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 # 286
|
written Sunday, July 11 2004 17:31
Profile
Not quite right, Kelandon. :) If you have more than one statement in your if(), then you need braces around them, like so: -------------------- Z: "I just feel so insignificant." Psych: "You ARE. You're an ANT." --Antz Posts: 104 | Registered: Saturday, November 17 2001 08:00 |
Off With Their Heads
Member # 4045
|
written Sunday, July 11 2004 17:37
Profile
Homepage
My bad. Honestly, I was thinking: and just delete the end call entirely. It doesn't really make that much of a difference. -------------------- 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 |