[RELz] - Script Validator

Post » Mon Aug 09, 2010 5:17 am

Update 13/12/09 - Rewrote the validator in order to shorten it a bit and ended up fixing a few bugs (including a pretty serious one in IE) at the same time. I've been through and checked that each error works as expected so hopefully I haven't introduced any new bugs.

Cipscis
User avatar
Stefanny Cardona
 
Posts: 3352
Joined: Tue Dec 19, 2006 8:08 pm

Post » Sun Aug 08, 2010 9:30 pm

This will be very helpful!! It even looks like you where nice enough to put it in the same font as the GECK scripts, so it doesnt look wierd till we reopen it. Thanks again cipcis, I plan on using this alot :D
User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Sun Aug 08, 2010 9:20 pm

pdate 14/12/09 - The http://www.cipscis.com/fallout/utilities/validator.aspx will now return an error if an invalid blocktype is used. I've been learning some more JavaScript so hopefully I'll be able to validate more stuff that isn't entirely structural - like blocktypes. Expect more updates in the near future.

Cipscis
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Mon Aug 09, 2010 2:13 am

Cipscis,

Is there a way in Notepad++ to modify this template? I use black background for coding/scripting, and this only looks good on a white background. I've looked all over the style configuration section, but can only seem to edit the default styles..

Thanks!

Miax
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Mon Aug 09, 2010 1:14 am

Hey Miax, are you talking about my http://www.gamesas.com/index.php?showtopic=1061039? In order to change the styles of a custom language without editing the actual XML you need to open the User-Defined Language dialogue box by pressing the icon that looks like a lightening bolt in a window. From there, select the FO3Script in the "User language:" select menu and you'll be able to change all the styles there. The default background colour is the second style from the top in the "Folder & Default" tab.

Cipscis
User avatar
Amysaurusrex
 
Posts: 3432
Joined: Wed Aug 09, 2006 2:45 pm

Post » Sun Aug 08, 2010 3:43 pm

Hey Miax, are you talking about my http://www.gamesas.com/index.php?showtopic=1061039? In order to change the styles of a custom language without editing the actual XML you need to open the User-Defined Language dialogue box by pressing the icon that looks like a lightening bolt in a window. From there, select the FO3Script in the "User language:" select menu and you'll be able to change all the styles there. The default background colour is the second style from the top in the "Folder & Default" tab.

Cipscis


Good Morning Cipscis!

Thank you, that's exactly what I needed. :)

Cheers!

Miax
User avatar
Jaki Birch
 
Posts: 3379
Joined: Fri Jan 26, 2007 3:16 am

Post » Sun Aug 08, 2010 8:07 pm

Thanks for this, Cipsis. This is a massive help and I'm using it constantly.


Hey this probably isn't the spot for it, but could you go over the original Tutorial and make it a bit more clear in spots, maybe offer an alternative method such as an ingestible, and...get it linked back on the WIkI? It seems to have vanished from there and I had to unbury it with a search.
User avatar
Alyna
 
Posts: 3412
Joined: Wed Aug 30, 2006 4:54 am

Post » Sun Aug 08, 2010 7:03 pm

Hey Elanthil, I assume you're talking about one of my menu tutorials? At the moment I'm no longer updating the one that I have hosted on the Wiki - if I do any work on a menu tutorial then it will be on the latest one hosted on my website. That said, because my http://geck.gamesas.com/index.php/Adding_an_Options_Menu tutorial is hosted on the Wiki, anyone is free to edit it. Because I'm only updating the latest tutorial, http://www.cipscis.com/fallout/tutorials/menu.aspx, I'm linking from the old tutorial to the new one but not from the new one back to the old one.

I personally don't like the practice of using ingestibles to open menus, as a fair bit of extra work needs to be done for (as I see it) no gain at all. Instead, I prefer to use books, as they appear in the "aid" section of the player's inventory and trigger http://geck.gamesas.com/index.php/OnEquip blocks when "equipped", but can be set up so that they are not "used up" when this happens.

Is there anything in particular that you'd like me to clarify in the newer tutorial? I think I saw you mention that you were unsure how to set up the script, perhaps a small section focusing on this would be helpful?

Cipscis
User avatar
lucile davignon
 
Posts: 3375
Joined: Thu Mar 22, 2007 10:40 pm

Post » Sun Aug 08, 2010 6:25 pm

Hey, how did I miss this? Awesome stuff! thanks for sharing :tops:
User avatar
Monika Fiolek
 
Posts: 3472
Joined: Tue Jun 20, 2006 6:57 pm

Post » Sun Aug 08, 2010 3:32 pm

I personally don't like the practice of using ingestibles to open menus, as a fair bit of extra work needs to be done for (as I see it) no gain at all. Instead, I prefer to use books, as they appear in the "aid" section of the player's inventory and trigger http://geck.gamesas.com/index.php/OnEquip blocks when "equipped", but can be set up so that they are not "used up" when this happens.

Cipscis


I like this idea alot, very cool. I was going to use an ingestible as well, as I was struggling like Ethanil01 was on using special-armor slots. Using a book seems Ideal.

Thanks!

Miax
User avatar
Adrian Morales
 
Posts: 3474
Joined: Fri Aug 10, 2007 3:19 am

Post » Sun Aug 08, 2010 4:08 pm

Hey Elanthil, I assume you're talking about one of my menu tutorials? At the moment I'm no longer updating the one that I have hosted on the Wiki - if I do any work on a menu tutorial then it will be on the latest one hosted on my website. That said, because my http://geck.gamesas.com/index.php/Adding_an_Options_Menu tutorial is hosted on the Wiki, anyone is free to edit it. Because I'm only updating the latest tutorial, http://www.cipscis.com/fallout/tutorials/menu.aspx, I'm linking from the old tutorial to the new one but not from the new one back to the old one.

I personally don't like the practice of using ingestibles to open menus, as a fair bit of extra work needs to be done for (as I see it) no gain at all. Instead, I prefer to use books, as they appear in the "aid" section of the player's inventory and trigger http://geck.gamesas.com/index.php/OnEquip blocks when "equipped", but can be set up so that they are not "used up" when this happens.

Is there anything in particular that you'd like me to clarify in the newer tutorial? I think I saw you mention that you were unsure how to set up the script, perhaps a small section focusing on this would be helpful?

Cipscis


your tutorial just seems to jump around alot, covering areas that you needed to cover as you needed to cover them on your project for the pencil machine, and not really giving a good sense of a 'step by step checklist'.

There was a lot of useful info in there, but it also would have benefitted from highlighting and sectionalizing.

A good breakdown of what each line in the script does...and why...and the method needed to not only expand the script, but to add 'back' or optionally 'exit' buttons would be helpful too.
User avatar
Sophie Payne
 
Posts: 3377
Joined: Thu Dec 07, 2006 6:49 am

Post » Sun Aug 08, 2010 5:36 pm

Thanks for the feedback Elanthil, I don't get much feedback that I can use to improve my tutorials so I'll make sure to make use of what you've told me.

I've been in the process of rewriting my http://www.cipscis.com/fallout/utilities/validator.aspx for a few days now, and at the moment I've got it almost to the same point as the live version but with less than half the code thanks to some new JavaScript tricks I've learnt. I'm not expecting anyone to take me up on this, but I've uploaded the dev version to http://www.cipscis.com/. If anyone's interested in testing it or having a look at how I've written it (and perhaps offer some pointers if you know a bit of JavaScript) you can find it http://www.cipscis.com/dev/validator/validator.html.

I'll update this post when I update the file, and when I take it down once it's ready to go live. If anyone wants to have a look at it I'd appreciate it if they could let me know here just so I can see who's interested.

Cipscis

EDIT:

Updated file - fixed bugs with "else"/"elseif" statements and "set" commands.

Updated file - fixed error with IE 7, indentation bug and incorrect error reporting of missing "endif" statements at End statements.

Updated file - fixed indentation of empty lines, problems with residual error detection. Added script type detection via ScriptName and blocktype and related errors (not checking variables yet)

Cipscis
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Mon Aug 09, 2010 1:41 am

I've been slowly working on the dev version of my validator, and it's advanced a bit further since I last posted here. At the moment it checks all the same errors as the old validator with only a couple of exceptions (variables in result scripts), and checks a few more on top of them.

The current iteration can be found http://www.cipscis.com/dev/validator/validator.html

Cipscis
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Sun Aug 08, 2010 9:02 pm

Nice that it doesn't say ScriptEffectUpdate is an invalid block now. I've been cheating and using your tool to indent my scripts for me when I start getting cross eyed from iteration... and I do get so very cross eyed. Most of my test saves are onomatopeias now, like "greep" "Derr" "Doo" "Dah". I've been typing "Load Doo" a lot the last 2 days. The damage may never heal.

I don't suppose you could bring back the easier on the eyes black and blue and grey colorscheme of your normal site into that link, can you? The blazing whiteness is bad for my migraine....
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

Post » Mon Aug 09, 2010 2:08 am

Maybe it should check for invalid blocktypes like OnDeath Player? Sure, it's corretc, but due to the way the players death is handled it will never fire.

Anyways, wonderful utiltitie.
User avatar
Arrogant SId
 
Posts: 3366
Joined: Sat May 19, 2007 11:39 am

Post » Sun Aug 08, 2010 9:40 pm

@CuteUnit:
Once I've finished with it, or at least taken it a little further along, I'll give it a decent user interface. At the moment pretty much all the development I'm doing is in the JavaScript, and I'm mostly ignored the way the actual page is set up. Once it's complete and I move it to the main site it'll have a similar layout to the current validator.

@harmy52:
At the moment it only checks the blocktypes themselves, although in the future I plan on parsing their parameters as well. There isn't anything particularly wrong with passing "player" as a parameter to http://geck.gamesas.com/index.php/OnDeath, though, as it's the scripted actor's death that fires the block, and the validator has no way of knowing which form the script is attached to.

Once I've got some rudimentary form of parsing expressions, however, I'll probably check for things like " == player" (should use http://geck.gamesas.com/index.php/GetIsReference) and other such warnings. I still haven't decided just how far I'll take it yet.

Cipscis
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Mon Aug 09, 2010 6:08 am

Another update for the dev version - conditions will now be checked for mismatched brackets, and any unused expressions (i.e. on their own line) will give an error.

Cipscis
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Mon Aug 09, 2010 8:15 am

I've now implemented a rudimentary form of expression parsing. Expressions used in conditional statements or "set" commands will now give more comprehensive errors, telling you how your brackets are mismatched, and how many condition fragments are erroneous. For example, the following line of code will give errors:
set foo to bar.foo (* 3))
The errors given would be:
1 mismatched closing bracket1 invalid expression fragment

At the moment, any expression in which two non-operator words (i.e. sets of alphanumeric characters) will be assumed to be function calls, so things like this won't give any errors:
set foo to 3 2
The next step will be to start on function parsing, and once I've got that working I should just be able to populate the function dictionary without having to change any of the actual code.

This expression parsing has been the hardest part of the validator to test so far, so if anyone finds any extra errors that are reported, or any that are missed, please let me know here.

Cipscis

EDIT:

If any invalid characters are found in an expression (at the moment I'm searching for these: @, #, $, ^, ?, :, [, ], \) then they'll throw one "invalid expression fragment" error and then the validator will remove them from the expression that is being validated. They'll still appear in the output, but once found the validator will ignore them as it validates the rest of the expression. EDIT: This behaviour will also be used if a function is called with explicit syntax, but the calling reference is omitted.

Cipscis
User avatar
Makenna Nomad
 
Posts: 3391
Joined: Tue Aug 29, 2006 10:05 pm

Post » Sun Aug 08, 2010 5:01 pm

Nice. :)

Thanks Cipscis! I use your parser quite frequently, its great to see some new toys with it!

Cheers,

Miax
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Mon Aug 09, 2010 7:49 am

Thanks Miax.

It looks like I'd forgotten to implement code that handles function calls in expressions, and they were throwing errors. That should be fixed now, though.

Cipscis

EDIT:

Now works with functions using commas to separate parameters.

Cipscis
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Mon Aug 09, 2010 8:25 am

set foo to bar.foo (* 3))


I read that as set foo to foo.bar
User avatar
Sanctum
 
Posts: 3524
Joined: Sun Aug 20, 2006 8:29 am

Post » Mon Aug 09, 2010 8:48 am

Fair enough. Hopefully soon I'll be able to recognise things like "set foo to foo.bar" as errors, given that variables can't use a name that's already an EditorID, and remote variable access doesn't work via "ref" variables.

Just finished another small update - decimals without leading digits (e.g. ".3") will now be accepted, and three varieties of brackets will now be validated, including checking for mismatches (those types are "()", "{}" and "[]")

Cipscis
User avatar
Emily Jeffs
 
Posts: 3335
Joined: Thu Nov 02, 2006 10:27 pm

Post » Sun Aug 08, 2010 10:04 pm

Got any plans to port this to the GECK ( as a FOSE plugin ) ?
User avatar
amhain
 
Posts: 3506
Joined: Sun Jan 07, 2007 12:31 pm

Post » Mon Aug 09, 2010 6:58 am

Another fix - negative numbers in expressions will now be accepted.

@shadeMe:
Honestly, I'd love to do that, although at the moment I really don't know enough to create a FOSE plugin. Once I'm satisfied enough with this development version to put it up on my website I'll probably look into it though.

The idea of creating a FOSE plugin has interested me for a while. Hopefully by the time I look into it FOSE v1.2 will be out and I'll have a template to work with.

Cipscis
User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Mon Aug 09, 2010 7:54 am

Another fix - negative numbers in expressions will now be accepted.

@shadeMe:
Honestly, I'd love to do that, although at the moment I really don't know enough to create a FOSE plugin. Once I'm satisfied enough with this development version to put it up on my website I'll probably look into it though.

The idea of creating a FOSE plugin has interested me for a while. Hopefully by the time I look into it FOSE v1.2 will be out and I'll have a template to work with.
Not sure how feasible this would exactly be though. You'll probably be restricted to evaluating the compiled code but I might be wrong. I'll investigate on OBSE's side.
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

PreviousNext

Return to Fallout 3