• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.
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/threads/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.
 
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?
 
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?
 
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.
 
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
 
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.
 
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 ^^
 
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")
 
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?
 
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.
 
Hey there. I found and bug regarding the Pokémon Vivillion:

[PokeCommunity.com] 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?
 
In "AI_Move_EffectScores"

Spoiler:
 
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.
 
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:
I do have those lines, yup.
Can you try and Knock Off / Switcheroo / Trick the item of the trainer after its Pokémon uses it? (to see if the Gem is still present or not)
 
Ok, so I set up 2 battles against the same trainer. One using the Pokemon Selection Script (https://www.pokecommunity.com/threads/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.
 
Ok, so I set up 2 battles against the same trainer. One using the Pokemon Selection Script (https://www.pokecommunity.com/threads/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