#Noobi-Heaven Forum Index
SearchFAQUsergroupsLog in
StatusDownloadsHighscore#NHGB#NHTFCLWoW
[TFC] Custom Sprites (dmsg)

 
Reply to topic    #Noobi-Heaven Forum Index » Support / Help View previous topic
View next topic
[TFC] Custom Sprites (dmsg)
Author Message
orangensaft



Joined: 12 Jan 2007
Posts: 938
Location: DE

Post [TFC] Custom Sprites (dmsg) Reply with quote
Adding sprites for the death messages (upper right corner: possibletrigger deathtype killedplayer).

List of programs needed
  • Sprite Explorer or a similar program to compile sprites.


I. Getting your image ready for "spriting up"
I.a If you plan on creating a set of sprites that are similar and might be used at the same time, use a single file. Or don't, if you prefer having a lot of files floating around in your TFC folder.

I.b Ok, now you got your image. Place it into the final spot of your eventual image you want to convert into a sprite. It's important that you choose the final placement before compiling and configuring it in the text-files.

I.c Save it as a Windows Bitmap (.bmp). Get the coordinates of the upper left corner, height and width of the image you want to use in-game. (For #rock_gas_kill it's (338|0) and 113w 24h)

II. Converting your image to a Sprite file (.spr)
II.a Open Sprite Explorer

II.b Choose File -> New Sprite.

II.c Go through the dialogues. When the "Add Bitmaps" window appears, add your .bmp file. (Multiple files for animated sprites.) After that, you have to configure the sprite's transparency. You just have to change "Texture format" to "Additive" for our purpose (=> adding dmsg).


III. Configuring hud.txt
III.a Add or change the damagetype to the hud.txt in tfc/sprites/. Now the previously saved data of our picture's area comes in. WARNING! Extract the original file from the "team fortress classic.gcf" first! Your TFC will probably crash if you don't have a complete hud.txt.
Code:
d_#rock_gas_kill      640   osa_dmsg2   338   0   113   24

d_#rock_gas_kill: HUD item code, in this case the death type
640: 320/640.. not quite sure what it's for, though..? min size of tfc window?
osa_dmsg2: .spr to take the image from - placed in tfc/sprites/.
338, 0: coordinates of the upper left corner of the area we want to use
113, 24: width and height of the area we want to use
III.b Change the number at the top of the file. This number tells TFC how many entries exist. It's basically <amount of lines>-1.

IV. In-game test


_________________
Kriswema | Global GoldSrc Database | World Championship of TFC

(Click to enlarge)

Last edited by orangensaft on Mon Dec 20, 2010 6:52 pm; edited 2 times in total
Fri Dec 17, 2010 8:50 pm View user's profile Send private message Visit poster's website
Linda



Joined: 05 Jul 2007
Posts: 470

Post Reply with quote
nice Smile ty
Sat Dec 18, 2010 12:20 am View user's profile Send private message
orangensaft



Joined: 12 Jan 2007
Posts: 938
Location: DE

Post Reply with quote
Important update
- Added: III.b Change the number at the top of the file. This number tells TFC how many entries exist. It's basically <amount of lines>-1.

Thanks to Toni for reporting this issue and helping me track the source of it.

_________________
Kriswema | Global GoldSrc Database | World Championship of TFC

(Click to enlarge)
Sat Dec 18, 2010 12:33 pm View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    #Noobi-Heaven Forum Index » Support / Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL