Kill Sprites
Seph_Kimara
Join Date: 2003-08-10 Member: 19359Members
<div class="IPBDescription">which file(s) do I need to edit?</div> As the topic states, I want to make some kill sprites. However, I'm at a loss as to what I need to edit (I assume the 320/640hud files, but even then, I have no clue how the hud.txt file is set up ie. what means what). Any specific image dimensions that need to be adhered to? etc.
Thanks for any help in advance. Looked around for anything else about it and gotten nowhere.
Thanks for any help in advance. Looked around for anything else about it and gotten nowhere.
Comments
Without it, you will get nowhere fast.</b>
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->d_knife 640 640aw3-s 100 232 64 24
d_handgrenade 640 640aw1 192 231 64 24
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
In the above, you see two lines from the unmodified hud.txt file. Should be pretty easy to figure out the weapons they relate to... for this example, I'll be using the d_knife line.
<span style='color:red'>640</span>: As Urd said, you'll only have to edit these lines, if you edit the hud.txt at all, <b>unless</b> you play on a resolution lower than 640x480, in which case, you'll be editing the 320s.
<span style='color:yellow'>640aw3-s</span>: Name of sprite file; located in /nsp/sprites.
<span style='color:green'>100 and 232</span>: Position of sprite in the file (refer to image)
<span style='color:blue'>64 and 24</span>: Size of sprite in the file (refer to image)
<img src='http://sjc.edu.hk/~verthandi/640aw3-s.gif' border='0' alt='user posted image' />
That's the basics of editing the hud.txt file. It's nothing too complex, once you get accustomed to all the numbers. However, take note that the reference for "death by Mine" is 'd_item_mine', and <b>not</b> 'd_tripmine'. The latter is one of the many obsolete references and can be ignored.
You don't always have to mess with the hud.txt file, but it's good to know how to. At any rate, that takes care of the boring part. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--><ul><li>Now, locate the death sprite you want to change, by finding the reference in the hud.txt file</li><li>Open the SPR file with Sprite Viewer, and then 'Save BMP' (preferably somewhere easy to access, like the Desktop)</li><li>Edit the BMP to your liking, using any image editor with palette support (MSPaint does not count)</li><li>After you're done editing the BMP, it's the same drill all sprite artists go through every time: <ul><li>256-color palette</li><li>the above, properly configured for the type of transparency required (this is the 'usual' problem)</li><li>both dimensions are a multiple of 8</li><li>neither dimension larger than 256 pixels</li></ul></li><li>Compile the sprite, using Sprite Wizard, and give it a test-run!</li></ul>
d_machinegun 640 640aw3-s 192 96 64 24
That's the death sprite for the machinegun. Notice it has a d_prefix. that means it's a death sprite
640 means the res or higher ,, 640aw3-s is the actual sprite file name. 192 is the x origin position in the sprite(tells it where to start the sprite) , 96 is the Y . 64 is the width, and 24 is the height..
So if you wanted to change it to your own machinegun sprite you'd put
d_machinegun 640 machinegunspritenamehere 0 0 64 24
if you made a sprite that is 64wx24h
the size is completely up to you.
Notice I put 0 0 for the origin, since it's a separate file it'll start in the topleft corner at 0,0 coords.
Good luck and happy spriting
(I'll include a pic in a min)
lets say you want to change the killsprite of the knife. Open up the hud.txt and look for
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->d_knife 640 640aw3-s 100 232 64 24<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Now, take the new sprite for it (here lets say the sprite is 64x24 px) and change the line to:
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->d_knife 640 knifekill 0 0 64 24<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Done... <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
So you don't need to look for the coordinates of the sprite. The only real problem is:
You can't just replace the sprite later... you need to edit the hud.txt again, if you want your old sprite/another w/o the same size... <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
This one here is for people that are too lazy to search the right coordinates from the sprite. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo--> (=> people like me <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo--> )