Freedom Reborn

Freedom Force Forums => Scripting Forum => Topic started by: M25 on February 13, 2009, 03:34:37 AM

Title: EZ Script Editor - Beta 0.2 released
Post by: M25 on February 13, 2009, 03:34:37 AM
If you've written stories in EZ script, you know it can be time-consuming tracking down little errors in the text.  The EZ Script editor:

- is a text editor that understands EZ script
- analyzes stories, and highlights any problems it finds
- contains a quick reference guide to the encounters, custom actions and cutscene commands
- generates the captions without having to go in-game


The Beta version of the EZ Script Editor is available at:

http://members.shaw.ca/m25/ezscriptedit02.zip



Short Readme
Spoiler

EZ Script Editor v0.1
by m25

For additional help, go to the Freedom Reborn forums,
http://freedomreborn.net/


The Basics:

Configuration:

When you start the program, go the panels menu and select configuration.  From there, enter or choose the paths to the dat files you are using (the mod directory), the language files location (usually <mod directory>/Lang/English), your custom heroes directory, and the map file you are using for the story.



Editing:

The Edit window is a basic text editor that has some understanding of EZ Script. 

As you type, it will highlight lines in red if the parser does not understand the line.  If you think it is correct, chances are you are missing a space between words, after commas, etc.

To perform a more thorough check of the story, select Analyze Script under the Tools menu.  If any problems are detected, errors will appear in the Reports/Errors window below the Edit window.  Clicking on any error should bring you to that line within the story.

If you have an error, and you know it is correct, please report it on the forums.


You can cut, copy and paste using the standard commands (cut = ctrl-x, copy = ctrl-c, paste=ctrl-v).

You can have multiple files open at once.  You can view them side by side by dragging the tab to the side of the window and holding it there for a second or two.



Sidebar:

The sidebar shows lists of encounters, actions, cutscene commands, characters, objects, heroes and markers.  Selecting an item in one of the lists will display a brief description of the item in the Description window (if it has a description). 

You can double-click on an item and it will be added to the Edit window at the location of the edit cursor.

The characters, objects, heroes and markers are pulled from the characters.dat, objects.dat, hero directoyr, and map file that you specify in the configuration window.  If you haven't set it up, then the lists will be empty.



Generating Captions:

To generate captions, you must have your language directory set correctly!

Select Generate Captions from the Tools menu, and the editor will add the required captions to the captions.txt file in the language directory you have set.  You'll still need to generate the language files using FFEdit or my language file generator to get the captions into the dat files.


Title: Re: EZ Script Editor
Post by: GogglesPizanno on February 13, 2009, 03:47:37 AM
Oooo... Ahhhhh.... Shiny....
Title: Re: EZ Script Editor
Post by: M25 on February 13, 2009, 04:04:19 AM
Of course, it should also be fully compatible with the EZ script assistant.

Title: Re: EZ Script Editor
Post by: JKCarrier on February 13, 2009, 04:05:31 AM
Bless you, M25!  :wub:
Title: Re: EZ Script Editor
Post by: GogglesPizanno on February 13, 2009, 04:56:30 AM
Quote from: M25 on February 13, 2009, 04:04:19 AM
Of course, it should also be fully compatible with the EZ script assistant.

Why on earth do I need to use that anymore?  ;)

I only played with it for a bit but its pretty sweet.
Nicely done.
Title: Re: EZ Script Editor
Post by: BentonGrey on February 13, 2009, 05:29:00 AM
This is....the greatest thing ever. :D

:EDIT: I've been using this on my first Aquaman mission, and it works like a dream so far!  I did notice one thing, though, that could be useful.  If I choose a Flee The Scene encounter (or something like it) from the menu on the right, I get all kinds of lovely cutscene options and such, but I DON'T get any Next: options.  Those could be cool to include.  Next: If All Escaped, etc.

:EDIT2: Hey M, I just got this error message when I added a character.
Spoiler

Manager.Notify: Unable to invoked notify for do errorcheck --- string index out of range
Manager.Changed: Unable to invoked changed for doubleclick ui choices changed on <bound method HandleList.SendItem of <sidebar.HandleList instance at 0x01B35A30>> --- see previous
UI_List.DoubleClick: Unable to invoke changed for ui choices --- see previous
Traceback (most recent call last):
  File "tested\buildtested\out1.pyz/UIWX.ui_elements", line 283, in DoubleClick
Edit.errors.Error: see previous

He added fine, so I don't know what the problem was.

:EDIT3: Found a minor error.  When you add a custom encounter, instead of "End Cutscene" you get "Enc Cutscene"
Title: Re: EZ Script Editor - Beta 0.2 released
Post by: M25 on February 19, 2009, 01:33:56 AM
I've uploaded Beta version 0.2 to

http://members.shaw.ca/m25/ezscriptedit02.zip


It fixes some errors, catches a few more problems with stories, adds some quality of life features like asking if you want to save an edited file, and adds some encounters that were missing from the help files.


Title: Re: EZ Script Editor - Beta 0.2 released
Post by: tommyboy on February 19, 2009, 01:46:50 AM
I have got to start playing with this!
Thank you.
Title: Re: EZ Script Editor - Beta 0.2 released
Post by: yell0w_lantern on February 19, 2009, 02:47:06 AM
 :wub:
You, sir, are the best!
Title: Re: EZ Script Editor - Beta 0.2 released
Post by: yell0w_lantern on February 19, 2009, 09:42:32 PM
Very useful tool!

The one-shot power trap is still troubling me. I cut and pasted powers right from the power tab in the editor and the editor still reads them as not existing.
Title: Re: EZ Script Editor - Beta 0.2 released
Post by: M25 on February 19, 2009, 10:08:34 PM
If you see something that you are sure is correct, then it's probably an issue with the editor.

It looks like 'Trap Power:' isn't in the definition file.

If you like, you can add
{'type': 'trap power', 'header': 1, 'pattern': 'trap power: <power>'},

to the parsedef.txt file, and it should recognize the line.  Otherwise, just ignore it for now.


Title: Re: EZ Script Editor - Beta 0.2 released
Post by: yell0w_lantern on February 20, 2009, 02:28:28 AM
Hmm, the problem might be on my end - I play-tested the level and the durn traps don't spring.
Title: Re: EZ Script Editor - Beta 0.2 released
Post by: M25 on February 20, 2009, 05:05:41 PM
Post your story and script.log in a new thread, and I'll look at it.  I'd like to keep this thread for editor issues.