EVN ship resource files

How does the programming work?

So I started playing around with the idea of making some new ships for EVN, and so I opened up Nova's files with MissionComputer, and started looking around to see what I could learn about how it compiles the ship info from different file types into one object in gameplay. I got as far as figuring out that the wëap is linked to the oütf , which is linked to the shïp , which also contains all the info about ship attributes; speed, armor, stock weapons, inherent AI, and such. And as far as graphics, the rlëD contains the actual sprites, and that is piped into the shän , which is the compiling point for the engine glows, weapon firing sprites, and turning calculations and all.
But then comes the problem. Nowhere in any file can I find any piece of information that tells Nova what shän file to link to what shïp file. I am completely mystified. The 'edit sprite' window of the shïp file is blank, and there's no information there. But that's the only way I can see.
Please help!

Each shïp resource is matched with the shän resource that shares the same resource.

The graphic displayed in the shipyard and the communications dialogue is in the PICT resource whose ID is (shïp ID - 128 + 5000). The graphic for the targeting screen is in PICT resource (shïp ID - 128 + 3000).

The descriptions that are shown in the shipyard and hire-escort dialogue boxes are dësc resources whose ID numbers have a similar mathematical relationship, and many other pairs of resources are linked the same way. Probably the easiest way to keep track of them all is to compare the IDs in the existing scenario, although MissionComputer provides link buttons in many of its editors.

The large graphic that’s displayed in the shipyard info window is again a PICT resource, but its ID can be anything you like (as long as it isn’t used by something else). You put that ID into the ‘Graphic’ field in your shïp’s dësc resource.

I'm not sure I'm understanding you. Let's try this on an actual scenario.
Light Shuttle:
Shïp ID: 128
Shän ID: 128 (ohhhh...)
Shipyard PICT ID: 5000
Targeting PICT ID: 3000
Dësc ID: 13000

So whatever shän and shïp resources have the same ID numbers, Nova will pair? I guess that makes sense...what about the shipyard descriptions and the the PICTs associated with the ship?

But that theory breaks down with other ships...
Modified Starbridge:
Shïp ID: 332
Shän ID: 165
Shipyard PICT ID: 5037
Targeting PICT ID: 3037
And I can't even find a description.

The last two digits of the shipyard and targeting pictures are always the same...that's good to know. But I'm still not understanding the rest of it.

@spacejock, on 27 April 2011 - 10:19 AM, said in EVN ship resource files:

The last two digits of the shipyard and targeting pictures are always the same...that's good to know. But I'm still not understanding the rest of it.

Those final digits are the zero-based ‘index’ of the shïp resource. Since resource IDs must start at 128, the index is simply the ID minus 128. (Indexes are also used to link planets to their descriptions, and outfitter items to their pictures and descriptions.)

As for the modified Starbridge, the game has special shortcuts for variant ships, so that you don’t need multiple copies of the same picture. I don’t have the files in front of me, but apparently shïp 332 is a customised variant of shïp 165, the stock Mod Starbridge, so it uses that ship’s graphics. 165 - 128 = 37, so the IDs of the PICT resources are following the formula. And because shïp 332 isn’t sold in the shipyard, it doesn’t need a description.

For your own work, it’s unlikely that you’ll need to make use of these shortcuts.

To be clear, shïp 332 still uses shän 332 (in the file Nova Ships 7). The shortcut the games makes is to notice that shän 332 references the same rlëD as shän 165, and thus, when it can’t find shipyard and targeting PICTs specific to shïp 332, it automatically uses those for 165 (the lowest-ID shïp with the same sprite).

You might also be interested in the Nova Bible, which explains just about everything about plug-ins for the EV Nova engine. I’ve linked to the newest version of the bible, which comes with Nova 1.0.A. It is written with ResEdit template editing in mind, but you should be able to figure out what fields correspond to what controls in MissionComputer. MC makes editing plug-ins a lot easier.

Quote

The shortcut the games makes is to notice that shän 332 references the same rlëD as shän 165

So the shän files in Nova Ships 7 are the variants of the basic ships that appear with their respective sprites in Nova Ships 1-4 (and 8)?
Ah, all right. That makes sense...a little. :blink:
As far as the mathematical formulas for finding ships and their related resources...wow. Once my head stops spinning I'm sure it will all make sense. I guess I should just be glad all the math isn't being done in binary...

So the buttons labeled "Edit Sprite", "Edit 200x200 Picture", "Edit Shipyard Description", etc, in the shïp resource are completely pointless, right?

This post has been edited by Spacejock : 27 April 2011 - 12:53 PM

@spacejock, on 27 April 2011 - 12:40 PM, said in EVN ship resource files:

So the buttons labeled "Edit Sprite", "Edit 200x200 Picture", "Edit Shipyard Description", etc, in the shïp resource are completely pointless, right?

Each of those buttons is nothing more than a link to the appropriate shän, PICT, or dësc resource, so that you can avoid having to do the maths yourself.

If you’re looking at the Starbridge (shïp 133), the Edit Sprite button will open shän 133, the Edit Shipyard Description button opens dësc 13005, and so on. And each button has either a green check mark or a red X, which tells you whether or not that resource already exists (in the current file).

As is the case with almost everything in MissionComputer, you can make a plug-in without them, but they save some work.

Back in the old days, some people used to use special charts or even spreadsheets to calculate the appropriate IDs for each resource. This was even more work then, because the previous games used a separate STR resource for every variation of the ship’s name, instead of including them in the shïp resource.

@spacejock, on 27 April 2011 - 12:40 PM, said in EVN ship resource files:

I guess I should just be glad all the math isn't being done in binary...

I don’t think binary math has ever been involved in Escape Velocity development, but there used to be (and still is, behind the scenes) a lot of hexadecimal.

Quote

If you’re looking at the Starbridge (shïp 133), the Edit Sprite button will open shän 133, the Edit Shipyard Description button opens dësc 13005, and so on.

That's funny... in mine, none of those buttons open the appropriate files. They all open a blank file of the correct resource type. (For example, under 'Edit Sprite' I get a blank shän file with all the values set to 0 or -1)
Probably just because Nova Data 1 doesn't have those files in it.

Quote

Back in the old days, some people used to use special charts or even spreadsheets to calculate the appropriate IDs for each resource.

Yeah, a spreadsheet is actually a pretty good idea. I'll have to see about that.

@spacejock, on 27 April 2011 - 07:04 PM, said in EVN ship resource files:

That's funny... in mine, none of those buttons open the appropriate files. They all open a blank file of the correct resource type. (For example, under 'Edit Sprite' I get a blank shän file with all the values set to 0 or -1)

Yes, that’s correct — if the necessary resource doesn’t already exist, the button creates it for you. If you fill out that blank resource with the appropriate data, it will be saved with the right ID to be linked to your ship.

But as you’ve anticipated, MissionComputer only works on one file at a time, so the PICT, dësc, and shän resources need to be in the same file as your shïp resource for the editor to be aware of them.

Log in to reply