• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Development: The Follow Me Script

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
Okay you know the problem about the time of exicution of the movement? Well i was thinking about changing the asm routine that moves the player when pressing a directional key, to not just move the player but also pickachu.
 

Full Metal

C(++) Developer.
810
Posts
16
Years
hm..rather than modding the keypress event, mod the player-move event?
that should help speed things up a little. let me do a little "mockup" in C/pokemon style code-thingy
<key has been pushed>
moveplayer (getplayerx()+1,getplayery()+1)
if (pokemonfollowmode!=0)
{
moveow(pokemon_ow [has been pre-determined],getplayerx()-1,getplayery()-1)
}
then, you simply choose an address to use for the "pokemonfollowmode" byte, and add a
push {r0}
ldr r0, address
strh #1,[r0,#0]
pop {r0}
just out of curiosity:
could i assemble that into BIN data, paste it with HW (into the correct byte alignment of course) and then, whenever that routine is called, i successfully "inserted" more code?
did that make sense?
So now i have a question
if we've all figured out how to do it in theory then why is it that we haven't done it yet? Is this routine particularly hard to find? Or is the challenge figuring out how to move the player? Or are there just too many things to check for that we shyed away from it? (really, questions, nothing more, because i'm not going to volunteer people for something i wouldn't (be able to) do my self)
 

dr4g0n12

Δράκος
173
Posts
14
Years
An easier way might be to make a script that creates a sprite on the map, and set it's person number as 0xFF
 

simdu68

asleep all summer zzZZ
218
Posts
14
Years
hey, you know what was my idea for a follow me pokémon?
it will surely seem stupid, but in my hack there is only one starter, and I thought I could remplace one bike (I am hacking on emerald so there are 2 bikes) by a sprite with the pokémon behind since there's anyway only one starter so I don't need to have many sprites of player with different pokémon behind, I'll just put the starter behind.......
like this you have one sprite but with player and pokémon behind

now, this idea is not that good either coz, I completely forgot about the evolutions of the pokémon, coz if the pokémon evolves and the following pokemon stays the same first pokemon it is really bad -_-'

but this idea can be useful if someone hacks on R/S/E or if not FR/LG but in this case there will be no more bike, and if there is only one choice of starter if not you would neet 3 different sprites, and if the starter pokemon doesn't evolve, it would only be useful in this case^^

I must find a new idea hmm.......
 

siper x

I'm Russia, Fear Russia
375
Posts
14
Years
  • Age 28
  • Seen Mar 29, 2023
I have an idea, have the pokemon sprite have a follow player (advance map), aqnd have a script on every tile you can enter on (doors, water edges, and map edges) so the one behind you follows, and the others are hidden, and the script also makes the other one disappear.

just an idea, and don't know if someone tryed it, but it might work.
 

simdu68

asleep all summer zzZZ
218
Posts
14
Years
ok I see, my idea was bad, but now I got another idea......
in fact I got it inspired by the post above^^
to be honest, I didn't completely understand what you said siper x, maybe it is the same thing as what I will say^^

well, in fact the sprite isn't obliged to follow you all the time, we could just put script in a faw important places like when village leaving the sprite runs from somewhere so you, when you enter a house the pokemon also comes, but durinf your walking just randomly the pokemon also can walk randomly, because what found out first was that I need a script on everytile if I want my pokemon to follow me (now I don't know exactly what you guys had for ideas coz it's today it's the first time I came on this thread^^)
yeah so as I said, we can't put scripts everywhere so just in important place that the pokémon is somewhere behind, don't know what he's doing^^ and when you go in a house or something so he runs behind you to catch you up, then again you walk along and then again do him catch you up......

sorry for my very bad english, I'm sure you will read my message 2 times to understand or you will read one time, not understand and give up^^
anyway, if someone understands what I mean, do you think it is possible like this?


edit: oh! I have seen all what you wrote already and finally I see that my idea is the worst idea ever -_-"
well, I'll still leave it^^
 
Last edited:

siper x

I'm Russia, Fear Russia
375
Posts
14
Years
  • Age 28
  • Seen Mar 29, 2023
ok I see, my idea was bad, but now I got another idea......
in fact I got it inspired by the post above^^
to be honest, I didn't completely understand what you said siper x, maybe it is the same thing as what I will say^^

well, in fact the sprite isn't obliged to follow you all the time, we could just put script in a faw important places like when village leaving the sprite runs from somewhere so you, when you enter a house the pokemon also comes, but durinf your walking just randomly the pokemon also can walk randomly, because what found out first was that I need a script on everytile if I want my pokemon to follow me (now I don't know exactly what you guys had for ideas coz it's today it's the first time I came on this thread^^)
yeah so as I said, we can't put scripts everywhere so just in important place that the pokémon is somewhere behind, don't know what he's doing^^ and when you go in a house or something so he runs behind you to catch you up, then again you walk along and then again do him catch you up......

sorry for my very bad english, I'm sure you will read my message 2 times to understand or you will read one time, not understand and give up^^
anyway, if someone understands what I mean, do you think it is possible like this?


edit: oh! I have seen all what you wrote already and finally I see that my idea is the worst idea ever -_-"
well, I'll still leave it^^

very close to what i had. what i was saying was at points of entry have a o/w of the pokemon hidden (choice on advance map) so when you step on it the pokemon follows, and when you enter another map, the script adds the o/w of the pokemon and the other one dissapears. when the pokemon appears it is at the follow player (another advance map choice), so it looks like it followed you to the map, but it is just a new o/w.
 

simdu68

asleep all summer zzZZ
218
Posts
14
Years
oh I see! yeah, I didn't thought about that, because we can't make a sprite change map right? I see, so your idea is better because at least it will work not like mine^^

edit: oh, in fact why not put at every map entrance a script applymovement like this the same OW can always follow and your not obliged to put on every map a new OW.....I know there is a script where you follow another OW to an another map, we can do the same but just of one tile like this it doens't seem like you are walking unfreely
...
...
aarrghhh!!! I hate my english, I can never explain clearly what I want to say!! I bet no one understood what I mean -_-'
I must really improve in scripting and in english to explein ly ideas.....
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Let's just be cheap and put the pokemon away when the person rides the bike!

Anyways, I noticed while playing heart gold, that the pokemon just echo's the player's movements, like this:

player moves up
player moves up - pokemon moves up
player moves down - pokemon moves up
player moves right - pokemon moves down

...

and so on. Why don't we just make a list of the player's last three movements somewhere in the RAM, then use an ASM routine to apply it to the pokemon.
 

Full Metal

C(++) Developer.
810
Posts
16
Years
Well, correct me if i'm wrong but...don't we have to find the routine that is executed on the player's movement?
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Good thing there's no revival rule here...

A discussion in my Physics class today (don't ask) prompted me to give this idea a concentrated effort. After several straight hours of hacking, I managed to create the following:

Spoiler:


It's pretty basic at the moment. For example, I haven't added support for ledges, running, or biking, I haven't tested what happens when the player changes maps, the following NPC can't be passed through, and I'm sure there are a bunch of other bugs I have yet to discover as well. However, I'm still happy with it. ^_^
 

AimayBee

Mighty Spriter
213
Posts
14
Years
Good thing there's no revival rule here...

A discussion in my Physics class today (don't ask) prompted me to give this idea a concentrated effort. After several straight hours of hacking, I managed to create the following:

Spoiler:


It's pretty basic at the moment. For example, I haven't added support for ledges, running, or biking, I haven't tested what happens when the player changes maps, the following NPC can't be passed through, and I'm sure there are a bunch of other bugs I have yet to discover as well. However, I'm still happy with it. ^_^

That is really amazing, have you made any improvements on it since posting this? x
 
Back
Top