• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Essentials 1.18.1 - Color text in scripts

  • 15
    Posts
    3
    Years
    • Seen Dec 15, 2021
    I will be quick and concise.

    They will see. Thanks to someone who commented on my previous post I have managed to show options with a script, but I would like to take it further. I would like to use the text formats in this script. I would like the word "Access" to look as usual in "Access PC", but "PC" is colored and bold. I have tried as in normal text, but it does not work.

    Can you help me?
     

    #Not Important

    All hail the wishmaker
  • 910
    Posts
    4
    Years
    Theres a script on relic castle by maruno that does that. I cant find it now but if you do a bit of digging you should find it
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    Currently, seeing the way it is coded, what you ask is not possible.

    You are refering to the following function:
    Code:
    def pbMessage(message,commands=nil,cmdIfCancel=0,skin=nil,defaultCmd=0,&block)
    and if you look at its code, you'll find that the first argument message is handled by pbMessageDisplay, which is the only function (as far as I can tell) that actually processes formatting (which is why formatting works in messages).

    What you'll also find, if you dig into the code, is that commands are displayed by:
    Code:
    def pbDrawShadowText(bitmap,x,y,width,height,string,baseColor,shadowColor=nil,align=0)
    that displays one item with the baseColor given (which is default in Window_CommandPokemonEx, and anyways you want to change color in the middle of the command).

    What you ask requires modifying pbDrawShadowText to make it process the formatting like pbMessageDisplay does.
    Unless you know what you're doing, maybe consider it impossible.
     
    Last edited:

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    Theres a script on relic castle by maruno that does that. I cant find it now but if you do a bit of digging you should find it

    Are you refering to (broken link removed)?
    If yes, it has been integrated to Esssentials ^^"
     
    Back
    Top