Avernumscript Editor

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

Pages

AuthorTopic: Avernumscript Editor
Infiltrator
Member # 5576
Profile Homepage #0
So despite the many other things I should have been doing this weekend, this is what I've been working on: A text editor specifically for writing Avernumscript. At the moment it displays line numbers, includes the ability to use Alint to check scripts, has a function to count characters in the selection (for avoiding overlong strings), has a jump to line number function, and has functions to insert basic code for a while loop and for a one shot dialog message. I'm curious to know if other people have ideas for features that would be useful, particularly new types of quick code snippet generators.

I want to also warn Windows users that I have no intention to port this program should I finish it. It would require a total rewrite of ~95% of the code using different libraries, and I would have to learn what I was doing every step of the way.

Also, can anyone remind me who actually wrote Alint? I would like to ask that person's permission to bundle it with this script editor.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
...b10010b...
Member # 869
Profile Homepage #1
quote:
Originally written by Niemand:

Also, can anyone remind me who actually wrote Alint? I would like to ask that person's permission to bundle it with this script editor.
Khoth.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Infiltrator
Member # 5576
Profile Homepage #2
Ah! Thank you!

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Off With Their Heads
Member # 4045
Profile Homepage #3
Does it check brackets (outside of running Alint)? It'd be nice if an unmatched bracket showed up in some odd color (like red).

--------------------
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
Lifecrafter
Member # 6193
Profile Homepage #4
Apparently I'll never see this program, but I'll weigh in anyhow.

When you asked what features would be nice, the first thing I started thinking about were pieces of code that I often copy and paste while I'm writing a script. What I came up with are.

-force_instant_terrain_redraw() / pause(): which is used in about every frame of a cutscene, so could be nice.
-dialog boxes: especially add_dialog_choice("OK") and choice = run_dialog(1), but an entire box with empty strings would be even better.
-You said basic loops, how about a basic rectangle call? You could ask what variable you want for x and y, and the limits of x and y, then insert the appropriate loops.

I'm going to start scripting right now, I'll get back to you if anything else hits me. :P

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
Law Bringer
Member # 4153
Profile Homepage #5
Yay! TextEdit has been annoying me lately... I have to keep using capitalized pause() calls to check line numbers. :P

Inefficient, but it works.

--------------------
Gamble with Gaea, and she eats your dice.

I hate undead. I really, really, really, really hate undead. With a passion.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Guardian
Member # 6670
Profile Homepage #6
Niemand, we have ways of making you do a Windows port. :P

This has renewed my interest in learning XML so I can write a .scheme file for AvernumScript in PN2. Won't be able to do all the fancy code-generation, but at least PN2 already highlights mismatched brackets and does line numbers.

--------------------
Avoid dropping air conditioners out of windows.
- Label on an air conditioner
Posts: 1509 | Registered: Tuesday, January 10 2006 08:00
Master
Member # 5977
Profile Homepage #7
This seems nice, but what exactly will it feature that Textwrangler doesn't have? That, too, is a free text editing program, specifically for HTML, but it works well with any kind of script.

EDIT: I was thinking, as something I would love to see, that it might be very handy to have some pre-defined script starts. Like that you can make a new file, and that you can choose what sort of script you want, and according to that the START, INIT etc states are automatically added.

Something else which may be usefull, along the lines of what kelandon commented and is nit implemented in Textwrangler to my discontent, is a checker that automatically checks for parentheses: if you type an unmatched right bracket somewhere, it will immediatly warn you.

[ Monday, April 09, 2007 10:37: Message edited by: Thralni ]

--------------------
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
Law Bringer
Member # 2984
Profile Homepage #8
No Windows port? :(

I guess I'll have to wait for the Eclipse plugin I wanted to write some day. That'll be a long wait. :rolleyes:

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Lifecrafter
Member # 7538
Profile Homepage #9
You guys could always just… switch to Mac. :P

--------------------
Do not provoke the turtles.
They do not like being provoked.

-Lenar

My website: Nemesis' Refuge
Posts: 743 | Registered: Friday, September 29 2006 07:00
Lifecrafter
Member # 6700
Profile Homepage #10
BLASPHEMER!!!
(let's see how UBB takes that one)

--------------------
The Silent Assassin believes that this scenario is a perfect example of why everyone should stop using computers and start blowing cows up with molotov cocktails.

--------------------
-Lenar Labs
What's Your Destiny?

Ushmushmeifa: Lenar's power is almighty and ineffable.

All hail lord Noric, god of... well, something important, I'm sure.
Posts: 735 | Registered: Monday, January 16 2006 08:00
Infiltrator
Member # 5576
Profile Homepage #11
Update:
Kelandon: Bracket checking is in. It proved to be a lot of work, but I'll agree that it's useful. I had to implement it in a kind of clumsy way though, so while it seems to be okay on 1000+ line scripts, I may need to improve it for better efficiency. It also does parentheses as suggested by Thralni.

Lazarus: for the force_terrain_redraw(),pause() thing I got to thinking it might be both good and possible to let users create their own snippets to be added via a set of short cuts. I'll have to work on the idea. A full-blown dialog box generator is a good idea, I'll definitely be putting that in. As for nested loops, one can make a section of code, use the loop generator to surround it with a loop using one variable, then surround that with a another loop using another variable. Hopefully that will be flexible enough and simple enough to be a convenient system to use.

Dintiradan: Well, you'll have to start out by teaching me about GUI frameworks for Windows. . . To all the windows users, I'm genuinely sorry not to able to do it, but a port is just more than I think I could handle. Being a cocoa program for Mac OS this is written in Objective-C, and makes extensive use of NSMutableAttributedStrings, NSTextStorage, and so forth that I would have no idea how to reproduce using Windows native frameworks. The best solution would be for someone who does know more about programming on Windows to make an equivalent program.

Thralni: While the line numbers and syntax highlighting don't differ greatly from Textwrangler, (which I do think is a great program, by the way.) it allows the user to check the script using Alint without leaving the application, marks the lines that Alint reported errors on, and has the code snippet generators. I don't expect this program to be spectacular in it's additional features, I'm hoping to make it possible to spend more time in a single application when writing scripts, and do simple, repetitive scripting tasks more efficiently. Lastly, you idea of script templates is great and I will definitely look into it.

And finally, I really just have to agree with Nemesis' analysis of the best way to solve every problem related to using Windows. :P

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Off With Their Heads
Member # 4045
Profile Homepage #12
quote:
Originally written by Niemand:

Kelandon: Bracket checking is in.
Cool. I approve.

quote:
I'm hoping to make it possible to spend more time in a single application when writing scripts, and do simple, repetitive scripting tasks more efficiently.
Yes! This is what BoA so desperately needs.

quote:
Lastly, you idea of script templates is great and I will definitely look into it.
It shouldn't be very hard, I'd think, and it'd be really convenient to have.

--------------------
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
Law Bringer
Member # 2984
Profile Homepage #13
You know, you might have something if you ditched the Mac and ported it for a real alternative to Windows...

(like, don'tcha know, Linux or something)

[/jibe] :P

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Law Bringer
Member # 4153
Profile Homepage #14
Everyone: Drop the Mac/PC/Linux junk, if you'd be so kind.

--------------------
Gamble with Gaea, and she eats your dice.

I hate undead. I really, really, really, really hate undead. With a passion.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Shaper
Member # 7472
Profile Homepage #15
*Drops own PC; predictable result happens*

On a side note, I think the C / C++ scheme in Programmers Notepad works well enough for me, so it won't be too great a loss not to be able to use this.

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Master
Member # 5977
Profile Homepage #16
Okay, I didn't know you were about to put all that in. I think I might drop textwrangler eventually if all this will be working correctly (The Alint sounds very good). I'm glad you approve of the template idea. It would be very helpfull if it could be put in.

Thanks :)

--------------------
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
Infiltrator
Member # 5576
Profile Homepage #17
Update again:
So I've now added a quick generator for full dialog boxes, I've got template files for an empty creature script, an empty terrain script, an empty town script, and basicnpc (I intend to make more, also.). There is also a code snippet manager function now: you can define your own code snippets for quick use, each is represented in a menu, and the first nine are assigned keyboard shortcuts. When you press the keyboard shortcut or select the menu item, the snippet is inserted into the current document.

What I'm now working on is making the preferences window. So far it allows you to turn on and off text wrapping, syntax coloring, and unmatched brace highlighting, as well as setting all of the colors used in syntax highlighting. So I want to ask potential users: what else would you want to be able to set or customize?

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Infiltrator
Member # 3040
Profile #18
For the code snippet manager: How about adding an option that will let the user customize where the insertion point starts? For instance, the text for "pause" could be:
1. force_instant_terrain_redraw();
2. pause(#);
Where the code snippet manager treated "#" as a selection indicator: Whenever "pause" was selected, the code would be inserted but with the "#" selected. Then one could do command-1 (or whatever keyboard shortcut it's assigned to) and then immediately enter the number.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Guardian
Member # 6670
Profile Homepage #19
To build upon that, how difficult would it be to do that for all the BoA calls? It could be similar to the argument prompting in Eclipse.

--------------------
I got up one morning, couldn't find my socks, so I called Information. She said, "Hello, Information."
I said, "I can't find my socks."
She said, "They're behind the couch." And they were!
- Steven Wright
Posts: 1509 | Registered: Tuesday, January 10 2006 08:00
Off With Their Heads
Member # 4045
Profile Homepage #20
This would probably be hard, but I'd love to have this script editor sync-ed up to the BoA documentation somehow. That is, have a list of calls in a separate window (closable, of course) on the side, and clicking on a call pulls up the appendix entry for that call, or something more or less to that effect. Maybe a Help feature that goes to the appendices.

Oh! And an astring-like feature, either that runs a spell-check on the text (ignoring the code) or that exports all the text to a text file (ignoring the code) and re-imports it so that the user can run a spell-check with another, separate application. This also might be hard.

If either of those two things are possible, they'd be neat, but even if not, the application sounds pretty neat anyway. Originally, I was using at least eight different applications for BoA scenario designing (Photoshop, Preview, and ResEdit for graphics, Word, BBEdit Lite, and Alint for scripts, and the BoA Editor and the BoA app for drawing towns and outdoors). This application might bring the total down to four (Graphic Adjuster, this, and the BoA Editor and BoA app). That would be a very good thing.

[ Monday, April 16, 2007 12:50: Message edited by: Kelandon ]

--------------------
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
Post Navel Trauma ^_^
Member # 67
Profile Homepage #21
quote:
Originally written by Niemand:

Also, can anyone remind me who actually wrote Alint? I would like to ask that person's permission to bundle it with this script editor.
Feel free. Also, if it doesn't do quite what you want, feel free to modify it and/or ask me things about it (but if you modify it, please also distribute the modified source)

--------------------
Barcoorah: I even did it to a big dorset ram.

desperance.net - Don't follow this link
Posts: 1798 | Registered: Thursday, October 4 2001 07:00
Infiltrator
Member # 5576
Profile Homepage #22
Thanks Khoth. I was meaning to get around to emailing you sooner. Sorry. The entire thing will be open source when I get it done, and I am planning to make some slight additions to Alint; it has given me a few bad results with te_ed_icon_adjust and a couple of other things.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Off With Their Heads
Member # 4045
Profile Homepage #23
Anything releasable?

--------------------
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
Infiltrator
Member # 5576
Profile Homepage #24
Sorry, this is my last week of classes for this semester, so it's a little hectic. I'm hoping less than a month to a beta, depending on how things go.

Since my last update, I have gotten a couple of things done:
-The program no longer crashes when you erase all the text in the file.
-You can set the colors used for syntax coloring.
-Code Completion! Type part of a BoA keyword or function call, then press a key combination (Opt+Space), and you get to see a list of all the possible matches. The functions have placeholders for their parameters, contained within pairs of '#' characters.
-Cmnd+open bracket or close bracket selects the text contained by the previous or next pair of '#' characters, for quickly selecting the placeholder function arguments.

My current to-do list contains:
-Add an auto indent feature
-Fix slowness of text insertion
-Touch up Alint; I'll have to check but I think I might have found a couple of minor things that it incorrectly flags as errors.
-Add quick code generators for floor, terrain, creature, and item definitions
-Make a quick generator for dialogue nodes
-Make application modal windows work (I seem to have broken them somehow.)
-Try to make a nice spell check: This may be tricky. Apple's spell checking implementation doesn't seem to have been intended for any degree of customization by developers. I may end up doing the same thing as astring, but I'd really like a more elegant and user friendly system.
-Try to make some type of online help: This is kind of a long shot. I think it would be great to have, but figuring out how to implement it will be tricky, and even once the implementation is in place, it would need a lot of content put into it to make it really useful. Could be very time consuming. THis might be a feature to put off for a possible version 2, so as not to delay version 1 indefinitely.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00

Pages