• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

Resource Terrain Tag Side Stairs 1.5a

Bv9Quos.png

getting this error when open the game

i tried it on new save file still same error
 
I took some time to fix the jumps caused by moveto, which was used to handle exceptions when it was not known which path the follower should take. Although new_x, new_y seem confusing, I made an adaptation so that going up and down stairs with or without this Script works smoothly.

Everything in the fancy_moveto method of the Game_Follower class.
Ruby:
Expand Collapse Copy
def fancy_moveto(new_x, new_y, leader)
    if self.x - new_x == 1 && (-1..1).include?(self.y - new_y)
      # Left-Up
      if self.y - new_y == 1 && passable?(new_x, new_y, 4)
        move_through(7)
        # New
      elsif self.y - new_y == 1 && passable?(self.x, self.y, 4)
        move_through(7)
      # Left-Down
      elsif self.y - new_y == -1 && passable?(new_x, self.y, 4)
        move_through(1)
        # New
      elsif self.y - new_y == -1 && passable?(self.x, self.y, 4)
        move_through(1)
      else
        move_fancy(4,leader)
      end
    elsif self.x - new_x == -1 && (-1..1).include?(self.y - new_y)
      # Right-Down
      if self.y - new_y == -1 && passable?(new_x, new_y, 6)
        move_through(3)
        # New
        elsif self.y - new_y == -1 && passable?(self.x, self.y, 6)
          move_through(3)
      # Right-Up
      elsif self.y - new_y == 1 && passable?(new_x, self.y, 6)
        move_through(9)
        # New
        elsif self.y - new_y == 1 && passable?(self.x, self.y, 6)
          move_through(9)
      else
        move_fancy(6,leader)
      end
    elsif self.x == new_x && self.y - new_y == 1
      move_fancy(8,leader)
    elsif self.x == new_x && self.y - new_y == -1
      move_fancy(2,leader)
    elsif self.x - new_x == 2 && self.y == new_y
      jump_fancy(4, leader)
    elsif self.x - new_x == -2 && self.y == new_y
      jump_fancy(6, leader)
    elsif self.x - new_x == 2 && self.y == new_y + 1
      jump_fancy(4, leader)
    elsif self.x - new_x == -2 && self.y == new_y  + 1
      jump_fancy(6, leader)
    #------------------------------------------------
    # New coordinates.
    #------------------------------------------------
    elsif self.x == new_x && self.y - new_y == 2
      jump_fancy(8, leader)
    elsif self.x == new_x && self.y - new_y == -2
      jump_fancy(2, leader)
    #------------------------------------------------
    # Diagonal floors
    #------------------------------------------------
    elsif self.x == new_x + 1 && self.y - new_y == 2
      move_through(7)
    elsif self.x == new_x + 1 && self.y - new_y == -2
      move_through(1)
    elsif self.x == new_x - 1 && self.y - new_y == -2
      move_through(3)
    elsif self.x == new_x - 1 && self.y - new_y == 2
      move_through(9)
    elsif self.x != new_x || self.y != new_y
      moveto(new_x, new_y)
    end
  end

Edit: Code updated 28-01-2025 to read coordinates on small stairs. Here I have been using stairs via event, as the Wiki says.
Ok, I thought i followed your instructions, but when I replace the fancy_moveto code with this, I get an error when I try to move with my new following Pokemon. It appears to be clashing with the "move_fancy" code, so not sure what I did wrong:

Exception: ArgumentError
Message: wrong number of arguments (given 2, expected 1)

Backtrace:
Game_Follower:48:in `move_fancy'
Game_Follower:125:in `fancy_moveto'
[Following Pokemon EX] Following Event.rb:214:in `follow_leader'
[Following Pokemon EX] Following Event.rb:272:in `block in move_followers'
[Following Pokemon EX] Following Event.rb:270:in `each'
[Following Pokemon EX] Following Event.rb:270:in `each_with_index'
[Following Pokemon EX] Following Event.rb:270:in `move_followers'
Game_Player:423:in `update'
Scene_Map:168:in `block in update'
Scene_Map:166:in `loop'
 
I get the following error when i try to move anywhere. any ideas?

[Pokémon Essentials version 21.1]

Exception: NoMethodError
Message: undefined method `-' for nil:NilClass

Backtrace:
RubyUtilities:405:in `lerp'
[Terrain Tag Side Stairs] Terrain Tag Stairs.rb:85:in `update_move'
Game_Player:491:in `update_move'
Game_Character:907:in `update'
Game_Player:418:in `update'
Scene_Map:168:in `block in update'
Scene_Map:166:in `loop'
Scene_Map:166:in `update'
Scene_Map:238:in `block in main'
Scene_Map:235:in `loop'
 
I get the following error when i try to move anywhere. any ideas?

[Pokémon Essentials version 21.1]

Exception: NoMethodError
Message: undefined method `-' for nil:NilClass

Backtrace:
RubyUtilities:405:in `lerp'
[Terrain Tag Side Stairs] Terrain Tag Stairs.rb:85:in `update_move'
Game_Player:491:in `update_move'
Game_Character:907:in `update'
Game_Player:418:in `update'
Scene_Map:168:in `block in update'
Scene_Map:166:in `loop'
Scene_Map:166:in `update'
Scene_Map:238:in `block in main'
Scene_Map:235:in `loop'
You need to start a new save file to avoid this error
 
Hey ! Just installed the plugin and the side stairs are working great !

I did run into a small issue though:
If the player gets teleported while standing on the side stairs (using Fly, Debug teleport, or even a regular teleport line from rpg maker xp),
the sprite remains offset afterwards.
It only resets once the player steps back onto a side stair tile.

Do you know of any way to reset the offset automatically when a teleport happens?
 
Back
Top