Page 1 of 1

oxp verification

Posted: Mon Sep 01, 2008 5:29 am
by bob19
Hope this is the right forum.
Found myself very interested in how oxps are made. Actually made a flying brick and saw it in the ooniverse, WooHoo. Then found how to verify an oxp. This is a great way to learn about the keys in the plist files. I have a few questions after running it over some of the oxps I have installed. Pretty sure they are all the latest but could be wrong.
What I've done is make backup copies of plist then made some changes after verifying, and then verifying again seeing if I can get the errors down without breaking the oxp.
These questions are for learning, am not trying to be a smart ass. Have done a little html and stuff over the years, but am certainly no expert, just above the books for dummies stage. Stupid thing is I didn't keep copies of stderr of the first verify runs for a benchmark.

oohaul
oohaul1
<key>has_fuel_injection </key>
<true/>
space in has_fuel_inject key.
key>max_missiles</key>
This and views are cosmetic in npc ships, true?

wolfwoods_variants
WARNING: image Images/drakemk2hud.png has non-power-of-two dimensions; it will have to be rescaled (from 1024x205 pixels to 1024x256 pixels) at runtime.
Not a clue. Seen similar in one or two others.
There was an entry in the demoships.plist cobra3courierSE but not in ship data.
Could you just add this using one of the other cobra3courierSE say the trader version with some changes?
Can 2 ships use the same .dat file?

UPS courier
python_ptt
python_ptt
<key>has_energy_unit</key>
<true/>
Should this have been has_energy_bomb?
ERROR: verification of ship "python_ptt" failed at "escape_pod_model": String "pirate-upscapsule" does not have required suffix ".dat".
Other similar keys in this plist were not flagged.
ERROR: verification of ship "ups-buoy" failed at "unpiloted": Expected fuzzy boolean, found string.
<key>unpiloted</key>
<string>yes</string>
should this be <true/>?
WARNING: unknown key "has_npc_traffic".
2008-09-01 12:49:09.234 oolite.exe[3588]
This one pops up on occasion.

solar-researcher
<key>heat_insulation </key>
<real>2</real>
<key>max_police </key>
<string>2</string>
extra character and space.
Should max_police be interger?
<key>max_defense_ships</key>
<string>12</string>
Should this be intergers?
ups-slave-satellite
<key>max_flight_yawn</key>
<real>1</real>
Must have been tired at the time.
solar-researcher2
WARNING: unknown key "role".
<key>role</key>
<string>ups_shuttle</string>
Would be roles wouldn't it?
solar-researcher3
<key>heat_insulation </key>
<integer>1</integer>
Format character and space, should it look like this. <real>1</real>?

Thanks

Posted: Mon Sep 01, 2008 10:59 am
by Thargoid
Some of what you're seeing there sound like similar issues that I just corrected in the Aquatics OXP (see the discussion here after Commander McLane's findings).

It sounds like you're a couple of steps behind me on the path of OXP learning, I'd wholeheartedly agree it's the best way to learn. From what I've found so far my I would say your comments are along the right lines, although the question about the "has <equipment>" seems to be causing some discussion (see the link above) in relation to the assigned values available.

The only things I would say is that the "has_energy_unit" could also be trying to give it an extra energy unit (although that's not a valid key in the list, according to the wiki), although you could be right with the bomb too. Also "has_npc_traffic" is a valid key (with true or false value) used to determine whether a carrier has trader traffic or not. But it was only introduced in V1.70, so if you're running V1.65 then that may be the source of the issue.

Posted: Mon Sep 01, 2008 11:08 am
by Eric Walch
Thanks bob19,

I ran the verifier last week for the first time. Tried it several times before in the past but it never did anything. Must have been doing something wrong. But last week I ran it over UPS and it worked for the first time. It was an awful long bug-report list. Most reports are only cosmetic: keys that just do nothing else than wasting space. Some are right but reported wrong like "has_npc_traffic". But that one is fixed in the trunc I noticed. What is still missing in the trunc version are the keys:
no_boulders = "boolean"; and hyperspace_motor_spin_time = "positiveFloat";. These are also legal but reported as wrong.

What really is wrong in UPS is: <key>heat_insulation </key> . It happens on a mac when selecting a word by double clicking. He tries to be friendly and includes a leading and trailing space. I mostly use the plist editor. When I paste something down you see the leading space and I edit it away, but you don't see the trailing space easy with the mac plist editor. I don't understand the "Â" in your listing as it was not in mine.
ERROR: verification of ship "python_ptt" failed at "escape_pod_model": String "pirate-upscapsule" does not have required suffix ".dat".
That is a wrong report, it shouldn't have a suffux ".dat". However, I don't see this report when I run the verifier.

Anyhow, I corrected all instances for my next release. None of the reported errors are critical. Thanks for your report bob, the verifier is really useful to catch those missed bugs.

Posted: Mon Sep 01, 2008 12:47 pm
by bob19
Thanks Thargoid
It was the Aquatics OXP discussion that got my interest in seeing how they are made.
It sounds like you're a couple of steps behind me on the path of OXP learning,
:shock: I would be more inclined to think a couple of light years.

Hi Eric
I haven't seen problems with ups on my system. I was amazed at the work and thats only looking through the shipdata.plist

One other question

Code: Select all

<key>exhaust</key>
<array>
    <string>5 0.0 -25 6.0 4.0 10.0</string>
    <string>-5 0.0 -25 6.0 4.0 10.0</string>
</array>
5 0.0 -25
Are these the co-ordinates you see in wings3d when you click on a point in your model?
Thanks guys

Posted: Mon Sep 01, 2008 12:48 pm
by Svengali
Eric Walch wrote:
However, I don't see this report when I run the verifier.
It is not enough to run the verifier one time. Fixing the things that are detected and then re-running the verifier is often necessary to catch the other things too.
Eric Walch wrote:
What really is wrong in UPS is: <key>heat_insulation </key> . It happens on a mac when selecting a word by double clicking. He tries to be friendly and includes a leading and trailing space. I mostly use the plist editor. When I paste something down you see the leading space and I edit it away, but you don't see the trailing space easy with the mac plist editor. I don't understand the "Â" in your listing as it was not in mine.
It looks like a UTF-8 thing (thanks Ahruman for your hint :-)) and happens when you convert a plist to another format. I've got this yesterday when I converted some files to UTF-8 (and back to ANSI again to see the difference).
bob19 wrote:
5 0.0 -25
Are these the co-ordinates you see in wings3d when you click on a point in your model?
Yes. But specially for the exhausts it is only a starting point, because they are not fixed and will move along the z-axis depending on the speed of the ship - so you often have to alter the coordinates a little bit.

Posted: Tue Sep 02, 2008 11:43 am
by Commander McLane
Eric Walch wrote:
ERROR: verification of ship "python_ptt" failed at "escape_pod_model": String "pirate-upscapsule" does not have required suffix ".dat".
That is a wrong report, it shouldn't have a suffux ".dat". However, I don't see this report when I run the verifier.
I have seen that as well. Probably the verifyer is mislead by that the key-name ends with "_model"?

And there are indeed some more keys (like "has_npc_traffic"), which are not yet known to the verifyer.

@ bob19: Having <string>1</string> instead of <integer>1</integer> or <real>1</real> is usually not a problem. Oolite understands and converts them correctly.

Posted: Tue Sep 02, 2008 12:30 pm
by Thargoid
I can add the "script_info" key to the list of ones that the verifier doesn't know. I made some changes to the drones beta OXP before I published it (mainly pre-pending "drones_" to various things to make them unique) and the verifier flagged those keys in Eric's scripts.

Again a false positive, but still a most useful tool.

One other random thought that strikes. Might it be worth having a beta section in the wiki list (or a separate list, or here, or somewhere else if more appropriate) for OXPs under test? It's very useful to have other people test-pilot your code I find, but it's probably not something the every-day player wants to get involved with, nor having to download files again when the beta-bugs get squashed...

Posted: Tue Sep 02, 2008 1:30 pm
by bob19
Thanks for the info guys.
Thargoid wrote:
Might it be worth having a beta section in the wiki list (or a separate list, or here, or somewhere else if more appropriate) for OXPs under test?
I don't mind beta testing. :)
One thing I haven't found yet is where updated oxps are announced. I follow the expansion pack forum and check the wiki regularly. A sticky in a section such as that for oxps updated on the wiki would be handy.

Posted: Tue Sep 02, 2008 3:51 pm
by JensAyton
All verifier bugs mentioned here are fixed, BTW. The updated files should work in 1.71.x: Config/verifyOXP.plist, Schemata/shipdataEntrySchema.plist.