• 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 v16.2+] Tall Grass

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
  • Let's make this happen:
    ftLn3Vd.png

    GIF (Actions with item and Following Pokemon OW included).
    First, save the image (named grass_anim) inside Graphics/Picture folder:
    LGBg1Fe.png

    P.S: Thanks Maruno to riped the image.

    If you want to use it in v16.2, check here:
    https://www.pokecommunity.com/showthread.php?p=10155104#post10155104

    Now, below 'Sprite_WaterReflection' script, paste a new one, called 'Sprite_TallGrass' or whatever you want. Then, inside the script, paste the code below:
    Spoiler:


    And finally, inside 'Sprite_Character' script, paste the lines:
    Spoiler:


    I just edited like Surf Base works and made a little things to adapt to Tall Grass. Give me credits if used because was a lot of work to do that. @_@
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • If you want a animation like HGSS:
    Spoiler:

    Search 'PField_Field' script. Then, replace 'Events.onStepTakenFieldMovement+=proc {|sender,e|' (# Show grass rustle animation, and auto-move the player over waterfalls and ice) for:
    Code:
    # Show grass rustle animation, and auto-move the player over waterfalls and ice
    Events.onStepTakenFieldMovement+=proc {|sender,e|
      event = e[0] # Get the event affected by field movement
      if $scene.is_a?(Scene_Map)
        currentTag = pbGetTerrainTag(event)
        if event==$game_player
          if currentTag==PBTerrain::WaterfallCrest
            # Descend waterfall, but only if this event is the player
            Kernel.pbDescendWaterfall(event)
          elsif PBTerrain.isIce?(currentTag) && !$PokemonGlobal.sliding
            Kernel.pbSlideOnIce(event)
          end
        end
      end
    }
    Now, add a new code below:
    Code:
    Events.onLeaveTile+=proc {|sender,e|
      event = e[0] # Get the event affected by field movement
      if $scene.is_a?(Scene_Map)
        currentTag = pbGetTerrainTag(event)
        if currentTag==PBTerrain::Grass && event.character_name != "nil"
          $scene.spriteset.addUserAnimation(GRASS_ANIMATION_ID,event.x,event.y,true,1)
        end
      end
    }

    And done! :D
     
    Last edited:
    39
    Posts
    8
    Years
    • Seen May 2, 2024
    I've tryed this in a vanilla version and it doesn't work, is there anything missing?
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I've tryed this in a vanilla version and it doesn't work, is there anything missing?

    What are you try to add, what version you use and what errors appears? I need this answers to try to help you because to made this script i just copied and edited how Surf Base script works. With you comment i just say for you to check all steps again.
     
    39
    Posts
    8
    Years
    • Seen May 2, 2024
    What are you try to add, what version you use and what errors appears? I need this answers to try to help you because to made this script i just copied and edited how Surf Base script works. With you comment i just say for you to check all steps again.

    Well, I just took a vanilla 17.2 version of essentials, added a new scripts page called Sprite_TallGrass where i've added the code you wrote and then added the code lines you mention in Sprite_Character, and I'm sure I did it correctly as I've done it more than once in different vanilla essentials. Oh, and also added the graphic in the correct folder. Then I start a new game and walk into any grass of the game but nothing happends and any error pops up, simply it doesn't work, I can see my full character when walking between tiles. I don't know if it's my fault or there's something missing. Can you try it by yourself in a vanilla version following the steps you tell here? To make sure it's not a problem of the instructions. Thanks in advice, I've seen other scripts in the forum you made and they are really awesome.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Well, I just took a vanilla 17.2 version of essentials, added a new scripts page called Sprite_TallGrass where i've added the code you wrote and then added the code lines you mention in Sprite_Character, and I'm sure I did it correctly as I've done it more than once in different vanilla essentials. Oh, and also added the graphic in the correct folder. Then I start a new game and walk into any grass of the game but nothing happends and any error pops up, simply it doesn't work, I can see my full character when walking between tiles. I don't know if it's my fault or there's something missing. Can you try it by yourself in a vanilla version following the steps you tell here? To make sure it's not a problem of the instructions. Thanks in advice, I've seen other scripts in the forum you made and they are really awesome.

    I did. Anyway, try removing '!$scene || !$scene.is_a?(Scene_Map) |!' into the main script (TallGrass script than i made) and test. Also, i sent my 'Sprite_Character' to Alan Flygon and posted here, into the thread. Check there too.
     
    39
    Posts
    8
    Years
    • Seen May 2, 2024
    I did. Anyway, try removing '!$scene || !$scene.is_a?(Scene_Map) |!' into the main script (TallGrass script than i made) and test. Also, i sent my 'Sprite_Character' to Alan Flygon and posted here, into the thread. Check there too.

    I've also tried what you said takin out from the "OR" those conditions but it still don't work, I copied your Sprite_Character modified code into a vanilla project and added the three scripts underneath (tall grass, shadows and bubbles), and the other two work fine but the tall grass one still doesn't work, it doesn't give any error but it doesn't show it correctly. I don't really know what else to do.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I've also tried what you said takin out from the "OR" those conditions but it still don't work, I copied your Sprite_Character modified code into a vanilla project and added the three scripts underneath (tall grass, shadows and bubbles), and the other two work fine but the tall grass one still doesn't work, it doesn't give any error but it doesn't show it correctly. I don't really know what else to do.

    Lol. Remove 'event.moving?' stuffs and check if grass will appears.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Added 'def jump_sprite' to the script, while event jumps. Please copy main code again.
     
    1
    Posts
    4
    Years
    • Seen Aug 17, 2019
    Hello, when I try to use the second script, I get the error message: "Sprite_Character line 33: NoMethodError occurred undefined method 'animation_id' for nil:NilClass". How can I solve it?

    Very appreciated.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Hello, when I try to use the second script, I get the error message: "Sprite_Character line 33: NoMethodError occurred undefined method 'animation_id' for nil:NilClass". How can I solve it?

    Very appreciated.

    What second script? Also my script doesn't use any 'animation_id'.
     
    2
    Posts
    4
    Years
    • Seen Oct 6, 2019
    I am fairly new to this, but I'm quite sure I followed the steps correctly unless I missed something.
    First after not installing successfully I tried it again on a vanilla install of 17.2
    next I saved the grass_anim.png in Graphics/Characters in the vanilla install
    next I added the script code you mentioned below the Sprite_WaterReflection script as its own script.
    Then I went into the Sprite_Character script and added the script code to the end of it that you mentioned.
    For both of these I used the new code versions
    When I load a playtest of the game I get this error (someone above me also got this it seems)
    "Script 'Sprite_Character' line 207: NoMethodError occured.
    undefined method 'animation_id' for nil:NilClass'
    Sorry if I'm missing something obvious, but I think it has to do with the code excerpt added to Sprite_Character
    if you'd like a copy of my install (got same results on vanilla and non vanilla versions) or any other info let me know.
    Either way I've been using a ton of your work on here and appreciate all the work you put into the community
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I think you guys copied more than necessary. Anyway, here my script for 'Sprite_Character'. Compare with yours:
    Spoiler:
     
    Back
    Top