Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Noob question, related to screen overlays  (Read 1645 times)

0 Members and 1 Guest are viewing this topic.

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Noob question, related to screen overlays
« on: October 20, 2013, 03:06:08 PM »
So today I've got a noob question.
Here's the scenario.
Basically I'm planning to make a custom in-game HUD for SMOD:RL. It's gonna be a .vtf overlay, and I'm thinking about inserting the r_screenoverlay command to the autoexec.cfg file (because overlays get removed in between map loads)
So that would work, but then the player would get the GUI even when he doesn't have the HEV. So how do I make the GUI appear only when the player is wearing the HEV suit?

If you have an alternative to the .vtf screen overlay, feel free to suggest, as I'm actually looking for alternatives (somehow the whole screen overlay appears blurry, and it would stretch badly on any resolution different from mine)

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
Re: Noob question, related to screen overlays
« Reply #1 on: October 20, 2013, 03:24:48 PM »
putting it in autoexec won't work, it gets executed only once on game start,
You'll need to use Logic auto to make it work like it should (look SMOD: Crylife for reference)
Overlays gets "scaled" to your screen res, so you need to make it "unscaled" so the engine will display it properly...
DROP DATABASE bsnooch

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: Noob question, related to screen overlays
« Reply #2 on: October 20, 2013, 04:28:33 PM »
putting it in autoexec won't work, it gets executed only once on game start,
You'll need to use Logic auto to make it work like it should (look SMOD: Crylife for reference)
Overlays gets "scaled" to your screen res, so you need to make it "unscaled" so the engine will display it properly...

Actually I'm thinking about ditching the r_screenoverlay method completely and relying on the HUD files to define what I have in my head. The problem is: as far as I know, SMOD is coded to replace the HEALTH and SUIT text into appropiate logos, and I don't want that. Is there any possible way to bypass that?

Offline Rook

  • *
  • +2% chance to make useful post
  • Rook has no influence.
Re: Noob question, related to screen overlays
« Reply #3 on: October 21, 2013, 01:32:33 AM »
It's not hard-coded if that's what you're asking. The normal font is swapped out in scripts/HudLayout.res for SMOD's font, SMODGUI. SMODGUI includes the symbols. With the font swapped, the "SUIT" string is swapped out for the font character with that symbol. I'm afraid I can't as easily remember where the latter happens if you wanted to replace the text.

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: Noob question, related to screen overlays
« Reply #4 on: October 21, 2013, 01:21:28 PM »
It's not hard-coded if that's what you're asking. The normal font is swapped out in scripts/HudLayout.res for SMOD's font, SMODGUI. SMODGUI includes the symbols. With the font swapped, the "SUIT" string is swapped out for the font character with that symbol. I'm afraid I can't as easily remember where the latter happens if you wanted to replace the text.
I could actually find that, it shoudn't be so hard.
I believe it's in resource/smod_english.txt or something like that.

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
Re: Noob question, related to screen overlays
« Reply #5 on: October 21, 2013, 08:31:07 PM »
it's in font file .ttf (i can't remember the name though, probably SMOD.ttf)
DROP DATABASE bsnooch

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: Noob question, related to screen overlays
« Reply #6 on: October 22, 2013, 02:06:36 PM »
it's in font file .ttf (i can't remember the name though, probably SMOD.ttf)
I know that, but I'm looking foe the line to define what text should be used in the "SUIT" line. (or health line, doesn't matter)