Victor Sfont - Change color

Discussion in 'RGSSx Script Support' started by Romanticist, May 31, 2019.

    Tags:
  1. Romanticist

    Romanticist Veteran Veteran

    Messages:
    161
    Likes Received:
    85
    First Language:
    English
    Primarily Uses:
    RMVXA
    I cannot figure this out for the life of me and I think it will greatly improve the ease of my game.

    On the equip menu, by default, the parameters will have different colors. For example:
    16 -> 13
    16 -> 20
    With my custom Sfont though, it's all just white text. How would I go about making it have color on my equip menu? Because without the color, it's hard to see what parameters are changing.
    Thank you
     
    #1
    Oscar92player likes this.
  2. Oscar92player

    Oscar92player Veteran Veteran

    Messages:
    443
    Likes Received:
    187
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    That's because you need to create a sfont graphic for each of the colours your game uses on the windows, not only white. The script is not built to make the font changing the colors automatically like the TTF ones that RPG Maker VX Ace uses by default.
     
    #2
    Romanticist likes this.
  3. Romanticist

    Romanticist Veteran Veteran

    Messages:
    161
    Likes Received:
    85
    First Language:
    English
    Primarily Uses:
    RMVXA
    Yes I know that, but how would I implement the colors into the menu?
     
    #3
  4. Oscar92player

    Oscar92player Veteran Veteran

    Messages:
    443
    Likes Received:
    187
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    They are applied automatically, if I'm not wrong, unless you didn't setup the images with the different colors inside the script.

    I don't have it right now, but there are supposed to be some lines inside the script just for that, to setup the different variable numbers with the colored SFonts.

    If you didn't setup them there, the game will only use the default white color for everything.

    That's the way it worked for me, when I was using RPGM VX Ace :/
     
    #4
  5. Romanticist

    Romanticist Veteran Veteran

    Messages:
    161
    Likes Received:
    85
    First Language:
    English
    Primarily Uses:
    RMVXA
    # * Set SFonts
    # Set here the index and name of the SFonts that will be used, add how
    # many SFont names you want. Refer to the SFont bitmap with $sfont[index]
    # VE_SFONT_NAMES = { index => name, index => name, ... }
    VE_SFONT_NAMES = { 1 => "font" }

    These are the instructions on how to set up the sfonts but I don't get how to do it :rswt I don't know how to specify which color it should be. Like, where do I put my green font, and where do I put my red one, so that my equip menu will recognize it?

    And here's the entire script while we're at it:
    https://victorenginescripts.wordpress.com/rpg-maker-vx-ace/sFont/
     
    Last edited: May 31, 2019
    #5
    Oscar92player likes this.
  6. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,359
    Likes Received:
    10,405
    First Language:
    English
    Primarily Uses:
    RMVXA
    As you are not requesting a different script, but wanting help with an existing one, this needs to be move.

    I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    Most scripters ask that their scripts not be reposted, but that people link back to the web page where they got it from. Could you therefore edit your last post to remove Victor's script and instead give a link to it (assuming the site is still in existence).
     
    #6
  7. Romanticist

    Romanticist Veteran Veteran

    Messages:
    161
    Likes Received:
    85
    First Language:
    English
    Primarily Uses:
    RMVXA
    Ah yes, sorry about that. I fixed my post.
     
    #7
  8. Oscar92player

    Oscar92player Veteran Veteran

    Messages:
    443
    Likes Received:
    187
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    You need to setup the font colours like in this picture (it's an example of an older project of mine):
    upload_2019-5-31_19-25-17.png

    As you can see, I've made a setup of 31 different fonts, one of them for each colour of the text. Now, you need to know other thing: those colours correspond to each one that the "Window.pne" graphic has. Those that are on the low-right of the image:
    upload_2019-5-31_19-27-54.png

    The first of the colours (beginning from the left), the white one, is number 0 on that list from Victor's script.

    So, in order to make the font colours appear on your game, each number needs to correspond with each colour on the "window.png" graphic. Each of your SFonts graphic for the colours needs a different name, of course.

    An example of how you can make you setup would be something like this:
    Code:
      VE_SFONT_NAMES = { # Do not touch
                         0 => "Font_White",
                         1 => "Font_Blue",
                         2 => "Font_Orange",
                         3 => "Font_Green",
                         4 => "Font_LightBlue",
                         5 => "Font_Purple",
    And so on, until you finish each one of the colours you want to use in your game. I thing the limit is on 31, but I'm not sure if you can exceed it.

    Only then, the colours will show on your system windows of your game.
     
    #8
    Romanticist likes this.
  9. Romanticist

    Romanticist Veteran Veteran

    Messages:
    161
    Likes Received:
    85
    First Language:
    English
    Primarily Uses:
    RMVXA
    Wow, thank you so much! That's pretty simple actually. I'll give it a go :LZSsmile:
    EDIT: It works! :D Thanks a ton!

    OH! And one last thing: is there any way to set up italics?
     
    Last edited: Jun 1, 2019
    #9
    Oscar92player likes this.
  10. Oscar92player

    Oscar92player Veteran Veteran

    Messages:
    443
    Likes Received:
    187
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    No, you can't use italics with bitmaped fonts. But, if you want, you can create italic fonts images, and overwrite them above the window colours you are not going to use on your game. That way, you just need to use that colour to call an italic font bitmap, or even use a different style of font.
     
    #10
    Romanticist likes this.
  11. Romanticist

    Romanticist Veteran Veteran

    Messages:
    161
    Likes Received:
    85
    First Language:
    English
    Primarily Uses:
    RMVXA
    That's a great idea :) Again, thank you for the help. It's all solved now :D
     
    #11
    Oscar92player likes this.

Share This Page