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

Generation 8 Project for Essentials v18 and v18.1 (Scripts, PBS and More)

Status
Not open for further replies.

StCooler

Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    OMG YES! TYSM!

    ...I tested it and the animations are still half the size. I also found that when any animation gets used in the battle, the sprite shrinks back to its original size. I'm sorry for putting you through all this, but I found a post from 2013 (https://www.pokecommunity.com/showthread.php?t=304456) where at the end a user called Minorthreat0987 is trying to do the same thing I did. Maruno said it'd be better to just half the size of the backsprites in the Pokédex (which idek how to do) and manually make all the backsprites double their original size (which idk how to do in bulk). So here I am with your advice, which again thank you for going out of your way, and my game looks like its having a seizure every time the opposing Bublasaur uses Vine Whip. Do you have any advice as to how I could a). Resize my back sprites in bulk and half their size in the Pokédex or b). make the animations bigger and not turn the sprites back to 100% size again? Thank you so much you've been an incredible help so far.

    In the function:
    Code:
      def pbAnimationCore(animation,user,target,oppMove=false)
    below the line:
    Code:
        oldTargetY = (targetSprite) ? targetSprite.y : oldUserY
    add the following lines:
    Code:
          oldUserZoomX = (userSprite) ? userSprite.zoom_x : 1
          oldUserZoomY = (userSprite) ? userSprite.zoom_y : 1
          oldTargetZoomX = (targetSprite) ? targetSprite.zoom_x : 1
          oldTargetZoomY = (targetSprite) ? targetSprite.zoom_y : 1
    And below the line:
    Code:
          animPlayer.update
    add the following lines:
    Code:
            userSprite.zoom_x = oldUserZoomX if userSprite
            userSprite.zoom_y = oldUserZoomY if userSprite
            targetSprite.zoom_x = oldTargetZoomX if targetSprite
            targetSprite.zoom_y = oldTargetZoomY if targetSprite

    This will prevent the sprite from shrinking. I have no idea how to double the size of the animations...

    As for your first question, I suspect you'd have to do this with another script. If you know Python, you can use PIL and loop over the images of the folder Graphics\Battlers. I haven't found any way to modify and save image files with Essentials.
     

    Shashu-Greninja

    "With great power comes great responsibility"- Whe
  • 99
    Posts
    3
    Years
    I face another bug with dependant events. In map transfers like door transfers, the dependent event is warped on the player rather its side or behind it
    Can anyone help me out with this?
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    Exception: ArgumentError

    Message: Item number 0 is invalid.



    Backtrace:

    PItem_Bag:93:in `pbQuantity'

    PItem_Bag:102:in `pbHasItem?'

    PokeBattle_BattleCommon:230:in `pbCaptureCalc'

    PokeBattle_BattleCommon:118:in `pbThrowPokeBall'

    PItem_BattleItemEffects:307

    PItem_BattleItemEffects:306:in `call'

    Event_Handlers:140:in `trigger'

    PItem_Items:317:in `triggerUseInBattle'

    Battle_Action_UseItem:124:in `pbUsePokeBallInBattle'

    Battle_Phase_Attack:83:in `pbAttackPhaseItems'


    For some reason I'm getting this error when I try to use a PokeBall (I get the same error for other kinds of balls, but some work fine), any ideas?
     

    StCooler

    Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Exception: ArgumentError

    Message: Item number 0 is invalid.



    Backtrace:

    PItem_Bag:93:in `pbQuantity'

    PItem_Bag:102:in `pbHasItem?'

    PokeBattle_BattleCommon:230:in `pbCaptureCalc'

    PokeBattle_BattleCommon:118:in `pbThrowPokeBall'

    PItem_BattleItemEffects:307

    PItem_BattleItemEffects:306:in `call'

    Event_Handlers:140:in `trigger'

    PItem_Items:317:in `triggerUseInBattle'

    Battle_Action_UseItem:124:in `pbUsePokeBallInBattle'

    Battle_Phase_Attack:83:in `pbAttackPhaseItems'


    For some reason I'm getting this error when I try to use a PokeBall (I get the same error for other kinds of balls, but some work fine), any ideas?

    This error says that you're using a Pokéball that is somehow not defined in the PBS file, or maybe the compiled files are wrong, or maybe the script is using a constant that is not a PBItem.
    Find which Pokéball gives you the error, and check if that Pokéball is defined in the PBS file items.txt.

    Also, compile your game again, make a new save, and try and see if you get that error again.
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    The error happens with every ball except Master and Nest
    They are all defined in items.txt, and I tried to compile the game again and start a new save, but nothing
    What do you mean by the script is using a constant that is not a PBItem?
     

    StCooler

    Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    The error happens with every ball except Master and Nest
    They are all defined in items.txt, and I tried to compile the game again and start a new save, but nothing
    What do you mean by the script is using a constant that is not a PBItem?

    When you compile the game, (among other things) it will read the items from the PBS file items.txt and create a new script (on-the-fly) that defines all items. For example, if you look for "LEFTOVERS" in the scripts, it's a constant. It is a hard-coded name that refers to a number, number that is defined by the first entry in the line that defines the leftovers. It does that for every item (and Pokémon, and move, and ability).

    Paste this code somewhere (make a new script above Main) and give us the error message:
    Code:
    class PokemonBag
      def pbQuantity(item)
        item_given = item 
        item = getID(PBItems,item)
        if !item || item<1
          raise ArgumentError.new(_INTL("Item number {1} is invalid. (base item: {2})",item, item_given))
        end
        pocket = pbGetPocket(item)
        maxsize = maxPocketSize(pocket)
        maxsize = @pockets[pocket].length if maxsize<0
        return ItemStorageHelper.pbQuantity(@pockets[pocket],maxsize,item)
      end
    end
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    Exception: ArgumentError

    Message: Item number 0 is invalid. (base item: CATCHINGCHARM)



    Backtrace:

    ------------------------------------:6:in `pbQuantity'

    PItem_Bag:102:in `pbHasItem?'

    PokeBattle_BattleCommon:230:in `pbCaptureCalc'

    PokeBattle_BattleCommon:118:in `pbThrowPokeBall'

    PItem_BattleItemEffects:307

    PItem_BattleItemEffects:306:in `call'

    Event_Handlers:140:in `trigger'

    PItem_Items:317:in `triggerUseInBattle'

    Battle_Action_UseItem:124:in `pbUsePokeBallInBattle'

    Battle_Phase_Attack:83:in `pbAttackPhaseItems'

    Here it is.
    I think I got it now, I recently set the ENABLE_CRITICAL_CAPTURES to true. If I set it to false, PokeBalls work perfectly. So, is the error happening because I don't have the Catching Charm defined in items.txt? Because I don't lol.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Here it is.
    I think I got it now, I recently set the ENABLE_CRITICAL_CAPTURES to true. If I set it to false, PokeBalls work perfectly. So, is the error happening because I don't have the Catching Charm defined in items.txt? Because I don't lol.

    It's strange because the Catching charm is defined by default in the Gen 8 project ^^
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    The thing is I only copied the scripts.rxdata file into my game, I already had almost all the PBS stuff lol. I feel so dumb now.
    Thanks a lot for your help!
     
  • 29
    Posts
    5
    Years
    • Seen Feb 27, 2023
    Guys, I don't know if this happens to you:

    Spoiler:


    (happens after defeating a Pokemon that used Jaw Lock on you)
    but if it does, go to Battler_Initialize line 235: "b.effects[PBEffects::Jawlock] = false" and change "Jawlock" to "JawLock" (Capital "L")
     

    Shashu-Greninja

    "With great power comes great responsibility"- Whe
  • 99
    Posts
    3
    Years
    I dont know if it's bug or is supposed to be like this only:- I have a zacian with Iron head and behemoth blade, but iin battle both of the moves turn into behemoth blade. Can Someone help me fix this?
     

    StCooler

    Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    It's not a bug, it's a feature :D

    From Bulbapedia:
    If Zacian knows Iron Head while entering battle in its Crowned Sword form, Iron Head will become Behemoth Blade for the duration of the battle.
    So if you have Behemoth Blade and Iron Head, you will get two Behemoth Blades, it's normal.
     
  • 83
    Posts
    3
    Years
    Hey there. I found and bug regarding the Pokémon Vivillion:

    Generation 8 Project for Essentials v18 and v18.1 (Scripts, PBS and More)


    I've run some tests and I discover that this error happens only when using Gen 8 Tool. Do you guys know what could have been causing this error?
     
  • 29
    Posts
    5
    Years
    • Seen Feb 27, 2023
    In "AI_Move_EffectScores"

    Spoiler:
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    Does anybody else have any problem with Gems?
    When a trainer uses them, the "the gem strengthened the move's power" appears every time the holder attacks (I'm assuming the gem is being used each time, it doesn't get consumed).
    When I use them, the gem is not consumed, but it only powers up moves of that same type.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Hey there. I found and bug regarding the Pokémon Vivillion:

    I've run some tests and I discover that this error happens only when using Gen 8 Tool. Do you guys know what could have been causing this error?

    For Arceus' sake, it took a long time to figure out the problem.
    In your PBS file pokemon.txt (NOT pokemonforms.txt), find the entry for Vivillon. It has an entry FormName, and this entry contains all the forms of Vivillon. The pink form of Vivillon is called "Polar Form", and it should be the form in pokemon.txt.
    In summary, replace:
    Code:
    FormName = Icy Snow Pattern,Polar Pattern,Tundra Pattern,Continental Pattern,Garden Pattern,Elegant Pattern,Meadow Pattern,Modern Pattern,Marine Pattern,High Plains Pattern,Sandstorm Pattern,River Pattern,Monsoon Pattern,Savanna Pattern,Sun Pattern,Ocean Pattern,Jungle Pattern,Fancy Pattern,Poké Ball Pattern
    with:
    Code:
    FormName = Polar Pattern


    Does anybody else have any problem with Gems?
    When a trainer uses them, the "the gem strengthened the move's power" appears every time the holder attacks (I'm assuming the gem is being used each time, it doesn't get consumed).
    When I use them, the gem is not consumed, but it only powers up moves of that same type.

    Can you check in the file Battler_UseMove_TriggerEffects, in the function:
    Code:
      def pbEffectsAfterMove(user,targets,move,numHits)
    below the code for Ash Greninja (Greninja with Battle Bond), do you have the lines:
    Code:
     # Consume user's Gem
        if user.effects[PBEffects::GemConsumed]>0
          # NOTE: The consume animation and message for Gems are shown immediately
          #       after the move's animation, but the item is only consumed now.
          user.pbConsumeItem
        end
    ?
     
    Last edited:
  • 73
    Posts
    4
    Years
    • Seen yesterday
    Ok, so I set up 2 battles against the same trainer. One using the Pokemon Selection Script (https://www.pokecommunity.com/showthread.php?t=290931), and the other one without it.
    The problem only occurred with the first one, it seems that the gem powers up any damaging move of any type, but then the item actually is consumed (I checked with Frisk, Knock Off, Poltergeist, Switcheroo, and Thief lol). There appears to be no problem when I use the gem (It powers up only if the type matches, and the item is consumed upon use). When not using the Pokemon Selection Script, they work perfectly though.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Ok, so I set up 2 battles against the same trainer. One using the Pokemon Selection Script (https://www.pokecommunity.com/showthread.php?t=290931), and the other one without it.
    The problem only occurred with the first one, it seems that the gem powers up any damaging move of any type, but then the item actually is consumed (I checked with Frisk, Knock Off, Poltergeist, Switcheroo, and Thief lol). There appears to be no problem when I use the gem (It powers up only if the type matches, and the item is consumed upon use). When not using the Pokemon Selection Script, they work perfectly though.

    I cannot replicate the bug...
     
    Status
    Not open for further replies.
    Back
    Top