Seasoned Roamer Roentgenium Posted July 27, 2010 Posted July 27, 2010 Yes, I know I've already posted a topic asking for BoA scripting help. But I didn't want to necromance it, and I have a more specific question this time. All the scenario scripts I've seen have the scripts in one continous line until notepad switches to a new one. Is this the only way to do scripts for BoA scenarios? Or is it possible to start a new line each semicolon? Quote
Well-Actually War Trall Niemand Posted July 27, 2010 Posted July 27, 2010 Quote: All the scenario scripts I've seen have the scripts in one continous line until notepad switches to a new one. What you are seeing is not a real effect, just a line ending issue. Windows convention (and that of various other, now less important operating systems) has historically been to insist on using both a carriage return character and a linefeed character at the end of each line, while Unix systems, including modern versions of Mac OS use only a linefeed. So when you view scripts written by tools using the Unix convention, Notepad doesn't recognize the newlines they contain. If this bothers you you'll need to either use a conversion tool or an editor with more brains than Notepad. Quote: Is this the only way to do scripts for BoA scenarios? Or is it possible to start a new line each semicolon? As noted above, this isn't even what it appears to be, and no, it is not a required style. Indeed it is a style which should be avoided at all cost. Avernumscript should, to a reasonable degree, be whitespace agnostic such that you can put in as many newlines, spaces, and tabs as you want, pretty much anywhere you would be likely to want them. Quote
Easygoing Eyebeast Dintiradan Posted July 27, 2010 Posted July 27, 2010 You can start a new line for each semicolon. In fact, you can put line breaks in the middle of statements too. For example, this is valid: Code: message_dialog( "First string.", "Second string."); The reason you see everything on one line is the different ways Windows and Macintosh handle line breaks (I'm guessing you're reading scenario scripts written by Mac users). Windows represents line breaks with two invisible characters (carriage return and line feed -- or CR and LF), while Macs only use one (old ones just use CR, and newer ones just use LF). Notepad is too simple a program to handle Mac line endings correctly -- if you want to read scripts written by Mac users, use Wordpad instead. EDIT: Niemand is too fast for me. Quote
Seasoned Roamer Roentgenium Posted July 27, 2010 Author Posted July 27, 2010 How about Notepad++? EDIT: Nevermind, it works with wordpad. I have another question, though. Is there a website that teaches you how to use avernumscript, step by step? Quote
Easygoing Eyebeast Dintiradan Posted July 27, 2010 Posted July 27, 2010 The original editor comes with PDFs that explain how to use AvernumScript -- you can download the original editor here. If you need more help, Kelandon has a tutorial that might help you get started. There's also Erik Westra's cookbook, which tells you how to do the most common tasks. Erik isn't around nowadays, but Kelandon is hosting his cookbook here. Quote
Seasoned Roamer Roentgenium Posted July 27, 2010 Author Posted July 27, 2010 I acidentially placed a spawn point in my starting town, and now I don't know how to remove it. How do I do this? Quote
Well-Actually War Trall Niemand Posted July 27, 2010 Posted July 27, 2010 As far as I know, there is no way. (It appears that this is something I'll need to look into.) As long as you, like most people, are not using wandering monster groups, this shouldn't be an issue. If you are using them, you can just place all of the spawn points over again to move them to where you want. If you really want that spawn point gone, it can be done, but will at present require some low-level magic, unless there's some simple thing I've overlooked. Quote
Seasoned Roamer Roentgenium Posted July 27, 2010 Author Posted July 27, 2010 So, it's not possible. Thanks, anyway. Quote
Well-Actually War Trall Ishad Nha Posted July 28, 2010 Posted July 28, 2010 Move the spawn points to some inaccessible location? Quote
Seasoned Roamer Roentgenium Posted July 28, 2010 Author Posted July 28, 2010 Well, I'm not planning on using wandering monsters... But I am planning on using goblins. Spruced-up ones, too. Not that I know how to edit monsters... Or script... Or do much with the BoA scenario editor... I wish there was a step-by-step, ultra-basic website that could teach me how to make a scenario... Edit: Or someone willing to teach me, step-by-step. Is there anyone that tutors BoA scenario making? Edit 2: Okay, I give up. I'd love to make scenarios, but I don't know anything about scripting. I don't even know where to type the scripts. Quote
Easygoing Eyebeast The Mystic Posted July 30, 2010 Posted July 30, 2010 Originally Posted By: Roentgenium How about Notepad++? EDIT: Nevermind, it works with wordpad. A better choice would be Crimson Editor. I even made a set of custom syntax files for Avernumscript to use with it, which I'm willing to share. Originally Posted By: Roentgenium Well, I'm not planning on using wandering monsters... But I am planning on using goblins. Spruced-up ones, too. Not that I know how to edit monsters... Once upon a time, I started writing a script generator (in VB6) to help make custom creatures. It's nearly complete, and is written to be almost totally foolproof. I could always bring it out of mothballs and put the last few finishing touches on it. I also wrote and released a script generator for custom items, and is hosted at w-dueck's site here. Originally Posted By: Roentgenium Edit 2: Okay, I give up. I'd love to make scenarios, but I don't know anything about scripting. I don't even know where to type the scripts. The editor PDFs and especially the BoA cookbook (both of which are mentioned above) are a great resource for those who are new to scripting. You should at least skim them over, and take a few notes before trying to write script. Also, there's nothing wrong with good old-fashioned trial and error; that's how I learned most of what I know (which, I'll admit, isn't much; I'm still fairly new myself). It's discouraging at first, but with some practice, I know you'll get the hang of scripting. Just give it time. Quote
Easygoing Eyebeast Dantius Posted July 30, 2010 Posted July 30, 2010 Originally Posted By: The Mystic Originally Posted By: Roentgenium Edit 2: Okay, I give up. I'd love to make scenarios, but I don't know anything about scripting. I don't even know where to type the scripts. The editor PDFs and especially the BoA cookbook (both of which are mentioned above) are a great resource for those who are new to scripting. You should at least skim them over, and take a few notes before trying to write script. Also, there's nothing wrong with good old-fashioned trial and error; that's how I learned most of what I know (which, I'll admit, isn't much; I'm still fairly new myself). It's discouraging at first, but with some practice, I know you'll get the hang of scripting. Just give it time. Kelandon wrote a pretty decent introduction to scripting called "Basic Scripting for Complete Beginners". I think it's hosted of CalRef, though, so it's down for now... Quote
Hatchling Cockatrice Quiconque Posted July 30, 2010 Posted July 30, 2010 Nope. It's still here: http://home.sanbrunocable.com/~tommywatts03/scripting.html'>http://home.sanbrunocable.com/~tommywatts03/scripting.html at Kelandon's Pink and Pretty Page!! http://home.sanbrunocable.com/~tommywatts03/ Quote
Seasoned Roamer Roentgenium Posted July 30, 2010 Author Posted July 30, 2010 Okay, then. Where do I type scripts? The notepad file in my scenario folder called "goblins"? Quote
Well-Actually War Trall Niemand Posted July 31, 2010 Posted July 31, 2010 Each script needs to be its own file. The scenario script should have the same name as the scenario file, but end with '.txt', instead of '.bas'. The scenario data script is that name again, but ending in 'data.txt'. Scripts for towns and outdoor sections also end in '.txt' and traditionally begin with 't' and 'o' respectively, but can have any names you want. It may be a good idea to look at how the scripts for an existing scenario to get a feel for this. Quote
Well-Actually War Trall Ishad Nha Posted July 31, 2010 Posted July 31, 2010 The best way to learn scripting is to look through the scripts of a scenario you have played. (A scenario by someone else, any scenario will do here.) Then open the scenario in the Scenario Editor and see how it all fits together. Quote
Seasoned Roamer Roentgenium Posted August 1, 2010 Author Posted August 1, 2010 From what I've seen by looking at roses of reckoning, each town needs a different notepad file named after it for town scripts. Each town also needs a different notepad file for dialogue. Complicated and confusing to me. Quote
Well-Actually War Trall Niemand Posted August 1, 2010 Posted August 1, 2010 The town script and town dialogue scripts need to be separate, yes. (Some towns may not have a dialogue, though.) The files are just plain ASCII text, which can be created and edited with Notepad, but also any other text editor you may prefer, so long as it can save without any formatting. It really isn't very complicated, it just groups the code for separate purposes into separate files. Quote
Kyshakk Koan La paix Posted August 7, 2010 Posted August 7, 2010 Originally Posted By: The Mystic It's discouraging at first, but with some practice, I know you'll get the hang of scripting. Just give it time. I've always thought scripting is way harder than basic programming (in C/C++). Would you guys agree? Maybe it's just because I have books and classes for programming, but little more than disturbingly long documentation for avernumscript. Remembering all those calls and their formats is so hard for me. Quote
Well-Actually War Trall Niemand Posted August 7, 2010 Posted August 7, 2010 It really isn't as hard (to my mind) mostly for the reason that there isn't much you can do. Two basic kinds of flow control, integer arithmetic, and various built-in functions you can call. I never remember the arguments for most of said built-in functions; I just look them up in the documentation. In C and C++ you have to (or get to) worry about: floating point math, arrays, pointers, functions, passing arguments by value, pointer, or reference, memory management, typedefs, structs, classes, unions, constructors, destructors, inheritance, overloaded operators, the preprocessor, and templates. These are all good and useful things, but not having any of them in Avernumscript certainly makes things simple (if restrictive). It really only gets hard when you try to do something it isn't meant to do, which can really be avoided most of the time in normal scenario designing. Quote
Kyshakk Koan La paix Posted August 7, 2010 Posted August 7, 2010 You're right, it's just easier to me because I have concrete, progressive ways to learn C/C++, and I study them much more consistently, hence building on my knowledge more and more. I need to spend more time scripting. Quote
Easygoing Eyebeast The Mystic Posted August 9, 2010 Posted August 9, 2010 Originally Posted By: Fractal I've always thought scripting is way harder than basic programming (in C/C++). I approach Avernumscript as a programming language in its own right; that seems to help, despite its restrictive nature. Quote: Remembering all those calls and their formats is so hard for me. I don't even try to remember them all. There's just so many of them, for one thing; and I always keep some editor documentation handy at all times. Quote: I need to spend more time scripting. That's usually the best way to do it. I find that you truly haven't learned anything in Avernumscript unless you've gotten errors in BoA, or in my case, caused BoA to crash. Quote
Rotghroth Rhapsody BJ Back From the Beyond Posted August 9, 2010 Posted August 9, 2010 Originally Posted By: The Mystic I don't even try to remember them all. There's just so many of them, for one thing; and I always keep some editor documentation handy at all times. I have a few of them memorized, things like dialog box calls and character location calls, but I do tend to have the appendix open at all times. Originally Posted By: The Mystic I find that you truly haven't learned anything in Avernumscript unless you've gotten errors in BoA, or in my case, caused BoA to crash. Been there, done that, over and over and over and over... Quote
Easygoing Eyebeast The Mystic Posted August 10, 2010 Posted August 10, 2010 Originally Posted By: B.J.Earles Originally Posted By: The Mystic I don't even try to remember them all. There's just so many of them, for one thing; and I always keep some editor documentation handy at all times. I have a few of them memorized, things like dialog box calls and character location calls, but I do tend to have the appendix open at all times. I memorized a handful of calls too. I also printed out the entire editor documentation and made it into a booklet; it makes a handy reference in addition to the PDFs. Originally Posted By: B.J.Earles Originally Posted By: The Mystic I find that you truly haven't learned anything in Avernumscript unless you've gotten errors in BoA, or in my case, caused BoA to crash. Been there, done that, over and over and over and over... But have you ever taken out the operating system with it? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.