Thread: Development: The Follow Me Script
View Single Post
Old January 3rd, 2010 (8:21 PM).
JPAN JPAN is offline
pokemon rom researcher
    Join Date: Dec 2008
    Posts: 104
    Originally Posted by interdpth View Post
    The games all have a function which happens everytime you take a step. Like the check for poision or an egg hatching happens in this function I have the offsets for FR/LG. So if you could hack the function and throw a script execution in, this would enable you to have following pokemon.
    I have recently developed for my engine a hack that allows you to activate a script every time you take a step. Oddly enough, it was inspired by the two subjects on this section, the RNG-generated weather and the Follow me scripts, both requiring level scripts and only able to be executed once each map load.
    Anyway, after some testing, that caused some problems that quickly become bothersome, like the fact waitmovement is a blocking function, and every step you need to wait for the other OW to follow you. That creates a form of lag that is slightly irritating, as walking has to stop each step it takes, and running is nearly impossible. I won't even get started with the bike... So, my approach was trying some of the other possible walking actions, like trainer events, but halt me nontheless. What I think is, by altering Waitmovement (or creating a spinoff) so that we have a movement-applying function that doesn't block us, it might be possible.

    The other option, a level event, has so many checks required that the script would be gigantic. Remember that, with your custom moving around, you also need to check for movement permissions, behaviour bytes, wild battles, activate animations, call scripts, warps... And it must be the same one for all maps. In other words, you would have to script the game engine.

    Originally Posted by 0m3GA ARS3NAL View Post
    (Very possible, as we can just as easily check what button the player is pressing by comparing to a number found in a certain area of the RAM.
    There are several locations with the Key configuration, but the most important here would be the game ones, located at 03003118, 0300311a and 0300311c. the difference between them is that 118 keeps a real keymap at all times, where 11a keeps only instant-keymaps (key presses, not key holds), and 11c keeps a keymap where in-game options were applied(like R = A). Because I don't know where the keys are found in-game other than in FR, 0x04000130 is the GBA location, but keep in mind the keys here are inverted, that is 0x3ff = no keys pressed.
    Here are the links for my work

    Currently working on:
    Battle Script Documentation
    Another large project
    Reply With Quote