The Bible For Dummies (tentative name)
How to make the most of the Holy Book with your editor
Introduction (note: these are to be internal links to the different sections)
1: What the heck is the Bible?!
2: Operation
3: An example: the oütf resource
4: Rinse and repeat
5: From theory to practice
6: The most important parts
7: The tricky parts
Introduction
The Nova Bible is the most important document in plugmaking, being the ultimate and universal reference. Yet, It's approach is quite steep, as It's very technical. You may have been puzzled when you first read It, and wowed never to use It again. But no one can make plugs without the Bible. Even the most experienced plug maker has to look It up. The aim of this guide is to allow you to get the invaluable information It contains from reading It. It assumes some basic knowledge about plugmaking, such as the beginning tutorial I wrote, and it does't aim at replacing the Bible. I recommand you to have the Bible open while reading this, and be ready to open your plug editor.
1: What the heck is the Bible?!
The Bible is the Holy Book. To best explain it, allow me to go back in time and tell you its history...
In may 1996, Escape Velocity is released. Matt Burch has made both the engine and the scenario of an awesome game that combines space arcade flying and combat with traditional space adventure/trade simulations. But the best is to come. He separated the engine from the scenario, implemented as a separated resource file, and put a way for the game to recognise partial scenario files, called plug-ins, that when put in the plug-in folder add their scenario to the built-in one, or even replace parts of it. This allowed easier distribution of third-party mods, since only what was changed/new needed to be transmitted, whereas changing the sounds or sprites of Maelstrom required one to put all sounds or sprites, including the unmodified ones. As resource files, the creation and edition of plug-ins could be done with Apple's ResEdit, no need to release an unsupported developing tool. Most importantly, Matt made and released the documentation of the actual format of the resources and the meaning of all the fields of this format. This technical documentation was the EV Bible, on which the Nova Bible is still based. This spawned from the beginning a thriving plug community, churning out plugs, but also TCs and alternate plug editors, to the EV community.
The Bible is the technical reference of the format and the values to give to the resources that are inside the data files and that should be in a plugin for it to work. It has never been meant as a learning guide. It is best thought of as a reference; if you don't remember or don't know yet the value to give to this field for your plug to work as expected, by reading the Bible you will know you need to enter in the field the value you want to see in the shipyard info multiplied by 10, or the price in credits you want the outfitter to charge for the outfit, or the amount of mass, in tons, that you want the ship to have free on top of all the preinstalled outfits and weapons (for instance). It should be open whenever you're making a plug-in, and available just a few clicks away.
2: Operation
The Bible is a big document, the raw text version (included with your distribution of Nova) weights 184kB; it could actually make a small book.
- There are other versions available, such as an HTML version, from the Ambrosia addons page. You may wish to use the features they offer, such as internal linking for the HTML version, but they feature the same content. This guide will assume you're using the text version, if another version allows you to go quicker, that's good; everything here will still apply.
Due to its size, it can be hard to navigate to find the section you're interested in. But a few tricks will make your life much easier:
-most of the sections, each one dealing with one resource type, are in alphabetical order of the resource type, i.e. the oütf one comes just after the öops one and just before the përs one. The exceptions are the spďn and shän sections that have more to do with graphics and are put before all others, and no one knows why, but jünk is before ďntf.
-the part that explains Nova Control Bits, the new incarnation of Mission Bits, is near the beginning.
-at the end are appendixes that document things that do not fall on any resource. Especially, go read now the last one, and make sure you are able to make a debug log and pilot log, it will make debugging your plug easier.
-you can go directly to one section by invoking the search function of the text reader (usually command or control-F), and putting in the resource type with the umlaut (for instance, oütf). Tell to go to the next occurence a few times until you're at the beginning of the desired section (each section begins by a line of dashes, then :"* The %%%% resource").
3: An example: the oütf resource
Go to the oütf section (see tip above), and read. First, you have a quick description of what the oütf resources are for: store information on the items you may equip your ship with, i.e. the outfits.
Then, in a first column are names. These are actually the names of the fields in ResEdit, when you open a plug-in with it. At the beginning, the EV Bible was meant for use with the only editor available, ResEdit (helped with provided templates so that it could recognise the resources). Based on the original EV version, the Nova Bible still assumes ResEdit is the editor used, and this may confuse you. But this is not a problem. Your plug editor has fields that match the ResEdit ones, just with different names that are close enough to be recognised. You should be able to find the field, that is named DispWeight in ResEdit, in your editor. Some other fields, that only can have a couple of values, can be implemented as popup menus in your editor (ModType, a little below, probably is), and flags fields are probably as a number of checkboxes. In the future, I'll refer to the fields by the name the Bible gives them, since it would be hard to cover all editors, plus new editors may appear or the existing ones may change. The Bible should not.
In a second column, you have the desciption of the value you find or need to enter in the field (depending if you're checking an existing plug or data file or if you're trying to make your own). I recommand to open a known resource of the data files while doing this, the description will make much more sense. For instance, open Nova Data 4, pick the oütf resources, and in them open the resource with ID 128, "Light Blaster". It has a DispWeight of 100; thus outfits with a lower DispWeight, as the description tells, will be displayed after it, and those with an higher DispWeight will be displayed before it in the outfitting screen. Notice most oufits actually have a DispWeight of 100 as well, in that case the outfits are ordered in increasing ID order, as was before Nova.
Perhaps the next field will tell more to you. It's name is Mass. Pretty obviously it's indeed the mass taken by the outfit in the free mass of the ship. This field holds 3 for the Light Blaster, confirming the description; the description will always make much more sense if you view the value for something you already know from the game.
TechLevel is a little trickier. This is an arbitrary number (i.e. it's not a value in a certain unit), 4 for the Light Blaster, that tells the technological level of the outfit. Planets have a Techlevel field themselves (plus some special ones), that tells up to which level of technology the planets outfitter and shipyard will be equipped, this means that the Light Blaster will only be available in planets with a TechLevel field with value 4 and above. Traditionally, values from 1 to 10 or so are used, plus some arbitraryly high tech levels that are given to outfits that are to appear via a SpecialTech. But as the description says, "see the section on spöb resources for more information."
Then we have a ModType field, and a ModVal field. There we have three columns. Indeed the description for the ModVal field (the ModType field can only have a restricted number of values that are all given) depends on the value of the Modtype field. Notice the ModType field may instead be a popup menu directly listing the kind of modification: weapon, cargo space, etc... For the Light Blaster, the ModType field is set to 1 or the popup menu is set the "weapon". Nothing surprising. The ModVal field is set to 128. What does it mean? The small oütf resource cannot contain weapon information for the weapon outfits. Therefore, this information is actually contained in a wëap resource, that this field indicates, in our case the one with ID 128. If you go and check the wëap resources in the same file, you will see weapon ID 128 is indeed the weapon "Light Blaster".
The Max field is pretty much self-explanatory (did you know you could have as many as 8 light Blasters?)
Then, we have a "Flags" field. This kind of field can be found in many Nova resources, it stores info for things that are either set or unset, check or unchecked, true or false. For this reason, they are almost always put as checkboxes in editors, with as many checkboxes as there are flags in the Flags field(s), so you needn't bother with the "0x0001" and the such (which are hexadecimal numbers). The checkboxes come with labels that should allow you to know which flag in the Bible they match, here the Light Blaster is a fixed gun, not a turret (note those two are only here for the purpose of limiting your gun/turrets amount by the available slots in your ship), not persistant, it can be sold, it's kept after purchases (I'd better be!), it isn't even persitent by mission operators, it's shown even if some requirement are not met, it's price and mass are constants, it can be sold only wher it can be bought, neither it has any of the other characteristics below. Notice there are some things that does not make sense to you yet. They will later, they are paraphernalia which you shouldn't bother with for now.
Continue reading the Bible section on the oütf resource and compare with the actual values in the Light Blaster one. Some may not make sense to you, ignore them.
Then, open another outfit, a non-weapon one such as the fusion reactor. Examine the values it has while checking the Bible for their meaning, and see how the effect of the outfit (recharging energy, there) is put. Check a variety of outfits to improve your understanding of the basic values of the oütf resource.
4: Rinse and repeat
You can now try the same with other resource types, first going to the corresponding section of the Nova Bible, while checking a known instance to give more sense to the quite abstract desciptions. Remember that interface of the plug editor may be far from what the Bible says, but keep in mind it's just an interface difference. The plug that the editor will save will have the same format as the plugs made by others, and another editor will allow you the same options, just with a different interface and maybe some time-saving features. I recommand you to study the resources in this order:
dësc
gövt
spöb
jünk
wëap
shďp
düde
s˙st
flët
përs
öops
ränk
crön
nëbu
böom
roďd
spďn
shän
and lastly mďsn
If you're wondering these dots have an actual purpose, they have. Matt told us it was to avoid overlaps in resource types. These dots are called an umlaut, by the way.
If you really have big problems with one resource in particular, search the web for annoted templates, then if you can't find any, ask us a PRECISE question in the EV Developer's corner (note: NOT to be made a link, I want the guy to try first then ask, he will tend to click the link and ask first if we give him it) of the Ambrosia Webboard. It's not important if you don't understand things at first, a good idea of how the main stats of something (such as the information displayed in the ship info dialog, for instance) is implemented is enough for a first pass.
5: From theory to practice
You should now know enough to make a little plug featuring a small number of resources. As a rule of thumb, as there are things you may not be understanding yet, I recommand always starting from a copy of an existing resource rather than from scratch: to make a new ship, you will copy the one with ID 128, the shuttle, from Nova Data 1, paste it in a new plug, and modify the fields you know to make the ship you want, while letting the fields you don't understand yet in place. Don't forget to change the ID of your new ship to an unused one or it will replace the Shuttle (I mean completely, it will show in place of the Shuttle in the Shipyard, people normally with shuttles will fly your new ship, etc...). You should know enough to basically know what you should put, and be able to refer to the Bible at times for the tricky or complex things, such as the values to give and their meaning for the various outfit types.
Remember to test your work from time to time by running Nova with a debuglog and pilotlog.
6: The most important parts
These are the places in the Bible that are of utmost importance, that the most experienced plug devers still have to check, as there is so much info that very few people can remember it all, and you can never know if there isn't some info in the Bible the plug editor doesn't tell you.
-"A quick word about controls bits...", at the beginning. This is the above all reference for the possibilities of the test and set expressions, especially the X### operators.
-most of the flags descriptions. Even if your editor gives labels to the corresponding checkboxes, they can't be as descriptive as the Bible.
-the wilcards at the end of the mďsn resource section. You just can't know them all.
-the ModType/ModVal part of the outfit section, there are too many different cases with each time a different meaning for the value in ModVal
-the appendixes, especially appendix III.
The other information in the Bible is just as important, but after some time you will not need to check them as much as these.
7: The tricky parts
There is some stuff that requires some knowledge that you may not have, and other stuff that's completely ununderstandable at first.
A, The hexadecimal. Usually the editor takes care of this for you, except when it doesn't. If you need to enter some hex, then I'll let the plug dever FAQ speak:
Using HEX flags is very easy, but many people are confused or intimidated by it at first. To incorporate several aspects into a field, add the corresponding HEX flags together. All you have to do to add the HEX flags is to add up the columns. The trick is, though, you don't carry. Rather, 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F. So, say you've got the following flags to add:
0x0001
0x0002
0x0008
0x0010
0x0040
0x0800
0x085B
0x1000
0x0020
0x2000
0x0800
0x0100
0x0400
0x3D20
0x0010
0x0020
0x0040
0x0080
0x00F0
The last column adds to 11, so put in Add the columns and substitute a letter for any value that is over 10. In EV, HEX numbers are either 4 or 8 digits, and both work the same way. The '0x' before the number indicates that it is a HEX number, and is ignored when you add them together. IMPORTANT: When you enter a HEX number in a ResEdit field, replace the '0x' with a '$'.
There's one place it will be even trickier: if you're making a cloak outfit. The field is set to take decimals, and you have to enter an hex number! The best way is to make the hex number following the instructions (for instance, if you want the cloak to drop shield and use 10 (8+2) units of fuel per second, the hex number will be 0x00A4), then convert it to decimal. There are calculators for that purpose; if you don't have any, then take the most significant digit of the hex number (here A), enter its decimal value (10 here) in a basic calculator, computerised or not, multiply by 16 (giving 160 here), then add the decimal value of the next digit (4 here), multiply by 16 if necessary, add the next digit, and so on until you add the last digit (don't end by multiplying by 16). Then we have the hex number converted in decimal (164 here), that you just enter in the field.
The same problem arises for the cloak scanner and the paint (and it has the same solution, though you will need an utility to convert the desired color to the hex number).
B, The contribute/require bits, the scanmask bits
-to be filled-
C, The Nova Control Bits
Fortunately for you, we have tried to explain their use (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/postdisplay.cgi?forum=Forum9&topic;=005474")here(/url).
D, The other resource types: PICT, STR#, RleD, etc...
These are not Nova-specific resources, you can find them in other places, therefore it's not the aim of the Bible to document them.
The 'PICT' resource is a very Macish image format (it's actually made of opcodes for the (former) drawing engine, QuickDraw), that is often found in application resources for their images, as well as independant files. It's mostly used in Nova for still images. You usually can't edit them with a plug editor, instead you make an image with a graphic program then import it to your plug (the way you do it varies with your editor, check its docs).
A 'STR#' resource is simply a collection a strings (with a maximum length of 256 chars each string), that Nova looks up for some purposes, for instance for a list of names from which to pick up the name for the special ship in a mission (the name of the pirate you have to kill for the bounty, for instance). Editors can edit it.
'Rle8' and 'RleD' are compressed, multi-frames images. They replace PICT (though you can always stick to PICT, but loading time may suffer if there is a large number of them) for all animations such as ships, shots, planets (that can be animated), etc... don't think that the PICT image format supports animation, but for that purpose a big PICT image containing all the frames in the following format is used (for 36 frames):
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
With the first one being the ship/weapon shot pointing up, just like the first frame of the Rle, then turning clockwise (same for Rle's). A plug editor usually can't edit Rle's directly. On Mac you can make them from the PICT image with EnRle, a Carbon program found in the NovaTools package, while on PC EVNEW allows you to import such an image into a RleD.
'csüm' you shouldn't touch. 'nuff said.
'vers' tells the version of a program or dependant file on Mac, and you shouldn't bother with it.
'STR ' is a resource containing one string each. It serves only to patch STR# resources, and even then, less than it used to. The editors can edit it.
'snd ' resources are one sound each. Nova has all its sound in this format. It can't be edited by plug editors. You need to make one with some sound program, save it in (Mac)system 7 sound format, that you open with your editor then move the unique sound resource to your plug (PC).wav format, that EVNEW can then import.
If you open Nova.rez on PC or the Nova application on Mac, or the EV or EVO TC, you may notice some other resource types, that are not important for you, such as DITL, but can be modified and have effects in the game (such as changing the layout of some windows). The thing is, they are only documented in Apple's developer documentation, next to which the Bible is easy.
(end for now)
I may need to give a conclusion, but wanted to have opinions from peers before. Notice it's to be read after an introduction to plug making (guy discovers the principle, how to create a plug and put a little modified resource in it), and in parallel to annoted templates, everything will be at Space Pirate's new plugdev space in HTML.
------------------
The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url)(url="http://"http://www.ambrosiasw.com/webboard/Forum25/HTML/000003.html#ZachaPedro05-18-200409:42AM") (/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) by wOOtWare to tinker with your Nova - FREE!
The feeling you're a Nova geek - priceless.
There are things money can't buy or that are free, for everything else, there's indeed Mastercard.
(This message has been edited by Zacha Pedro (edited 07-19-2004).)