• 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 places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Development: The Follow Me Script

EdensElite

No0b, but getting there.
190
Posts
12
Years
  • Age 28
  • UK
  • Seen Jul 4, 2014
I have a kind newby solution to the warp issue. Allbeit it's a pain in the bum, but it could work. You said that you had a Problem with creating sprites, but what if you place them in Amap, hid them from view and place a script at the start of each map that makes them appear. It would also check your position and then place them behind you. You would have to have a script for each place on every map though which would be annoying.
 

droomph

weeb
4,285
Posts
12
Years
What I think we should do is to set a byte in the RAM that isn't used (but still saved), and each time the player warps/flies and appears in the new map, it checks to see if it is set. If it's set, which means that you still want to have them follow you, the next time the player starts moving, it makes a sprite below you, and then deals with the other (working) stuff normally. And if it's a warp-panel, you could delay the screen-fading effect a bit and stick in another "warp" animation for the character behind you.

As for surfing, you should make them jump on a "Wailmer" or seperate bike behind you. When you go onto land again, it checks to see if it's still set, and if it is, it will change the "following" sprite back to normal.

And you don't even have to do that. You could just branch an "It's not very polite when you do that..." or "He needs a POKéMON to surf." to appear whenever you try to surf or bike while someone's following you.

I would want do that, but I don't know how to even begin...
 
5,256
Posts
16
Years
The Mirror Player functions in FireRed arent perfect, they dont always mimick the player's movement, but maybe some hacking could "fix" that? Would that be a helpful thing? Idk.
 
61
Posts
11
Years
Um I don't know if you know this, but an easy way to do a follow me script is

*the start of your script*
playsong 0x *follow me or follow me alt offset* 0x0
applymovement 0x person number @movement1
applymovement 0x FF (player) @movement2
wait movement 0x person number
fadedefault(This just makes it fade to the default song of the map you're on)
*the rest of the script*

I have done this and it works, you just copy the movement data from the person the player is following, paste it, and rename the pointer to the movement data of the player.

I don't know how well it works the other way around, but it should work just the same.(Just do a script event instead of a person event and swap the player movement with the person movement in the main script) I have a working script of that if anyone wants to see it.
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
Um I don't know if you know this, but an easy way to do a follow me script is

*the start of your script*
playsong 0x *follow me or follow me alt offset* 0x0
applymovement 0x person number @movement1
applymovement 0x FF (player) @movement2
wait movement 0x person number
fadedefault(This just makes it fade to the default song of the map you're on)
*the rest of the script*

I have done this and it works, you just copy the movement data from the person the player is following, paste it, and rename the pointer to the movement data of the player.

I don't know how well it works the other way around, but it should work just the same.(Just do a script event instead of a person event and swap the player movement with the person movement in the main script) I have a working script of that if anyone wants to see it.
Sorry to inform you, but you missed the point of this thread. Here, we're trying to make a system where the player has full control over his movement, but a sprite behind him moves with him.
 
61
Posts
11
Years
Here's an idea, how about looking for the movement commands that the D-pad uses to move the player? There must be some offset somewhere (by offset I mean command) since it's the most used command in the game.

If you could find whatever script does that, I'm sure it wouldn't take a lot of guessing to add the follow me stuff.
 
91
Posts
14
Years
  • Seen Feb 22, 2023
In fact all that is just done by the main routine, it gets all the hardware registers and parses them correctly and executes the movement routines. Adding something here can have bad influence on the game, since there is, as far as i know, no sort of vblank interrupt that keeps the game on a constant speed of execution and "rendering".
Also you needed to find out how you can actually move another person, since they are slightly different to the player, as long as you do not want to use your own OAM.

~SBird
 
61
Posts
11
Years
Hmm....you know, there's a little side thing in Black 2 that's basically what you're after.

It's in Humilao City. The last house on the piers before you enter route 22 has an old lady and an overworld version of Man-fo.

She asks you if you will walk her little Man Fo, and if you say yes the Man Fo follows you around inside the house.
So I say find out what's going on in that data, find how to port it to other games, and presto.
 

Mr. Magius

  
244
Posts
16
Years
Hmm....you know, there's a little side thing in Black 2 that's basically what you're after.

It's in Humilao City. The last house on the piers before you enter route 22 has an old lady and an overworld version of Man-fo.

She asks you if you will walk her little Man Fo, and if you say yes the Man Fo follows you around inside the house.
So I say find out what's going on in that data, find how to port it to other games, and presto.
Well see, we already have semi-working Follow Me scripts for walking and running and all those basic movements. The problem is with warping, surfing, biking, flying, etc. Maybe warping is used in that specific script, but other than that it would be useless.
We're not that far into NDS hacking that we can simply borrow data from B/W's scripts as well. Look how advanced we are at 3rd Gen hacking, yet we can't do this script just yet.

I'll try and look into this a little more and help everyone out. I'm a noob when it comes to hexing and assembly, but it wouldn't hurt.
 

Kaphotics

♥ Quick Claw Guillotine ♥
22
Posts
12
Years
  • Seen Oct 29, 2018
Well see, we already have semi-working Follow Me scripts for walking and running and all those basic movements. The problem is with warping, surfing, biking, flying, etc. Maybe warping is used in that specific script, but other than that it would be useless.
We're not that far into NDS hacking that we can simply borrow data from B/W's scripts as well. Look how advanced we are at 3rd Gen hacking, yet we can't do this script just yet.

I'll try and look into this a little more and help everyone out. I'm a noob when it comes to hexing and assembly, but it wouldn't hurt.

Not entirely correct; we know a lot about B/W scripts.

I can tell you for a fact that the script @ Humilau does not support warping. I can override the Lady's trigger to let me walk outside (by un-toggling the const_16 value from 1 to 0, the floor trigger stops making the lady bring you back inside. It's located at 02225542 in W2-U and 02225522 @ B2-U). After stepping outside the functionality stops presumably due to the Overworld NPC and script functionality not being present at the warped-to map.

I've been dabbling with NPRE and I have a pretty good parsing capability for B2W2.

Here's the parsing output, all commands currently have temp names and there's a few commands that aren't implemented (thus breaking functionality).
Spoiler:
 
Looking to the 4th and 5th generation for the solution is silly. Everything is handled differently when watered down to the level this has to be done at for the 3rd generation.

An inelegant solution for the warping problem is to hide a sprite somewhere on every map and move it after the warp is complete to serve as the follower, and then continue as normal, but how cumbersome that would be!

Is the follower coded as a legit people event with a people number and everything? If so, then you shouldn't have to worry about making them work in people's scripts where the player is moved. Just make sure everyone has the people number of the follower and have them define its movements separately, if they desync it its their problem. If not, pretend I didn't say anything.
 
1
Posts
11
Years
  • Seen Feb 18, 2017
Is it possible to make a second hero Pikachu) who does the same moves as the first hero but one time later?
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
I hate posting in old threads, but this one is still fresh-ish and I'm hoping this project doesn't die. I'm curious though, if walking works and warps don't, how do connected maps behave? Are there any videos of progress?
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
So how much of it was completed? What was accomplished and what wasn't?
And why isn't the information shared?
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018


Dude, this thing died back when someone figured it out and refused to share that information with us. That was years ago. It died out.

It's not dead, more on hold.

So how much of it was completed? What was accomplished and what wasn't?
And why isn't the information shared?

I can't speak for why others didn't share their code, but I can explain why I didn't share mine.
It's very simple, I didn't share it because it was overcomplicated and I honestly believed there is a better way to do it. As of yet, I haven't reworked the code, so I haven't released anything.
 

AimayBee

Mighty Spriter
213
Posts
14
Years
It's not dead, more on hold.

I can't speak for why others didn't share their code, but I can explain why I didn't share mine.
It's very simple, I didn't share it because it was overcomplicated and I honestly believed there is a better way to do it. As of yet, I haven't reworked the code, so I haven't released anything.

But if you did release it we could take a look at it and make it simpler some way. Two heads are better than one.
 

U.Flame

Maker of Short Games
1,326
Posts
15
Years
I'm happy to hear it's on hold rather than dead. I can understand holding it until it's properly improved.
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
I may be late to the party here, but it seems like the following sprite always is one step behind you. Once you take a new step, the follower takes the step you just took. Is it too much trouble to find out wherever the game registers the steps and create a branching routine or something mimicking it to attach onto another sprite so it'll take the last step you did?

Clearly I have no skill in this as I have no idea about what I'm talking about... is this even feasible?
 
Back
Top