• 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.

[Essentials v13] Faster text and faster exp. gain animation

453
Posts
10
Years
  • Age 32
  • Seen Apr 17, 2024
If you're dissatisfied with even the fastest text speed and exp. gain bar animation speed then this tutorial is
for YOU! *points finger*

This short tutorial will teach you how to make the text speed in Pokémon Essentials twice as fast with a little trick
and how to make exp. gain bar animation duration same for all exp. gain amounts (for example, gaining 50 exp
and 500 exp will take the same amount of time).

Note: This tutorial is written for version 13.

This is how I did it in my game. First, you should find the updateInternal method
in script SpriteWindow. The first line of the method should look like this:

Code:
curcharskip=@frameskip<0 ? @frameskip.abs : 1

After that line, add this:

Code:
curcharskip += 1

This will make all text in messages appear a lot faster. How does it work? Instead of showing one letter by letter
it will show (at least) two letters at a time. However, if we do this, then a problem arises in pokémon battles. If the text
appears too fast, before the "pokéball appearing" animation is over, the battle will freeze. So, we introduce a
control variable that will turn on the char skip only during non-battle messages (made with Show Message).
We update the above line like so:

Code:
curcharskip += 1 if $skip_one_more

Next step is to initialize the global variable $skip_one_more. Insert this in the Settings script, first line.

Code:
$skip_one_more = false

It should be false by default, and true only when we're showing messages. So let's turn it on in method
Kernel.pbMessage (script PokemonMessages, line 1010). Insert this as the first line in the method:

Code:
$skip_one_more = true

And insert this before the last line (return ret)

Code:
$skip_one_more = false

That's it! If you'd like to have an option of choosing this text speed, you could add another control variable
that together with $skip_one_more activates the char skip. For example:

Code:
curcharskip += 1 if $skip_one_more && $hyper_text_speed_ACTIVATE


On to the exp. bar animation.

Add this on the end of the method animateEXP (script PokeBattle_ActualScene, line 691)

Code:
    @expAnimSpeed = (newexp - oldexp) / 60.0
    @expAnimSpeed = 1 if @expAnimSpeed < 1

In method update, on line 811, there should be:

Code:
@currentexp += 1

Overwrite that line with this:

Code:
@currentexp += @expAnimSpeed
@currentexp = @endexp if @currentexp > @endexp

That's it. Now to explain what's going on here. Firstly, we set some animation parameters. @expAnimSpeed is
calculated as a difference between new exp. and old, divided by 60. This is equivalent to calculating speed from
distance and time needed to cross that distance. Here, we want to cross the "distance" between new exp. and
old exp. in 60 frames, regardless of that distance's length. If the speed is less than 1, we set it to 1, because
minimally, we want to gain 1 exp per frame.

The second part is in the update method. Instead of increasing the current exp by 1, we increase it by
@expAnimSpeed, and if we go beyond the @endexp, we set the @currentexp back to @endexp

If you've tried it and it works, a thanks will suffice. No credits are needed.
 

Chrisario

Friend code :0018 2912 2366 let me know
108
Posts
10
Years
I never asked for this but thanx alot for this The exp SE I seem can't get it from google
because the quietness when gaining EXP is borring
 

FL

Pokémon Island Creator
2,446
Posts
13
Years
  • Seen today
Nice tip!

First, you reverse it. 'curcharskip += 1 if $skip_one_more' should be 'curcharskip += 1 if !$skip_one_more'.

To solve the freeze problem, after each 'pbDisplayPaused(_INTL("{1}\r\nwould like to battle!",@opponent.fullname))' line and 'pbDisplayPaused(_INTL("{1} and {2} want to battle!",@opponent[0].fullname,@opponent[1].fullname))' line, add:

Code:
    while @scene.inPartyAnimation?
      @scene.pbGraphicsUpdate
    end

Doing this, the $skip_one_more stuff is unnecessary.
 
11
Posts
9
Years
  • Age 29
  • Seen Apr 24, 2021
Sorry but I do not understand where I have to put $ skip_one_more = true in the script PokemonMessages
 

Courtland

"It's time for the Revelation..." - Pokemon Doomsd
57
Posts
10
Years
Jeez, doesn't work if you have a Pokemon with speed boost or leftovers. It just endlessly get exp.
 
Back
Top