Jump to content
  • Bored of optimization yet?


    Toothpastefairy

    Well good news for you! Because today we

    are

    dealing with line breaks. A sort of intermezzo if you will. Line breaks are a pain in the butt cheeks, because there seems to be no rhyme or reason to their existence. You can change the words before the line break and it will disappear. Okay, seems logical enough. You can add words after the line break and it will disappear. Okay, what? And until one of Ame's patreons looked into things, you could do nothing and they would randomly appear and disappear. RMXP are you drunk? When doing our optimization run (ha! still talking about optimization) I noticed something which I would've bet was the cause.

     

    Dear reader, always bet against me, for I was wrong.

     

    And then I found a line break while playing. And another. And yet one more. Time to actually look into things. After putting print statements down like no tomorrow, the following conversation between me and essentials happened:

     

    See, the function in question is getFormattedText. And this function is over-engineered like no tomorrow. Want to left-align stuff? seems logical. Want to right or center align, this function got your back. Want to use the weirdest font you can find? No problem for this badboy. Want to add Icons? Make only one line right align? Okay please slow down. Color certain words? Add your own line breaks? A second way to add Icons?

    Want to try splitting the text? No, stop!

    And that one is the problem. getFormattedText decides to rerun itself when a condition is met. What that condition exactly entails, I still don't know. But to spice things up, getFormattedText quickly adds a \n in the middle of the string. Which in ruby is syntax for: start a new line. And when it is rerun, it starts another new line right before the word after which the \n is placed.

    🤔🤔🤔🤔🤔

     

    That part of the function has officially been yeeted. We now are free

    after

    all this time of suffering.

     

     

    • Like 19
    • Thanks 3
    • Haha 5
    • Upvote 5


    User Feedback

    Recommended Comments

    The fact that you guys take the time to make memes about essential is just phenomenal

     

    Also, hasn't the line break thing been an issue since... always? Congrats for beating that boss, geez it's been a stubborn one

    Share this comment


    Link to comment
    Share on other sites

    Thank you for looking into this. It could get

    very

    frustrating to keep missing dialogue and then having to go look it up later. Always good to see Reborn moving forward.

    Share this comment


    Link to comment
    Share on other sites

    I can't believe you put those line breaks in at the end of your post like that

    But, fantastic work as always 👀 

    Share this comment


    Link to comment
    Share on other sites
    Quote

     

    I just want to say, you guys are doing an amazing job with the development of this, as nothing else seems to fit better here, masterpiece of game called Pokémon Reborn. Indeed, we missed some lines here and there because of this damn /n but now this guy is down, never to return!

    Keep up the excellent work fellas! 

     

    PS: Don't you worry, we'll wait as long as needed 😉

    Share this comment


    Link to comment
    Share on other sites

    As I noticed these lines automatically skipping by way too fast I always thought they must be separate text formatting mistakes regarding the line width, maybe exclusive to my font. Glad the real culprit is finally found and we are rid of these offputting dialogue hickups!

    Share this comment


    Link to comment
    Share on other sites

    Spongebob memes fill me with joy, however, knowing the pain that is working with essentials... fills me with angery.

    Share this comment


    Link to comment
    Share on other sites

    when is the 52% gonna change to 53%, you've been optimizing this shit all year thats gotta be at least 1%

     

    Share this comment


    Link to comment
    Share on other sites
    13 hours ago, SpenceMcFence said:

    when is the 52% gonna change to 53%, you've been optimizing this shit all year thats gotta be at least 1%

     

    technically we, uh, don't really count this since it wasn't planned 😕

    Share this comment


    Link to comment
    Share on other sites

    I love these Pkm Reborn Dev Blogs. Great to see you tackling all the bizarre Pkm Essentials issues and tell us what the cause was. And the more directly game design/programming centered posts concerning e.g. AI just make me wish GF had a remotely as good eye, interest, and ambition for that kind of stuff.

    Share this comment


    Link to comment
    Share on other sites

    Hi Guys. I know we got the game-z.exe recently. When I try to soft reset in it using F12, I am getting error.

    I wanted to soft reset for the starter but when I try F12 I am getting an error. The error is as follows:

    Script 'Settings' line 97:Errorno::EBADF occurred
    Bad file descriptor.

    Does anyone know how to fix this?

    Thanks.

    Share this comment


    Link to comment
    Share on other sites
    14 hours ago, Storm said:

    Hi Guys. I know we got the game-z.exe recently. When I try to soft reset in it using F12, I am getting error.

    I wanted to soft reset for the starter but when I try F12 I am getting an error. The error is as follows:

    Script 'Settings' line 97:Errorno::EBADF occurred
    Bad file descriptor.

    Does anyone know how to fix this?

    Thanks.

    We already have a party going. Join us here.

     

    Edit: fixed in 18.4.3

    Edited by Scy Guy

    Share this comment


    Link to comment
    Share on other sites

    Hello. I'm the patron you mentioned. 😄 I'm soooo happy that someone finally managed to find the true cause. Thank you! Okay, bye.

    Share this comment


    Link to comment
    Share on other sites


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • hello. the progress bars are in storage. you can read about why here.

    and, no, the game is not cancelled. it's okay.

    (Updated 8/25)

  • 16-4.png
    16-5.png
    16-6.png
    16-7.png
    16-8.png
    16-11.png
    16-12.png

×
×
  • Create New...