• 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 Trading Card Game 2 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.

Water Bubbles

  • 52
    Posts
    9
    Years
    [PokeCommunity.com] Water Bubbles

    Configure the terrain tag where you want the bubbles to be displayed and done! I've include two pictures for the bubbles animation, you should put the pictures in Graphics folder. I've ripped the GBA style one but the 5 Gen one is ripped by Zenionith so if you use it, you should give credits to him.

    Download: https://pokemonfangames.com/script.php?id=13

    How to install
    Place the script in "script.txt" before main and "water.png" in Pictures folder. If you want to use the GBA styled, don't need to place the "water.png" picture, just the "waterGBA.png". Make sure you rename it to "water.png".

    How to use
    By default, water bubbles are showed in terrain tag number 16, you can change it modifying "WATERRAINTAG".
    Invisible events will not have effect for water bubbles. Also, if you name add "/nowater/" to an event name or create a comment in the event with NoWater, it will not have water bubbles too.
     
    Last edited:
    thanks man I was looking for that for a long time, Also I was wondering if you have that water kind of beach animated tile that is on the HGSS picture ?
     
    For this script work on V17.2, change line '@waterSprites.push(WaterAnim.new(@playersprite,$game_player,@viewport1,@map))' into '@waterSprites.push(WaterAnim.new($scene.spritesetglobal.playersprite,$game_player,@viewport1,@map))'.

    Edit: Look at my below post.
     
    Last edited:
    Klein has another script on their site related to Z priority. Im not sure if it would fix this, but it's worth a shot if you haven't installed it yet.
     
    But where can I find the script? The KleinStudio's link port me to a deleted page.
     
    Klein has another script on their site related to Z priority. Im not sure if it would fix this, but it's worth a shot if you haven't installed it yet.

    Nops... :/ Also, i checked: if you have a Dependency Event (like Brandon event into Route 3, vanilla PE) , wont show the effect to him too.

    So, maybe we need to put add effect to Dependency Event inside the script.

    EDIT: Also, if you install footprints scripts, will show footprints effect to Dependency Event (in case, to following pokemon). Weird. lol
     
    Last edited:
    For this script work on V17.2, change line '@waterSprites.push(WaterAnim.new(@playersprite,$game_player,@viewport1,@map))' into '@waterSprites.push(WaterAnim.new($scene.spritesetglobal.playersprite,$game_player,@viewport1,@map))'.
    Instead of doing the above step, do the below step:

    Change line

    Code:
    @waterSprites.push(WaterAnim.new(sprite,sprite.character,@viewport1)) if sprite.character!=$game_player
    into
    Code:
    @waterSprites.push(WaterAnim.new(sprite,sprite.character,Spriteset_Map.viewport)) if sprite.character!=$game_player'

    And line
    Code:
    @waterSprites.push(WaterAnim.new(@playersprite,$game_player,@viewport1,@map))
    into
    Code:
    @waterSprites.push(WaterAnim.new($scene.spritesetglobal.playersprite,$game_player,Spriteset_Map.viewport,@map))

    This solves the z order issue.

    EDIT: For working with dependent events (like pokémon following), before line
    Code:
    alias water_old_initialize initialize
    add
    Code:
    class PokemonTemp
      attr_accessor :pendingWaterSprites
    end

    Change line
    Code:
    @sprite.dispose if @sprite && [email protected]? && !isInWaterTileId
    into
    Code:
    @sprite.dispose if @sprite && [email protected]? && (!isInWaterTileId || @rsprite.disposed?)

    Change line
    Code:
    return if disposed? or !isInWaterTileId
    into
    Code:
    return if disposed? or (!isInWaterTileId || @rsprite.disposed?)

    After line
    Code:
    water_old_update
    add
    Code:
    if $PokemonTemp.pendingWaterSprites && !$PokemonTemp.pendingWaterSprites.empty?
      sprite = $PokemonTemp.pendingWaterSprites.pop
      @waterSprites.push(WaterAnim.new(sprite,sprite.character,Spriteset_Map.viewport))
    end

    On PField_DependentEvents, after line
    Code:
    @sprites.push(Sprite_Character.new(@viewport,event))
    add
    Code:
    $PokemonTemp.pendingWaterSprites = [] if !$PokemonTemp.pendingWaterSprites
    $PokemonTemp.pendingWaterSprites.push(@sprites[-1])

    EDIT2: Fixed dependent events
    EDIT3: Fixed save/load with dependent event.
    EDIT4: Fixed a small mistake
     
    Last edited:
    Instead of doing the above step, do the below step
    If i save the game and load, the effect won't appears. Also, i check one more thing: if we have a event (NPC i.e) in different map, the effect only will show if the player are in the same map than NPC (Tall grass - same script base than Water Bubble - and footprints effects only appears if the player are in the same map than them):
    [PokeCommunity.com] Water Bubbles

    [PokeCommunity.com] Water Bubbles
     
    That's an interesting finding Wolf I also noticed that after you posted this.
     
    I got confused at first as the script linked above was for water pond bubbles, a script for showing trailing bubbles. There's an easier way to do this in v17 by using the same code as the grass animation.

    For repeating water bubbles while walking through shore tiles BW-style, the link is here: https://pokemonfangames.com/resource/water-bubbles/.
     
    Back
    Top