PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive > Questions & Answers

Notices

Questions & Answers Do you have a problem you need a straight answer for? Ask a question here and get an answer.

Reply
 
Thread Tools Display Modes
Old 10th July 2013, 02:43 PM   #1
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Post JPAN's Hacked Engine Issues

A lot of Gen III Pokemon hackers have found JPAN's Hacked Engine to be extremely useful, as it adds a lot of new functions and options when creating their own hack. However, like all great hacks, it has its issues. So far, I have only come across a few, but my goal here is to create a specific thread for these bugs (a list will be kept in this first post), and for people who need help using the hack in general.

Known Issues and Solutions:


(these are all for version 1.1)

The Patch:

  • Problem: Can't fly to locations.

    Solution: You need to restore the header scripts that set the world map flags for each town. This can be done by creating new versions of the scripts in each map header that just say "setworldmapflag 0xXXX". You can reference these in a clean rom.


  • Problem: Upon losing a battle, the player doesn't go to a Pokecenter.

    Solution: Same as the flying one, you need to restore the scripts. However, JPAN completely hacked the sethealingplace command that takes care of this, so you will need to write new scripts. These will go in the header for each PC. The new syntax can be found in the .doc file that came with the hacked engine.


  • Problem: The player is always fishing.

    Solution:
    This really isn't an issue. It is because you are using your save file from a normal FireRed game. In a regular FR game, that var that controls the walking OW is used for other things, but when JPAN erased all of the scripts, he used this var to control OWs. Therefore, it is already going to be set to something else. Simply write a script to set all of the vars that control things like OWs, backsprites, and trainersprites to 0, and similar issues will disappear also.


The Tool:

  • Problem: The OW when the player goes to surf become all screwed up and freezes the game.

    Solution: Go to 0x5F2D0 in a hex editor. You should see a pointer, follow it. Now, jump ten bytes ahead (you should end up on the next row, one byte down and to the left of where you started) and change the byte to FF. The byte you need to change comes after a string of: 29 18 D0. So now, that string looks like 29 18 D0 FF.

    Also, you have to reset all of the vars you selected for the player OW switch. There should be 7 of them. Using a script right near the beginning of the game, set them all to 0. I used vars 0x408F -> 0x4096, so my script, at some point, would contain:
    Code:
    setvar 0x408F 0x0
    setvar 0x4090 0x0
    setvar 0x4091 0x0
    setvar 0x4092 0x0
    setvar 0x4093 0x0
    setvar 0x4094 0x0
    setvar 0x4095 0x0
    setvar 0x4096 0x0
    Now it should work!



Both:

  • Problem: When using the hero backsprite switch, there is an issue where the opposing trainers palette is forced to be the hero's palette.

    Solution: Using a hex editor, search for this in your rom:
    Code:
    43 01 C0 00 C0 18 E4 00 0C 19 04 19 23 68 00 2B 0C D0 60 68 0A 49 10 22 0B DF C0 24 09 19 0B DF 08 49 0B DF 09 19
    There should only be one result. The very next two bytes need to be change to C0 46, so now the string will look like:
    Code:
    43 01 C0 00 C0 18 E4 00 0C 19 04 19 23 68 00 2B 0C D0 60 68 0A 49 10 22 0B DF C0 24 09 19 0B DF 08 49 0B DF 09 19 C0 46
    and it should work!



  • Problem: OWs only reload on warp.

    Solution: This isn't an issue, it was coded this way on purpose because it can get complicated loading OWs in runtime. However, if you have some ASM skills, see this thread: http://www.romhackersonline.com/showthread.php?t=14286



  • Problem: When using the hero backsprite switch on NO$GBA, it doesn't work, but when running it in VBA, it works perfectly.

    Solution: This is what happens when you don't use a BIOS file on VBA, mistakes are made. For the non-ASM folks, the explanation might not make sense, so I'll just spoiler it:

    Spoiler:
    JPAN used SWI 0xB (CPUSET) to copy the frames into the VRAM. The issue with this, is that he worked in this order:

    -Store new BS pointer in r3
    -Write new palettes in. (Using SWI 0xB)
    -Move r3 to r0.
    -Store BS in VRAM.

    On VBA, r3 is safe when you use SWI 0xB without a BIOS file. However, when using a real BIOS file, SWI 0xB overwrites r3 in the process. The number, at least for me, is always 170. So, when this gets moved into r0 and used as the source address for the image, the game just ignores it because it doesn't read from BIOS. (I think.XD) Credits to Jambo51 for having me look into that.


    Now, for the fix! Remember to see the first issue in this section also, as they are the same routine (he really botched this one, haha, but we love him anyways.<3) so you can kill two birds with one stone. Now, follow these instructions:
    Code:
    First, go to 0x7630 in a hex editor and follow the pointer.
    
    To relay the rest of the instructions, I'm going to use this format:
    
    [7630]+XX = YYYY
    This means, "at the address "0x7630 + 0xXX", paste-write/type YYYY as is." Most of you already know this, but for newers guys and girls, this could confuse them. So, onto the fix: (Friendly reminder: This is all in HEX!) [7630] + 72 = 9A 46 (Before palette insertion, store r3 in r10 for safe keeping) [7630] + 74 = 00 00 (remove a now useless branch, as our last change removed a cmp) [7630] + 88 = 53 46 (recover the sprite location from r10 and mov it back to r3) Optional: [7630] + 8A = CA 46 (may cause or prevent issues, idk, not necessary. Moves r9 onto r10. At this point, r9 should be 0 (and always is, at least for me), so this will reset r10 back to 0. Leaving r10 alone doesn't cause any issues for me, but this is for anyone who feels they need to reset r10.)
    Please note, that this removes JPAN's safety net, so that if a blank pointer (00000000) is loaded, the default BS is loaded instead. I did this because it was the only code at which I could add in the extra instructions required without making the routine longer and repointing. This error could occur if you load a BS outside of the region of the table that has been filled, but the the rom most likely won't crash, it will simply just show a blank sprite in most cases. So, if you see one, then you know what went wrong.


  • Problem: If you wanted to load an overworld sprite palette into almost any slot besides 0xA, then the game would not load the palette again after a fadescreen (such as going into a menu then back).

    Solution: Replace six bytes starting at at 0x5EECE with 00. [credit: diegoisawesome]




Feel free to post any and all issues you have with the hack that have not been submitted already.

Last edited by karatekid552; 20th October 2013 at 03:11 AM.
karatekid552 is offline   Reply With Quote
Likes Luna, DarkPsychic, Jambo51, Linkandzelda liked this post
Sponsored Links
Old 10th July 2013, 02:47 PM   #2
Alice
ClariS <3
Style AdminstratorAdministratorPHO VIP
 
Alice's Avatar
 
Join Date: Apr 2010
Location: Azalea Town
Age: 22
Posts: 319
Alice Alice
Default

I didn't even know these problems existed, hopefully this will prove useful to others who didn't know
__________________
sukiyami.







"I dreamt that you were a dog. And the dog was my husband. Anyway, it was the worst dream ever." — Aisaka Taiga
Alice is offline   Reply With Quote
Old 10th July 2013, 03:47 PM   #3
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Quote:
Originally Posted by Half Metal ★ View Post
I didn't even know these problems existed, hopefully this will prove useful to others who didn't know
The surfing issue is extremely common. I have answered it probably 10 time in Simple Questions threads alone, as well as having a lot of pms and vms about it. So yeah, I got tired of answering and decided to make a thread.
karatekid552 is offline   Reply With Quote
Old 11th July 2013, 12:15 AM   #4
Diegoisawesome
Oh god the bees
Ex-Staff
 
Diegoisawesome's Avatar
 
Join Date: Jul 2013
Location: :noitacoL
Age: 21
Posts: 60
Diegoisawesome
Default

I remember there was a glitch with trainers that the camera had to move up to see. I fixed it but I don't remember how.
Diegoisawesome is offline   Reply With Quote
Old 11th July 2013, 12:21 AM   #5
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Quote:
Originally Posted by diegoisawesome View Post
I remember there was a glitch with trainers that the camera had to move up to see. I fixed it but I don't remember how.
If you do remember, let me know. I'll keep an eye out for it as I make my hack.
karatekid552 is offline   Reply With Quote
Old 11th July 2013, 03:42 AM   #6
Pirate Ninja
P l a y t h e f i e l d
 
Pirate Ninja's Avatar
 
Join Date: Jul 2013
Location: The seas
Age: 23
Posts: 49
Pirate Ninja
Default

Deja vu, much?
Anyway you'd better point out the header scripts thing, and also that healing center problem. It might be some time before beginning hackers notice that the cities don't come in the fly world map register.
Pirate Ninja is offline   Reply With Quote
Old 11th July 2013, 11:46 AM   #7
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Quote:
Originally Posted by Pirate Ninja View Post
Deja vu, much?
Anyway you'd better point out the header scripts thing, and also that healing center problem. It might be some time before beginning hackers notice that the cities don't come in the fly world map register.
It took me a second to realize what you were talking about XD. I used the tool for my hack, so I wouldn't have to fix those issues.

I'll add them.
karatekid552 is offline   Reply With Quote
Likes DarkPsychic liked this post
Old 15th August 2013, 01:33 AM   #8
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Well, I have updated with two more issues solved! One was about the backsprite switch not working on emulators that use a real BIOS and the other was just a link to my finished research on OW switching, which was built to fix a small issue with this hack.
karatekid552 is offline   Reply With Quote
Old 19th October 2013, 03:00 PM   #9
Diegoisawesome
Oh god the bees
Ex-Staff
 
Diegoisawesome's Avatar
 
Join Date: Jul 2013
Location: :noitacoL
Age: 21
Posts: 60
Diegoisawesome
Default

Hey, I've fixed another "issue" in the Hacked Engine. If you wanted to load an overworld sprite palette into almost any slot besides 0xA, then the game would not load the palette again after a fadescreen (such as going into a menu then back). To fix this, replace six bytes starting at at 0x5EECE with 00.
Diegoisawesome is offline   Reply With Quote
Old 16th January 2015, 01:28 PM   #10
anonyboy
Newbie
 
Join Date: Jan 2014
Posts: 3
anonyboy
Default

well in a particular map after i end a battle the player ow takes the place of another trainer/you can't move yourself. does anyone have a fix?
anonyboy is offline   Reply With Quote
Reply

Tags
engine, hacked, issues, jpan

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 02:01 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts