Need larger game title image! Created 16 years ago2007-12-16 00:32:48 UTC by srry srry

Created 16 years ago2007-12-16 00:32:48 UTC by srry srry

Posted 16 years ago2007-12-16 00:32:48 UTC Post #241119
While preparing some various aspects of my mod, I ran across quite a severe difficulty? for me anyway. I found that the sprites containing the game title in Half-Life would need to be larger if I wanted my mod?s title image to fit onto it. I also learned that the maximum size a sprite can be is 256x256, and since the size of Valve?s existing title sprites (which is combined into two of the many HUD sprites) is already to maximum size, I cannot expand it any to fit my title.

However, I?ve found out that in Opposing Force, they actually have a separate sprite just for the bottom half of the title, so it says ?HALF-LIFE? with ?OPPOSING FORCE? under it. This is exactly what I need. So the problem now is, it would probably require coding to be able to use a second sprite, unless that kind of information is defined somewhere else. Does anyone know how I could go about this?
Posted 16 years ago2007-12-16 00:38:16 UTC Post #241121
Are you talking about the main menu? Because that is really the only place I know of that has the title (besides the game_text title at the beginning).
Posted 16 years ago2007-12-16 00:42:06 UTC Post #241123
Haha, saw... the beginning title is not a game_text. It's a sprite, and you can choose whether it's displayed or not in the map properties. No, I'm not talking about the main menu. :x
Posted 16 years ago2007-12-16 00:43:50 UTC Post #241124
oh seriously? i must not have played it in a damn long time.
Posted 16 years ago2007-12-16 00:45:21 UTC Post #241125
Sigh

I have this feeling that nobody's going to have the first clue about it.
Posted 16 years ago2007-12-16 01:14:13 UTC Post #241127
OHO! I think I found it. There's a hud.txt file in the GCF's sprite directory that seems to be used to map out the locations of the HUD sprites... now I just have to decipher it. If anybody knows about this stuff, please let me know. I'm a bit surprised this isn't documented anywhere.
Posted 16 years ago2007-12-16 01:15:30 UTC Post #241128
i read an article about it once. it was for counter-strike, but i believe it would work the same. i'd say google it, ill see if i can find it myself.

i think, if you copy the line for the title, and then make a duplicate and set it's coordinates to be right below the main title, and direct it toward your subtitle sprite, you could probably pull it off.
Posted 16 years ago2007-12-16 01:19:40 UTC Post #241130
If I just copy the part from the hud.txt in Opposing Force where it defines the lower part of the sprite, and it should work.
Posted 16 years ago2007-12-16 04:25:32 UTC Post #241161
Well, that didn't seem to work. At all. :

Maybe somebody with coding knowledge could tell me if this is a coding thing, or if all i need to do is edit some text files?
Posted 16 years ago2007-12-16 06:32:00 UTC Post #241170
I think you can achieve it without any coding, just hud.txt.
Here's how you'd (probably) do it.

From hud.txt
title_half		640 640hud4	0	226	256	30
The first number is for resolution, then there's the name of the sprite used. The other four numbers are coordinates for both opposite corners of the area to cut out from the whole sprite image. The first two are for the upper-left corner of the area, while the last two specify the size of the texture area to use(256x30). So, to get a bigger starting title image - make the biggest one you can and edit the coordinates to match it. Also, in order not to lose the other sprites stored in hud4/hud4 - you might have to make a separate sprite for them all and make apropriate changes in hud.txt.

EDIT: Heh, this should be added to my Hud Editing tut. ;o
Daubster DaubsterVault Dweller
Posted 16 years ago2007-12-16 06:53:01 UTC Post #241171
Thanks for explaining how the coordinates work. The thing is, I know how the edit the current title, which is located in 640hud4/640hud5, but I need to make it recognize two other sprites for the lower portion, and it doesn't seem to want to.
So, to get a bigger starting title image - make the biggest one you can and edit the coordinates to match it.
It's ALREADY the biggest it can be - 256x256. That's why I have to look into this other method that they used in Opposing Force.

I'm thinking that the game is directed to look at certain lines inside hud.txt, and whatever those lines say will be what is displayed, but it has no reason to recognize any additional lines in hud.txt. I don't know where the lines for it to use would be specified. I'm worried that it might be buried in the code somewhere, because I'd personally have no way of changing that stuff myself. I just wouldn't have the knowledge.

But then again, I might be totally wrong about how that all works. It's really just an educated guess, based on my past experiences with these things. All I know is, copying these additional lines...

title_half 640 640hud4 0 226 256 30
title_life 640 640hud5 0 226 220 30
title_opposing 640 640hudof05 0 0 256 32
title_force 640 640hudof06 0 0 256 32

...from the hud.txt used for Opposing Force, and pasting them over those you showed from Half-Life's hud.txt will not work to make 640hudof5 and 640hudof6 be displayed with the title.
Posted 16 years ago2007-12-16 07:06:15 UTC Post #241172
Hm, I'm fairly sure I've had a sprite larger than 256x256.
ChickenFist ChickenFist<Witty Title>
Posted 16 years ago2007-12-16 07:09:17 UTC Post #241173
It may be possible for the engine to handle them, much like it's possible for the engine to handle larger textures than 256x256... but neither Sprite Explorer nor Sprite Wizard would allow me to create anything larger. They both turned back errors.
Posted 16 years ago2007-12-16 07:11:55 UTC Post #241174
That's really weird, because I just tried creating a 512x512 sprite with Sprite Explorer, and it worked :P
ChickenFist ChickenFist<Witty Title>
Posted 16 years ago2007-12-16 07:29:37 UTC Post #241176
well, I know that 256x304 didn't work, but I'll try 256x512.

Edit: Wow. That worked. Which doesn't explain why it wouldn't accept 256x304, which should be valid, but... Thank you so much, ChickenFist! You've saved me, for now.

Now all I should have to do is reset some coordinates in Half-Life's existing hud.txt and it should work!

Second edit: It's working beautifully!@!1
You must be logged in to post a response.