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

v15 Gen 6 pack - Wild Pokemon cause lag that comes close to crashing the game

824
Posts
8
Years
  • When a wild Pokemon tries to use a move, the game freezes up some time between calculating damage and actually applying it. This does not seem to be an issue when I fight a trainer, even with the same Pokemon.

    I feel like I should be supplying more information, but I've made SO MANY changes that I feel it would be easier to figure out what the game normally does between damage calculation and applying damage.

    I use the original Gen VI Pack, which is based on v15.
     
    119
    Posts
    10
    Years
    • Seen Sep 1, 2023
    Does it play a sound effect after the freeze/lag? I've noticed on several occasions that essentials can freeze while it's loading an audio file (happens on my old laptop for the victory jungle of every first battle after startup).

    If that's not the case I'd recommend adding in some debug messages to find out which section of the code is causing the freeze.
     
    824
    Posts
    8
    Years
  • Does it play a sound effect after the freeze/lag? I've noticed on several occasions that essentials can freeze while it's loading an audio file (happens on my old laptop for the victory jungle of every first battle after startup).

    If that's not the case I'd recommend adding in some debug messages to find out which section of the code is causing the freeze.

    So in other words, you're saying that it might be the audio file from the animation may be causing the problem? Then why does it only appear when fighting only wild Pokemon.

    Due to my Battle Camera feature, I know that it starts after Rivalry triggers.



    Information I've gathered so far:

    - it doesn't happen in Trainer battles
    - it doesn't happen in Double Battles even against wild Pokemon
    - it happens after the base damage is calculated but before the target's defense is calculated.
    - it happens for any wild Pokemon, but it WILL call a "script taking too long" error if the wild Pokemon is Nidoran of either gender
     
    Last edited:
    119
    Posts
    10
    Years
    • Seen Sep 1, 2023
    So in other words, you're saying that it might be the audio file from the animation may be causing the problem? Then why does it only appear when fighting only wild Pokemon.
    Sounds like an audio file isn't the cause here (unless it's just 1 attack, but even then it's to inconsistent).

    In that case I recommend adding in some debug messages (I don't know how experienced you are with coding in rmxp); e.g. 'print("text")' this code (without the single quotation marks) creates a pop-up showing the text. Place this in you code to find out which exact line causes the freeze. Seeing as it starts after Rivalry triggers I'd start looking there. Note that you can also put variables in between the brackets to show its value in the popup mesage.

    You'll have to do this yourself, without seeing the code it's hard to say what causes the freeze.
     
    824
    Posts
    8
    Years
  • The issue has been fixed. Turns out it was a constant initialization that was being done incorrectly. It's a constant unique to my game, and is supposed to default to 7 for all battles. For wild Single battles, it was being set to 3.
     
    Back
    Top