Jump to content

Code?


Nicothodes

Recommended Posts

As Degarne Htils said, you can create BoA script files in just about any text editor, as long as it allows you to save files as unformatted text.

 

From the manual, section 2.1:

 

"On a Macintosh, scripts can be edited using SimpleText, BBEdit, or any other text editor. On Windows, scripts can be edited using NotePad or WordPad. Make sure the script is saved as regular text (not, say, in Microsoft Word format) or Blades of Avernum won’t be able to understand it."

 

In case you were wondering where to save the script files, they should go in the directory that contains the scenario file you're working on.

 

Again, from the manual:

 

"All of the scripts for a scenario must be in the same folder as the scenario (not in any subfolders). The game will only be able to find the scripts if they are in the same folder as the actual scenario file."

Link to comment
Share on other sites

Don't use TextEdit, though. You'll be bashing your head against the wall trying to debug it. Use BBEdit Lite.

 

Look at VoDT for examples of what the scripts should be titled. For example, each town has a different one, and it's standard to put the town number and part of the town name as part of the town script's title.

Link to comment
Share on other sites

You must be far better at reading over your code than I am. I rely on the BoA compiler a great deal. And the line numbers are meaningful once you know how to use them, although it can take some practice.

 

All I know is that my debugging time cut in half or even less once I started using BBEdit Lite.

Link to comment
Share on other sites

HHHHHWWWHHAT?? Did someone change their name or is this some different Nicoth*des? Didn't you release a scenario already or something? I thought you used Windows.

 

Anyone, read the manual. It tells you all the basic stuff, and there should be many examples of code in your scenarios/[VoDT|aSR|ZKR|DwtD] folder. Use the editor in conjunction with the scripts and learn how to format your scripts intelligibly. Don't make make stilly mistakes like forgetting semicolons(";") declarations of variables in the right spot, initialization of strings, mismatched braces and parenthesis, unpaired quotes, missing parenthesis and accompanying braces around if and while controllers, blah blah blah.

 

EDIT: Forgot my paid endorsement.

With a mature development headed by Slava Pestov, JEdit is a full featured text (not word) editor. It runs through a Java Runtime Environment, and as such, it will run on any platform with the correct JRE. It has been developing for 4 (maybe 5, can't remember) and is completely open source and modularity. Macros can be coded in and there are many extensions available. It supports BeanShell, a simple scripting system for text matches and such, kind of useful in place of regular expressions. Download it now from Sourceforge!

Link to comment
Share on other sites

Quote:
HHHHHWWWHHAT?? Did someone change their name or is this some different Nicoth*des? Didn't you release a scenario already or something? I thought you used Windows.
I assume you're talking about a different Nicothodes, because I've never made a scenario with a plot in my life(though I've finally found a plot idea) in my life, and I can't stand Windows.
Link to comment
Share on other sites

I use BBEdit 6.5. Its indispensable for writing scripts. It has line numbers and they match up almost every time with the error messages the main program gives. I also find the soft wrap text useful, as it tends to make the points where I have lengthy dialog obvious, and this makes it easier to go through and proofread your text at a later date then when you write it. Of course its a good idea to proofread when you write, but something will slip by, and going back will usually catch some mistakes.

 

What I also find useful is a blank word processing document to either write text in or copy from the script to check spellings and more importantly check to make sure you aren't over the character limit for that particular chunk (word count features makes this a lot easier).

Link to comment
Share on other sites

The quotes aren't displayed, so I don't count them. I haven't a clue how Jeff stores the strings we put in the scripts. Maybe the delimiters are actually quotes, which is why you can't escape the quotes, though you could use underscores. But that explanation now makes sense, now that I think about it. I was wondering why the game needed 2 marker characters...

Link to comment
Share on other sites

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