Save-Point
[RMXP] Showing skill gained by leveling up on battle result - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: [RMXP] Showing skill gained by leveling up on battle result (/thread-8283.html)

Pages: 1 2


RE: [RMXP] Showing skill gained by leveling up on battle result - FrQise - 05-06-2021

(05-06-2021, 03:21 AM)DerVVulfman Wrote: 1)  No worries.  Though I think you left only moments before I posted the fix.  Seriously, you were up till roughly 3am?

2) Heaven forbid, they are not the same.  But we have a thread for it:  ACBS  (Atoh's CBS).. More advanced ... easily.

Ahahaha I think I went to bed at 5 am.

I'll check the thread but I think I might be too scared to swap my battle system in the middle of my game, might break a lot of things haha

Again, thanks for the help!


RE: [RMXP] Showing skill gained by leveling up on battle result - DerVVulfman - 05-06-2021

You'll have more breaks using Blizzard's  TON OF FIXES script.  It isn't F12 compliant.  By way of F12, I mean the F12 player reset button built into the RPGMaker line of engines.  And by that, I mean you will run into the dreaded F12 stack issue bug if you hit the F12 button.  I told bliz about it last year, and fixing it is relatively easy though time consuming.  He is just...

We have more than one lazy scripter in the realm. Laughing

Alias is the best method of adding new code into a script when a 'super' command cannot work, much better than rewriting the whole method.

EXAMPLE:
Start the game and hit F12 in the TITLE screen.
Error message says 'stack level too deep'  and points to line 1258 in 'Tons of Addons 2'
The script is the BITMAP class.  You NEVER just alias a hidden class like BITMAP. (*explanation later)
The alias command is the culprit:  alias init_font_override_later initialize.
The alias needs to only run ONCE when you start Game.exe and not every F12 restart, so we need to put it in an if...end block:
Code:
if @tonfixes2_bitmap_init.nil?
 alias init_font_override_later initialize
 @tonfixes2_bitmap_init = true
end
Essentially, it says "Hey, if the @tonfixes2_bitmap_init value doesn't even exist", set up your alias statement and then create the @tonfixes2_bitmap_init value and set it to true.  The first time you run the game, it runs the alias.  Fine.  And if the player hits F12, will NO LONGER alias it a second time!  That was the problem.

* Explanation (I said later, right?)
Hidden classes are NOT meant to reload. So aliasing methods related to the Sprite class itself (I discovered in 2007), Bitmap, Font, Windows and the like require this consideration.  And if you are aliasing parent class methods, you need to watch out too.  For example, if you are touching up a custom menu and you choose to alias the 'draw_actor_graphic' class within Window_Base by using an alias command within your custom class, you can run into problems.

But the above method does work.  Still, the Tons of Fixes  (HAHAHAHAHAHAHA!) requires tons of F12 fixes that you'll need to apply in this very manner.  Once you do this one, run it again and you'll find another spot needing another F12 fix.


RE: [RMXP] Showing skill gained by leveling up on battle result - FrQise - 05-07-2021

Woah!

I didn't even knew about the F12 key !

I'll try to fix all thoses F12 bugs !

Thanks for the info !