• 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: Pokémon Fire Red Hacked Engine

Darthatron

巨大なトロール。
1,152
Posts
18
Years
I second this. Though I don't think I, personally, would have much use for disabling the entire menu, it might be nice to be able to disable certain functions like the Bag. Actually, I think the Bag is disabled in one of the Battle Frontier zones in Emerald so maybe we could take a look at some of those specials and try to port them to Fire Red.

Also, when you mention the "help menu" do you mean the menu that pops up when the player presses 'L' or 'R'? Because the player can choose to disable that menu in the Options tab from the Start Menu so if we could locate where the Options (text speed, text box type, etc.) are stored in the RAM, we could probably override the player's settings temporarily to disable the Help Menu.

The pointer at 0x0300500C points to some data that may be of help.

Code:
[Name (8 bytes)]
[Gender (1 byte)]
[??? (1 byte)]
[Trainer ID (2 bytes)]
[Secret ID (2 bytes)]
[Hours of play (2 bytes)]
[Minutes (1 byte)]
[Seconds (1 byte)]
[Milliseconds (1 byte)]
[Options (3 bytes)]
Credits to HackMew for a base of this data. Link.

The 14th byte (or first byte in the "Options" part mentioned above) there changes when you change the "Button" option

Code:
00 > Help
01 > LR
02 > L=A

I didn't do much research on it, so that's all I have. ^_^
 

Deokishisu

Mr. Magius
989
Posts
18
Years
Also, when you mention the "help menu" do you mean the menu that pops up when the player presses 'L' or 'R'? Because the player can choose to disable that menu in the Options tab from the Start Menu

Yes, I do mean that help menu and I am aware that it can be disabled by the player. I just think that it'd be a lot easier if I could just disable it completely, no fuss and no worrying that I might accidentally trap a player by requiring a button press that could lead them to the never-ending help menu pop ups of doom.

EDIT: One more quick suggestion. Maybe a toggle Running Shoes special so the player doesn't have to hold down B like in HGSS? That'd be pretty convenient in my opinion.

EDIT2: Now that I'm thinking about it, if the disable/enable Help Function was implemented, could I just put the disable help special before the LR checker in the walking script and re-enable it if L+R aren't pressed and at the end of the walking script itself? That way, no matter what the player has it set to, they can use the Help function and still utilize the secondary menu.
 
Last edited:

iTeruri

iAm
277
Posts
17
Years
I was wondering if you could ass something like 0x800C but something that DOES work in scripts and walking scripts. Could be a special or a plain old var like 0x800C.

This would be great as 0x800C doesn't working with scripts and walkings scripts and it would be very nice if it did.
 

Deokishisu

Mr. Magius
989
Posts
18
Years
Hey JPAN, I ran into more trouble with the walking scripts. I compiled my script into the ROM, and decided to test it by assigning it to a regular signpost event before going through and putting the pointer. Unfortunately, when I activate the script, whether pressing the right button combination or not, it freezes. I was wondering if you could take a look at my script to see if I used one of your commands wrong. If you can't see anything wrong with it, then it's just a general scripting problem I'll have to figure out :P

I warn you, it's pretty long. But I really think the problem might lie early on, because nothing's happening at all. The blank release and end things for the "Use [HM]" offsets are just because I haven't figured how to do them yet. Just ignore it for now please. The radio's all the same because I haven't gotten around to expanding the song table and adding my own songs.

Spoiler:
 

JPAN

pokemon rom researcher
104
Posts
15
Years
  • Seen Jul 2, 2016
Hey JPAN, I ran into more trouble with the walking scripts. I compiled my script into the ROM, and decided to test it by assigning it to a regular signpost event before going through and putting the pointer. Unfortunately, when I activate the script, whether pressing the right button combination or not, it freezes.[\QUOTE]
Just by looking at the start of the script, I saw a small problem. You use call, but all paths lead to end, and not return. That call is not necessary, as the script can be used as any other script. Simply place @RealStart address on the table. Also, the reason it seems to be crashing is because when you activate the script, some paths lead to 2-worded multichoices boxes with only one choice loaded. An example is the "Alpha" loading part.
Code:
loadpointer 0x0 @ALPHAC
special 0x25
checkitem 0x35 0x1
if 0x1 call @Phero
checkitem 0x16A 0x1
if 0x1 call @Seeker
multichoice 0x0 0x0 0x20 0x1
Probably more, but check them out.
PS: I have looked over your suggestions, and next release will include a way to have one single script load every time a key combination is loaded. Works fine on test-runs, and is several times more realistic to call a menu from there.
 

Deokishisu

Mr. Magius
989
Posts
18
Years
Just by looking at the start of the script, I saw a small problem. You use call, but all paths lead to end, and not return. That call is not necessary, as the script can be used as any other script. Simply place @RealStart address on the table. Also, the reason it seems to be crashing is because when you activate the script, some paths lead to 2-worded multichoices boxes with only one choice loaded. An example is the "Alpha" loading part.
Code:
loadpointer 0x0 @ALPHAC
special 0x25
checkitem 0x35 0x1
if 0x1 call @Phero
checkitem 0x16A 0x1
if 0x1 call @Seeker
multichoice 0x0 0x0 0x20 0x1
Probably more, but check them out.
PS: I have looked over your suggestions, and next release will include a way to have one single script load every time a key combination is loaded. Works fine on test-runs, and is several times more realistic to call a menu from there.
Alrighty, I see the whole call thing, thanks for pointing it out for me!

So, since my menu changes are depending on what flags are set and items in the player's inventory, I have to do a separate script for each possible combination to avoid the "2-worded multichoices boxes with only one choice loaded" problem? I had assumed that if the script happened to go down a path (due to flags set and items in inventory) which had less than the "maximum" I would let possible, then the multichoice command would just load an appropriate box based on whatever pointers were loaded (based on whatever flags were set and items in the inventory). Apparently I was wrong in assuming that if I'm understanding you correctly. ^^

Thanks again, I'm going to retry the script with your alterations and suggestions. It'll take me a while to get all the possible combinations going, so I think I might wait till it's absolutely needed to begin rescripting that time-consuming part.

P.S. Ooo, that feature for the next release sounds promising. Thanks for considering my suggestions, and keep up the amazing work!
 

Hoshiko Aki

Avatar rules
109
Posts
15
Years
  • Seen Oct 17, 2011
Hello,

I have a question, I'm using this a wile now. Today I wanted to make a swarm but I don't get it how to make it :( Me have read the manual and still i don't get it.

Can some own explain this to me?

Greetings Hoshiko Aki.


BTW sorry for my bad English
 

mindfreak

Belgium Rom hacker
45
Posts
16
Years
  • Seen Nov 1, 2012
Hey JPAN,(or someone else.)
Could you explain (once again but more detailed) how you make the new overworld tabels work?
I tried by reading the the info in the source code but I always got confused how many bytes I got to paste where.
 

Deokishisu

Mr. Magius
989
Posts
18
Years
Hello,

I have a question, I'm using this a wile now. Today I wanted to make a swarm but I don't get it how to make it :( Me have read the manual and still i don't get it.

Can some own explain this to me?

Greetings Hoshiko Aki.


BTW sorry for my bad English

To make a regular swarm event (not using pre-defined Pokemon), you would add this to whatever script activates it:

Code:
special 0x56
setvar 0x8004 0x(Pokemon Number in Hex)
setvar 0x8005 0x(Chances of appearance: 0x7fff is a 50% chance, 0xffff is always)
setvar 0x8006 0x(Quantity, how many appearances until it turns off: 0x0 is infinite appearances)
setvar 0x8007 0x(Location: 0x0 is all locations (grass, water, fishing, rock smash))
However, it will work for as long as it's on. That is, if you activate your swarm on the first route and don't deactivate it when you leave, that same swarm will occur for every other area you can encounter wild Pokemon in. So to cancel the swarm, add this to the deactivate script:
Code:
special 0x57

I haven't actually used the swarm event since I played around with the engine when it first came out, but I'm almost certain that's it.
 
219
Posts
16
Years
>< I love you,JPAN~~Finally,the trainer flag hack comes true!
Ya,the tool is...a little strange...
While I use it,some labels and buttons are obscured...And the window can maximize- -||


edit:

The button of Trainer Flag Script don't work at all...
If a hack requires var number or something,you can't cancel it.
 
Last edited:

Pogeygothaxed

Pokémon exDeltaSpecies Creator
231
Posts
14
Years
Well, when trying to apply the OW hack, I got to the prompt box where it asks for a variable. I tried to put in several different numbers, each time I enter it in and hit OK, it reopens the box in a different location on my screen. I'm not sure if it's a bug, or I'm not inputting in the variable correctly. Does it need to be in a certain syntax or something? :s Aside from that, the layout seems okay.

It's kind of overwhelming seeing all of the different options, but it makes finding what you want a lot easier, and applying (which was it's designed job) much simpler also. Thanks for taking the time to code up a program like this for people like me.

Any help with my problem posted above would be appreciated. Thanks in advance.
 

JPAN

pokemon rom researcher
104
Posts
15
Years
  • Seen Jul 2, 2016
>< I love you,JPAN~~Finally,the trainer flag hack comes true!
Ya,the tool is...a little strange...
While I use it,some labels and buttons are obscured...And the window can maximize-The button of Trainer Flag Script don't work at all...
If a hack requires var number or something,you can't cancel it.
As for the tool layout, I guess it would be nice to know which resolutions are people using. I use a 1440x900 on my laptop and 1024x768 on my desktop, and both showed up fine, but might differ from pc to pc.
As for the Trainer flag hack, I tried it on a newly adquired ROM and worked fine, then tried it out on some hacks, and worked as well, altough once the sprite I used it on stopped moving, but I couldn't find any reason why. So, just make sure you are using it correctly, that the flags used are "clean". If the problem is not even working, the version I first uploaded yesterday didn't offer any messages other than error messages for non-special hacks. This latest verison I uploded a few hours ago does, and shows "Trainer flag hacks successfully applied". If it doesn't try redownloading.

Well, when trying to apply the OW hack, I got to the prompt box where it asks for a variable. I tried to put in several different numbers, each time I enter it in and hit OK, it reopens the box in a different location on my screen. I'm not sure if it's a bug, or I'm not inputting in the variable correctly. Does it need to be in a certain syntax or something? :s
The prompt box is not a C++.net class, and as such I had to make it from scratch. But apparently, using a ShowDialog command doesn't let me put the box where I wanted it, and instead pops arround randomly. Eventually, I'll get it fixed, but first I need to study up some more on the tool. Note as well that it does not accept Enter as input, or allows to cancel mid-hack. This is another of those things that should be corrected for next version.
Also, the prompt box accepts both numbers and hex, and as such I needed to place something to distinguish it from eachother. "0x" or "x" before the hex number is required, else it will convert it to decimal, and certain numbers do not exist. And, to prevent people from entering invalid or engine-used variables, the variables start at 0x4050 and go up to 0x7fff. Some hacks will tell you they need X sequential variables. in that case, the upper limit is 0x7fff-X. Hope this answered your question.
 

Pogeygothaxed

Pokémon exDeltaSpecies Creator
231
Posts
14
Years
As for the tool layout, I guess it would be nice to know which resolutions are people using. I use a 1440x900 on my laptop and 1024x768 on my desktop, and both showed up fine, but might differ from pc to pc.
As for the Trainer flag hack, I tried it on a newly adquired ROM and worked fine, then tried it out on some hacks, and worked as well, altough once the sprite I used it on stopped moving, but I couldn't find any reason why. So, just make sure you are using it correctly, that the flags used are "clean". If the problem is not even working, the version I first uploaded yesterday didn't offer any messages other than error messages for non-special hacks. This latest verison I uploded a few hours ago does, and shows "Trainer flag hacks successfully applied". If it doesn't try redownloading.


The prompt box is not a C++.net class, and as such I had to make it from scratch. But apparently, using a ShowDialog command doesn't let me put the box where I wanted it, and instead pops arround randomly. Eventually, I'll get it fixed, but first I need to study up some more on the tool. Note as well that it does not accept Enter as input, or allows to cancel mid-hack. This is another of those things that should be corrected for next version.
Also, the prompt box accepts both numbers and hex, and as such I needed to place something to distinguish it from eachother. "0x" or "x" before the hex number is required, else it will convert it to decimal, and certain numbers do not exist. And, to prevent people from entering invalid or engine-used variables, the variables start at 0x4050 and go up to 0x7fff. Some hacks will tell you they need X sequential variables. in that case, the upper limit is 0x7fff-X. Hope this answered your question.

Oh, I understand now. Thanks again for clarifying. :) I got it to work now, and it doesn't seem to have any other problems.
 
219
Posts
16
Years
- -||I just found that I forgot to press SAVE...Sorry...

Yes! The script works just like a trainer^^And with this,maybe we could forget the "green script" for a while^^
But seems the script only happen once(yes,I saw your explanation),so how to reset the "flag" to make it happen again?(So that I can make a person that you have to avoid to been seen.Just like you're a SPY^^)---You can just ignore this rude request if you're busy...

Anyway,thank you really a lot^^
 

JPAN

pokemon rom researcher
104
Posts
15
Years
  • Seen Jul 2, 2016
But seems the script only happen once(yes,I saw your explanation),so how to reset the "flag" to make it happen again
Usual clearflag command. They are real flags, after all. Just make sure you are out of sight when you do it. Something like warp to the start of the course, clearflag the flag used, and it's ready for another try. Or at least a moving command to take you out of the OWs sight and then clearflag. Just make sure by the time it ends, the OW can't see you, or it will start the script automatically as it ends.
 

>Dante<

Call me Steven
201
Posts
15
Years
hey man!
this is a really interesting project.. :)
but do you think that it's possible to see a project as this for emerald?
becouse maybe you know..
but emerald have a little space then the other bases ROMs..
now with the help of XSE it's easy to expand the ROM..
but..always it's more better to use the space already to disposition..
 

Deokishisu

Mr. Magius
989
Posts
18
Years
hey man!
this is a really interesting project.. :)
but do you think that it's possible to see a project as this for emerald?
becouse maybe you know..
but emerald have a little space then the other bases ROMs..
now with the help of XSE it's easy to expand the ROM..
but..always it's more better to use the space already to disposition..

Honestly? After all the amazing work he's done for the community with this engine, you say one thing about how "interesting" it is, without even looking at the manual and realizing the work he put into it I'll bet, and ask him to port it to Emerald? Wow.

---

Anyway, quick question for you. When I applied the safari hack, it asked me to input flags, so I did. The manual doesn't say much about them, and I'm pretty unfamiliar with the safari-related commands in an unhacked Firered, what exactly were those flags for? To start the Safari Game? The prompt-box didn't really clear much up.

Oh, and one more thing, related to the manual again. Could you perhaps for the next release do something to distinguish the new features from the old? Like maybe color the title of the newly added features in red or something? It's difficult for me to tell what's new and what's not, and I end up scrolling through several times just to find them all. Thanks!

---

EDIT: I think I found a typo in the manual. For the "Place Key Script" Special, the actual special command given is the same as the "Ignore Key Input" one. I'm going to assume that it is meant to say "special 0xcb". Which leads me to another problem. I was playing around with the ignore and key script specials and noticed that while alone, the ignore command works perfectly. However, I used the key script special in the end of a script like so:
Code:
special 0xCB
setvar 0x8004 0x300
loadpointer 0x0 0x8738458
To call a regular talking script, one that I know works perfectly when used normally, and the dreaded Help System is back, even with the ignore command, and my talking script doesn't do or start at all, even when I set it to L=A in the options menu and manually disable the Help System. Please tell me I'm an idiot and just using the command wrong.
 
Last edited:

iTeruri

iAm
277
Posts
17
Years
Will you still release a .ips patch of the newer versions?
The tool, sadly, doesn't work on my mac using darwine to run it.

Just so you know, I had zero problems upgrading from an older version of the patch to v1.
 

JPAN

pokemon rom researcher
104
Posts
15
Years
  • Seen Jul 2, 2016
Anyway, quick question for you. When I applied the safari hack, it asked me to input flags, so I did. The manual doesn't say much about them, and I'm pretty unfamiliar with the safari-related commands in an unhacked Firered, what exactly were those flags for? To start the Safari Game? The prompt-box didn't really clear much up.
It seems it wasn't saved in the manual. That is for the a new function, that allows you to create several sized pedometers. The flags it asks for allow you to activate one of those pedometers, by setting the flag it asked for. Those pedometers are located at 0x0203f4e0 to 0x0203f4eb, but to access them you need to use the getbyte commands.
0x203f4e0 -> always on 32bit pedometer
0x203f4e4 -> first flag asked activated 32 bit pedometer
0x203f4e8 -> second flag activated 16 bit pedometer
0x203f4ea -> third flag activated 8 bit pedometer
0x203f4eb -> fourth flag activated 8 bit pedometer
These pedometers are totaly optional to use, and don't even depend on the 0x800 flag.
So, the only relation they have with the safari hack is that they ride on the back of the safari decreasing.
Oh, and one more thing, related to the manual again. Could you perhaps for the next release do something to distinguish the new features from the old? Like maybe color the title of the newly added features in red or something? It's difficult for me to tell what's new and what's not, and I end up scrolling through several times just to find them all.
I'm thinking about trying to make the next manual in .pdf format, with indexed tabs. That should make finding new stuff easier.
I think I found a typo in the manual. For the "Place Key Script" Special, the actual special command given is the same as the "Ignore Key Input" one. I'm going to assume that it is meant to say "special 0xcb". Which leads me to another problem. I was playing around with the ignore and key script specials and noticed that while alone, the ignore command works perfectly. However, I used the key script special in the end of a script like so:
Code:
special 0xCB
setvar 0x8004 0x300
loadpointer 0x0 0x8738458
To call a regular talking script, one that I know works perfectly when used normally, and the dreaded Help System is back, even with the ignore command, and my talking script doesn't do or start at all, even when I set it to L=A in the options menu and manually disable the Help System. Please tell me I'm an idiot and just using the command wrong.
When I say a code receives something as an argument, that means the specific code, not the hack as a whole. As such, the script is reversed. Also, if you also want the LR keys disabled, this alone wouldn't work, disablling the new script. so, you would need this
Code:
setvar 0x8004 0x300
loadpointer 0x0 0x8738458
special 0xCB
special 0xCA
Also, thank you for noticing the typos. I'll fix them and place the corrected version in this release (but not a PDF version).

Will you still release a .ips patch of the newer versions?
I could release a patch version. It should be up by tomorrow(I hope).
 
Back
Top