Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development

Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.



Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #26    
Old January 6th, 2010 (07:58 AM).
Spherical Ice's Avatar
Spherical Ice
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Couldn't you use getplayerpos, store the x and y in a variable, and then subtract one from the y var if the player's facing up, add one to the y var if the players facing down, etc. and then create the OW for the Pokémon in that position?

At least I think that'd work - it would depend on if there is a way on checking where the player's facing in a level script - I'm not sure if it's possible.

Then again, what do I know?
__________________
Reply With Quote
  #27    
Old January 6th, 2010 (05:12 PM).
558122_DG's Avatar
558122_DG
Learning how to make mistakes
 
Join Date: Nov 2009
Gender: Male
i think the simple faceplayer should fix that prob
ur gonna need the same amount of OW in the end
__________________
This signature has been disabled.
Spoilers are forbidden in signatures
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #28    
Old January 6th, 2010 (06:32 PM).
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
Quote originally posted by The Master:
Couldn't you use getplayerpos, store the x and y in a variable, and then subtract one from the y var if the player's facing up, add one to the y var if the players facing down, etc. and then create the OW for the Pokémon in that position?

At least I think that'd work - it would depend on if there is a way on checking where the player's facing in a level script - I'm not sure if it's possible.

Then again, what do I know?
Of course there is a way to check which way the player is facing... But this script wouldn't make the Pokemon walk it would just make it appear behind the player, plus it wouldn't work when changing maps.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #29    
Old January 17th, 2010 (05:03 AM).
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
Quote originally posted by The Master:
Couldn't you use getplayerpos, store the x and y in a variable, and then subtract one from the y var if the player's facing up, add one to the y var if the players facing down, etc. and then create the OW for the Pokémon in that position?

At least I think that'd work - it would depend on if there is a way on checking where the player's facing in a level script - I'm not sure if it's possible.

Then again, what do I know?
If you had bothered to check my script, you would see I had done exactly that. If you want to fix this, then you will need a way to activate my script in a way the still allows the player to move if you do not use the 'applymovement 0xFF @pointer' bits. The map to map script worked on my script, just as long as you placed an overworld on every map. I have managed to solve many of these problems, yet I am completely stumped when it comes to removing the loop.
__________________
Reply With Quote
  #30    
Old January 17th, 2010 (11:38 AM). Edited January 17th, 2010 by 0m3GA ARS3NAL.
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL
Im comin' home...
Community Supporter Tier 1
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
Quote originally posted by Giga Universe:


If you had bothered to check my script, you would see I had done exactly that. If you want to fix this, then you will need a way to activate my script in a way the still allows the player to move if you do not use the 'applymovement 0xFF @pointer' bits. The map to map script worked on my script, just as long as you placed an overworld on every map. I have managed to solve many of these problems, yet I am completely stumped when it comes to removing the loop.
That's your problem, if you remove the loop, the script will no longer work for you because of how you wrote it.
You'll need to make your script branch off once movement of the second sprite is completed, and end the script.
The other thing wrong, is that as soon as you do that, the script will most likely be really buggy... actually, I guarantee it will be buggy, and broken. And this script will take up some serious space in your hack. (The script itself, and then like 9 or more bytes for every map you apply it to.

Not to mention have you made a workaround for when the player jumps off a cliff?
What about running speed? (If you are running, the sprite won't change speed with you, it will cause you to stop moving for a second or two while it walks.)

Don't even get me started on biking... (Same as running, more severe.)

Flight would not be bad, except when you fly, you leave your pokemon behind momentarily.
Surfing? No way buddy, not only would the pokemon try to follow you in the water, but it would be left behind by one tile.

And what about interfering scripts?

There are simply too many factors in place for your script to work under ANY condition.
And besides, you require JPAN's patch for it, we try to find solutions for people that don't use it, so that it will be available to ANYONE.

This is a job for ASM, I'm only learning ASM at the moment, so I am of little use... I can read it, I just don't know exactly how to apply it.

*cough*Would be helpful if there was another ASM tutorial...*cough*

[EDIT] I just realized... How would your script work for the player walking down onto another map or from the left, Since (I assume) the sprite X/Y coordinates are stored in an UNSIGNED byte, wouldn't that mean that there can't be a -1 for your sprite to rest on? Or does it not require a signed byte? I have not tested this at all, but I knew it was a problem from the start.

(For reference, an unsigned byte has a range of 0 to 255, whereas a signed byte has a range from -127 to 127)
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Reply With Quote
  #31    
Old January 24th, 2010 (02:41 AM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote originally posted by 0m3GA ARS3NAL:
[EDIT] I just realized... How would your script work for the player walking down onto another map or from the left, Since (I assume) the sprite X/Y coordinates are stored in an UNSIGNED byte, wouldn't that mean that there can't be a -1 for your sprite to rest on? Or does it not require a signed byte? I have not tested this at all, but I knew it was a problem from the start.

(For reference, an unsigned byte has a range of 0 to 255, whereas a signed byte has a range from -127 to 127)
Actually, last time I checked they were signed 16-bit values.
__________________
Reply With Quote
  #32    
Old January 24th, 2010 (06:05 AM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL
Im comin' home...
Community Supporter Tier 1
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
Quote originally posted by HackMew:
Actually, last time I checked they were signed 16-bit values.
I see... well, then i guess it may be easier to understand.
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Reply With Quote
  #33    
Old January 24th, 2010 (06:46 PM).
pspdude's Avatar
pspdude
:o super shinx?
 
Join Date: Jul 2008
Location: Toronto
Age: 21
Gender: Male
Nature: Calm
this is sumthing i found: http://www.youtube.com/user/Mohh2haxer#p/u/1/22lSulNBcE8 i know its only an OW tho
__________________








Pspdude Ish Amazing :O!





Thx Jefelin for the sprites
Reply With Quote
  #34    
Old January 24th, 2010 (09:36 PM).
Omega Zero's Avatar
Omega Zero
Is back...
Community Supporter Tier 4
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 16
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Omega Zero
Well that wouldn't help at all it's an overworld not a person on Advance map..
__________________
Reply With Quote
  #35    
Old January 31st, 2010 (03:56 PM).
Sagiri's Avatar
Sagiri
 
Join Date: Mar 2007
Age: 20
There are other issues too. What if the player is standing against a border (such as a cliff) but facing away from it? Wouldn't the Pokemon following you appear on the border? That wouldn't look very good.
Reply With Quote
  #36    
Old February 1st, 2010 (06:15 AM).
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
Quote originally posted by L Xero:
There are other issues too. What if the player is standing against a border (such as a cliff) but facing away from it? Wouldn't the Pokemon following you appear on the border? That wouldn't look very good.
That would not be a problem. Even in my script which does not work properly, the script runs only on the move, not the face. So if you tap a button and the player changes facing, the follower does nothing. However, if the player moves - it moves. So therefore, your situation would not happen, as to change the follower so it would be on the border, you would have to step away from the border. Therefore, the follower would not be on the border. Basically, long story short - in the ideal script (even in mine which is clearly not ideal), your situation will not occur.
__________________
Reply With Quote
  #37    
Old February 1st, 2010 (08:52 AM).
Sagiri's Avatar
Sagiri
 
Join Date: Mar 2007
Age: 20
Quote originally posted by Giga Universe:


That would not be a problem. Even in my script which does not work properly, the script runs only on the move, not the face. So if you tap a button and the player changes facing, the follower does nothing. However, if the player moves - it moves. So therefore, your situation would not happen, as to change the follower so it would be on the border, you would have to step away from the border. Therefore, the follower would not be on the border. Basically, long story short - in the ideal script (even in mine which is clearly not ideal), your situation will not occur.
Oh, sorry. I assumed that you were basing it on the way they were facing. My bad.
Reply With Quote
  #38    
Old March 2nd, 2010 (02:28 PM).
OM3GA Umbr30n's Avatar
OM3GA Umbr30n
Was Mazot2
 
Join Date: Jun 2009
Location: UK
Age: 17
Gender: Male
Nature: Relaxed
FIRSTLY!
*BUMP*
Secondly
couldnt you edit the bike and running routines to check if i pokemon is following you and if it is speed that up aswell except with the bike make the pokemon go into the pokeball like in HG/sS?
thirdly
would it be a good or bad idea to make the pokemon walthrough-able so that if the player gets trapped the player moves to where the pokemon was and the pokemon goes to where the player was using the script?
so that is a few problems fixed, but i was thinking to fix the moving maps problem could u not place a script with an OW at the mouth of all the entrances so that the script at the mouth will cause the OW there to do the following? and also how would you hide the OW from the last map? my only problem... the only othe solution i have for fixing map to map would be instead of using connections how about a warp without an animation so it moves you to the correct place as if it was a connection but it wouldnt show like a black screen etc.

~Umbreon
The hacker of logic
__________________

Flareon's are Red,
Vaporeon's Blue,
Espeon is my concious,
Umbreon is my life-style

~Umbreon
Reply With Quote
  #39    
Old March 4th, 2010 (04:12 AM). Edited March 4th, 2010 by Giga Universe.
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
No, the solution to this isn't scripting. It is impossible to get a script working, there are all sorts of problems. The goal is to get this into an ASM routine, NOT a script. So yes, we would have to edit biking, surfing, flying, etc routines in order to build one. Besides My script already allows you to do that, and I'm sure Omega's does too. But I'm sure that there are a lot more bugs in his script that just the map transporting bug.
__________________
Reply With Quote
  #40    
Old March 14th, 2010 (10:19 PM).
.:batto:.'s Avatar
.:batto:.
Pokébreeder
 
Join Date: Dec 2008
Location: Australia
Age: 20
Gender: Male
Nature: Bold
Yes Ive Tried Hundreds Of Times To Make Sucessful "follow Me" Scripts
i did not know that its back in heart gold and soul silver tho...:o
Reply With Quote
  #41    
Old March 27th, 2010 (08:57 PM). Edited March 28th, 2010 by NatureKeeper.
NatureKeeper
No longer active here.
 
Join Date: Jun 2008
Location: Somewhere.
Age: 17
Gender: Male
Nature: Hasty
Send a message via Windows Live Messenger to NatureKeeper Send a message via Skype™ to NatureKeeper
I have already an idea on what to do, but it includes big time ASM.

Like I said, it is the same idea from before, but with an improvement.

The ASM routine of the bike will be edited, so the variable I am using is set to zero, which is no Pokémon follow you around. (That includes both Mach and Acro.) How? Well, when you press the bike, variable XX is erased. After you dis-activate the bicycle, it calls the very script that allows the sprite of the desired Pokémon to appear beside the player according to the level of the map and the accessibility (C is accessible, but D isn't for instance, and if the player is at C, the Pokémon cannot warp to like 10. And if the player is on 0, the Pokémon disappears until the player goes on a level. Same for 3C and other relative levels.)

Running. Simply, change the done applymovement called by ASM after comparison and checking into a higher speed.

Flying: When you chose an HM to use, even Cut and Rock Smash, the Pokémon will be temporarily hidden. How? Well, fly needs a change in routine, and other simples will just have hidesprite 0x and showsprite 0x added to their main script. Common sense FTW!

Surfing: The routine will be edited just like Bike, Fly and Surf. Meh, meh.

When healing: The Pokémon will temporarily appear.

This'll need a routine to check maps, and also needs a sprite in each map and a level script. These can be done in advance. If you wish the sprite just to do exactly like HGSS without putting a sprite or a LS in each map, then we have to edit the game's engine.
Reply With Quote
  #42    
Old April 14th, 2010 (06:14 PM).
NarutoActor's Avatar
NarutoActor
The rocks cry out to me
Community Supporter
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 21
Gender: Female
Nature: Bashful
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
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.
__________________
~There are those people who understand hex, F the rest
Reply With Quote
  #43    
Old April 15th, 2010 (06:09 AM).
Shiny Quagsire's Avatar
Shiny Quagsire
I like .short's because they're comfy and easy to wear.
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Or, maybe there is a list of the players movements, and the pikachu echo's the movement.
__________________



Reply With Quote
  #44    
Old May 9th, 2010 (12:15 PM).
Full Metal's Avatar
Full Metal
C(++) Developer.
Community Supporter
 
Join Date: Jan 2008
Location: In my mind.
Age: 19
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to Full Metal
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)
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote
  #45    
Old June 2nd, 2010 (06:29 PM).
dr4g0n12's Avatar
dr4g0n12
Δράκος
 
Join Date: May 2009
Location: The past
Age: 18
Gender: Male
Nature: Adamant
An easier way might be to make a script that creates a sprite on the map, and set it's person number as 0xFF
__________________

DON’T LET THE SPIRIT OF ROCK DIE!!


Friend code: 0732 2275 5722

Pokemon Online Username: dr4g0n12
Reply With Quote
  #46    
Old June 3rd, 2010 (03:25 AM).
simdu68's Avatar
simdu68
asleep all summer zzZZ
 
Join Date: Feb 2010
Location: France
Age: 20
Gender: Male
Nature: Calm
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.......
__________________
MY HACK:

Updated ;D



___________________________________________________________________



Supporter of:







Reply With Quote
  #47    
Old June 3rd, 2010 (07:02 AM).
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 40
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
no. that's a terrible idea. read above posts for reason
__________________
http://www.pokecommunity.com/member.php?u=253113
Reply With Quote
  #48    
Old June 3rd, 2010 (11:08 AM).
siper x's Avatar
siper x
I'm Russia, Fear Russia
 
Join Date: Jul 2009
Age: 19
Gender: Male
Nature: Lonely
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.
__________________
Never wish for death, but life. If you die, who will protect those precious to you?

Blood brother to Kroso
Reply With Quote
  #49    
Old June 3rd, 2010 (12:39 PM). Edited June 3rd, 2010 by simdu68.
simdu68's Avatar
simdu68
asleep all summer zzZZ
 
Join Date: Feb 2010
Location: France
Age: 20
Gender: Male
Nature: Calm
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
__________________
MY HACK:

Updated ;D



___________________________________________________________________



Supporter of:







Reply With Quote
  #50    
Old June 3rd, 2010 (03:49 PM).
siper x's Avatar
siper x
I'm Russia, Fear Russia
 
Join Date: Jul 2009
Age: 19
Gender: Male
Nature: Lonely
Quote originally posted by simdu68:
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.
__________________
Never wish for death, but life. If you die, who will protect those precious to you?

Blood brother to Kroso
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:47 PM.