• 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] Modifying text shorcuts

25
Posts
7
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!
     
    172
    Posts
    7
    Years
    • Seen Sep 6, 2022
    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.
     
    25
    Posts
    7
    Years
    • Seen Feb 19, 2020
    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.
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    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.
     
    1,682
    Posts
    8
    Years
    • Seen today
    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