• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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] Modifying text shorcuts

  • 25
    Posts
    9
    Years
    • Seen Feb 19, 2020
    So, I've been using a lot of the message commands such as \r, \b and \f to make dialogue more interesting and less painful to sit through. However, I've decided to add little pss-styled faces for every character whenever they speak by simply using \f[{pssnumber}]. My issue is that this has made typing dialogue a real pain in the butt because how many of these things I have to add at the beginning of every textbox. My question is thus, how to combine multiple of these modifiers (similar to \sign[x]) into one modifier for every main character.
    Ideally I'd want such a function to set: \r or \b, \f[x], \w[x] as well as add in the name of said character. Any help would be much appreciated!
     
    Well you can probably just find the script that calls the pictures and the script that calls the colors and combine them into one. Then have it determined by a different letter or whatever. It should be about as easy as that.
     
    I thought it'd be that simple as well. Sadly, it seems all these functions are scattered across different sections and not very clearly documented. The \b and \r are nowhere to be found from where I've looked (unless I'm really blind) so this is all turning out much harder than I thought it would be.
     
    I'm pretty sure they're mostly defined in the Messages script section, but because they are defined using Regular Expressions, you can't just search for \r or something like that.
    Im not sure how to do exactly what you're trying to accomplish, but you can check out this thread, which discusses topics along these lines.
    And if you want tho learn more about regular expressions in Ruby, which is how these tools operate, this is a good resource.
     
    Yeah the format strings are a little interesting, as they are not case sensitive. Like for \r, you would need to CTRL + SHIFT + F for [Rr]. Multi letter codes just involves chaining these sequences together. So, \pg, the player gender color code, is [Pp][Gg]
    Now there's a couple different places where these codes appear, but the part that does most of the work in messages is def Kernel.pbMessageDisplay. You should add your changes to the other locations though, like FORMATREGEXP. I can't really say which ones do and don't need to change, so compare the functions of the other codes in the same block to determine where the additional changes need to be.
     
    Back
    Top