ScriptGremlin Beta 1 Release

Started by Kyran, March 17, 2010, 03:44:45 AM

Previous topic - Next topic

Kyran



Features

*  Syntax highlighting
*  Autocomplete
*  Tooltip help
*  Templates
*  Almost everything can be customized in Gremlin's INI files

Download the ZIP
www.esnips.com/web/kyranjaxipun

Notes

*  No installer needed
*  Open your character's .DEF file, and Gremlin loads the state files
*  Runs alongside Fighter Factory, keeps RAM copy of your files
*  Instructions included
*  You may submit bugs to me on this forum.

Enjoy!

Cybaster

If I were you, I'd move this topic to "Mugen Releases", with a Tool icon.
Will test later. :)

Cyanide

Will be using this in my next wip who promises to need lots of obnoxious code duplication.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Cybaster

#3
- Couldn't load my nxc_Ryu (available on www.mugenguild.com/cybaster). Problem in the path.
- Couldn't load Shin Gouki by POTS. Problem in the path of System.st. Same for his Geese, and I guess all his characters.

- Is sysvar implemented ? He seems to consider it as an error.
- In his Iori, Vans often writes the trigger before the type ("trigger1 = ..." before "type=changestate" for example), and this is evaluated as an error. While the syntax is odd, it's not an error.
- I noticed it doesn't load the "CNS" file from the DEF (tested on KOF Iori by Vans).
- Any plans on being able to display Japanese characters ? :P
- The program doesn't seem to recognize the constants from the Data section, at the beginning of the CNS files (tested on Buu by Stig87).
- Any plans on being able to open CMD and why not AIR files too ? Just read "Version Info". :P

After a few minutes of tests, this is really great for debugging chars and finding syntax errors. My biggest grip is that it couldn't load 80% of the characters I wanted to load ! o_O

FOUND THE MISTAKE : People often define files in the DEF like this :
Quote
st      = States/System.st
while your program only handles :
Quotest      =States/System.st
Notice the space after the "=".

Also, it doesn't handle comments in the DEF file. If a file is defined like this :
Quotest      =States/System.st   ;Main States
the program will attempt to parse "   ;Main States" in the path, and will obviously fail.

Kyran

#4
Cybaster,

Thanks for spotting these omissions. I have uploaded another version which parses the DEF file using the same class which parses SCtrl fields for values. Case sensitivity for the "st = " has been removed as well. I also encountered a scenario where the user may have entered the same state file name in the DEF file entries; Gremlin now checks so that the same file isn't opened twice.

Gremlin is picky about the position of the SCtrl type field. This syntax requirement can promote readability, and I am going to leave it as-is until I see a significant reason to change it...such as a large number of characters who prefer to be coded that way. PotS' characters were used as the formatting model.

Gremlin's Scintilla has a font-switching error for special characters, which includes some ASCII symbols and other fonts. It is on the bug list, sir. I hope to find a configuration within Scintilla that fixes this issue. These special characters may be lost when saving/loading.

Please be aware Gremlin has no definitions for constants...yet.

CMD= editing is now enabled. Gremlin will not attempt to open Common1.CNS, however. I need to know how a character uses a custom Common1, if that's possible, before I can give Gremlin the instructions.

Also, about AIR files. Does anyone even edit them in notepad? Help me understand if there's a need for Gremlin to show that file to the user. I can see how to parse the file to detect what frames an attack collision box exist in, and Gremlin could make that data available in the form of a variable such as #HitBox.1# or #HitBox.All# -- thus retrieving an AnimElem= string containing all relevant collision boxes. It might be an easier way to develop hitdefs.

Finally, I realize I've placed this in the wrong forum, but I'm glad I was able to distribute the beta to the people who contributed most to this project. Thanks again for your cooperation.

Download the ZIP ScriptGremlin Beta1b
www.esnips.com/web/kyranjaxipun

Cybaster

There aren't any problems anymore with comments in the DEF file, but there still is a problem handling the space after the "=".

QuoteGremlin will not attempt to open Common1.CNS, however. I need to know how a character uses a custom Common1, if that's possible, before I can give Gremlin the instructions.
If a character has a file named Common1.cns in its folder, then it will use this file and override every state defined in the Common1.cns located in Mugen's data folder.

Concerning the AIR file, I can see several little things :
- Syntax correction obviously.
- Having templates for special non-standard animations : http://randomselect.piiym.net/forum/index.php?topic=703.0

Kyran

#6
Haha, man I blundered. Tested it this time though. If the file (such as common1) can't be opened from the character folder where declared in the DEF, Gremlin will report the debug error and continue opening what it does~ find.

CNS file opening is enabled.

NOTE:  You must close Gremlin and re-open it to load another character. This issue in Beta1b is being fixed at the moment. Be careful not to lose any important data. After much testing, I'm convinced this issue is resolved.

Changes have been uploaded.

ScriptGremlin Beta1c
www.esnips.com/web/kyranjaxipun

Nnaajj

Damn, I wish I could try this out  :(
Quote from: Luis Alejandro on July 27, 2010, 07:46:45 PM
Quote from: RaiN on July 27, 2010, 07:44:57 PM
Kinda strange but I woke up today and her hand was on my ass cheek
I won't suspect anything though I'll take it she was sleeping and didn't notice
you should have flipped over slowly

MirageAtoli

On the concept of filepath, I believe there is a hierarchy in where things are checked. The common1.cns states are where they are because they are not found in the characters folder and are in the next place searched.
Quote from: Titiln on December 31, 2007, 10:46:10 PM
i think we should call it an "engine" so we don't look like total idiots because otherwise we'd be arguing about a "game" and that would be somehow "dumber" than arguing about an "engine" on the "internet" for countless hours

Quote from: Beatrice on March 01, 2010, 06:55:03 PM
Quote from: Iced
I for one, do not enjoy round corners!  :bigcry:
But they hurt much less when we accidentally hit them!  :S

Kyran

Hey folks,

I'm putting the finishing touches on a major extension to Gremlin's template system.

You will be able to build variables, functions, and use pointers to local field parameter values in your templates as of next beta release. This allows you to do things like making a hitdef's PauseTime relative to the damage dealt, instead of hand-writing in direct values.

Variables are string types, and so you can define them as whole values for a multi-attribute field.

MEDIUM_HITSOUND = 4, 1
DAMAGE = 50, 5
StunTime = 10

Locals retrieve~ values from fields within a current template, which should be a single SCtrl. The scope of a local is the template itself not any composite it is a part of.

#local.damage.1#

Functions can take variables as well as locals, and Gremlin will compute the return value during the insertion of the template into your document. Functions are limited to math operations, but you can do COS, SIN, and some other things.

TENTHDAMAGE() = #local.DAMAGE.1# / 10

Sometimes you need to round a decimal off for a field requiring an Int. CEIL and FLOOR prefixes to your function allow you to do this.

Everything's working well, and I'm adding an update button so that Gremlin will recompute and rewrite values should you want to tweak formulas and variables. Gremlin stores template code into the comment of the respective line upon insertion...as you can see here:



Next beta release soon.

Cybaster

Great news. Haven't got time to test the last beta more, but I'm looking forward to this. :)

Kyran

Beta 2a is now out with the extensions to the template system. I'm really glad Konata built that parser and mentioned it here on the forums, because now Gremlin is capable of so much more than making it easy to hard-code characters -- it's making it possible to separate interface from implementation.

I would like your feedback on the new features, and I'm open to ideas on how to improve Gremlin's script management.

ScriptGremlin Beta2a
www.esnips.com/web/kyranjaxipun

Xinos

#12
I gotta say, this is VERY nifty for making characters with. Thanks very much for this tool, this will help me a lot :)

Edit: I think you should update the title, it still says Beta 1, while this is now Beta 2.

Kyran

#13


Just to update you folks, I've been cleaning up some of Gremlin's code. As you can see, things are looking a bit more like Visual Studio now that I have a GUI-end block-reading system. Next beta may be ready tomorrow.

Changes:
*  Icons for AutoComplete
*  SysVar(0-4) awareness in VarSet (unaware of any other valid SCtrls this field can be a field in)
*  New overload for VarSet designating SysVar(#) as a required field
*  StateDef members listview - shows all the SCtrls in the current StateDef, updates itself well
*  Several fixes to AutoComplete
*  AutoComplete inserts the  = sign for you when typing an SCtrlField
*  Disabled Ctrl+Space shortcut for AutoComplete, as it was displaying garbage

I'm happy that the prototype parser has been able to perform to expectations. Unfortunately, the spaghetti code has not made it easy enough to extend the application's functionality. But now that the requirements are clear, I'm able to build a proper object model.

Eventually, Gremlin should be able to do things like check for duplicate field entries, such as two matching lines containing "Attr = "...and mark them for error, with a real error message, without marking duplicate Trigger1 lines as errors. Plus, with all the right data in the right place, I can finally fix that Hit_Attr2 string to tolerate a comma-delimited list and populate AutoComplete based on field types.

Will get back to you soon. Have a good one.

4/6/2010 update:
I've been delayed by a pesky bottleneck and project organization, but some support for more triggers has been added. It would be nice for autocomplete to show all your options for these triggers though, especially regarding command.cmd command strings. With any luck, I'll be able to get it working tomorrow.

Kyran

New version is up.

ScriptGremlin Beta 2b:
www.esnips.com/web/kyranjaxipun

This version adds AutoComplete support for gray triggers, which require a != or = operator, as well as everything you see in my previous post and a bottleneck fix. Instead of racing to get every last feature squeezed into the spaghetti, I've opted to take an OOP approach. However, things are still coming along. I'm pleased with this version, and I think you'll enjoy the enhancements over prior beta versions.

Please report bugs here.