Skip to content

Add new move_route methods

Rey requested to merge TheRey/pokemonsdk:demo/new_move_route_method into development

MR Description

  • This MR adds two new types of commands for moveroutes.
  • The move_random_within_zone makes it so that an event will be able to move randomly inside a zone defined by 4 borders. If, for some reason, the NPC's initial or current position isn't in the defined border, the NPC will try to move in the direction of the zone.
  • The move_random_within_systemtag makes it so that an event will be able to move randomly only in a specific systemtag. Example: a Rattata set to walk only in grass won't be able to leave the patch of grass it's in. If the event's initial position or current position isn't in the specified systemtag, the event will stop moving until it is again standing on the specified systemtag.

Note to acknowledge before testing

  • To ensure your test won't take too much time, you can and should up the speed and the frequency settings of your events.

Tests to realize

  • Create an event with the move_random_within_zone method in the 3 - custom movement mode and set a zone. Example: move_random_within_zone(12, 20, 8, 25) will allow the event to move between 12 and 20 on the x axis, and between 8 and 25 on the y axis : your NPC should stay in the same zone.
  • Create an event with the move_random_within_systemtag method in the 3 - custom movement mode and set a systemtag. Example: move_random_within_systemtag(GameData::SystemTags::TGrass) will allow the event to move on tiles marked as a grass tile: your event should only be able to move to tiles with the same systemtag as the parameter.
Edited by Zøzo

Merge request reports