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

Marsh Terrain Tag

Rayd12smitty

Shadow Maker
  • 645
    Posts
    13
    Years
    • Seen Feb 21, 2016
    Ok, so I want to add a new type of terrain tag for marsh like areas like those in pearl/diamond/platinum. At first I thought I wouldn't need a new tag, and could just mark the tile with a bush flag, so the player sinks into it, but then realized there isn't a way I know of to make the player move slower in these tiles.

    Has anyone made this before? Can someone help me do it?
     
    If you don't have any scripting knowledge, you could always have a touch event that sets the players speed if facing left/right, lower speed to 2, and vice versa, depending on which side the marshland is...

    Or.

    Search in PokemonField, class PBTerrain, and add your new terrain there.
    and search Events.onStepTakenFieldMovement+, and add @move_speed=$game_player.move_speed, to set @move_speed to the players current speed.

    then I guess wherever you need to, place @move_speed = number, but make number any other number, I would suggest any number below 4, probably 2.5 to be honest.

    So basically.

    Search SootGrass=14, add Marsh=15 below.
    Search Events.onStepTakenFieldMovement+, and underneath Kernel.pbSlideOnIce(event), add:
    Code:
      elsif $game_map.terrain_tag(event.x,event.y)==PBTerrain::Marsh
        @move_speed=$game_player.move_speed
        @move_speed = 2.5 # or any other number
    Search return PBEnvironment::Sand, add:
    Code:
        elsif terrain==PBTerrain::Marsh
          return PBEnvironment::Marsh

    If you wanted an animation create an animation and look up how grass and sootgrass works and pretty much copy one of them to get the effect you want.

    Do this or something like this to add new terrain tags.

    This is how I would do it, I don't know if this works, it looks fine, if you want encounters on this tile, I'm sure you can work that out yourself.
     
    Ok so I put it in like you said, and when I try to load the game I get an error that says syntax error with the line you said to put under Kernel.pbSlideOnIce(event). I attached a screenshot. Sorry for such a big picture. I just realized that. Any help would be great as I have no idea whats wrong.
     
    --->Search<--- Events.onStepTakenFieldMovement+, and --->underneath<--- Kernel.pbSlideOnIce(event)

    You also placed it under Kernel.pbSlideOnIce(event=nil), That's not where I said to go...

    I can't test this on my game as I can't use my editor.exe, which is a shame
     
    --->Search<--- Events.onStepTakenFieldMovement+, and --->underneath<--- Kernel.pbSlideOnIce(event)

    You also placed it under Kernel.pbSlideOnIce(event=nil), That's not where I said to go...

    I can't test this on my game as I can't use my editor.exe, which is a shame

    Sorry my bad. It doesn't get the error now. Thanks

    Ok so now I am still getting a new error


    Spoiler:
     
    Last edited:
    Did you define Marsh=15? In PokemonField around line 559.
     
    Back
    Top