OXP Verifier – does anyone ever use it?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

OXP Verifier – does anyone ever use it?

Post by JensAyton »

A long time ago, I added the --verify-oxp command line option, which was intended to validate the structure of an OXP. The only part that was ever completed was the shipdata.plist verifier, which was potentially useful but hasn’t been kept up to date at all.

Does anybody ever (attempt to) use it, and if so, how often?

There are basically three options here moving forward: 1) keep a large lump of code in the game that’s hardly ever tested, incomplete and probably doesn’t work properly, 2) remove it completely, or 3) keep the plist schema verifier part and run it on all shipdata.plist entries – and possibly some other plists – every time the game starts (in non-deployment builds).
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: OXP Verifier – does anyone ever use it?

Post by cim »

Ahruman wrote:
Does anybody ever (attempt to) use it, and if so, how often?
Yes. I have a buildscript that packages up OXPs and copies them to my AddOns directory during development; it runs as part of that process. For what little it actually checks, I find it quite useful.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXP Verifier – does anyone ever use it?

Post by Svengali »

I'm using it from time to time too - usually before I'm going to release a new version.
As cim said it is a nice helper, but I wouldn't squeeze a tear if it gets removed.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: OXP Verifier – does anyone ever use it?

Post by JensAyton »

Come to think of it, there’s a fourth option: make it a stand-alone command line tool (with the generic validation functionality of tests/plistSchemaValidator rolled in). This would get it out of Oolite’s hair, so to speak, and its build time. Since it is used, it’s not much of a priority, but worth considering. (There’s still option 3, of course.)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: OXP Verifier – does anyone ever use it?

Post by Thargoid »

Yes, use it quite often, and fairly generally before release of each OXP as a final check.

For me the option 4 of a separate tool would make most sense. But also it needs a bit of upgrading as you already noted, as some valid commands/syntaxes get flagged as errors occasionally, and also I think some are missing or still logged as to-do.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: OXP Verifier – does anyone ever use it?

Post by JensAyton »

Thargoid wrote:
Yes, use it quite often, and fairly generally before release of each OXP as a final check.

For me the option 4 of a separate tool would make most sense. But also it needs a bit of upgrading as you already noted, as some valid commands/syntaxes get flagged as errors occasionally, and also I think some are missing or still logged as to-do.
Regardless of the form it takes, I myself will not be spending much time on upgrading it or expanding it to cover more ground, but reports of cases where it’s actively wrong are welcome.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: OXP Verifier – does anyone ever use it?

Post by Eric Walch »

Thargoid wrote:
But also it needs a bit of upgrading as you already noted, as some valid commands/syntaxes get flagged as errors occasionally, and also I think some are missing or still logged as to-do.
I also use it on a regular base. Whenever I found that a correct key if flagged as wrong, I updated trunk with it.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: OXP Verifier – does anyone ever use it?

Post by Thargoid »

If I come upon them, I'll let you both know.

From memory I think there are some valid scanclass entries which is flags as errors, but without going and checking a few OXPs I can't be more specific at the moment.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: OXP Verifier – does anyone ever use it?

Post by UK_Eliter »

I use it regularly. But here's one false positive that it produces (or at least I am pretty sure it is a false positive):

Code: Select all

00:05:29.484 Checking shipdata.plist
  00:05:29.500 Ship "3G-interstellarTurret2":
    00:05:29.500 ----- WARNING: unknown key "fire_rate".
That report is for this code:

Code: Select all

"3G-interstellarTurret2" =
	{
		like_ship = "3G-interstellarTurret";	
		accuracy = 8;
		fire_rate = 0.3;   // Interval between shots in seconds, for ball_turret subentities. Default: 0.5; minimum: 0.25. 
		laser_color = "redColor";
		weapon_energy = 16;
	};
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: OXP Verifier – does anyone ever use it?

Post by JensAyton »

Fixed in r5313.
Post Reply