11 Aug., 2004: Ive just done quite a bit of revision on this post. Some later posts in this tread may make less sense as a result.
This is something intended for beginners. I'd like comments on it from experienced plug-writers, and also from any newbies who try it out; as a Mac-based guy, I'd especially like to know if anything conflicts with how EVNEW works. Hopefully this will give some people some fun and also inspire some entries into the Silly Plug Contest that I'm runninghere.
-----
How To Make:
The Simplest Ship Sprite Imaginable
This tutorial is intended to help beginning EVN plugmeisters create their first flying objects. As much as possible, all pain will be deferred until after this lesson! Starting with a Mac or a PC, zero knowledge about EVN plug-making, and just the slightest acquaintance with an image editor, you'll learn how to replace the graphic for one of Nova's own ships with another image -- a photo cutout, scanned sketch, stock clip-art image, or other unanimated, non-rotating picture.
The result is an inexplicable flying object (IFO?) which can be a hoot to meet and fight against, though difficult to control when it is your own ship (tip: fire your guns to figure out which way you're facing). Once you've seen how easy it can be to make this sort of crude start, you can go on to learn how to produce more polished and complicated ships and plugs. Note: Numbers between asterisks (e.g. 3) refer to footnotes at the end of the tutorial. you can complete the tutorial without reading these.
-
Register EVN!
No plug you build is going to work with your copy of EVN until you pony up your shareware fee. -
Find a victim.
Select a photo, cartoon, sketch, or other image that shows an object that you believe belongs in space. Here, I plan to use John Kerry's head. When we are done, we'll have made this plug, which is all of 6 K (stuffed). Here's an excerpt from the source image1:
- Cut it out.
Use an image editor (I use both Photoshop and GraphicConverter, a great Mac shareware program) to trim the image down to a rectangular area centered on the object you want, leaving at least one pixel of background image on all sides:
Save the trimmed sprite as a PICT file (PICT is usually ".pct" on PCs; saving as .tiff or .bmp should work OK, too. Avoid .jpg or .gif.) . You'll have the least trouble down the road if before saving you make sure that the image is set to a resolution of 72 dpi or ppi (dots or pixels per inch; in Photoshop this is adjusted under "Image > Image Size" -- don't resample the image when you change the resolution!).2
Note that here I've filled the background with pure white. This can make the next step a little easier, but isn't necessary (heck, the background can be plaid if you prefer). I've also reduced the size to make it somewhat more in line with other ship sizes in the game. My image is 53 X 80 pixels. For comparison, an EVN shuttle is 24 X 24 pixels and an Auroran carrier is 184 X 184 pixels. Be sure to write down the dimensions of your image -- you'll need the info later.
- Mask it.
To tell Nova where the ship is and where it isn't, you need a PICT that is pure white where your image will appear, and pure black outside. For example:
There are various ways of making this mask. One quick-n'-dirty way is to make a copy of your image, select its white background, invert the selection, use a "Fill" command to fill the shape with black, then invert the whole mask image. However you make it, it is important that the mask also be 72 dpi and that it be saved as a "bitmap" or "one bit" PICT (just black and white, no shades of gray in the palette; In Photoshop, use the "Image > Mode" sub-menu).
-
Get the right tool.
To put your sprite in a plug, you need a plug-making program. On Windows, you need EVNEW. Go download it. If you use Macs (as I do) you have some choice, but for this tutorial I'll recommend NovaTools. NovaTools is an add-on program for Apple's ResEdit application for OS 8, OS 9, or the OS X Classic environment (direct download link, 465K), so you'll need to download that, too, and then follow the install instructions that come with NovaTools. (In a nutshell, you use ResEdit to copy all the contents of the "NovaTools 1.0.0" file and then to paste them into the "ResEdit Preferences" file in the "Preferences" folder. Then you increase ResEdit's memory allocation to at least 6 MB.)3 -
Start with an empty plug file.
EVNEW probably can create this with an easy menu option. On a Mac,
you have to use a file with the type code set to "Npďf" and the creator set to "Növä." If that means nothing to you, just make a copy of my KerryShuttle plug (or any other EVN plug), rename it, and use ResEdit to open it and delete all its contents (highlight each of the resource type icons and press delete). Save the blank file. -
Put your stuff in.
Insert your images into your plug file. In EVNEW, you do this with the File>Import command at the top of the PICT resource input box. In NovaTools, open your PICT sprite in your image editor and do "Select All" followed by "Copy." Switch to your plug-making program and do "paste." Repeat this for your mask.4 -
Renumber your PICTs.
Every item you paste into ResEdit gets an ID number. Your graphics won't display if your PICTs have numbers that conflict with ones used for ship graphics that are already in Nova (in rlë8 & rlëD resources -- but don't worry about what those are for now5). For your sprite PICT, choose a number that Nova doesn't use; an even number between 2320 and 3998 or between 4030 and 4998, for example. For your mask, use this number plus one. In ResEdit/NovaTools, to apply these numbers you double-click on the PICT icon, select the resource whose number you want to change, do cmd-I, and then enter the number:
- Make a new shän.
If you are in ResEdit/NovaTools, you do this by clicking to highlight the main window for the plug (the one that usually has an icon for each resource type), typing cmd-K, and scrolling down to select (highlight) "shän" from the list on the left side of this dialog:
When you click "OK," two windows will automatically open. The first is a list of the shäns in the plug (there's only one right now). The second window lets you edit the shän you just created, and should look like this5.5:
EVNEW should give you something functionally similar. We can ignore most of this screen for this tutorial; everything outside of the red circle can just be left with the values that NovaTools enters automatically. For "BaseImageID" and "BaseMaskID," enter the ID numbers for your PICTs. "FramesPerSet" and "BaseSetCount" are both 1.6 "BaseXSize" is the width of our PICT (in pixels), and "BaseYSize" is the height. If the shän window doesnt now show your sprite image and the black of the mask, close the window and reopen it. If you've done everything correctly, it should show up.
If you don't see your sprite image and the black of the mask in the shän window after you've filled out the circled fields, close the window and reopen it. If you've done everything correctly, it should show up.
- Pick your secret identity.
Now you need to know the shän ID numbers for the ship sprites that your plug will replace. Most ships in Nova have several shäns, since they need one for each variant (Starbridge Class A, Starbridge Class B, used Starbridge...). Here are the shän numbers for a few Nova ships you may want to try:
Shuttle: 128, 188, 361, 362, 391
Starbridge: 133, 195, 196, 197, 198, 199, 367, 368, 398
Fed. Destroyer: 141, 211, 212, 213, 214
Pirate Viper: 166, 333. 332. 404
Manta: 161, 314, 315
Pirate Carrier: 147, 285, 286, 287 (+ Unrelenting: 374)
Kestrel: 378
If you want to find shän ID numbers for other ships, make a copy of the "Nova Data 1" file in your "Nova Files" folder. Move the copy out of the "Nova Files" folder (so you don't risk messing up the game) and use your plug-making program to look at the list of the "shďp" resources that the file contains. Sorting the shďps by name instead of by ID Number can help; in NovaTools, do this with the "View > by Name" command. For each shďp resource for a variant of the ship you are changing, you will need to make a shän with the same ID number. Since these shäns all point to the same sprite graphics, they can be identical.7
- Copy -- Copy -- Copy.
Make copies of the shän you made in step #9 until you have one for each shän/shďp ID number (in NovaTools, highlight your first shän and use cmd-D to duplicate). Change the shän ID numbers using the same method you used in step #8 to replace the PICT ID numbers, and save your plug.
-
You're done!
Move your plug to your "Nova Plug-ins" folder, start up the game, and go look for your sprite! You don't need to start a new pilot for this plug to work. -
Chase perfection.
Once you've seen your crude IFO in flight, you may want to make adjustments to your image or mask.8 Quit Nova, delete the offending image(s) from your plug, and then paste in new versions using the same ID number(s) you used before. -
You're ready to get fancy.
Now that you are able to make the most basic of sprites, your next step can be in any of a large number of directions: master rlë graphics, add animation (& glows, lights, weapons, banks), make a graphic that rotates or includes a pointer to indicate facing (try studying my TrueAbomination plug, for example), add a new shďp to the game, learn a 3D graphics program....9
Thanks to: orcaloverbri9, CaptAceHarddrive, SpacePirate, what_is_the_matrix, noba man
Notes You Don't Need to Read (At First)
1: By sending John Kerry into space, I mean no disrespect to his political views. In fact, I agree with a great many of them. This, however, does not shake my belief that he's got a funny-lookin' head. The source image for this tutorial is from his U.S. presidential campaign web site. It is by Sharon Farmer, and was explicitly provided for re-use. You should at least briefly consider the moral and legal issues of using copyrighted materials before putting them in plugs. My non-expert understanding, however, is that non-commercial use enjoys some protection. Humorous intent may actually strengthen your position, since in the US the First Amendment protects satire and parody as free speech. So be funny!
2: It is not essential, but good (it makes for a smaller file), to set your PICT sprite image to a palette of "thousands of colors" (AKA 8 bits per channel, 32768 colors, or 16-bit color), rather than "millions of colors."
3: The NovaToolsUpdate 1.0.1, which modifies NovaTools once you've installed it, is recommended. I didn't mention this in the main text because you can complete your first sprite without it.
4: You can delete any RECT resources that ResEdit creates when you paste in the PICTs. They do no harm, though.
5: If you continue making more complicated ships, before long you'll need to learn how to translate your PICT sprites into rlë8 and rlëD ones. EVNEW can do this by itself; on a Mac, you need to master EnRLE, another program available from w00tware's NovaTools page.
5.5: If the shän window doesnt look similar to the one with all the check-boxes and blanks shown here (for example, if it shows a column of 6-digit numbers down the left side of an otherwise all-white window), this may mean that NovaTools is not installed correctly. This is also true if "shän" does not appear in the scrolling list in the "Select Type" dialog.
6: "FramesPerSet" is 1 because our image doesn't change as the ship changes the direction in which it is facing; "BaseSetCount" is 1 because we have no special images for banking or animation.
7: Nova stores the shäns for all its ship sprites in six of the numbered "Nova Ships" files. However, since every shän ID number matches one of the ID numbers for a shďp resource in Nova Data 1, it is easier to just collect all the numbers you need from Nova Data 1. You don't have to copy or modify any shďp resources for this tutorial. (If you take a peek inside them, though, you may start to get ideas for your next game-modding project!)
8: If you find that your sprite has an unsightly halo of white (or another color) around it, you probably need to add some carefully placed black pixels to your mask to "tighten" how closely it follows the edge of your object. This is pretty common in beginners' sprites.
9: Here are three places to start your search for more tutorials and guides:
SpacPirate's Plugin Guides
NovaLightbringer's list of tutorials
Development Guides discussion
------------------
Dr. Trowel's E.S.W.P. -- Cold Fusion graphics for EVN Override, EVN:O bug fixes, 'n more.
Very Good Stuff: EVula NovaTools EVPlugSearcher Play FAQs: N N O C Dev FAQs: A B
Interests: The Good, The Bad, and The Loopy.
(This message has been edited by Dr. Trowel (edited 07-26-2004).)
(This message has been edited by Dr. Trowel (edited 08-11-2004).)
This post has been edited by Dr. Trowel : 07 January 2006 - 08:05 PM