The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Wiimeiser on August 01, 2012, 02:11:33 AM

Title: Victory Aftermath \n bug
Post by: Wiimeiser on August 01, 2012, 02:11:33 AM
I'm getting that same problem with Yanfly's Victory Aftermath, what's more is it also deletes the word it's placed before no matter how many spaces you have scratch that if you put a space the word stays and the space isn't deleted, but it still doesn't work.
Title: Re: Victory Aftermath \n bug
Post by: modern algebra on August 01, 2012, 10:01:07 AM
Show me a demo with the error situation recreated and I will try and fix it.
Title: Re: Victory Aftermath \n bug
Post by: Wiimeiser on August 01, 2012, 01:52:50 PM
Here you go. Unrelated, but the game crashed when entering battle... Is this known?
EDIT: Not the one I uploaded, another one.
Title: Re: Victory Aftermath \n bug
Post by: modern algebra on August 01, 2012, 09:57:28 PM
No, there is no known error where the game would crash on entering battle. Are you sure it has something to do with these scripts?

Anyway, the error occurs in the demo you showed me, but that demo actually doesn't include any ATS script at all so I'm thinking that it's a bug with the Victory Aftermath script independent of the ATS. I will still try to fix it for you.

EDIT::
Alright, in the Victory Aftermath script, find these lines starting around line 343

Code: [Select]
        case @victory_quote_type
        when nil; next
        when :win_quote;   @win_quotes[@win_quotes.size-1] += line.to_s
        when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s
        when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s
        end

Change them to:

Code: [Select]
        case @victory_quote_type
        when nil; next
        when :win_quote;   @win_quotes[@win_quotes.size-1] += line.to_s.gsub(/\\[Nn]/, "\n")
        when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s.gsub(/\\[Nn]/, "\n")
        when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s.gsub(/\\[Nn]/, "\n")
        end

I think that should fix the problem when it's independent. So do that first.

Unfortunately, once that's fixed, then a problem with Paragraph Formatting will arise. But you can fix that by changing this line in Victory Aftermath at line 171:

Code: [Select]
    HEADER_TEXT = "\e>\eC[6]%s\eC[0]\e<\n"  # Always at start of messages.

Add /pf to it to turn off paragraph formatting, like so:

Code: [Select]
    HEADER_TEXT = "/pf\e>\eC[6]%s\eC[0]\e<\n"  # Always at start of messages.
Title: Re: Victory Aftermath \n bug
Post by: Helladen on August 02, 2012, 03:00:41 AM
Thanks, you helped me, too. :)
Title: Re: Victory Aftermath \n bug
Post by: M@pple on January 17, 2013, 08:48:00 AM
Well Modern Algebra, your solution worked like a charm to me, but the two letters "pf" keep appearing before the character name.

how to fix this?

=EDIT=

Wait, somehow this glitch fixed itself, but my necropost is wasnt for nothing at least, i have a question,its true that you have a message script that fixes all those messaging bugs?
Title: Re: Victory Aftermath \n bug
Post by: modern algebra on January 18, 2013, 01:08:58 AM
The pf thing was only necessary since Wiimeiser was using my Paragraph Formatting script.

The only part that you'd need to do if you're not using the formatter is the first part.

As for your second query, I don't know what "all those messaging bugs" are specifically. I've not written a messaging system that specifically targets any errors. However, I have written a couple message systems, and it is possible that they would incidentally have fixed some bugs. Without knowing what bugs you are referring to though, then I don't know.