The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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
  #1    
Old January 3rd, 2010, 01:31 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
Ah yes, the pain in the rear that many a yellow remake has encountered.
The follow me script.
First made popular in Pokemon Yellow Version, We were able to have our starter pokemon, a happy little pikachu follow us around Kanto, getting into all sorts of shenanigans.
And now, returning on the Nintendo DS, for Pokemon Heart Gold, and Soul Silver versions, the following starter pokemon is back.
Many people, including myself have tried to recreate this, but to no avail.
Many people insist on trying to use scripts to do this, but surely setting a script on each tile of every map would be a real pain, no doubt.
I've even gone so far as to creating an elaborate script, that can detect many things, such as;
  • The last direction a player moved, be it up, down, left, or right
  • What direction to move the sprite
  • The script could tell if a player jumped off of a cliff or not (To prevent the sprite from stepping onto the cliff itself, and de-syncing with the player)
  • If the player clicked on the sprite, it would respond, as pikachu was able to.

Unfortunately, I was only able to manage the sprite to follow me around on one map at a time, unable to transfer from map to map.
Also, it would cause my player to stop movement, to allow the sprite to move into the new position, then I could move again, causing me to take at least twice as long to walk from point A to point B.

My idea-
Now, I'm no expert when it comes to ASM, no, a lack of help and... motivation so to speak... (My computer is a pain, I can't do much on it, let alone run a GBA emulator, my PSP does that...)
ANYWAYS, My idea would be to hack the routine that detects when you press a directional button, to move not only the player, but a second sprite.

It would need to be a routine that remembers the last button pressed, compare it to the currently pressed button, and execute an action.

Another problem that I came across, would be going from map to map... the creator of this routine would need to find a way to load the following sprite up, and have it remain behind the player, even after walking from one map to another.

It would also be a problem to have the player walk into a dead-end hallway, and be trapped by the following sprite, so that would also be something that a solution would be needed... (Maybe a way to check the last direction pressed... If last Direction was left, and new direction is right, have the sprites walk over each other... Or even have the other sprite intangible, like a Virtual Sprite. (Much like the XSE command "createsprite"))


I'd be glad to help in any way, but ASM is pretty much out of the question as of now, since I don't really have the resources to practice it. (I can learn, just can't put it into action on this PC, lol)

Any Ideas, and thoughts would be not only appreciated, but encouraged.
__________________
>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
  #2    
Old January 3rd, 2010, 10:21 AM
Gamer2020's Avatar
Gamer2020
This love is a sickness...
 
Join Date: Jun 2008
Location: Distant Land
Gender: Male
Nature: Bold
Send a message via Skype™ to Gamer2020
Well maybe you can have some kind of level script.
This is just an idea but the script can check to see if this certain sprite is following you and have the "same" sprite appear on the map.
Idk if I explained my idea right and I'm not sure if it's possible since I don't remember if flags can be used in level scripts. I don't remember exactly at this time but still there are always variables.

It's just an idea don't kill me...
__________________
Pokemon Game Editor Download!
Pokemon TCG Assistant!
Fun Fact: Even though PGE isn't posted on PC anymore it still has the same number of downloads per day.
Reply With Quote
  #3    
Old January 3rd, 2010, 11:42 AM
ZodiacDaGreat's Avatar
ZodiacDaGreat
Working on a Mobile System
 
Join Date: Feb 2007
Location: South Pacific
Age: 22
Gender: Male
Nature: Relaxed
Send a message via ICQ to ZodiacDaGreat
Uh, level scripts are out of the picture here XD And as for the routine, I don't thinking hacking the keypress routine is a good idea. Anyway, here's my idea... Who know's you might see one in Pure Gold too

Part 1 - We hack the sprite loading routine and load a extra sprite... But not just anywhere This sprite should be the last, as Map overworlds might overwrite this. Then, we hack a routine that's executed a lot. What this routine does, is:
1) Check for a flag - A flag must be set meaning that the sprite can follow the player.
2) Check the party - To see if the overworld (Pikachu, or what so ever) is in the party.
3) Other checks - whether Pikachu has evolved or not and so on...

Should any of these previous checks fail then the sprite does not appear and follow the player. But once the conditions are fulfilled, the routine will take the player's position and calculate it for the overworld, so it'll be following it.
__________________
Reply With Quote
  #4    
Old January 3rd, 2010, 01:28 PM
interdpth
I've seen things, man.
 
Join Date: Jul 2004
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.
__________________
yes, this is doge.

potato is not here.

bye
Reply With Quote
  #5    
Old January 3rd, 2010, 01:49 PM
Co500's Avatar
Co500
You think you're strong? You're not.
Community Supporter
 
Join Date: Jun 2008
Location: Far Awayyyyyyy
Gender: Male
What about if someone find the script or asm or evel script in yellow and translate it to the newer GBA generation?
__________________
It can't end now. Not like this.


I hope you’ll remember, there is something good in goodbye.



Reply With Quote
  #6    
Old January 3rd, 2010, 04:41 PM
DreadWaffle's Avatar
DreadWaffle
LOVE AND PEACE!
 
Join Date: Aug 2009
Location: Underground
Gender: Male
Nature: Calm
i think this may help
http://www.pokecommunity.com/showpos...postcount=2695
thank you giga!
__________________
"I am known as Valentinez Alkalinella Xifax Sicidabohertz Gombigobilla Blue Stradivari Talentrent Pierre Andri Charton-Haymoss Ivanovici Baldeus George Doitzel Kaiser III. Don't hesitate to call."
Reply With Quote
  #7    
Old January 3rd, 2010, 05:45 PM
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 Co500 View Post
What about if someone find the script or asm or evel script in yellow and translate it to the newer GBA generation?
You can not do that, nuff said.



Well, his script is... interesting at best, at least in this context.
I've had a script written out that was quite long indeed, it worked almost exactly like this, only I hadn't thought to use the movesprite command.

The problem is, you have to take into account other sprites on the map, small cliffs the player can jump off of, and things like that.
And no doubt we want to be able to supply this to hackers NOT using JPAN's Hacked Engine.

(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. (I knew what it was, but my memory has gotten a bit rusty, haven't gotten so fired up about hacking in a long time. (That is why I am going to post, and contribute a lot to PC's R&D department, lol)))

Anywho, I like Zodiac's idea a lot, and I like interdpth's too... problem is, actually hacking the routine's needed.
I wish I could help with that, WHEN ARE YOU GUYS RELEASING ANOTHER ASM TUT?!?! lol

So, are we going to take interdpth's route? If so, I'll get writing... I've made the script once before, no harm in writing it again...
__________________
>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...

>

Last edited by 0m3GA ARS3NAL; January 3rd, 2010 at 05:52 PM.
Reply With Quote
  #8    
Old January 3rd, 2010, 07:18 PM
davidthefat
I Love C++
 
Join Date: Dec 2009
Age: 20
Gender: Male
http://www.emu8086.com/dr/asm2html/a...snake.asm.html

thats the ASM code for snake (the really old game) You can look at that and figure out how they handle that. I have no idea what that ASM mumbo jumbo means

http://www.zophar.net/pdroms/gba/christmas-advance.html

thats a gba one


personally I would make the pokemon check for collision before moving.
Reply With Quote
  #9    
Old January 3rd, 2010, 07:29 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
I believe that the key register is located at 0x4000130. In my opinion, interdpth has the best idea. If he has the address of that routine, we can examine it. Otherwise, I guess just run a ROM with VBA-SDL-H and put a breakpoint on 0x4000130 and try to locate that routine. davidthefat also makes an excellent point about the location of the hack; we don't want to put it before anything important such as collision detection or behavior data like, as 0m3GA said, those ledges that the player jumps over.
__________________

Brother of Vrai

Last edited by colcolstyles; January 3rd, 2010 at 08:04 PM.
Reply With Quote
  #10    
Old January 3rd, 2010, 08:00 PM
interdpth
I've seen things, man.
 
Join Date: Jul 2004
here's the function

SAME FOR FR/LG

Spoiler:
Code:
ROM:0806D698 EachStepTests                           ; CODE XREF: sub_806D5E8+36p
ROM:0806D698                 PUSH    {R4,LR}         ; Push registers
ROM:0806D69A                 LSLS    R0, R0, #0x10   ; Logical Shift Left
ROM:0806D69C                 LSRS    R4, R0, #0x10   ; Logical Shift Right
ROM:0806D69E                 BL      sub_811B0D0     ; Branch with Link
ROM:0806D69E
ROM:0806D6A2                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D6A4                 BEQ     loc_806D72C     ; Branch
ROM:0806D6A4
ROM:0806D6A6                 LDR     R0, =byte_203ADFA ; Load from Memory
ROM:0806D6A8                 LDRB    R0, [R0]        ; Load from Memory
ROM:0806D6AA                 CMP     R0, #2          ; Set cond. codes on Op1 - Op2
ROM:0806D6AC                 BEQ     loc_806D72C     ; Branch
ROM:0806D6AC
ROM:0806D6AE                 BL      sub_806D74C     ; Branch with Link
ROM:0806D6AE
ROM:0806D6B2                 LDR     R0, =dword_2037078 ; Load from Memory
ROM:0806D6B4                 LDRB    R1, [R0]        ; Load from Memory
ROM:0806D6B6                 MOVS    R0, #0x40 ; '@' ; Rd = Op2
ROM:0806D6B8                 ANDS    R0, R1          ; Rd = Op1 & Op2
ROM:0806D6BA                 CMP     R0, #0          ; Set cond. codes on Op1 - Op2
ROM:0806D6BC                 BNE     safari          ; Branch
ROM:0806D6BC
ROM:0806D6BE                 LSLS    R0, R4, #0x18   ; Logical Shift Left
ROM:0806D6C0                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D6C2                 BL      sub_8059D70     ; Branch with Link
ROM:0806D6C2
ROM:0806D6C6                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D6C8                 CMP     R0, #0          ; Set cond. codes on Op1 - Op2
ROM:0806D6CA                 BNE     safari          ; Branch
ROM:0806D6CA
ROM:0806D6CC                 BL      sub_810C4EC     ; Branch with Link
ROM:0806D6CC
ROM:0806D6D0                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D6D2                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D6D4                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D6D6                 BNE     poison          ; Branch
ROM:0806D6D6
ROM:0806D6D8                 LDR     R0, =EachStep   ; Load from Memory
ROM:0806D6DA                 BL      DoScript        ; Branch with Link
ROM:0806D6DA
ROM:0806D6DE                 B       fin             ; Branch
ROM:0806D6DE
ROM:0806D6DE ; ---------------------------------------------------------------------------
ROM:0806D6E0 off_806D6E0     DCD byte_203ADFA        ; DATA XREF: EachStepTests+Er
ROM:0806D6E4 off_806D6E4     DCD dword_2037078       ; DATA XREF: EachStepTests+1Ar
ROM:0806D6E8 off_806D6E8     DCD EachStep            ; DATA XREF: EachStepTests+40r
ROM:0806D6EC ; ---------------------------------------------------------------------------
ROM:0806D6EC
ROM:0806D6EC poison                                  ; CODE XREF: EachStepTests+3Ej
ROM:0806D6EC                 BL      CheckForPoison  ; Branch with Link
ROM:0806D6EC
ROM:0806D6F0                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D6F2                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D6F4                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D6F6                 BNE     eggs            ; Branch
ROM:0806D6F6
ROM:0806D6F8                 LDR     R0, =EachStepPoison ; Load from Memory
ROM:0806D6FA                 BL      DoScript        ; Branch with Link
ROM:0806D6FA
ROM:0806D6FE                 B       fin             ; Branch
ROM:0806D6FE
ROM:0806D6FE ; ---------------------------------------------------------------------------
ROM:0806D700 off_806D700     DCD EachStepPoison      ; DATA XREF: EachStepTests+60r
ROM:0806D704 ; ---------------------------------------------------------------------------
ROM:0806D704
ROM:0806D704 eggs                                    ; CODE XREF: EachStepTests+5Ej
ROM:0806D704                 BL      sub_80463B8     ; Branch with Link
ROM:0806D704
ROM:0806D708                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D70A                 CMP     R0, #0          ; Set cond. codes on Op1 - Op2
ROM:0806D70C                 BEQ     safari          ; Branch
ROM:0806D70C
ROM:0806D70E                 MOVS    R0, #0xD        ; Rd = Op2
ROM:0806D710                 BL      btl2_8054E90    ; Branch with Link
ROM:0806D710
ROM:0806D714                 LDR     R0, =script_EggHatch ; Load from Memory
ROM:0806D716                 BL      DoScript        ; Branch with Link
ROM:0806D716
ROM:0806D71A                 B       fin             ; Branch
ROM:0806D71A
ROM:0806D71A ; ---------------------------------------------------------------------------
ROM:0806D71C off_806D71C     DCD script_EggHatch     ; DATA XREF: EachStepTests+7Cr
ROM:0806D720 ; ---------------------------------------------------------------------------
ROM:0806D720
ROM:0806D720 safari                                  ; CODE XREF: EachStepTests+24j
ROM:0806D720                                         ; EachStepTests+32j
ROM:0806D720                                         ; EachStepTests+74j
ROM:0806D720                 BL      CheckSafariSteps ; Branch with Link
ROM:0806D720
ROM:0806D724                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D726                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D728                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D72A                 BEQ     fin             ; Branch
ROM:0806D72A
ROM:0806D72C
ROM:0806D72C loc_806D72C                             ; CODE XREF: EachStepTests+Cj
ROM:0806D72C                                         ; EachStepTests+14j
ROM:0806D72C                 MOVS    R0, #0          ; Rd = Op2
ROM:0806D72E                 B       loc_806D732     ; Branch
ROM:0806D72E
ROM:0806D730 ; ---------------------------------------------------------------------------
ROM:0806D730
ROM:0806D730 fin                                     ; CODE XREF: EachStepTests+46j
ROM:0806D730                                         ; EachStepTests+66j
ROM:0806D730                                         ; EachStepTests+82j
ROM:0806D730                                         ; EachStepTests+92j
ROM:0806D730                 MOVS    R0, #1          ; Rd = Op2
ROM:0806D730
ROM:0806D732
ROM:0806D732 loc_806D732                             ; CODE XREF: EachStepTests+96j
ROM:0806D732                 POP     {R4}            ; Pop registers
ROM:0806D734                 POP     {R1}            ; Pop registers
ROM:0806D736                 BX      R1              ; Branch to/from Thumb mode
ROM:0806D736
ROM:0806D736 ; End of function EachStepTests
ROM:0806D736
__________________
yes, this is doge.

potato is not here.

bye
Reply With Quote
  #11    
Old January 3rd, 2010, 08:14 PM
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 interdpth View Post
here's the function

SAME FOR FR/LG

Spoiler:
Code:
ROM:0806D698 EachStepTests                           ; CODE XREF: sub_806D5E8+36p
ROM:0806D698                 PUSH    {R4,LR}         ; Push registers
ROM:0806D69A                 LSLS    R0, R0, #0x10   ; Logical Shift Left
ROM:0806D69C                 LSRS    R4, R0, #0x10   ; Logical Shift Right
ROM:0806D69E                 BL      sub_811B0D0     ; Branch with Link
ROM:0806D69E
ROM:0806D6A2                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D6A4                 BEQ     loc_806D72C     ; Branch
ROM:0806D6A4
ROM:0806D6A6                 LDR     R0, =byte_203ADFA ; Load from Memory
ROM:0806D6A8                 LDRB    R0, [R0]        ; Load from Memory
ROM:0806D6AA                 CMP     R0, #2          ; Set cond. codes on Op1 - Op2
ROM:0806D6AC                 BEQ     loc_806D72C     ; Branch
ROM:0806D6AC
ROM:0806D6AE                 BL      sub_806D74C     ; Branch with Link
ROM:0806D6AE
ROM:0806D6B2                 LDR     R0, =dword_2037078 ; Load from Memory
ROM:0806D6B4                 LDRB    R1, [R0]        ; Load from Memory
ROM:0806D6B6                 MOVS    R0, #0x40 ; '@' ; Rd = Op2
ROM:0806D6B8                 ANDS    R0, R1          ; Rd = Op1 & Op2
ROM:0806D6BA                 CMP     R0, #0          ; Set cond. codes on Op1 - Op2
ROM:0806D6BC                 BNE     safari          ; Branch
ROM:0806D6BC
ROM:0806D6BE                 LSLS    R0, R4, #0x18   ; Logical Shift Left
ROM:0806D6C0                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D6C2                 BL      sub_8059D70     ; Branch with Link
ROM:0806D6C2
ROM:0806D6C6                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D6C8                 CMP     R0, #0          ; Set cond. codes on Op1 - Op2
ROM:0806D6CA                 BNE     safari          ; Branch
ROM:0806D6CA
ROM:0806D6CC                 BL      sub_810C4EC     ; Branch with Link
ROM:0806D6CC
ROM:0806D6D0                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D6D2                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D6D4                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D6D6                 BNE     poison          ; Branch
ROM:0806D6D6
ROM:0806D6D8                 LDR     R0, =EachStep   ; Load from Memory
ROM:0806D6DA                 BL      DoScript        ; Branch with Link
ROM:0806D6DA
ROM:0806D6DE                 B       fin             ; Branch
ROM:0806D6DE
ROM:0806D6DE ; ---------------------------------------------------------------------------
ROM:0806D6E0 off_806D6E0     DCD byte_203ADFA        ; DATA XREF: EachStepTests+Er
ROM:0806D6E4 off_806D6E4     DCD dword_2037078       ; DATA XREF: EachStepTests+1Ar
ROM:0806D6E8 off_806D6E8     DCD EachStep            ; DATA XREF: EachStepTests+40r
ROM:0806D6EC ; ---------------------------------------------------------------------------
ROM:0806D6EC
ROM:0806D6EC poison                                  ; CODE XREF: EachStepTests+3Ej
ROM:0806D6EC                 BL      CheckForPoison  ; Branch with Link
ROM:0806D6EC
ROM:0806D6F0                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D6F2                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D6F4                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D6F6                 BNE     eggs            ; Branch
ROM:0806D6F6
ROM:0806D6F8                 LDR     R0, =EachStepPoison ; Load from Memory
ROM:0806D6FA                 BL      DoScript        ; Branch with Link
ROM:0806D6FA
ROM:0806D6FE                 B       fin             ; Branch
ROM:0806D6FE
ROM:0806D6FE ; ---------------------------------------------------------------------------
ROM:0806D700 off_806D700     DCD EachStepPoison      ; DATA XREF: EachStepTests+60r
ROM:0806D704 ; ---------------------------------------------------------------------------
ROM:0806D704
ROM:0806D704 eggs                                    ; CODE XREF: EachStepTests+5Ej
ROM:0806D704                 BL      sub_80463B8     ; Branch with Link
ROM:0806D704
ROM:0806D708                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D70A                 CMP     R0, #0          ; Set cond. codes on Op1 - Op2
ROM:0806D70C                 BEQ     safari          ; Branch
ROM:0806D70C
ROM:0806D70E                 MOVS    R0, #0xD        ; Rd = Op2
ROM:0806D710                 BL      btl2_8054E90    ; Branch with Link
ROM:0806D710
ROM:0806D714                 LDR     R0, =script_EggHatch ; Load from Memory
ROM:0806D716                 BL      DoScript        ; Branch with Link
ROM:0806D716
ROM:0806D71A                 B       fin             ; Branch
ROM:0806D71A
ROM:0806D71A ; ---------------------------------------------------------------------------
ROM:0806D71C off_806D71C     DCD script_EggHatch     ; DATA XREF: EachStepTests+7Cr
ROM:0806D720 ; ---------------------------------------------------------------------------
ROM:0806D720
ROM:0806D720 safari                                  ; CODE XREF: EachStepTests+24j
ROM:0806D720                                         ; EachStepTests+32j
ROM:0806D720                                         ; EachStepTests+74j
ROM:0806D720                 BL      CheckSafariSteps ; Branch with Link
ROM:0806D720
ROM:0806D724                 LSLS    R0, R0, #0x18   ; Logical Shift Left
ROM:0806D726                 LSRS    R0, R0, #0x18   ; Logical Shift Right
ROM:0806D728                 CMP     R0, #1          ; Set cond. codes on Op1 - Op2
ROM:0806D72A                 BEQ     fin             ; Branch
ROM:0806D72A
ROM:0806D72C
ROM:0806D72C loc_806D72C                             ; CODE XREF: EachStepTests+Cj
ROM:0806D72C                                         ; EachStepTests+14j
ROM:0806D72C                 MOVS    R0, #0          ; Rd = Op2
ROM:0806D72E                 B       loc_806D732     ; Branch
ROM:0806D72E
ROM:0806D730 ; ---------------------------------------------------------------------------
ROM:0806D730
ROM:0806D730 fin                                     ; CODE XREF: EachStepTests+46j
ROM:0806D730                                         ; EachStepTests+66j
ROM:0806D730                                         ; EachStepTests+82j
ROM:0806D730                                         ; EachStepTests+92j
ROM:0806D730                 MOVS    R0, #1          ; Rd = Op2
ROM:0806D730
ROM:0806D732
ROM:0806D732 loc_806D732                             ; CODE XREF: EachStepTests+96j
ROM:0806D732                 POP     {R4}            ; Pop registers
ROM:0806D734                 POP     {R1}            ; Pop registers
ROM:0806D736                 BX      R1              ; Branch to/from Thumb mode
ROM:0806D736
ROM:0806D736 ; End of function EachStepTests
ROM:0806D736
Sweet
I think that if one were to branch off into the movement of a second sprite, it would be important to do that, BEFORE the Poison and Egg Checks.
I don't know if it would make any difference, but if the second sprite moves after an egg hatches, then would the second sprite move? Or would it sit there, and end up de-syncing with the player?

Also, I have East Asian Language Suppourt on for programs, so any letters that aren't normal, show up as Chinese... what is "EachStepTests+7Cr"
But more importantly, what is the +7Cr thing?
All I see after the C is a strange box that looks like...
___
|00|
|18|

Sorry for the crappy ASCII representation...
__________________
>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
  #12    
Old January 3rd, 2010, 08:16 PM
interdpth
I've seen things, man.
 
Join Date: Jul 2004
It's supped to be an up arrow xD
__________________
yes, this is doge.

potato is not here.

bye
Reply With Quote
  #13    
Old January 3rd, 2010, 08:21 PM
JPAN
pokemon rom researcher
 
Join Date: Dec 2008
Quote:
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.

Quote:
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
  #14    
Old January 3rd, 2010, 08:22 PM
ZodiacDaGreat's Avatar
ZodiacDaGreat
Working on a Mobile System
 
Join Date: Feb 2007
Location: South Pacific
Age: 22
Gender: Male
Nature: Relaxed
Send a message via ICQ to ZodiacDaGreat
Quote:
Originally Posted by interdpth
It's supped to be an up arrow xD
lol, yeah that's IDA Pro Anyway, I believe all games have a step counter or something, it increments every time the player takes a step.
__________________
Reply With Quote
  #15    
Old January 4th, 2010, 12:52 PM
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 21
Gender: Male
Nature: Modest
JPAN is right I have thought of all kinds of scenarios for my yellow hack not even would you worry about a pokemon follow you but a script would be needed to make sure if a pokemon is deposited the ow would disappear and stuff, in other words ALOT of scripting needed for this and lets not start on backsprite recognization.
__________________
Join us!

My 'learning how to combine battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Name: Ethan

Black FC: 2666 1354 4379
Name: Ashton

White 2 FC: 1120 8065 3049
Name: Nate

3DS Friend Code: 1349-4646-2412
Name: tysonrss
Reply With Quote
  #16    
Old January 4th, 2010, 01:08 PM
Spherical Ice's Avatar
Spherical Ice
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
HAI Y DONT U ASK PKMN LEEG CHMP BECOZ GREEN SAFIRE HAS IT!!!!!!!!!!!!!!!!!!!!!!!!!

-cough-

Good luck on this, guys. It's a shame I have hardly any knowledge in ASM/hex, but you know JPAN's hack has key recognition? I'm unsure if it's possible, but couldn't you manipulate it so that if START or SELECT or whatever, the OW comes out and then the script is executed or something? I don't know - the idea doesn't contribute much, I know, sorry. D:
__________________
Reply With Quote
  #17    
Old January 4th, 2010, 01:11 PM
Pokepal17's Avatar
Pokepal17
More cowbell~
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Guys there's a "copy player" movement in Advance Map. Now I was able to make some sort of following from that but I think the ASM of that movement could be the key for this. The only problem is that when you push against the OW, the OW will move away a bit. Now I'm wondering if the routine could be edited then it'd work right. But then we'd have the depositing and entering maps to try and figure out. So, I think if we focus on the following and worry about the other bits later, this could be acheived.
__________________
Pokémon Stardrop
Reply With Quote
  #18    
Old January 4th, 2010, 06:29 PM
davidthefat
I Love C++
 
Join Date: Dec 2009
Age: 20
Gender: Male
I might have a solution for the map to map transition, make it OK for the pokemon to be on the same tile as the player but never 1 away from it. So make it if the player did not move, the poke does not move either, just dont check for collison for the pokemon, only player
Reply With Quote
  #19    
Old January 4th, 2010, 06:56 PM
interdpth
I've seen things, man.
 
Join Date: Jul 2004
Map to map transition is easy, just create the sprite virtually via a script! :)
__________________
yes, this is doge.

potato is not here.

bye
Reply With Quote
  #20    
Old January 4th, 2010, 07:09 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 as Full metal said that the reason giga universe's script isn't letting him interact with anything and Full metal said it was cause the game is checking for button presses
__________________
Reply With Quote
  #21    
Old January 4th, 2010, 07:17 PM
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 interdpth View Post
Map to map transition is easy, just create the sprite virtually via a script!
Whenever I tried it didn't work as I thought... would it work? Could we make it tangible so we can talk to it?

Quote:
Originally Posted by tainui View Post
Well as Full metal said that the reason giga universe's script isn't letting him interact with anything and Full metal said it was cause the game is checking for button presses
Not exactly, he is stuck in an eternal loop...
__________________
>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...

>

Last edited by 0m3GA ARS3NAL; January 4th, 2010 at 07:19 PM. Reason: Your double post has been automatically merged.
Reply With Quote
  #22    
Old January 4th, 2010, 07:29 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 i tryed something before that sort of worked but took up alot of space instead of looping the script it goes setvar 0x7001 0x1
at the end normally you put something like
#org @finish
goto @something (to repeat it but i tryed this )
end

#org @finish
end

then made a new script
#org @start
setvar 0x7001 0x0
release
end

and it kinda worked but the pikachu kept instantly coming to you and it would take up WAY to much space
__________________
Reply With Quote
  #23    
Old January 5th, 2010, 02:56 AM
OM3GA Umbr30n's Avatar
OM3GA Umbr30n
Was Mazot2
 
Join Date: Jun 2009
Location: UK
Age: 17
Gender: Male
Nature: Relaxed
i have an idea it would take a while but work,
have a script on every tile that uses a flag to check what starter u chose then sets ow then makes the sprite turn your direction and move towards you once every time u move.
__________________

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

~Umbreon
Reply With Quote
  #24    
Old January 5th, 2010, 03:06 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 |+~Umbreon~+| View Post
i have an idea it would take a while but work,
have a script on every tile that uses a flag to check what starter u chose then sets ow then makes the sprite turn your direction and move towards you once every time u move.
That idea's been thought of, tried, and failed... sorry.
I'm afraid this will have some ASM with it...
__________________
>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
  #25    
Old January 5th, 2010, 10:00 AM
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
Maybe co-ordinate comparing will do?

An assembly first checks the current pressed button:

Up
Down
Left
Right and compare co-ordinates:

e,g: Left\Right, coordinate 0,1 from player, Sprite down.
Up, coordinate 0,1, Sprite down.

detects the sprite number in the map of a map that is set in a variable.

This is an example from Luminous Yellow.

'----------------' Extract
msgbox @1 MSG_YESNO
compare LASTRESULT 0x1
if 0x0 call @end
showsprite 0x10
setvar 0x7000 0x10
callasm 0xunsetyet
msgbox @3 0x6

'---' cut

#org @1
= Ok!\nYour RIOLU is allowed.\lWould you like him\lto follow you around?

#org @3
= Have fun~!
''--'' end

level script for houses

'---'
compare 0x7000 0x10
if 0x0 goto @end
showsprite 0x10
callasm 0xunset
'---'

I don't have the routine yet. T_T

All scripts copyrighted.
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 12:13 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.