[THPS3] Lower the font size?

Post your hi-scores, videos, questions, talk about Tony Hawk games.
Forum rules
No talking about modding in this forum.
_ENunn_
Posts: 108
Joined: Fri Apr 04, 2014 12:21 am
Location: Henderson, KY, USA
Contact:

[THPS3] Lower the font size?

Postby _ENunn_ » Wed Jul 30, 2014 6:29 am

Hello. I hope everyone is having a great day.

First off, I would like to say I am sorry for all the trouble I have caused over the past few months I've been on this forum. Spamming the forums, raging over too many problems, etc. This was the cause of my long inactivity here.

Anyways...

I have Demo's Custom Fonts from his site (http://devilclanthps3.weebly.com/) and I got the THPS2 fonts installed. However, it is too big. How do I lower the font size? Is it my screen resolution that is making it too big?

Untitled.png
Untitled.png (806.88 KiB) Viewed 3059 times

As you can see, some of the text doesn't fit.
lol hi
Demo
Posts: 483
Joined: Mon Aug 15, 2011 2:20 pm
Contact:

Re: [THPS3] Lower the font size?

Postby Demo » Wed Jul 30, 2014 12:39 pm

now this is a good question.

this is common problem with bitmap fonts. look at this image. these are original thps3 trick font and thps2 font replacement at pixel level. you can notice letters itself are larger. in order to have it same sized we have to scale it down, but if we'll do it in the font file itself, we'll lose some pixel data, which will make it look uglier.

Image

instead they have scale value in qb scripts. so if original font required scale = 1, larger font would require smaller value, let's say 0.7.
there are two qb scripts in data\scripts folder that refer to UI and menu fonts, those are panel.qb and frontend.qb
i've attached my modified scripts, you can find something like that in my older videos with th2 font. it also changes gap and special trick colors.
could explain you how you can change it yourself if you're interested.

ui_scripts.7z
(3.97 KiB) Downloaded 136 times

Image
_ENunn_
Posts: 108
Joined: Fri Apr 04, 2014 12:21 am
Location: Henderson, KY, USA
Contact:

Re: [THPS3] Lower the font size?

Postby _ENunn_ » Wed Jul 30, 2014 3:01 pm

Demo wrote:now this is a good question.

this is common problem with bitmap fonts. look at this image. these are original thps3 trick font and thps2 font replacement at pixel level. you can notice letters itself are larger. in order to have it same sized we have to scale it down, but if we'll do it in the font file itself, we'll lose some pixel data, which will make it look uglier.

Image

instead they have scale value in qb scripts. so if original font required scale = 1, larger font would require smaller value, let's say 0.7.
there are two qb scripts in data\scripts folder that refer to UI and menu fonts, those are panel.qb and frontend.qb
i've attached my modified scripts, you can find something like that in my older videos with th2 font. it also changes gap and special trick colors.
could explain you how you can change it yourself if you're interested.

ui_scripts.7z

Image


Sure! Go ahead!

BTW, you make great YouTube videos!
lol hi
Demo
Posts: 483
Joined: Mon Aug 15, 2011 2:20 pm
Contact:

Re: [THPS3] Lower the font size?

Postby Demo » Wed Jul 30, 2014 4:35 pm

most of the UI stuff is in panel.qb, open it in THQBEditor and find this part.

Code: Select all

#00075  Trick_Text_Properties = STRUCT{
          Positions = ARRAY(
           
            STRUCT{
              pos = STRUCT{
                VECTOR[320.0; 390.0; 0.0] just = PAIR[0.0; 1.0]
                }
              dims = PAIR[950.0; 60.0]
              }
   
    <several structs here>
           
          )
          drawer = trick_font
          between_line_spacing = 4
          text_duration = 20
          scale = 0.8
          max_scale = 0.9
          min_scale = 0.5
          pulse_rate_up = 0.05
          pulse_rate_down = 0.02
          falling_color = STRUCT{
            VECTOR[180.0; 25.0; 0.0] alpha = 90
            }
          gap_text_color = STRUCT{
            VECTOR[0.0; 128.0; 0.0] alpha = 128
            }
          special_text_color = STRUCT{
            VECTOR[128.0; 128.0; 0.0] alpha = 128
            }
          score_drawer = trick_score_font
          score_pos_split_h = STRUCT{
            VECTOR[320.0; 409.0; 0.0] just = PAIR[0.0; 0.0]
            }
          score_pos = STRUCT{
            VECTOR[320.0; 400.0; 0.0] just = PAIR[0.0; -1.0]
            }
          }


positions array contains several struct which probably were meant to be used in different modes, but you actually only need the first one.
pos = STRUCT{ VECTOR[320.0; 390.0; 0.0] <= this defines the middle top point of the trick text area (see image)
dims = PAIR[950.0; 60.0] <= this defines width and height of trick text area.

Image

lower you can find several params that define scale and pulsing - scale (normal scale), max_scale (max pulsing scales), min_scale (min pulsing scale), pulse_rate_up (speed of pulsing up), pulse_rate_down (speed of pulsing down)
Vectors in falling_color, gap_text_color and special_text_color define color for failed combo text, gap text and special text.
the last one is score_pos, vector there defines the top left point of the score and multiplier.

the numbers are not the actual screen pixels, so you'll have to play around to find how much should you change it.

the last one is score text scale, but to change that we'll need to open frontend.qb and find this:

Code: Select all

#00549    setproperty STRUCT{
            type = textdrawer
            name = trick_score_font
            values = STRUCT{
              font = "trick.fnt"
              spacing = 3
              defaultScale = 1
              defaultColor = VECTOR[160.0; 160.0; 160.0]
              defaultAlpha = 110
              just_center_x just_top shadow_off = PAIR[0.15; 0.15]
              }
            }


this defines trick_score_font text properties which is used to draw score. obviously, we just have to change the defaultScale param.
also thps3 allows to add shadow to any text by offset. but THPS2 font already got shadows, so you can change shadow_off to zeroes for both trick_font and trick_score_font and it won't be shaded twice.

don't forget to backup your files becore something went wrong.
_ENunn_
Posts: 108
Joined: Fri Apr 04, 2014 12:21 am
Location: Henderson, KY, USA
Contact:

Re: [THPS3] Lower the font size?

Postby _ENunn_ » Wed Jul 30, 2014 10:38 pm

So, what about the color palette? What should I type in so I can make it, oh I don't know, purple?
lol hi
WhoElseButMe
Posts: 420
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: [THPS3] Lower the font size?

Postby WhoElseButMe » Wed Jul 30, 2014 10:51 pm

The vector for color is in R G B order
use any color picker and you can get the red, green, blue, and alpha channels of the color.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
_ENunn_
Posts: 108
Joined: Fri Apr 04, 2014 12:21 am
Location: Henderson, KY, USA
Contact:

Re: [THPS3] Lower the font size?

Postby _ENunn_ » Fri Jun 19, 2015 8:50 am

I need to go back for this thread for some more help. I am now able to change the trick font color. I wanna change the trick font, that is normally white, and the score font colors. Can you please tell me which lines have those two?
lol hi
Demo
Posts: 483
Joined: Mon Aug 15, 2011 2:20 pm
Contact:

Re: [THPS3] Lower the font size?

Postby Demo » Fri Jun 19, 2015 4:42 pm

_ENunn_ wrote:I need to go back for this thread for some more help. I am now able to change the trick font color. I wanna change the trick font, that is normally white, and the score font colors. Can you please tell me which lines have those two?


did you read carefully through this block of code?

Code: Select all

            values = STRUCT{
              font = "trick.fnt"
              spacing = 3
              defaultScale = 1
              defaultColor = VECTOR[160.0; 160.0; 160.0]
              defaultAlpha = 110
              just_center_x just_top shadow_off = PAIR[0.15; 0.15]
              }

Return to “General thps talk”

Who is online

Users browsing this forum: No registered users and 2 guests