PDA

View Full Version : Development: Pokémon Fire Red Hacked Engine


Pages : [1] 2

JPAN
September 10th, 2009, 04:14 AM
Greetings everyone. I have come before you today to present you the project I've been working on for the last month. I call it Pokemon Fire Red Hacked (Tentative Title).

This is a base for Fire Red US V1.0. It will not work with other Fire Red versions.

But what is this? Well, this is a small patch that rewrites a part of the main game engine, in order to increase the number of options you have as a ROM hacker. This include several features I've heard people complaining about and requesting, as well as some that just popped in my head.

This is a work in progress, and I aspire for it to become one day a compiled colection of all that only ASM can make possible without having to know ASM to pull it off. So, please, feel free to suggest new features and present your own if you want. You will be credited for it, of course.

















Features

Support for over sixty thousand different OWs, as well as access to fourty-six hundred different palettes
Hacks preformed in the Battle system allow you to choose options for your hack, including Status-ridden pokemon, Shinies and creation of swarm events
Access to GBA Hardware function through new Specials that allow you to create Timed events and Button dependent events
All processor math and logic functions available for your variables
Dynamic multichoice boxes that can be changed Runtime, making them limitless
A fully-fledged pokemon decryption system accessed through variables that allow you to read and edit almost all information encrypted and locked away inside your pokemon.
Edited some of the old Specials, allowing for replacing the Old man Pokemon and Ghost Marowak with new pokemon, as well as a new version of the Pokemon Size minigame (the Heracross and Magikarp ones)
Edited the Fossil Special (from pewter museum). Now it can hold 256 different 64 by 64 pixel uncompressed images
Edit what every Behaviour byte does when you press A in front of it(scripts), allowing for things like headbutt trees
Choose where you go when you die, even if it's not a pokecenter.
Also incuded in the pack is a Instruction booklet explaining the functions and some examples of those functions. Some gameplay mechanics are explained there that doesn't apply only to this hack.

This Patch should be aplied first, then any other Rom base that you want. It should have no problem working, but I didn't test them all (as long as they didnt write it over the old scripts, is should be fine). This patch is based on the "clean" patch I gave away some time now, so all scripts, people and Signposts are gone.

On a sidenote, all source code is provided in the attachment, with a compiled form also available. But all the code only work, as is, on Fire Red US v1.0. Most code, however is portable for any other Pokemon game, as long as you replace the pointers to in-game references to the ones of your version. The pokemon decrypt, timer and keypad functions are easily portable as long as you know the party location and variable 80xx family location.

First update:
I corrected all the reported bugs, and they seem to work right now. Also, the Swarm-Roam code and the Wild code are compatible with eachother, and both have been added new features.
Added Behaviour byte scripts. You can now run scripts such as the defaults for cabinets and bookshelves on all bytes. Not advised to overwrite the water Bytes, but if you really want to, you have that option.
Created a function that replaces the SethealingPlace determination of your retreat place when you whiteout.

Second Update:
Fixed some bugs in my code and in Nintendo's Safari code. Details in the version Changes.

Third update:
An early christmas present for you all, the newest version is out!
Major changes on this hack, as well as corrected bugs and somewhat extensively tested code led me to prompt this as the first full version update.
Full changes listed on the version change text.
Of course, bugs will still happen, so please report them here when you find them.

Fourth update:
After some snooping around, I found a severe problem with my hack implementation: It always required to be applied when starting a hack. Because that decreases the number of people that can apply this hack, I have made a tool in C / C++.net to apply it. This tool already includes the remaining hacks for this latest release, including the result of the Item research, button-triggered scripts, more safari balls and trainer-activated scripts that are not trainers. Now with the manual included.
When extracting the tool, extract the whole "Hack tool" folder. Any of those folders missing might corrupt your ROM and crash the tool.
Tool use:
(optional) to extend a ROM, check the "Expand ROM on opening" box
Click "Open ROM"
If it's not a Fire Red version, it should pop-up an error. If it's a FR(u), but you changed the header, same error will appear. Don't worry about it then.
Select the hacks you wish to install, by clicking on the corresponding checkboxes and buttons (advice: if you are installing the behaviour byte hack, click that one first, as that function cleans the old space, that is not detected by the Free space table, for safety reasons, but is added to the opened rom free space, and uses it for smaller hacks, eg. specials)
Click the apply button after selecting all you want from the above checkbox list
In some cases, it might ask you for variables, or tell you it created some tables. That information is available afterwards if you click the "Get Changed Data" button.
End all modifications by saving to a ROM, with a name of your choice.

This tool doesn't ovewrite hacks. as such, if you install a hack that is not a special, it will be placed at a new location and the old one will not be cleaned. Next version should have that fixed.

This tool is compiled in visual studio c++ 2005, and as such, may have dependencies with the .net framework. If it doesn't open, try installing .net framework 2.0.

I must say, even though I program in c for a long time, and c++ from recent years, the C++ .net library was a bit new to me, so the layout might be a bit wierd and seem a bit off. Tell me your opinion of it, as always, so I can improve it for next release. Also, report any bug here or by PM.

D-Trogh
September 10th, 2009, 05:13 AM
First the HG/SS ROMs dumped, now this.. WOW :)

Gamer2020
September 10th, 2009, 05:29 AM
This is nice.
But it doesn't help those Hacking R/S/E.
But it seems you put in a lot of work so good job. ^^

Cello
September 10th, 2009, 05:36 AM
This is, no doubt, one of the most amazing things I could have ever thought I could wake up to see.

If I read it right you can't apply this to a hack already being worked on though, correct?

JPAN
September 10th, 2009, 05:57 AM
If I read it right you can't apply this to a hack already being worked on though, correct?

If you're using the original scripts, or have any in the Fire Red script region (0x160000 to 0x1bb000), then no. But if you work on the 0x720000+ part of the rom (the common region for most people) then there should be no problem. Just remember to back up your hack before you try it.

mervyn797
September 10th, 2009, 05:58 AM
lol, i didnt understand half the features, but from what i understand, you have done a great job, looking forward to test it.

Christos
September 10th, 2009, 06:02 AM
If you're using the original scripts, or have any in the Fire Red script region (0x160000 to 0x1bb000), then no. But if you work on the 0x720000+ part of the rom (the common region for most people) then there should be no problem. Just remember to back up your hack before you try it.

A patch of a normal Fire Red ROM would work better on progressed Fire Red hacks.

Anyway, great work, I'm interested in seeing what other hackers are going to do with all these special commands.

Satoshi Ookami
September 10th, 2009, 06:06 AM
That's pretty interesting...
Ya did an awesome job man...
I'm sure it'll help tons of Fire Red hackers

Full Metal
September 10th, 2009, 03:24 PM
O.o
THIS IS SO FREAKING AMAZING!
i can't believe anyone else isn't psyched about this.
:D :D :D
THANKUTHANKUTHANKUTHANKU!!!

cooley
September 10th, 2009, 04:11 PM
This is the best for FireRed hacking that I've seen, so far.. What really made me bite my lip was the Overworld possibilities and palettes too. But that would mean HackMew takes more time to make the new Owerworld Editor. But I'd definitely hex new Owerworlds if I new the data and whatnot.

I have a question, Is music affected in any way by this patch? In terms of Adding/subtracting tracks?

JPAN
September 10th, 2009, 04:17 PM
This is the best for FireRed hacking that I've seen, so far.. What really made me bite my lip was the Overworld possibilities and palettes too. But that would mean HackMew takes more time to make the new Owerworld Editor. But I'd definitely hex new Owerworlds if I new the data and whatnot.

I have a question, Is music affected in any way by this patch? In terms of Adding/subtracting tracks?

Inside the pack comes a instruction booklet that contains all information I had on Overworlds and people events, including some I found out while studying the OW decription code. So Hex editing shouldn't be such a problem.

Also, nothing was done about the music. Its the only are of the GBA programming I have still not understood. As such, no changes to the music was made.

sky_queen3
September 10th, 2009, 10:34 PM
*is too dumb to know how it works but I'll try it anyway*

0m3GA ARS3NAL
September 11th, 2009, 12:33 AM
Well well well, our buddy JPAN has surpassed Mastermind_X himself...
At least in my book.
Say, would you mind tutoring me in ASM?
I want to learn it, and you seem more than capable...

ZodiacDaGreat
September 11th, 2009, 02:11 PM
Hey, cool idea ^^
I guess I'm doing the same thing too XD but for Ruby. More on that until I'm back ;) I'd say mine's a bit different.

.Seth
September 11th, 2009, 02:14 PM
Wow.
This is absolutely the best thing I've seen during my time here at PC.
Very amazing work, JPAN.
You are the pseudo-god of rom hacking in my book.

DawnRyder
September 11th, 2009, 02:32 PM
OMG!!! This is awesome! Thank you JPAN!
I've been waiting for something like this to come out.

Gamer2020
September 11th, 2009, 03:55 PM
Hey, cool idea ^^
I guess I'm doing the same thing too XD but for Ruby. More on that until I'm back ;) I'd say mine's a bit different.

I call it Pokemon Fire Red Hacked (Tentative Title).



No one cares about emerald... :'(

bigfatgranny
September 11th, 2009, 05:06 PM
Incredible. The most impressive thing I've seen in the rom hacking community in along time. I just tried it out and It's loaded with things I've wanted to do but couldnt due to my lack of asm skills. The ability to change the hero sprite in game is one I've wanted to be able to do for a long time. Two thumbs way up JPAN.

Pokepal17
September 11th, 2009, 08:37 PM
This is absolutely amazing. Wow, all that in one patch, I can't wait to try it out. :D

0m3GA ARS3NAL
September 11th, 2009, 09:16 PM
For anyone wondering, you should NOT apply this to a Clean Fire Red Rom, but instead, use JPAN's Clearing Patch, that clears out all of the scripts, signposts, and sprites in every map. Otherwise, some bugs may occur. You can find it in the OLD rom hacking thread, for those who can't find it anymore, here is a link.

http://www.pokecommunity.com/showpost.php?p=5005730&postcount=252
(That is his post.)

sky_queen3
September 11th, 2009, 09:18 PM
o.O What kind of bugs aew we talking about?

0m3GA ARS3NAL
September 11th, 2009, 09:21 PM
o.O What kind of bugs aew we talking about?

If you use scripts found in those areas, they will be deleted, ASM scripts you insert may not work at all, lots of things, you HAVE to use it, or you WILL get messed up.
(It will clean out everything, clearing the original scripts put in by Nintendo.)
Seriously, there is a reason JPAN said it works with his cleaned patch, because he made this ASM with it, this is best used when starting a NEW hack.

Thrace
September 11th, 2009, 11:27 PM
This looks incredible. I don't have much to say that hasn't been said already. I'll be sure to use this for my hack.

negative
September 12th, 2009, 01:52 AM
Wow! You really took your time doing this, and I love it. I think I'll use it:P
Thanks a lot. This will really help.

sky_queen3
September 12th, 2009, 05:01 AM
If you use scripts found in those areas, they will be deleted, ASM scripts you insert may not work at all, lots of things, you HAVE to use it, or you WILL get messed up.
(It will clean out everything, clearing the original scripts put in by Nintendo.)
Seriously, there is a reason JPAN said it works with his cleaned patch, because he made this ASM with it, this is best used when starting a NEW hack.

Ok, so applying it to a pure, unhacked rom won't cause those bugs? :)

Mr. Frog
September 12th, 2009, 05:22 AM
Wow, this looks simply amazing!

JPAN
September 12th, 2009, 06:41 AM
For anyone wondering, you should NOT apply this to a Clean Fire Red Rom, but instead, use JPAN's Clearing Patch, that clears out all of the scripts, signposts, and sprites in every map. Otherwise, some bugs may occur. You can find it in the OLD rom hacking thread, for those who can't find it anymore, here is a link.

http://www.pokecommunity.com/showpost.php?p=5005730&postcount=252
(That is his post.)

Well, actually, what I said was that this hack was made based on the Clean Patch I posted earlier. That means that applying this patch will do the same as the Clean Patch, that is, erasing all scripts from the original map. So, this patch should be appliable to any Fire Red rom, hacked or not, that doesn't use the old scripts.

That is because, at the slightest change in number of events, AdvanceMap will repoint them to 0x712000 and below, leaving the old ones behind. So only maps you left intact from the original game should be affected. Only detail I need to add, this patch will erase the almost always reused Pokecenter scripts (healing, linking). Take care if that happens to you. Those scritps are easy to find (and copy) from any not-patched game, but I will provide them together with the resources in the next release.

iTeruri
September 12th, 2009, 11:10 AM
There is onely one word to describe this: superawesomebestthingintheworldever.

Really, this will help me (and I'm sure many others) a lot. Especially the dynamic multichoice options, battle specials and swarming specials.

I got a few questions though:

Never mind. I tried it myself and I pretty much figured it out.

sonic1
September 12th, 2009, 02:22 PM
Wow!!
I have to say,this is super cool!:D

But!..... It has problem(at least for me)... :(

When i use Fly or surf,it freezes the game!

Why it happens?

~sonic1~

JPAN
September 12th, 2009, 03:10 PM
When i use Fly or surf,it freezes the game!

Why it happens?

~sonic1~

That's odd. After reading this post, I tried with my a normal Fire Red and activated every needed flag. The sub-functions of the surfing and flying worked normally. Did you use a US Fire red ROM? I tried several ways of calling those functions, an they work.
Because I deleted the scripts, including level scripts, the worldmap_flags are not being set, so you can't fly anywhere on the just-patched ROM. But no freezes were found.

Full Metal
September 12th, 2009, 06:43 PM
Now heres an idea for ya ;)
U know the sethealingplace command?
since u already seem to know abunch about ASM
would you be able to change that one
OR be able to make it so that we can set
a var (for example lets use 0x7FFF)
the PC script would be: setvar 0x7FFF 0x[map bank] setvar 0x7FFE 0x[map number]
then alter the part that makes us scurry to the PC to simply warp us to the places specified in the two variables.
Just an idea.

liuyanghejerry
September 12th, 2009, 06:49 PM
This is very nice,and start a new way of using ASM.
I've not read the manual yet because I'm on my phone.
But I guess I have to do it myself to make this engine work on JP roms and even R/S JP roms...

Ninja Caterpie
September 12th, 2009, 06:53 PM
make one for emerald now plox

Very nice. Very nice.

Very very nice.

Dunno what else to say, rofl. 8D

sonic1
September 13th, 2009, 01:21 AM
Oh,i have now identified the problem.xD

It was because i had used a old save from another firered and because that,it was causing conflict!

But now that i started new game,its resolved! Thank you!:D

Your hacked engine is fantastic!

~sonic1~

score_under
September 13th, 2009, 06:19 AM
Now heres an idea for ya ;)
U know the sethealingplace command?
since u already seem to know abunch about ASM
would you be able to change that one
OR be able to make it so that we can set
a var (for example lets use 0x7FFF)
the PC script would be: setvar 0x7FFF 0x[map bank] setvar 0x7FFE 0x[map number]
then alter the part that makes us scurry to the PC to simply warp us to the places specified in the two variables.
Just an idea.
Can't you just make it set those vars at the start of your hack and set the sethealingplace table pointer to those vars +8 ?

diegoisawesome
September 13th, 2009, 08:26 AM
Er, I have a question.
How would I make an overworld have one of the new palettes that I made a new pointer to in the table, and what would I number the new palette?

JPAN
September 13th, 2009, 09:12 AM
Er, I have a question.
How would I make an overworld have one of the new palettes that I made a new pointer to in the table, and what would I number the new palette?

In the palette table, the end is marked with 00000000 ff110000. if you place it after that line, it will not work. Also, if the above would be a palette, the 11ff would be the number of that palette. Almost all numbers are still available, so number it something like 0020 would be fine. Remember to place the finish line at the end of your new insertions, or the code will crash the game.

Unfortunately, the OW Editor does not support this new aditions, so the best way to make it is to be tricky.
Copy your ROM. That copy will be where you will replace the old sprites and palettes with your new ones. Edit the new sprite and frames to your liking. In the end, go to where that OW is (at the old OW data pointer, the first pointer at the OW table pointers), copy the OW data to the first ROM, and place a pointer to the OW data in your Overworld table. Don't forget to copy your frames from the Sprite pointer.
Now, the OW is in the game but the Palette is still be messed up. So, go the OW data and right after the FFFF bytes you find the palette. Replace it with the new one you inserted and try it out.

Now heres an idea for ya ;)
U know the sethealingplace command?

I have checked out the Sethealingplace command, and figured out how it worked. Your idea of the variables isn't too far off. It would require at least three variables, and the sethealingplace would only be necessary to determine the script that is called after the blackout (I checked out how it worked without such check, and it would always treat the are as a pokecenter, displaying the animation on such places as Blaine's head).
However, that change will still take some time to make.

thrilljack1
September 13th, 2009, 06:25 PM
This looks amazing because it has one feature I've always wanted: variable wild/trainer pkmn level based on your current level.

After trying it out, I'm completely confused. I played it through and all of the events are gone (as expected). However, when I opened it on Advance Map I still see all the events there. I tried making an event and it didn't show up. It's almost as if all of the events are still present but simply "turned off." Mind helping an enthusiastic hacking noob out? I'm dying to play around with the level editor thing.

bigfatgranny
September 13th, 2009, 06:51 PM
That's weird? I never got an error with mine. But for everyones info this takes out EVERY script. Including the ability to nickname pokemon. But this is easy to fix. Just insert it from a clean rom.

thrilljack1
September 13th, 2009, 07:06 PM
That's weird? I never got an error with mine. But for everyones info this takes out EVERY script. Including the ability to nickname pokemon. But this is easy to fix. Just insert it from a clean rom.

I've been doing research and I'm wondering if I'm missing something important. I'm using XSE and Advance Map, but I'm beginning to think that maybe I need to be using a different program or something.
With Advance Map, all of the scripts are there in the game, they just don't seem to activate / show up when I start the rom.

Father Ash
September 14th, 2009, 07:13 AM
Just given the manual a quick once-over and it looks brilliant. I doubt I'd really use much of it except for the wild pokemon level stuff and roaming legendaries but still it's abso-bloody-lutely amazing.

Co500
September 15th, 2009, 11:22 AM
its great only that for some reason i cant get more OWs if some one has a firered ips with more than 255 ows could you please tell me :)

hoebeke
September 15th, 2009, 05:00 PM
wow this is gonna help a lot!

thanks man!

Bayonetta
September 15th, 2009, 06:27 PM
You should add Diamond and Peark Skill System, like making fire punch a physical fire type attack and crunch a dark physical attack.

giova90
September 16th, 2009, 03:39 AM
fantastic job!...i could be fantastic also have the following OW like pokemon yellow and HG SS...and maybe to be a change by ow trainer card and back when you play ...so start to change the character when you would like to do it...:-)

-DarK-
September 19th, 2009, 10:49 AM
Simply amazing. If it's possible, I have an idea for what command/function/whatever to include: A wild pokemon changing script. It's possible to change wild pkmn data by storing that data from the ROM into the RAM, and then hack the script that reads the data from the ROM to make sure that that data is read from the RAM instead. I tried to do something like this, but with my close-to-no knowledge of ASM, it didn't work out.

JPAN
September 19th, 2009, 02:44 PM
Simply amazing. If it's possible, I have an idea for what command/function/whatever to include: A wild pokemon changing script.

That was one of the first included functions. Specials 0x58 and 0x59. Special 0x58 allows you to load another Wild pokemon data to replace any of the old ones. Read on the manual how. Special 0x59 disables that function until activated again with special 0x58.

-DarK-
September 20th, 2009, 01:57 AM
That was one of the first included functions. Specials 0x58 and 0x59. Special 0x58 allows you to load another Wild pokemon data to replace any of the old ones. Read on the manual how. Special 0x59 disables that function until activated again with special 0x58.

Now this is what I've been looking for! :D Really, this is great, well done mate!

sonic1
September 20th, 2009, 09:02 AM
Sorry to tell,but i've found another problem(at least for me) :(

I've used your special 56(swarming/roaming legendaries) with the following script:


setvar 0x8004 0xFFFE
setvar 0x8005 0xFFFF
setvar 0x8006 0x1
setvar 0x8007 0x1
special 0x56


Problem:

As you can see,i pretend to use a predefined pokemon stored at a pointer, that must be placed by hand in 0x0203f488! And that's what i've done,but!...

It works the way i want, but after the capture it turns into a bad egg!:\

Misc. information (of the problem):

The predefined Pokemon that im has a diferent OTid and SecretID than mine!(no prob here,just like i want)

The pokemon is a raikou lv.100

The predefined pokemon data i used is:

E4FF8F4E4197ECAFCCBBC3C5C9CFFF036D260202C5BBCCC6FFFFFF0013130000A5F107EBBB2BAAF1A5E863E1D66891E1F26838E0B16769F55668DEE1757A70E1A50963E1A56863E1A56863E1A56863E10000
000064FF40014001DA00AB00FD00F700BF


And if you didn't understand the problem, there's a video-gif in attachment :

Plz,i need to understand whats happening

~Sonic1~

JPAN
September 20th, 2009, 10:35 AM
As you can see,i pretend to use a predefined pokemon stored at a pointer, that must be placed by hand in 0x0203f488! And that's what i've done,but!...

It works the way i want, but after the capture it turns into a bad egg!:\

Misc. information (of the problem):

The predefined Pokemon that im has a diferent OTid and SecretID than mine!(no prob here,just like i want)
In fact, the difference in OTids IS the problem. When I tested this code I used pokemon caught in the game, replicated to the other side, that's why I didn't notice a very important piece of information: the game doesn't copy the Wild data 1 to 1, only the encrypted part. the OTIDs are changed to the one the game owner has.

Of course, now that I know of the problem, I can fix it. Next release will have this fixed. Up until then, I advise people to not use the Predefined pokemon mode.

Thanks for the heads up.

sonic1
September 20th, 2009, 12:01 PM
Your welcome!;)

I should thank you,your engine is really fantastic!:D
Hope your next release will be more fantastic than this(its going to be hard,the actual release it's already fantastic!:laugh:)

One more question:
it's possible to have more than 1 pokemon swarming/roaming at the same time?(srry to ask this but i'm in school and i don't have time to test it out)

~sonic1~

PS:Every time i find a bug/problem,i'll post it here so you can improve your engine ;)

JPAN
September 20th, 2009, 12:17 PM
One more question:
it's possible to have more than 1 pokemon swarming/roaming at the same time?(srry to ask this but i'm in school and i don't have time to test it out)
You cannot. I have made it so that you can only have one pokemon either swarming or roaming in that map, but not both.
The only solution for this is to use a Level Script to select which roaming pokemon appears or if a swarm happens.

Sonikku17
September 20th, 2009, 01:31 PM
This is really amazing! I've tried out a couple of the features you added, and it's simply incredible. Thanks for putting so much time into this, it really helps out amateur hackers like myself! Also, a quick question: Would there be any way for you to add some way to control what music plays during trainer battles?

VvInstinctvV
September 20th, 2009, 01:49 PM
One feature that would be awesome is if you made it to where it was compatible with larger sprites than 64X64, so that we could include all the d/p sprites (80X80) without shrinking them.

diegoisawesome
September 20th, 2009, 01:56 PM
Could you make a special that forces a move to be taught to that location, even though there may be empty slots?

Also, is there a way to set what map bank and number the Swarming Pokémon or Roaming Pokémon is at? Also, how would you make it so that after you encounter a Roaming Pokémon, it moves to another map?

Another cool idea would be something like the Behavior bytes changing, where you could force an item to be usable and run a script.

And maybe, as an addon to the sethealingplace hack, you could do something that would let you change the text pointers that are called during the run home thing, aka "[PLAYER] scurried home, protecting..", "MOM: Oh, hello, sweetie! Did your POKéMON faint?...", and "MOM: There you go! All healthy and happy!..." or however they go. This would be useful for people who want to have many different places where different things are said upon fainting.

Aljam
September 20th, 2009, 04:59 PM
Uhhhh... why are there alot of events on map 3.0?(pallet town map)
Are they there for a reason?
I patched over my hack btw (didnt even start scripting)

justinufer
September 21st, 2009, 06:46 PM
Would it be possible for you to make it so that you can change the amount of items you can have in your pc item box?

Neo-Wolf
September 22nd, 2009, 05:26 AM
Can you hack the engine so that no scripts are deleted?
Good work!

-DarK-
September 22nd, 2009, 07:59 AM
Is there a posibility to make a sort of "follow" script? I mean, more meant for the yellow hacks, so that pikachu (or for non-yellow hacks, even better, all possible pokemon, much like in HG/SS) can follow you around?

giova90
September 22nd, 2009, 09:20 AM
Is there a posibility to make a sort of "follow" script? I mean, more meant for the yellow hacks, so that pikachu (or for non-yellow hacks, even better, all possible pokemon, much like in HG/SS) can follow you around?
the same my question on a previuos page(but without replies) XD

The Prince of Sweet Sorrow
September 22nd, 2009, 10:05 AM
Very cool. Briliant. May i suggest one more features? I noticed lately, there are hackers that want to fit more regions, why don't you expand the size of the rom (if you can do it of course).

You officially have my thanks. XD

giova90
September 22nd, 2009, 10:33 AM
ok ...someone have already added some OW and palette?....i've followed the manual but once modified the hack on my HEX the rom does error in every programs(advance map and overworld editor)...
so as already somebody ask it, release a patch that adds a great number of OW and palette(i could be awesome have every OW pokemon like HG SS) because i guess it's important for many hackers to have this..........................................................................................................

justinufer
September 22nd, 2009, 08:59 PM
Also would you be able to make it so that there is a script that we use to save the game?

0m3GA ARS3NAL
September 22nd, 2009, 09:28 PM
Very cool. Briliant. May i suggest one more features? I noticed lately, there are hackers that want to fit more regions, why don't you expand the size of the rom (if you can do it of course).

You officially have my thanks. XD

XSE has a ROM expander... Up to 32 MB

Also would you be able to make it so that there is a script that we use to save the game?

There is already a script like that.
Check the Battle Tower / Trainer Tower / Battle Colosseum / Union Room / Anything else that makes you save.

The script will tell all...

~Poke~
September 23rd, 2009, 12:31 AM
Can you hack the engine so that no scripts are deleted?
Good work!

Step 1: Get both this patch and the patch linked to on this page that only deletes the scripts.

Step 2: Patch both to clean roms.

Step 3: Use LIPS to create a patch from the hacked engine. Then when it asks for a clean rom direct it to the other patched rom.

Step 4. The patch it produces will leave all scripts but still have a hacked engine.

JPAN
September 23rd, 2009, 02:06 PM
Step 1: Get both this patch and the patch linked to on this page that only deletes the scripts.

Step 2: Patch both to clean roms.

Step 3: Use LIPS to create a patch from the hacked engine. Then when it asks for a clean rom direct it to the other patched rom.

Step 4. The patch it produces will leave all scripts but still have a hacked engine.
Actually, this will render this hack useless. That is because I used the Script Area of the ROM to implement all code. If you want to use the old scripts, simply copy them from the original code and repoint them into your ROM.

diegoisawesome
September 23rd, 2009, 02:20 PM
Actually, this will render this hack useless. That is because I used the Script Area of the ROM to implement all code. If you want to use the old scripts, simply copy them from the original code and repoint them into your ROM.
Er, I did that, and it's working just fine...

Surf
September 23rd, 2009, 03:52 PM
I've been having difficulty with the timer.
How can I get it to show what time it has recorded, in a msgbox?
Do I have to call a var?

JPAN
September 24th, 2009, 01:31 AM
I've been having difficulty with the timer.
How can I get it to show what time it has recorded, in a msgbox?
Do I have to call a var?
Using Special2 0x(variable) 0x4a, it will read out the timer to the variable.
buffernumber 0x0 0x(variable) will buffer the time in seconds for the buffer 0
To print that, just use a normal msgbox that contains in its text a \v\h02.

If you want to print in the hours, minutes and Seconds format, you may use the VarMaths specials to make it into sizable chunks.

(assuming the variable you used in the special call was 0x8007)
writebytetooffset 0x07 0x0203f4d8
writebytetooffset 0x80 0x0203f4d9
setvar 0x8000 0x3c
writebytetooffset 0x00 0x0203f4da
writebytetooffset 0x80 0x0203f4db
special2 0x(seconds) 0x41
special2 0x(minutes) 0x41
buffernumber 0x2 0x(seconds)
buffernumber 0x1 0x(minutes)
buffernumber 0x0 0x8007
msgbox 0x @text (text = \v\h01:\v\h02:\v\h03)

Josephine
September 24th, 2009, 01:51 AM
If there were a way to store the players X and Y coordinates along with what map they were currently on, then there'd be no stopping me switching to FR now that this is here.
However, as it is Emerald has a workaround for this using one of the original specials. :/

Is there any way you might be able to include this in the next update?
Your work is fantastic, and I desperately want to be able to make use of it. xD

sonic1
September 24th, 2009, 06:27 AM
Hi there!
Hmmm...I've come now with a sugestion and a problem(again:laugh:)!

So the sugestion is: You can make something that forces the player to battle (in wildbattles) until death, capture or kill the poke!If it helps,check the legendarie battle scripts,it could be something there that will help you, since it checks if the player killed the poke or captured it or run from battle(but outside of battle,and my idea is inside battle).Its for the people that want a Pal Park.And if you can make a wildbattle check if the player run instead of capturing or killing the pokemon then instead of making the pokemon appear the times you put,appear until you kill or capture the pokemon like for Pal Park.(of curse you have to put another variable to check if the rom hacker wants it!)

The problem is:I know that you tell to not use the predefined pokemon part of special 56 (roaming/swarming),but before i tell you that bug,i had noticed another bug: with the normal pokemon numbers, the times that they appear is correct(i mean,if you put 5 times,he appears 5 times) but if you use a predefined pokemon he appears infinitely time,even if you put it to appear 1 time.

Thats it,

~Sonic1~

Darthatron
September 26th, 2009, 04:38 PM
I have 3 questions.

1. Is it possible to add a way to change the graphic of the old man special (of him throwing the pokeball), perhaps using load pointer?

2. Is it possible to add a way to have a script load every time any map is loaded?

3. Is it possible to add a way to have a script load every time the player takes a step?

Keep up the good work. :)

●•ΛΣЯӨЩ•●
September 26th, 2009, 04:56 PM
Well you could try to make some update such that we can insert all the 493 Pokemon and their info.

ΡλЯλđΘЖ
September 26th, 2009, 05:03 PM
Hey, I was wondering if you could include something that lets you change the players OW, Back, and Front sprites during gameplay (like a script or something).
If something like this already exists, sorry. :P

cooley
September 27th, 2009, 02:45 PM
Hey, I was wondering if you could include something that lets you change the players OW, Back, and Front sprites during gameplay (like a script or something).
If something like this already exists, sorry. :P
You can already do something like that. HackMew will be writing an ASM tutorial on how to do so.

0m3GA ARS3NAL
September 27th, 2009, 06:33 PM
Hey, I was wondering if you could include something that lets you change the players OW, Back, and Front sprites during gameplay (like a script or something).
If something like this already exists, sorry. :P

Read teh freaking Readme. This is already included, instead of asking if it is there, please, read the Readme file, there is a reason it is called a READ ME.

Darthatron
September 27th, 2009, 09:24 PM
Read teh freaking Readme. This is already included, instead of asking if it is there, please, read the Readme file, there is a reason it is called a READ ME.

As far as I can see there is no way to change the front/back sprites. :\

0m3GA ARS3NAL
September 27th, 2009, 09:40 PM
As far as I can see there is no way to change the front/back sprites. :\

Yeah, well the OW changing thing is... I suppose making an ASM routine that checks what outfit you wear etc could change it, but I can't make one.

hi sir tomato my password is syvniti
September 28th, 2009, 10:50 AM
Hey, I was wondering if you could include something that lets you change the players OW, Back, and Front sprites during gameplay (like a script or something).
If something like this already exists, sorry. :P

I been thinking about writing a tutorial... If neither Hackmew or Jpan has done it in the next weekends, I'll do it, if I don't turn to drunk at friday.
As far as I can see there is no way to change the front/back sprites. :\
I have written a routine for the front sprite, and Doubt the back sprite should be hard..

TAKUORO
September 30th, 2009, 11:17 AM
Thank you!!

It´s a great patch, maybe the bets i've seen.

but one thing... how do I insert the source codes.. i mean, have them but I don't know how to put them, in an hex edtior?
a script?
i'm triying to do the overworld thing but I don't know where to put the codes can someone help me please? i'm not familiar with this.. sorry
if it's by an asm editor... could you give me the download link?
I have vista and I can't open mine ...

I'm looking forward to more things, keept up the good work! :)

cooley
September 30th, 2009, 01:44 PM
Thank you!!

It´s a great patch, maybe the bets i've seen.

but one thing... how do I insert the source codes.. i mean, have them but I don't know how to put them, in an hex edtior?
a script?
i'm triying to do the overworld thing but I don't know where to put the codes can someone help me please? i'm not familiar with this.. sorry
if it's by an asm editor... could you give me the download link?
I have vista and I can't open mine ...

I'm looking forward to more things, keept up the good work! :)

Yeah, with an ASM compiler like GoldRoad or Devkit.
After you've managed to compile it, it creates a .bin file, which you open in Hex and copy the routine and paste it into blank space in your ROM. But be careful, it has to end with 0 4 8 or C, and when you call the routine, like:

callasm 0x805054

You must add 1 to it, like this:

callasm 0x805054 + 1 = 0x805055

Simple enough. But Here's a link, to learn about more ASM:
HackMew's Knowledge (http://www.pokecommunity.com/showthread.php?t=117917)

TAKUORO
September 30th, 2009, 05:30 PM
Ok thank you very much!!

I already compiled it but one thing...... i tried to do the OW expand thing

after I paste the code into the rom with the hex editor...can I paste it in any offset?
(of course, it must be 0,4,c,etc...)
or it must be at the offset next to the OW pallets and sprites?


another thing... When i do it... I still can change the palletas and sprites in the overworld editor?
Or I will have to d change them by hex?

EDIT: I paste it next to the OW data and when I open it with the Ow editor this show up:
http://img38.imageshack.us/img38/7579/errorp.png
and a lot of more errors like pallete unfound and a lot of things and no OW can be seen


again.. sorry.. but it's a little difficult for me :P

JPAN
October 1st, 2009, 12:36 AM
Ok thank you very much!!

I already compiled it but one thing...... i tried to do the OW expand thing

after I paste the code into the rom with the hex editor...can I paste it in any offset?
(of course, it must be 0,4,c,etc...)
or it must be at the offset next to the OW pallets and sprites?

another thing... When i do it... I still can change the palletas and sprites in the overworld editor?
Or I will have to d change them by hex?

Some part of the code must be pasted over the old function. Those piece of code are identified by the comment before it telling you where to paste it. They are generaly only 8 bytes, and have four zeroed bytes in front of it. those bytes are the pointer, in reverse, for where you put the rest of the functions.
In the case of the Overworld code, you can find those type three times along the code. To identify them, just look out for sets of four or more 0's. There is only one exception to this, that is right after 6f e9 05 08, which is a shift to replace the overworld cleaner.
If you used devkitPRO Arm as.exe, the result will be a a.out where the compiled code starts at 0x34. copy from there if you use it.
The reason I din't provide a compiled code for this feature is that this is the only code that isn't copy-paste onto the game. The instructions at the source file tells you where to put it, but you still need to know how to identify them. Knowing Thumb helps greatly here.

On a final note, OW Editor was made not using the OW person pointers but the OW data in the ROM directly. As such, it doesn't recognise the changes at the OW number and Pallete number. It will always only allow you to edit the original ones, so if you wish to edit a new table, you must use another ROM and copy the data after you are done.

hi sir tomato my password is syvniti
October 1st, 2009, 09:32 AM
Some part of the code must be pasted over the old function. Those piece of code are identified by the comment before it telling you where to paste it. They are generaly only 8 bytes, and have four zeroed bytes in front of it. those bytes are the pointer, in reverse, for where you put the rest of the functions.
In the case of the Overworld code, you can find those type three times along the code. To identify them, just look out for sets of four or more 0's. There is only one exception to this, that is right after 6f e9 05 08, which is a shift to replace the overworld cleaner.
If you used devkitPRO Arm as.exe, the result will be a a.out where the compiled code starts at 0x34. copy from there if you use it.
The reason I din't provide a compiled code for this feature is that this is the only code that isn't copy-paste onto the game. The instructions at the source file tells you where to put it, but you still need to know how to identify them. Knowing Thumb helps greatly here.

On a final note, OW Editor was made not using the OW person pointers but the OW data in the ROM directly. As such, it doesn't recognise the changes at the OW number and Pallete number. It will always only allow you to edit the original ones, so if you wish to edit a new table, you must use another ROM and copy the data after you are done.
*Tip: You can just edit the ini or source for the overworld editor.

TAKUORO
October 12th, 2009, 09:42 PM
*Tip: You can just edit the ini or source for the overworld editor.


I don't know how xD

One thing...I have a bug... when I use a special, anyone, the game frezees, after 5 or 6 seconds the game restarts....It happens in all the roms I use, I only add a code and this happens, it happens after 4 or 5 hours after I used the code...It's weird..this never happened before...and a friend also has this bug...

Ah!!
another thing!

In wich offset I must put the code for increase the OW's and pallete's?

i try and try but in all offsets I put it it messes up the rom!
Thanks

And a question.....you will continue the path..adding more specials, more codes, etc..?
Or you will leave it like this?
I will love one of this for emerald :D

Craver
October 13th, 2009, 06:22 AM
Greetings everyone. I have come before you today to present you the project I've been working on for the last month. I call it Pokemon Fire Red Hacked (Tentative Title).

But what is this? Well, this is a small patch that rewrites a part of the main game engine, in order to increase the number of options you have as a ROM hacker. This include several features I've heard people complaining about and requesting, as well as some that just popped in my head.

This is a work in progress, and I aspire for it to become one day a compiled colection of all that only ASM can make possible without having to know ASM to pull it off. So, please, feel free to suggest new features and present your own if you want. You will be credited for it, of course.






Features

Support for over sixty thousand different OWs, as well as access to fourty-six hundred different palettes
Hacks preformed in the Battle system allow you to choose options for your hack, including Status-ridden pokemon, Shinies and creation of swarm events
Access to GBA Hardware function through new Specials that allow you to create Timed events and Button dependent events
All processor math and logic functions available for your variables
Dynamic multichoice boxes that can be changed Runtime, making them limitless
A fully-fledged pokemon decryption system accessed through variables that allow you to read and edit almost all information encrypted and locked away inside your pokemon.
Edited some of the old Specials, allowing for replacing the Old man Pokemon and Ghost Marowak with new pokemon, as well as a new version of the Pokemon Size minigame (the Heracross and Magikarp ones)
Edited the Fossil Special (from pewter museum). Now it can hold 256 different 64 by 64 pixel uncompressed images
Edit what every Behaviour byte does when you press A in front of it(scripts), allowing for things like headbutt trees
Choose where you go when you die, even if it's not a pokecenter.

Also incuded in the pack is a Instruction booklet explaining the functions and some examples of those functions. Some gameplay mechanics are explained there that doesn't apply only to this hack.

This Patch should be aplied first, then any other Rom base that you want. It should have no problem working, but I didn't test them all (as long as they didnt write it over the old scripts, is should be fine). This patch is based on the "clean" patch I gave away some time now, so all scripts, people and Signposts are gone.

First update:
I corrected all the reported bugs, and they seem to work right now. Also, the Swarm-Roam code and the Wild code are compatible with eachother, and both have been added new features.
Added Behaviour byte scripts. You can now run scripts such as the defaults for cabinets and bookshelves on all bytes. Not advised to overwrite the water Bytes, but if you really want to, you have that option.
Created a function that replaces the SethealingPlace determination of your retreat place when you whiteout.

Hey, friend. Would you hack a EMERALD ROM too?

If u think, isn't a bad idea.!

Lyzo
October 13th, 2009, 02:25 PM
I'm not sure if anyone has been having this problem but...
I applied this patch to a clean ROM and started hacking some things to test it, when scripts were implemented I started up the game. I Talked with Prof. Oak, chose to be a male, and then the screen went black when it should go to the naming part.
I first thought that I had an unclean ROM so I tried the ROM without patching it. The naming worked... So I think that because this ASM routine cleans out all the scripts, it also cleans out the naming script, which means that any naming things that happen in game(naming pokemon, yourself, and whatnot) will basically freeze the game in a black screen. If you could fix this, please do. If I'm doing something wrong and really stupid please tell me :P

Darthatron
October 13th, 2009, 09:03 PM
I'm not sure if anyone has been having this problem but...
I applied this patch to a clean ROM and started hacking some things to test it, when scripts were implemented I started up the game. I Talked with Prof. Oak, chose to be a male, and then the screen went black when it should go to the naming part.
I first thought that I had an unclean ROM so I tried the ROM without patching it. The naming worked... So I think that because this ASM routine cleans out all the scripts, it also cleans out the naming script, which means that any naming things that happen in game(naming pokemon, yourself, and whatnot) will basically freeze the game in a black screen. If you could fix this, please do. If I'm doing something wrong and really stupid please tell me :P

I definitely haven't had that problem. Make sure you applied the patch to a clean ROM. Downloaded a different one if needed.

Lyzo
October 14th, 2009, 02:01 AM
Ah, fixed my problem. I'm guessing this patch only works for FireRed (U)? Because it doesn't have the weird name glitch on FireRed (U). :P

Deokishisu
November 15th, 2009, 07:14 PM
I'm having a slight problem, how exactly are the new sethealingplace variables supposed to work in a script? Could you please give an example? I've tried a few things on my own, but I keep ending up at Map 0.0, the link battle map.

By the way, extraordinary work. I've already restarted some of my "little" projects onto your engine and I find your new commands and the expanded capabilities extremely useful. Well done, and thank you!

Liquid Shadow
November 16th, 2009, 02:51 PM
I just tested many of the specials, and they're all awesome! Do you mind just explaining to me how I edit the ini file in OW editor? When I do I can't edit more than the first frame of the sprite.

Thanks a lot man. Any chance of DayandNight and RTC in the future?

Amachi
November 23rd, 2009, 07:56 PM
I'm having a slight problem, how exactly are the new sethealingplace variables supposed to work in a script? Could you please give an example? I've tried a few things on my own, but I keep ending up at Map 0.0, the link battle map.
I was confused at first as well, but it's pretty simple actually.

I just did this for my own hack, but it should be easy to copy for yourself.

sethealingplace 0x1
setvar 0x405a 0x0003 'Map.Bank: 00.03'
setvar 0x405b 0x0005 'X: 05'
setvar 0x405c 0x000c 'Y: 0C'

Just replace the hexidecimal numbers as needed and insert into your script.

Note: sethealingplace 0x1 is for places without a healing machine. If you want to use a PokéCenter, use sethealingplace 0x0.

btw JPAN, when I do get returned to sethealingplace 0x1 after whiting out, the text from the Mom healing script is displayed. Is it because of sethealingplace 0x1 or because of special 0x0?
MOM: [PLAYER]! Welcome home.
It sounds like you had quite an experience.
Maybe you should take a quick rest.
*healing*
and so on.
Anyway can you change that or should I just do it myself through A-Text?
edit: hmm, it seems that A-Text can't edit that bit of dialogue, or at least as far as I see it can't. I MUST FIND ANOTHER PATH.

diegoisawesome
November 25th, 2009, 08:28 AM
I was confused at first as well, but it's pretty simple actually.

I just did this for my own hack, but it should be easy to copy for yourself.

sethealingplace 0x1
setvar 0x405a 0x0003 'Map.Bank: 00.03'
setvar 0x405b 0x0005 'X: 05'
setvar 0x405c 0x000c 'Y: 0C'Just replace the hexidecimal numbers as needed and insert into your script.

Note: sethealingplace 0x1 is for places without a healing machine. If you want to use a PokéCenter, use sethealingplace 0x0.

btw JPAN, when I do get returned to sethealingplace 0x1 after whiting out, the text from the Mom healing script is displayed. Is it because of sethealingplace 0x1 or because of special 0x0?

Anyway can you change that or should I just do it myself through A-Text?
edit: hmm, it seems that A-Text can't edit that bit of dialogue, or at least as far as I see it can't. I MUST FIND ANOTHER PATH.
What so you mean? A-Text edits it perfectly fine. I edited it to make a "healing PC"... before I found this patch.

Amachi
November 25th, 2009, 01:26 PM
What so you mean? A-Text edits it perfectly fine. I edited it to make a "healing PC"... before I found this patch.
Oh hey, it does work. Thanks for the info, I couldn't find it before.

diegoisawesome
November 25th, 2009, 01:40 PM
Oh hey, it does work. Thanks for the info, I couldn't find it before.
Yeah, you're welcome.

By the way, JPAN, why not make a backsprite + frontsprite replacer like the Overworld replacer? It would be useful for my hack and the hacks of many others.

Quickster
November 25th, 2009, 06:14 PM
I have a question about the timer because I dont fully understand it. Say I wanted to use it to simulate a day night script, would I set it and have it check for whatever the designated time to change to night is. If its set does it continue after you save and then close the emulator,or does it only go if you are playing? (sorry if im not clear enough.)

amoliski
November 26th, 2009, 12:03 PM
Where do the flags start? I have a list of them from the base rom, but if you cleared all of the scripts out, that means you killed most of the ingame flags as well, correct?

sonic1
November 26th, 2009, 12:17 PM
Hi:)

Your 2nd update is awesome.That problem of wild poke script was fixed indeed:D

...But i have another problem.I know you changed the behavior of tiles,but i think thats because of that that some tiles don't have the right behavior,or losed it.
More specifically, by example,the ice don't breaks when we step on it. (see the attachement gif to understand better)

There's a fix for it?

Thank you,
~Sonic1~

liuyanghejerry
November 28th, 2009, 05:48 AM
Hi,JPAN,after doing some hacking based on this engine,I have something in doubt:
1.In the explaining of the OW data in map, you said the movement in AM never used.But chack the Cut-Able-Tree,the movement is used.-----I found every OW got 11 in that movement,so it does no used...

2.In the OW data ,there must be some bytes about OW's gender.You can see when talk to a gril OW,the fonts are red,but blue ones when a man .But I didn't see whatever about gender in that table, is it missed?

Banjora Marxvile
November 28th, 2009, 05:54 AM
Hi,JPAN,after doing some hacking based on this engine,I have something in doubt:
1.In the explaining of the OW data in map, you said the movement in AM never used.But chack the Cut-Able-Tree,the movement is used.

2.In the OW data ,there must be some bytes about OW's gender.You can see when talk to a gril OW,the fonts are red,but blue ones when a man or black when Team Rockets.But I didn't see whatever about gender in that table, is it missed?

The text colours is in the scripts in Firered normally, and is editable by Script Editing, not in the OWs.

liuyanghejerry
November 28th, 2009, 06:09 AM
The text colours is in the scripts in Firered normally, and is editable by Script Editing, not in the OWs.
Of course I know that.And please test before you talk.


#dynamic 0x800000

#org @1
lock
faceplayer
message @2 0x2
release
end

#org @2
= SEE MY COLOR.


Complie it and give it to a gril OW and a boy OW,and you'll realize it .

Deokishisu
November 28th, 2009, 05:03 PM
Of course I know that.And please test before you talk.


#dynamic 0x800000

#org @1
lock
faceplayer
message @2 0x2
release
end

#org @2
= SEE MY COLOR.


Complie it and give it to a gril OW and a boy OW,and you'll realize it .

You're right, there must be a gender byte stored somewhere to determine whether it's pink or blue font. But, if all else fails, you could just use the textcolor command. It's cumbersome, but it'll totally work.

And thanks for the sethealingplace help Amachi!

RedYoshi
December 8th, 2009, 08:22 PM
Is there a way to just use the extra palettes with the overworlds that are already in the game? Without having to use the expanded OverWorld hack?

I changed the sprite palette via hex editing, as in the original palette was # 6, and I changed it to #22 in a hex-editor. The sprite looks fine in the overworld editor (it uses the changed palette), however in game it appears as having the original palette (#6)

Nvm, just read about the palette slot thing, I really need to double check these things....

JPAN
December 12th, 2009, 06:50 PM
Sorry for the late replies, everyone.
The ice don't breaks when we step on it.
Even from the time I wrote my document about behaviour bytes that tile has given me a headache. Truth be told, that byte only works on that specific tile in that specific tileset. Never found out why. At the moment, the only fix I can give you is by placing on a step (green) script the following code:
special 0x8f
setmaptile 0x8004 0x8005 0x(ice tile number) 0x0
special 0x8e
end
This will make the tile you are stepping on become the next tile, but you need some way to know what the next tile will be.
In the OW data ,there must be some bytes about OW's gender.You can see when talk to a gril OW,the fonts are red,but blue ones when a man .But I didn't see whatever about gender in that table, is it missed?
To be honest, I didn't even notice that color detail until I read your post. So I searched around, and found no difference between male and female OWs in the data. Most likely, there must be a separate table somewhere detailing that behaviour, or separate set of flags that are checked upon opening a script with that OW's number.

liuyanghejerry
December 13th, 2009, 07:15 AM
-v-Happy to see I made some progress about the data...

By the way,is there any possibilty that help me about this? :http://www.pokecommunity.com/showpost.php?p=5389378&postcount=12768
Looks I have nobody else to ask for help...

Darthatron
December 13th, 2009, 09:25 PM
Would be great if you can look at this post and tell me if any of it is possible: http://www.pokecommunity.com/showpost.php?p=5158760&postcount=72

JPAN
December 14th, 2009, 11:58 PM
By the way,is there any possibilty that help me about this? :http://www.pokecommunity.com/showpost.php?p=5389378&postcount=12768
Looks I have nobody else to ask for help...
First of all, from what I understood, you placed the sprite directly under the first table. Just to make it clear, you need to first insert a pointer in the first table (at 1a2000), and that pointer must point to a table, where each entry is a OW sprite. So, imagine you want to insert the sprite at 0x1A1740. then, you first place at 1a2004 a pointer to another address, like 0x1a9000, and there you place the pointer 0x1a1740. Either way, I wouldn't recommend using those addresses, as all addresses where the old scripts used to be (16000 to 1b0000) may be used in future versions.
Also, in the end, the sprite wouldn't show properly. It appears I forgot to include a very important routine on the last patch. That problem will be solved by next release.
I have 3 questions.

1. Is it possible to add a way to change the graphic of the old man special (of him throwing the pokeball), perhaps using load pointer?

2. Is it possible to add a way to have a script load every time any map is loaded?

3. Is it possible to add a way to have a script load every time the player takes a step?
The first (backsprite switching in general) is giving me a hard time thanks to the pointless reloading of palettes. I'm finishing the backsprite loader for the next release, but nothing using loadPointer or the like, just hardcoded in a table. Do you really need to switch the old man specifically or did you mean a trainer in general(like yourself)?

The second can be done sacrificing the fourth level script, forcing every map to load a specific script. I haven't really looked into it yet, but my guess is that changing the script loading routine, that searches if there is a level script to execute, to always check a new memory or ROM area where there is always a script to be used could be done.

The third is much harder. While I have found several routines that deal with the walking around, I have yet to find the one that calls all the separate others.
There are at least 4 routines where I found steps to work. One is the Daycare, other is the other daycare, the third is the safari zone and the last is the happiness counter. Though it can be done, I have to first find the master routine that makes you walk around.

Darthatron
December 15th, 2009, 12:15 AM
The first (backsprite switching in general) is giving me a hard time thanks to the pointless reloading of palettes. I'm finishing the backsprite loader for the next release, but nothing using loadPointer or the like, just hardcoded in a table. Do you really need to switch the old man specifically or did you mean a trainer in general(like yourself)?

The second can be done sacrificing the fourth level script, forcing every map to load a specific script. I haven't really looked into it yet, but my guess is that changing the script loading routine, that searches if there is a level script to execute, to always check a new memory or ROM area where there is always a script to be used could be done.

The third is much harder. While I have found several routines that deal with the walking around, I have yet to find the one that calls all the separate others.
There are at least 4 routines where I found steps to work. One is the Daycare, other is the other daycare, the third is the safari zone and the last is the happiness counter. Though it can be done, I have to first find the master routine that makes you walk around.

Well... Switching the old man in order to create something similar to Yellow version so I can have an event of Oak catching Pikachu and then the original event where it's meant to be. However, changing the players battle sprite would also be pretty helpful.

I really have nothing to ad about the other two points, but your idea seems to be logical. I hope you can get them both done. :)

onyx79
December 15th, 2009, 02:05 AM
what I've downloaded your engine and it has deleted all of my person OW's also how can I use all of the features in your hacked engine?,how to use the safari zone swarms and etc.

Quickster
December 15th, 2009, 04:32 AM
Well... Switching the old man in order to create something similar to Yellow version so I can have an event of Oak catching Pikachu and then the original event where it's meant to be. However, changing the players battle sprite would also be pretty helpful.



Well, you can always replace the old man in tile molester,for example, see my signature.
If thats sorta what youre aiming for.

Darthatron
December 15th, 2009, 04:49 AM
Well, you can always replace the old man in tile molester,for example, see my signature.
If thats sorta what youre aiming for.

The whole point was so I could switch the sprite in game so I could use the old man and another one. Thanks for the suggestion, but read more carefully next time. ^_^

Tropical Sunlight
December 15th, 2009, 06:43 AM
what I've downloaded your engine and it has deleted all of my person OW's also how can I use all of the features in your hacked engine?,how to use the safari zone swarms and etc.
The patch was supposed to delete every single script in the game.

Read the MS Word file that was included.

liuyanghejerry
December 16th, 2009, 06:34 AM
First of all, from what I understood, you placed the sprite directly under the first table. Just to make it clear, you need to first insert a pointer in the first table (at 1a2000), and that pointer must point to a table, where each entry is a OW sprite. So, imagine you want to insert the sprite at 0x1A1740. then, you first place at 1a2004 a pointer to another address, like 0x1a9000, and there you place the pointer 0x1a1740. Either way, I wouldn't recommend using those addresses, as all addresses where the old scripts used to be (16000 to 1b0000) may be used in future versions.
Also, in the end, the sprite wouldn't show properly. It appears I forgot to include a very important routine on the last patch. That problem will be solved by next release.

O.O...Next release....Seems I have to make my hack beta at that time...

By the way,is it possible that make a trainer run a script other than trainerbattle when he sees you?

Haku.
December 17th, 2009, 01:50 AM
does anyone know how do i make a new pallete pointer for an overworld?
I read the read me but still i don't understand a thing.
How do i repoint a pallete?

Younegai
December 22nd, 2009, 01:35 PM
So wait...

Is this the ASM tool? I heard someone talking about how ASM can edit the intro movie sequence. Or are these tools just extensions of ASM?

JPAN
December 23rd, 2009, 07:51 PM
Posting here to tell you all that the new version is now available on the first post. Lot's of changes were made there, but some new features are really worth talking about, and are too big for that post space.

First, Dynamic OverWorlds. This will allow you, by using variables 0x4080 to 0x408f to create decoration-like Overworlds, that can be changed by scripts at any time without needing to create tons of them at A-Map and placing them hidden at the top of the map. All you need to do is place their OW number as one between 0 to f and then place in the right unknown byte below the picture number (table number) 0xFF, and then just change the respective variable (0x4080 for OW number 0, 0x4081 for OW number 2, etc.) the number of the table and sprite number you wish to use.
What can this be used for? For instance, simple randomized trainer rooms or Secret Bases.

Second we now have full trainer customization. Everything from the trainer card picture to the backsprite and OW can be selected in runtime by pushing the right buttons (or, in this case, variables). Details on how it works are found in the manual.

Next, we have Walking scripts. This new function allows you to activate a script simply by walking around. These scripts are very versatile, and are activated whenever there isn't a step-on script or warp in the way, as well as a EGG hatching or VS seeker running out. This Script allows most people to implement several random events that could before only be activated when a player crossed a map line, or by using up the stored steps of the VS seeker specials.
Examples of what you can do with this are presented in the manual, as well as details of its functioning. But combined with the getTileBehaviour special, also added in this entry, you can easily mimic and replace behaviour bytes and create your own step-on scripts based on past events (this was the closest I got to recover the ice behaviour lost in the past entry. I will fix it, but for now this is a good replacement).
Downsides to this code is that some low-level walking events, such as Random pokemon battles, are disabled. But a fix is given in the manual, using another of the specials developed in this delivery, the Random Wild Battle Generators the game uses, in conveinent Special format.

I hope you enjoy this delivery, and that it may help you with your hacks. Any bug or questions, post them here or PM me.

RedYoshi
December 23rd, 2009, 08:13 PM
...Second we now have full trainer customization. Everything from the trainer card picture to the backsprite and OW can be selected in runtime by pushing the right buttons (or, in this case, variables). Details on how it works are found in the manual.


Wow! The trainer customization thing sounds awesome! This adds lots of possibilities! Is it safe to patch over a Rom that has been patched with the previous version? I kinda don't feel like re-doing everything in my hack again...

Darthatron
December 23rd, 2009, 08:22 PM
You update is very good, but I was hoping for something do change the map tiles based on variables, much like your "Get Tile Number" function, but rather setting it.

JPAN
December 23rd, 2009, 08:49 PM
You update is very good, but I was hoping for something do change the map tiles based on variables, much like your "Get Tile Number" function, but rather setting it.
If you are talking about setting the tiles based on a position stored in a variable, it already does that, using the Setmaptile command.
In SetMapTile, the three first arguments are able to be variables. for instance, you may use this command:
Special 0x8f
Setmaptile 0x8004 0x8005 0x(your var here) 0xC
special 0x8e
To change the tile you are stepping on to the value contained inside your variable. This is already provided with the game code.
If you are talking about changing behaviour and background values, the new specials and codes I introduced allow you to simulate that to an extent.

Darthatron
December 23rd, 2009, 09:08 PM
If you are talking about setting the tiles based on a position stored in a variable, it already does that, using the Setmaptile command.
In SetMapTile, the three first arguments are able to be variables. for instance, you may use this command:
Special 0x8f
Setmaptile 0x8004 0x8005 0x(your var here) 0xC
special 0x8e
To change the tile you are stepping on to the value contained inside your variable. This is already provided with the game code.
If you are talking about changing behaviour and background values, the new specials and codes I introduced allow you to simulate that to an extent.
I had no idea they could be variables (apparently neither did a few other people I asked last night), thanks, that makes me life much easier. Keep up the good work. And thanks again.

EDIT: Is it just me or does the variable 0x800C no longer contain which way the player is facing?

diegoisawesome
December 24th, 2009, 08:20 AM
JPAN, I want to make a door that moves the camera up when walking into it, much like the effects of walking into the Sprout Tower and others in HeartGold/SoulSilver. How could this be accomplished using your tile attribute hack, as I do not believe it explains how to make a walking-into script.

0m3GA ARS3NAL
December 24th, 2009, 12:29 PM
JPAN, I want to make a door that moves the camera up when walking into it, much like the effects of walking into the Sprout Tower and others in HeartGold/SoulSilver. How could this be accomplished using your tile attribute hack, as I do not believe it explains how to make a walking-into script.

Well, instead of using a regular warp event in A-Map, you could have an event that does everything for you.
There is a scripting command that opens and closes doors, with it, you could;
Have the door open
Have the player walk into the door (And disappear)
Have the door close
Have the screen continue to move up
And Finally, warp!

diegoisawesome
December 24th, 2009, 01:06 PM
Well, instead of using a regular warp event in A-Map, you could have an event that does everything for you.
There is a scripting command that opens and closes doors, with it, you could;
Have the door open
Have the player walk into the door (And disappear)
Have the door close
Have the screen continue to move up
And Finally, warp!
Yes, I already know how to do that, but I want to make it look nice. I think the best way is to make it a walk-into event.

0m3GA ARS3NAL
December 24th, 2009, 01:29 PM
Yes, I already know how to do that, but I want to make it look nice. I think the best way is to make it a walk-into event.

Whatever floats your boat I suppose.

mdb31
December 24th, 2009, 01:57 PM
Hi I know this is probably a really stupid question but I am completely confused. How exactly do you use this hacked rom? Do you load it instead of the original fire Red? I keep reading how you are supposed to "patch" the original ROM but I have no idea how to do this or what that means. If someone would be kind enough to briefly explain to me what I need to do it would be greatly appreciated.

Sorry for being a noob,

Mdb31

Edit: Nevermind I figured it out. For anyone who had a similar question, you have to download a program called ips.exe (google it) to patch ROMS.

liuyanghejerry
December 24th, 2009, 09:31 PM
Posting here to tell you all that the new version is now available on the first post. Lot's of changes were made there, but some new features are really worth talking about, and are too big for that post space.


Oh,this is really the best Chistmas gift for me,thank you,JPAN!
I think I'll devote myself how to use the new features several days.
By the way,is it possible to make a script while a trainer sees you but not a tranierbattle script?

JPAN
December 25th, 2009, 08:31 AM
Oh,this is really the best Chistmas gift for me,thank you,JPAN!
I think I'll devote myself how to use the new features several days.
By the way,is it possible to make a script while a trainer sees you but not a tranierbattle script?
While I am working on it, it wasn't ready for christmas release, so I decided to include it on next release. Curiously enough, another of the "tile specials", that finds if a person is looking at a given location in the map, at a distance set by the view radius (that would allow you to replace the trainer scripts for one single walking script) was also not finished in time. But don't worry, for next release should solve the "patching erase my work" problem.

diegoisawesome
December 27th, 2009, 12:29 PM
I am trying to fix a few bugs I accidentally made in my game. I would like to see where the dada overwrites the main engine for a few of them, but it never says what or where you have to patch any of the specials to point to your code.

helloNL
December 29th, 2009, 03:31 PM
what i understand is that you now can add more pallettes sprites pokemon trainers
but how do we do that?

raupy
December 30th, 2009, 12:31 AM
Argh, for english ROMs...

Please make it compatible for German ROMs!

This is a great work!

mfg
raupy

Quil
December 31st, 2009, 03:34 PM
Somehow to the patch ****s the dynamic OW 240.. When I encounter it in my screen the game crashes, and at a normal rom i see the basic player ow (nothing set)
This is the way I used the dynamicly generate trainers, but it bugs now :C fffuu

HackChu
January 2nd, 2010, 03:48 PM
This is nice but I don't know how to use it and the doc that this came with comes up with a error saying that it can't do some conversion.

"Unable to load graphics conversion filter.Continue with document conversion?" was the error I get.

So when I hit yes it keeps coming up until I press no, please help...

0m3GA ARS3NAL
January 2nd, 2010, 04:30 PM
This is nice but I don't know how to use it and the doc that this came with comes up with a error saying that it can't do some conversion.

"Unable to load graphics conversion filter.Continue with document conversion?" was the error I get.

So when I hit yes it keeps coming up until I press no, please help...

Yeah, the file is a Word File, you'll need to install Microsoft Word, or Open Office (Open Office is free)
Google is your friend.

helloNL
January 2nd, 2010, 05:05 PM
he sais in other words that he uses word or openoffice

HackChu
January 2nd, 2010, 05:34 PM
Yeah I understood thanks OA!

LiekingOfMudkipz
January 5th, 2010, 09:53 AM
It's not explained I dont think for your multichoice boxes on how to lead the script somewhere else after clicking on one of the options. Where would I put the

if 0x1 goto @XXXXX

Or something else for each choice ? I need it desperatly and if I get help on how to do this then I could use the hacked engine in the way I wish and it';s a big help already! Thanks.

Deokishisu
January 9th, 2010, 10:50 AM
It's not explained I dont think for your multichoice boxes on how to lead the script somewhere else after clicking on one of the options. Where would I put the

if 0x1 goto @XXXXX

Or something else for each choice ? I need it desperatly and if I get help on how to do this then I could use the hacked engine in the way I wish and it';s a big help already! Thanks.

setvar 0x8006 0x0
loadpointer 0x0 @firstchoice 'your first multichoice text
special 0x25
setvar 0x8006 0x1
loadpointer 0x0 @secondchoice 'your second multichoice text
special 0x25
multichoice 0x0 0x0 0x20 0x0 'the two 0's, and then the position x and y
compare LASTRESULT 0x0 'if 1st choice goto
if 0x1 goto @firstchosen
compare LASTRESULT 0x1 'if 2nd choice goto
if 0x1 goto @secondchosen
compare LASTRESULT 0x7F 'if B was pressed goto
if 0x1 goto @Bpressed

^short example for you, includes somewhere to go if B was pressed.


My question is regarding the walking scripts. I'm not sure how to compile them. Do I compile a call command to my walking script at 0x1a4e2c? But then what do I do with var 0x407e? I'm just generally confused with this one. I'm trying to do the secondary "bag" thing suggested in the readme for a pseudo-PokeGear-like thingy. By pressing both L+R to activate it. I just don't know how to go about doing it.

JPAN
January 9th, 2010, 07:16 PM
My question is regarding the walking scripts. I'm not sure how to compile them. Do I compile a call command to my walking script at 0x1a4e2c?
Compiling a script to work with the walking scripts is the same as compiling it to work anywhere else. just put it on the ROM somewhere. Afterwards, change the 0s at 0x1a4e2c to the pointer to the script location.
But then what do I do with var 0x407e?
Var 0x407e is the activate this script variable. If you want the script you just placed at 0x1a4e2c to be active, you must set the variable to 1, in the normal variable-setting fashion. Otherwise it won't run.
I'm trying to do the secondary "bag" thing suggested in the readme for a pseudo-PokeGear-like thingy. By pressing both L+R to activate it. I just don't know how to go about doing it.In here, just do it like if you were about to create a simple talk-to script that did that. So, my guess is that it would have a key check followed by a call if true to the script of the said function. Just don't forget about the small detail about the wild battles, as that script sounds like the kind that never turns off, and to set the help option off, as it will always activate before the script.

Deokishisu
January 9th, 2010, 09:41 PM
Thanks JPAN! You really cleared a lot up for me. And thank god you reminded me about the wildpokemon bit, I would've been poking around forever before I realized what I missed. ^_^

Oh, and I have a quick suggestion for the next release. I'm not actually sure if this is possible now, because I haven't fiddled around with it, but how about the ability to disable key presses? During timed minigames and such, having the player able to use the start menu wouldn't be the greatest thing ever. And perhaps disabling some things on the start menu itself. Sometimes we wouldn't want the player to save, (such as that "Erase Party Pokemon Special" that would wipe the Pokemon out of memory between saves), use the bag, or look at their Trainer Card. I also wouldn't mind a special that would disable and enable the Help Menu itself. It just seems cumbersome and annoying.

Thanks again for your help JPAN, and great work!

colcolstyles
January 9th, 2010, 10:21 PM
Oh, and I have a quick suggestion for the next release. I'm not actually sure if this is possible now, because I haven't fiddled around with it, but how about the ability to disable key presses? During timed minigames and such, having the player able to use the start menu wouldn't be the greatest thing ever. And perhaps disabling some things on the start menu itself. Sometimes we wouldn't want the player to save, (such as that "Erase Party Pokemon Special" that would wipe the Pokemon out of memory between saves), use the bag, or look at their Trainer Card. I also wouldn't mind a special that would disable and enable the Help Menu itself. It just seems cumbersome and annoying.

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.

Darthatron
January 9th, 2010, 10:42 PM
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.

[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. (http://www.pokecommunity.com/showpost.php?p=3131702&postcount=1)

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

00 > Help
01 > LR
02 > L=A

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

Deokishisu
January 10th, 2010, 09:15 AM
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.

iTeruri
January 11th, 2010, 12:33 PM
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
January 11th, 2010, 01:18 PM
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.

#dynamic 0x7360CC
#org @start
call @realstart
end

#org @realstart
checkflag 0x106
if 0x0 goto @endit
special2 0x8006 0x2e
compare 0x8006 0x3
if 0x1 goto @menu
special 0x8f
special2 0x800d 0x7f
compare 0x800d 0x1
if 0x1 goto @grass
compare 0x800d 0x2
if 0x1 goto @water
release
end

#org @grass
special 0x97
release
end

#org @water
special 0x98
release
end

#org @endit
release
end

#org @menu
lock
checkflag 0x107
if 0x1 call @GammaMenu
checkflag 0x108
if 0x1 call @DeltaMenu
checkflag 0x109
if 0x1 call @OmegaMenu
setvar 0x8006 0x0
loadpointer 0x0 @ALPHAC
special 0x25
checkitem 0x35 0x1
if 0x1 call @Phero
checkitem 0x16A 0x1
if 0x1 call @Seeker
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @choseALPHA
if 0x1 call @chosePhero
if 0x2 call @choseSeeker
release
end

#org @chosePhero
release
end

#org @choseSeeker
release
end

#org @GammaMenu
setvar 0x8006 0x0
loadpointer 0x0 @GAMMAC
special 0x25
checkitem 0x35 0x1
if 0x1 call @Phero
checkitem 0x16A 0x1
if 0x1 call @Seeker
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @choseGAMMA
if 0x1 call @chosePhero
if 0x2 call @choseSeeker
release
end

#org @DeltaMenu
setvar 0x8006 0x0
loadpointer 0x0 @DELTAC
special 0x25
checkitem 0x35 0x1
if 0x1 call @Phero
checkitem 0x16A 0x1
if 0x1 call @Seeker
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @choseDELTA
if 0x1 call @chosePhero
if 0x2 call @choseSeeker
release
end

#org @OmegaMenu
setvar 0x8006 0x0
loadpointer 0x0 @OMEGAC
special 0x25
checkitem 0x35 0x1
if 0x1 call @Phero
checkitem 0x16A 0x1
if 0x1 call @Seeker
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @choseOMEGA
if 0x1 call @chosePhero
if 0x2 call @choseSeeker
release
end

#org @Phero
setvar 0x8006 0x2
loadpointer 0x0 @PheromonesText
special 0x25
return

#org @Seeker
setvar 0x8006 0x1
loadpointer 0x0 @VSSeekerText
special 0x25
return

#org @choseALPHA
msgbox @ALPHAsbanter MSG_NORMAL
setvar 0x8006 0x0
loadpointer 0x0 @MapChoice
special 0x25
checkitem 0x36 0x1
if 0x1 call @haveradio
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @chosemap
if 0x1 call @choseradio
release
end

#org @haveradio
setvar 0x8006 0x1
loadpointer 0x0 @Radiochoice
special 0x25
return

#org @chosemap
special 0xFB
release
end

#org @choseradio
setvar 0x8006 0x0
loadpointer 0x0 @radiochoice1
special 0x25
setvar 0x8006 0x1
loadpointer 0x0 @radiochoice2
special 0x25
setvar 0x8006 0x2
loadpointer 0x0 @radiochoice3
special 0x25
setvar 0x8006 0x3
loadpointer 0x0 @radiochoice4
special 0x25
setvar 0x8006 0x4
loadpointer 0x0 @radiochoice5
special 0x25
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @choseradio1
if 0x1 call @choseradio2
if 0x2 call @choseradio3
if 0x3 call @choseradio4
if 0x4 call @choseradio5
release
end

#org @choseradio1
playsong 0x157 0x0
release
end

#org @choseradio2
playsong 0x157 0x0
release
end

#org @choseradio3
playsong 0x157 0x0
release
end

#org @choseradio4
playsong 0x157 0x0
release
end

#org @choseradio5
playsong 0x157 0x0
release
end

#org @choseGAMMA
msgbox @GAMMAsbanter MSG_NORMAL
setvar 0x8006 0x0
loadpointer 0x0 @MapChoice
special 0x25
checkitem 0x36 0x1
if 0x1 call @haveradio
checkflag 0x820
if 0x1 call @havebadge
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @chosemap
if 0x1 call @choseradio
if 0x2 call @choseHM
release
end

#org @havebadge
setvar 0x8006 0x2
loadpointer 0x0 @HMchoice
special 0x25
return

#org @choseHM
setvar 0x8006 0x0
loadpointer 0x0 @Flash
special 0x25
checkflag 0x821
if 0x1 call @cancut
checkflag 0x825
if 0x1 call @canrocksmash
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @useflash
if 0x1 call @usecut
if 0x2 call @userocksmash
release
end

#org @cancut
setvar 0x8006 0x1
loadpointer 0x0 @Cut
special 0x25
return

#org @canrocksmash
setvar 0x8006 0x2
loadpointer 0x0 @RockSmash
special 0x25
return

#org @useflash
release
end

#org @usecut
release
end

#org @userocksmash
release
end

#org @choseDELTA
msgbox @DELTAsbanter MSG_NORMAL
setvar 0x8006 0x0
loadpointer 0x0 @MapChoice
special 0x25
checkitem 0x36 0x1
if 0x1 call @haveradio
checkflag 0x820
if 0x1 call @havebadge
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @chosemap
if 0x1 call @choseradio
if 0x2 call @choseHM
release
end

#org @choseOMEGA
msgbox @OMEGAsbanter MSG_NORMAL
setvar 0x8006 0x0
loadpointer 0x0 @MapChoice
special 0x25
checkitem 0x36 0x1
if 0x1 call @haveradio
checkflag 0x820
if 0x1 call @havebadge
multichoice 0x0 0x0 0x20 0x1
if 0x0 call @chosemap
if 0x1 call @choseradio
if 0x2 call @choseHM
release
end

#org @ALPHAC
= ALPHA

#org @GAMMAC
= GAMMA

#org @DELTAC
= DELTA

#org @OMEGAC
= OMEGA

#org @PheromonesText
= PokéPheromones

#org @VSSeekerText
= VS. Seeker

#org @ALPHAsbanter
= Ugh, yes?

#org @MapChoice
= Map

#org @RadioChoice
= Radio

#org @radiochoice1
= PLACEHOLDERPLACE Station

#org @radiochoice2
= PLACEHOLDERPLACE Station

#org @radiochoice3
= PLACEHOLDERPLACE Station

#org @radiochoice4
= PLACEHOLDERPLACE Station

#org @radiochoice5
= PLACEHOLDERPLACE Station

#org @GAMMAsbanter
= Something you need?

#org @HMChoice
= HMs

#org @Flash
= Flash

#org @Cut
= Cut

#org @RockSmash
= Rock Smash

#org @DELTAsbanter
= How can I help?

#org @OMEGAsbanter
= Can I assist you?

JPAN
January 11th, 2010, 02:08 PM
[QUOTE=Deokishisu;5467551]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.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
January 11th, 2010, 03:04 PM
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.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
January 14th, 2010, 03:46 AM
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
January 18th, 2010, 09:12 AM
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
January 18th, 2010, 06:14 PM
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:

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:
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.

liuyanghejerry
January 18th, 2010, 06:21 PM
>< 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.

Pogeygothaxed
January 18th, 2010, 07:03 PM
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
January 18th, 2010, 09:07 PM
>< 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
January 18th, 2010, 10:33 PM
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.

liuyanghejerry
January 19th, 2010, 06:20 AM
- -||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
January 19th, 2010, 11:10 AM
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.

Deokishisu
January 19th, 2010, 12:42 PM
JPAN, I think I love you. There are no other words to describe this.

>Dante<
January 19th, 2010, 12:56 PM
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
January 19th, 2010, 01:05 PM
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:
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.

iTeruri
January 19th, 2010, 01:25 PM
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
January 19th, 2010, 03:48 PM
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:
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
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).

heatransoul
January 19th, 2010, 04:19 PM
HOLY CHEESE!
This is amazing! I might even consider starting a new hack!

Deokishisu
January 19th, 2010, 05:21 PM
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.

So I could start a pedometer wherever I wanted for other step-limited minigames and such? Awesome! Thanks for clearing that up.

And regarding the menu thingy - Ugh I'm so bad at this! Thank you for explaining that. I know enough scripting to make any "standard Pokemon-esque" ingame event, but when it comes to some of these special and special2 commands, and the extras and such that I want to include that branch out farther than what Nintendo intended, there's just alot to work out! Which is part of the reason I was so excited when this got released. Anyway, like always, your amazingness cannot be expressed in mere words. Thanks!

>Dante<
January 20th, 2010, 06:12 AM
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.
Honestly? I'm interested only to the answer of JPAN.. not to yours.
isn't my intention to minimize the job of JPAN.

to ask is permissible..
to answer is courtesy..

Full Metal
January 20th, 2010, 02:40 PM
JPAN, (i thought i saw you asking about the design of ur program).
IMO its kinda messy...like to scrambled, its ok if it doesn't all fit inside a nice space, just try and make it more...organized? I'm not being picky, i'm perfectly fine with the way it is, but i thought i read somewhere you asking for an opinion (ima too lazy to go back to first page xD FAIL) so yea...just my opinion though, I'm certainly glad you made a tool to apply it though ^^

Quil
January 21st, 2010, 04:57 AM
JPAN, maybe you should add an option for variables more then 16 bit. 65535 isn't that much, and it ruins my bank script pretty hard xD And there are probably more cases when the 65k limit is verrrry annoying :C
I don't know if it is possible, but that would be an awesome addition :3

Darthatron
January 21st, 2010, 05:01 AM
JPAN, maybe you should add an option for variables more then 16 bit. 65535 isn't that much, and it ruins my bank script pretty hard xD And there are probably more cases when the 65k limit is verrrry annoying :C
I don't know if it is possible, but that would be an awesome addition :3

Something like that would require a total overhaul of how variables work. I doubt he will do it for you, but if you need to use higher values your best bet would be to take a look at ASM - a bank script in ASM would be much better, at least.

HackMew
January 21st, 2010, 05:50 AM
Something like that would require a total overhaul of how variables work. I doubt he will do it for you, but if you need to use higher values your best bet would be to take a look at ASM - a bank script in ASM would be much better, at least.

Not to say there are not 65535 variables either...
Besides, there are thousands of them anyway. I don't see how that can be very annoying.

hashtag
January 21st, 2010, 08:28 AM
I'm going to go ahead and move this to Research & Development, I feel that this is innovative enough to fulfil the needs of that section more.

Quil
January 21st, 2010, 08:36 AM
Not to say there are not 65535 variables either...
Besides, there are thousands of them anyway. I don't see how that can be very annoying.

I was talking about the limit of 65k in value. There are enough free variables to be used, that isn't the problem =P

And @ Darth, about ASM.. It costs pretty much time to learn ASM, and because of personal reasons, I don't have much time. I already figured out myself that ASM is a better solution..

HackMew
January 21st, 2010, 08:45 AM
I was talking about the limit of 65k in value. There are enough free variables to be used, that isn't the problem =P

And @ Darth, about ASM.. It costs pretty much time to learn ASM, and because of personal reasons, I don't have much time. I already figured out myself that ASM is a better solution..

Whether you want to have more variables, or increase their value range... both require quite some ASM.
It would be definitely easier to reserve some particular variables and use them in pairs, reaching a range limit of 4294967295.

mindfreak
January 23rd, 2010, 03:48 AM
I'm really confused with the overworld stuf.
If I make a new pointer here V
B0FD3908 B0FF3908 B0FE3908 New pointer
What table is it?
(The manual said that only one was occupied but there are already 3 pointers. so is it 0x1 or 0x3)

And how can I display the new overworlds ingame?
(I tried by editing the event data in hexworkshop but failed.)

iTeruri
January 23rd, 2010, 08:50 AM
Wait, so how does the item hack work?
I have a script compiled at 0x900000. I'm using Item Editor by Thethethethe. Where should I enter the offset? Because I can't find where the item table is located in the rom...

JPAN
January 23rd, 2010, 12:23 PM
I'm really confused with the overworld stuf.
If I make a new pointer here V
B0FD3908 B0FF3908 B0FE3908 New pointer
What table is it?
(The manual said that only one was occupied but there are already 3 pointers. so is it 0x1 or 0x3)
My bad. I accidentaly left some debug table addresses in the main table. Remove them and place your pointer on the second slot (b0ff3908), and delete the third. In that case, it will be 1.
If you wanted to keep the tables, then it would be 0x3, as you suggested.
And how can I display the new overworlds ingame?
(I tried by editing the event data in hexworkshop but failed.)
Look at the trainer flag hack area of the manual. I placed a picture there that explains the new data in the A-Map person event. Simply change the rightmost unknown byte, right below the picture number, to the table number. The change will not appear in A-Map, but in game it will be your sprite.

Wait, so how does the item hack work?
I have a script compiled at 0x900000. I'm using Item Editor by Thethethethe. Where should I enter the offset? Because I can't find where the item table is located in the rom...
The item table starts at 0x3db028, and ends at 0x3df09c. If you can, after editing the Item in the Item editor, Open a table file in your hex editor and search for your item name, and it should pop up. If you can't open a table file, multiply the item number by 0x2c and add it to the base address.
When you reach the item, goto Item_adddress+ 0xE and make sure the item number is the same there as you input it (item 0x102 should have 02 01 in there). Then go to Item_address + 0x1b and make sure the value is 4. In Item_address + 0x1c, place the routine pointer (21 15 16 08 in the patch version) and in Item_address + 0x28 place the script pointer (00 00 90 08 in your case). Save, and it's good to go.

Right now I am working on increasing the amount of money you can have to One billion minus 1. And I've read the "increase the variables capacity", and I Have already planned to create a group of special functions to let the user treat a group of variables as a single one, but all those operations are on the user's risk, and must keep under consideration the range he wishes to use. As such, I will provide said functions on the next release, and should include add and subtract functions, buffer number functions for 32 bit, and support for more digits dynamically.

And the increase money hack is (apparently) complete! You can now hold up to 999 999 999 money! That's nearly 1000 times more money! If you don't want to wait for the next release to test it, know this was acomplished just by replacing 7 bytes, and here's how to do it:
at 0809fdd4 replace |3f 42 0f 00| for |ff c9 9a 3b|; (999999 for 999999999)
at 0808a006, 0809fe52 and 0809fe62, replace that one byte from |06| for |09|. (6 digit display for 9 digit display)
Done, you should be able to have that much money now.

EDIT: As this was moved to the Research and Development forum, I feel that now I can directly ask for opinions on future updates without going Off-topic. So, I will tell you what's going on and you tell me what you would like me to do.
Because Special editing is limitative (special is a 5 byte command tops, and so it cannot receive direct input through the script. Not that's impossible, just very unpractical), I've been looking at the commands in the scripting engine, in order to find how stuff works and where the "free" commands are. And I was surprised to find that, from Ruby to Fire Red, some commands changed their use dramatically, or simply went and did some stuff we are not expecting. One example is the "copyVarIfNotZero" command, that In Fire Red copies a variable, even if it is zero. The correct name, for it's usage, would be something like "copyVarOrSetIfNotVar", as there what it does is copy a variable if both words given are real variables (in the 0x4000-0x8013 range), and set the first variable to the second value if not a real variable (values up to 0x3fff). Copyvar, in the other end, simply is error-prone in this case. trying to write in illegal memory if the value is not a variable. So, in this case, should I try and correct the Copyvar method to be bug-free and make it so Copyvarifnotzero does what we expected it to do, or let it be?
Same is true for some other commands, such as addvar and subvar, that should be identical, but subvar allows the use of two variables, while addvar does not. Should I try and fix that too?
I will introduce a concept now. A "fake" command would be a command where the arguments that should be used (according with the script compilers such as XSE) are not the real argument numbers. For instance command 0x96 (unnamed as of yet) in Ruby takes 2 bytes as arguments. In FR, it takes no arguments, as in there it's a simple nop command. The opposite could also be true: commands that use more bytes than we thought they would. Stuff like startContest, which have no use in FR, and occupies only one byte (correct in both versions) could be replaced with a command that receives data and consumes bytes, in order to make it easier to use certain commands (such as the VarMath special, that even I have trouble using). As that would cause some confusion in the script compilers code (there would have to be two separate set of Fire Red commands, one static and one dynamic that accompanied this hack), we could use a technique that Gamefreak used with its Trainerbattle command, where it can ignore certain bytes as to get specific information. As such, something like VarMaths multiply variables could be used like this:
#alias startContest mulVar
#org @start
mulvar
copyvar 0x8000 0x8001
end

Where the copyvar is nothing more than a holder for the two variables to multiply, and its opcode (0x19) is discarded, and would never happen. We would use it only to mantain the integral structure of the code, so decompiling this script wouldn't turn into something wierd that no-one could read.

So, with this concept in mind, should I in future hacks (and in corrections from older ones), allow "fake" commands to take place or keep with the current "setvar argument_var value" ... "special 0xNUM" format?

HackMew
January 24th, 2010, 02:26 AM
Just out of curiosity, what's the point of having SO much money? It would take ages just to reach that limit. I guess 999999 is a good amount IMHO. Especially in my hack where I let mom save some money for the player. Special editing may be limitative, but breaking commands compatibility is worser. Backward compatibility has already been broken (which is the main reason I don't like this hacked engine), basically. But that's not the point. Let's just not forget there's always callasm. Sure, it's not as comfy as specials, but I think I don't need to remind you that only FR/LG have many nopped specials. Yes, I do know it's called "Fire Red Hacked Engine". But porting it to other games it someday is always a possibility that should at least be considered.

diegoisawesome
January 24th, 2010, 08:38 AM
Backward compatibility has already been broken (which is the main reason I don't like this hacked engine), basically.
HackMew, just out of curiosity, what do you mean by "backwards compatibility"?
And, to JPAN, I think that the new way would probably be more confusing than the current way, so just keep it as-is.

P.S. Using the hack tool, should I redo inserting all commands, or just insert the new ones? Or should I simply use the patch?
[BTW, you should start using HackMew's new tool, A-Ptch, as it has backwards patching compatibility.

HackMew
January 24th, 2010, 08:49 AM
HackMew, just out of curiosity, what do you mean by "backwards compatibility"?

I'll give you a little example: the sethealingplace command. In the hacked engine, it has changed and now requires three variables to be set in order to work properly.

diegoisawesome
January 24th, 2010, 08:55 AM
I'll give you a little example: the sethealingplace command. In the hacked engine, it has changed and now requires three variables to be set in order to work properly.
Oh, so you meant "script backwards compatiblility, as scripts from the old/new couldn't go on to the new/old"? I see.

HackMew
January 24th, 2010, 08:58 AM
Oh, so you meant "script backwards compatiblility, as scripts from the old/new couldn't go on to the new/old"? I see.

That was just an example. Backward compatibility is anything about structures, specials, scripting commands etc. etc. For example, when I implemented the D/P evolutions in a FR ROM, I did not change the original structure on purpose (as Eevee gained 2 evolutions, the old structure would not have been enough, theoretically) and used a workaround just for Eevee.

diegoisawesome
January 24th, 2010, 09:03 AM
Ah, I see.
Also, I sent you a PM which would have been off-topic here. Check your inbox.

Deokishisu
January 24th, 2010, 11:39 AM
Hey JPAN, just thought I'd stop by again and give you some feedback and two suggestions for the next release.

I also think you should leave that the way it is. It's more complicated, and the current way works fine imo.

And for the suggestion, now that a RTC has been implemented into FR successfully, it may be time to step it up on the berry front. My suggestion is to add the R/S/E berry system into your engine, utilizing the RTC by interdepth and ZodiacTheGreat. The growing cycles for each berry can be found on each berry's individual Bulbapedia page, along with other miscellaneous information you may need regarding how it should turn out.

And here's a totally outlandish one that I personally wouldn't really need, and would probably take insane amounts of work that I really don't want to put you through, but might be something to keep in mind. Pokemon Contests from R/S/E? I just thought people might want that ported to FR. I don't really care either way, but it's something to consider.

JPAN
January 24th, 2010, 03:42 PM
Just out of curiosity, what's the point of having SO much money? It would take ages just to reach that limit. I guess 999999 is a good amount IMHO.
In a normal pokemon game, the usual limit is perfectly good. But for some other types of hack, like simulator-based, the 1 million limit is reached pretty fast. Here, I think of projects that rely heavily on money to work, where you want the player to be rewarded by good money management, and where the player can produce items. An example would be a simulator based on a pokemon game, where real-estate purchases (buy a house, buy terrain) can easily overcome that limit.

Special editing may be limitative, but breaking commands compatibility is worser. Backward compatibility has already been broken (which is the main reason I don't like this hacked engine), basically. But that's not the point. Let's just not forget there's always callasm. Sure, it's not as comfy as specials, but I think I don't need to remind you that only FR/LG have many nopped specials. Yes, I do know it's called "Fire Red Hacked Engine". But porting it to other games it someday is always a possibility that should at least be considered.
In this case, I partially agree with you. One of the things I tried the hardest is to reduce the changes in-game, in order to keep the old game systems and functions working as they were intended. That is why I always search around for unused bytes on structures in the game to place them on. The sethealingplace one also annoys me a bit, so I made a few fixes and now mimic the old code if no values are placed in the variables. Next release should fix it. If you know of any other that messes things the old game should do, feel free to tell me so I can fix it.
Lastly, about the specials, I used these in order to simplify usage. The main objective of this hack is to provide a number of new features with simplicity of use. The main reason I try to mantain retro-compatibility is so that anyone who uses this hack doesn't need to learn new info that conflicts with the original games, and so that we can use the good tools out there we used to use.

And for the suggestion, now that a RTC has been implemented into FR successfully, it may be time to step it up on the berry front. My suggestion is to add the R/S/E berry system into your engine, utilizing the RTC by interdepth and ZodiacTheGreat. The growing cycles for each berry can be found on each berry's individual Bulbapedia page, along with other miscellaneous information you may need regarding how it should turn out.

And here's a totally outlandish one that I personally wouldn't really need, and would probably take insane amounts of work that I really don't want to put you through, but might be something to keep in mind. Pokemon Contests from R/S/E? I just thought people might want that ported to FR. I don't really care either way, but it's something to consider.
Actually, the only reason I didn't implement a berry growth system yet is because of three simple things.
First, I have no way to display the berry trees in their growth stage. Berry trees aren't typical sprites, so there is no way to simply copy them and paste them on a new OW table. And I have near zero graphical skills, so creating berry trees from scratch would be nigh impossible.
Second, the in-game costs. You would need a variable for each berry patch, plus one other variable for all the data relating to current growth time, growth stage... I've made some studies in this matter, and could get 256 berry patches in the same way as the Dynamic OW switches, by using a compressed data system that would use the last 6 or 7 bits of the variable contents as the entry in that table (as there are less than 63 berries, if you want up to 127 berries, the growth time had to be sacrificed). And would require a secondary data table, to keep all the growth time tables, types of berries, and other data.
Third, I don't really believe in the RTC mechanics. I appreciate the work made by interdepth, as i checked it out and it's quite good, but I always disliked the fact you had to play at a certain time to work with it. Also, I would have no way to test anything with RTC, as my computer seems to hate it, and wouldn't have the time to make a full debugging of that function.

So, following all these reasons, I must say, if problem number one was fixed, I could probably go around the other two. Myself, I would prefer a simulated time system rather than a real one, and would more easily implement one and use it.

As for the second suggestion, porting the Contest system from R\S\E onto Fire Red would be really hard. Not only would it be necessary to know where all data related to the contests was, as well as routines, you would also need to find out which pointers to routines are also present in Fire Red (like the OW Map function), which to keep, which to change, and finally, after all that, we would need to repoint the data stored in the RAM so it doesn't overwrite the used by Fire Red. The amount of work required for that one would be so great, it would probably be best to remake it from scratch. So this one I might state that will not be ported to Fire Red.

Deokishisu
January 24th, 2010, 07:16 PM
Actually, the only reason I didn't implement a berry growth system yet is because of three simple things.
First, I have no way to display the berry trees in their growth stage. Berry trees aren't typical sprites, so there is no way to simply copy them and paste them on a new OW table. And I have near zero graphical skills, so creating berry trees from scratch would be nigh impossible.

I completely understand the contest thing. I just thought that if it was possible to do it without turning someone into a mindless hacking zombie in the process, you would know how! :P

About the graphical berry problem. I'm not exactly sure what you're saying there. Do you mean that their is literally no way to make a reasonably plausible sprite transition between the berry growth stages in Firered? That you wouldn't be able to link each berry to its respective tree sprite? You can't think of a way to show the intermediary sprite stages in berry growth but can only figure a way to show one or two? You can't find the different growth stage sprites so you can insert them? Please elaborate a bit, maybe we'd be able to work something out! Even a cheap workaround, or a skeleton that could be expanded upon later would be better than nothing imo.

EDIT: Oh, and another Hoenn related suggestion that I forgot. Emerald made several additions to ability and berry functionality, namely Flame Body and Magma Armor reducing the time it takes for a Pokemon to hatch, the EV reduction berries, and several other abilities receiving overworld effects. I was wondering if this too could be ported to your engine. When it comes to this, I have no idea how much work would be involved, but if you think it could be done, I'd be happy to grab a list of the changes and additions made in Emerald for you.

JPAN
January 24th, 2010, 09:05 PM
About the graphical berry problem. I'm not exactly sure what you're saying there. Do you mean that their is literally no way to make a reasonably plausible sprite transition between the berry growth stages in Firered? That you wouldn't be able to link each berry to its respective tree sprite? You can't think of a way to show the intermediary sprite stages in berry growth but can only figure a way to show one or two? You can't find the different growth stage sprites so you can insert them? Please elaborate a bit, maybe we'd be able to work something out! Even a cheap workaround, or a skeleton that could be expanded upon later would be better than nothing imo.
Well, let me first explain what would be needed to create a Berry system. Consider this:

1st - Consider berry trees animated OWs:
If we notice, sprout and seed stages are common to all berries, so we can make the OW manager fetch those when the berry isn't ready. For the growing and ripe stages, we can use two sequential OW's. If we have a single table for all those OW's, we can have different berry trees for 127 different berries, which is more than there are berries. So, using a OW table for berries only, we could easily have that many trees, and that many berries available.

2nd - If berries are OWs that can appear anywhere, they are Dynamic OW's
Made it once, could make it again. Adding a new table of Dynamic OW's would be easy. I would propose that byte 0xFE in the OW loader would make it look in a separate set of variables, checking for the variable corresponding to the berry planting location. Berry planting locations are identified by the picture number, making them limited to 256 patches, same way the Dynamic OW's work now.

3rd - Lets consider Berries separate from OWs. Berries have data.
That's what Gamefreak did. It considered normal OWs were different from Berry trees, and that is why berries can't be translated directly from Ruby to Fire Red. And it's a good idea, anyway. We could attribute every berry a number (starting with 0x1 for cheri berry and ending in 0x2b for Enigma berry) and create a data table for each berry. That table could be simply this:
BERRY TABLE
2 bytes item number
2 bytes OW image
1 byte growth time seed-stage 1
1 byte growth time stage1 - stage 2
1 byte growth time stage2 - ripe
1 byte max time ripe-seed

Of course the table could be much more complex, but this would be enough.
So, in that Dynamic OW variables, we could keep data related to the berry itself and not the OW, as the OW function could fetch the real image to display from this table.
Instead, that Variable would keep this
BERRY VARIABLE
6 bits Table Index
2 bits growth stage
2 bits watered times
6 bits growth time

Where watered only counts once per stage, growth time is the time passed from last renewal (full cycle) and it's count in the minimum time unit for berries (with real time, I think that's 6 hours).
And as such, it would be possible to implement a very simple berry system in Fire Red.

Now, the actual answer to your question. What I was talking about in that post was my own limitations, and not the game's. As you may see (or not) from this post, I've spent a great deal of time trying to figure out how to put the berries in the game, and minimize needed data in Variable count.
The problem is not data handling, or routine creation. The problem is that there is no Image data for me to copy from one game to the other. While I could create a well-oiled system, without sprites to show, it would look bad. As I have no sprites to include, nor am I capable of making my own, I can't complete this project.

So, In a short sentence, as I have no Spriting skills, and there aren't any ready-made sprites to use, I can't complete this.

On a separate sidenote, one of the hacks I started out making relied heavily on this system, but on a more elaborate note. There, the berry tree data had about 32 bytes of data, counting with diferent variations such weather and seasons. But was halted indefinitely as the Images needed weren't arround.

EDIT: Oh, and another Hoenn related suggestion that I forgot. Emerald made several additions to ability and berry functionality, namely Flame Body and Magma Armor reducing the time it takes for a Pokemon to hatch, the EV reduction berries, and several other abilities receiving overworld effects. I was wondering if this too could be ported to your engine. When it comes to this, I have no idea how much work would be involved, but if you think it could be done, I'd be happy to grab a list of the changes and additions made in Emerald for you.
That falls under the Item and Ability hacking. The berries could be mimicked easily, as We've already came to the conclusion on how to use items in the bag, in the pokemon menu and in the Overworld. As for the abilities, I've started studying how the Battle screen is organized briefly, but other matters appeared, and I dropped it. Both Attack effects and Ability effects are not very studied areas, but Flame body and Magma Armor ability to hatch eggs could be applied as we know how to check for abilities and where the hatching routine is placed, as well as some other effects (don't remember the ability name) that acts as a natural repel and the one that makes lower-leveled pokemon appear. It can be done, but without ever trying to read into abilities in-batle, i can't say how much work it would take.

iTeruri
January 25th, 2010, 04:59 AM
Thanks for the explanation on the item hack. I got it to work, however when you register the item (it's a key item) and use select to use the item, the screen keeps flashing and the rest of the game is frozen (you can't do anything).

Full Metal
January 25th, 2010, 02:00 PM
uh...the guide fully explained how to change the OW of the player, but what i would like to know is how to use different pallettes for the male/female character? For me, changing the pallette of one changes the pallette of the other, is the ability to not do that available with your engine and i just missed it?

sky_queen3
January 25th, 2010, 04:46 PM
Er, does 1.1 have a manual, I can't seem to find it. :(

Never mind, I found it. :cer_love:

Darthatron
January 25th, 2010, 05:03 PM
uh...the guide fully explained how to change the OW of the player, but what i would like to know is how to use different pallettes for the male/female character? For me, changing the pallette of one changes the pallette of the other, is the ability to not do that available with your engine and i just missed it?
Change the palette number and then edit it.

Deokishisu
January 25th, 2010, 05:06 PM
The problem is that there is no Image data for me to copy from one game to the other. While I could create a well-oiled system, without sprites to show, it would look bad. As I have no sprites to include, nor am I capable of making my own, I can't complete this project.

So, In a short sentence, as I have no Spriting skills, and there aren't any ready-made sprites to use, I can't complete this.
http://img31.imageshack.us/img31/5301/berries.png
^Berry tree sprites. I think they're from D/P but number 43 is the last berry in the third generation, the Enigma Berry.

Oh, one more thing. Maybe a hatch egg command? Could be useful for a very expensive incubator type script. And just a quick question, it's prolly what I'm thinking, but I just want to make sure. All the commands regarding encrypting and decrypting the selected Pokemon work on eggs right? I can modify an egg's IVs and such just like any other Pokemon right?

JPAN
January 25th, 2010, 05:22 PM
Thanks for the explanation on the item hack. I got it to work, however when you register the item (it's a key item) and use select to use the item, the screen keeps flashing and the rest of the game is frozen (you can't do anything).That is because the Item scripting routine was prepared for most hacked items, and not key items registered in select. The difference being one need to take you out of the bag, the other doesn't. For the first case (normal "use" press), you needed to get out of the bag, and so it does. In the second ("select" press), the routine will try to exit the bag for you, and as you aren't in a bag, that causes a large mess. It would be easy, then, to fix it: remove the bag-exit. So, we come to two solutions here. either a new, separate function for key items, or a single function for both normal and key-pressed items. I vote for the second, as all it would take would be adding a "if not OW, call bag exit" type of code.

uh...the guide fully explained how to change the OW of the player, but what i would like to know is how to use different pallettes for the male/female character? For me, changing the pallette of one changes the pallette of the other, is the ability to not do that available with your engine and i just missed it?
This question covers many aspects of OW hacking. Let's assume a palette A for the hero, and B for the heroine. Both the heroine's and hero' s Slot is, by default, 0. If you try and change the sprite from the hero to the heroine one, when the sprite is finally loaded, the palettes should have been replaced, and no harm visible. Just remember that lots of icons use palette slot 0 as their color default (the pop-up ! box comes to mind), so make sure the edits don't turn it into something hideous.
Now, we assume we have both OW's (male and female) in the scene at once. As the palette slot is the same for them both, the one loaded first will be your player, and the second the opposite gender normal OW (your OW is always loaded first). As the second sprite is loaded last, it's its palette that is loaded in the screen, and your hero changes colors. This is not a byproduct of the hack, or anything like this, but rather a wrong configuration of the OW data. Simply change the OW slot to keep them both in their original colors.

Oh, one more thing. Maybe a hatch egg command? Could be useful for a very expensive incubator type script. And just a quick question, it's prolly what I'm thinking, but I just want to make sure. All the commands regarding encrypting and decrypting the selected Pokemon work on eggs right? I can modify an egg's IVs and such just like any other Pokemon right?
First of all, thanks for the sprites. After I insert them, I should be able to complete a rudimentar berry system. It will take a while, though.
As for the egg hatch command, check special 0xc1(no animation hatch) and 0xc2 (normal hatch routine). And yes, an egg is a normal pokemon, only one that has the egg flag set in the miscelaneous data. As such, any of the pokemon editing specials will affect eggs (and, suprisingly enough, even healt and pp related ones, leading to stuff like fainted eggs that can't be healed)

Deokishisu
January 25th, 2010, 05:39 PM
First of all, thanks for the sprites. After I insert them, I should be able to complete a rudimentar berry system. It will take a while, though.
As for the egg hatch command, check special 0xc1(no animation hatch) and 0xc2 (normal hatch routine). And yes, an egg is a normal pokemon, only one that has the egg flag set in the miscelaneous data. As such, any of the pokemon editing specials will affect eggs (and, suprisingly enough, even healt and pp related ones, leading to stuff like fainted eggs that can't be healed)

Thanks for clearing up the egg crap for me. I thought as much.

Oh, and when you do have your epicly-awesome berry system down, make sure to make a detailed how-to in the next manual. I ended up not fully comprehending everything you said regarding how it would be implemented and carried out in game, and I'd hate to have to plague you with questions when the next version comes out. :P And take your time! Slow and steady wins the... hack?

<Insert generic your awesome keep up the good work comment here.>

interdpth
January 25th, 2010, 09:58 PM
In a normal pokemon game, the usual limit is perfectly good. But for some other types of hack, like simulator-based, the 1 million limit is reached pretty fast. Here, I think of projects that rely heavily on money to work, where you want the player to be rewarded by good money management, and where the player can produce items. An example would be a simulator based on a pokemon game, where real-estate purchases (buy a house, buy terrain) can easily overcome that limit.


In this case, I partially agree with you. One of the things I tried the hardest is to reduce the changes in-game, in order to keep the old game systems and functions working as they were intended. That is why I always search around for unused bytes on structures in the game to place them on. The sethealingplace one also annoys me a bit, so I made a few fixes and now mimic the old code if no values are placed in the variables. Next release should fix it. If you know of any other that messes things the old game should do, feel free to tell me so I can fix it.
Lastly, about the specials, I used these in order to simplify usage. The main objective of this hack is to provide a number of new features with simplicity of use. The main reason I try to mantain retro-compatibility is so that anyone who uses this hack doesn't need to learn new info that conflicts with the original games, and so that we can use the good tools out there we used to use.


Actually, the only reason I didn't implement a berry growth system yet is because of three simple things.
First, I have no way to display the berry trees in their growth stage. Berry trees aren't typical sprites, so there is no way to simply copy them and paste them on a new OW table. And I have near zero graphical skills, so creating berry trees from scratch would be nigh impossible.
Second, the in-game costs. You would need a variable for each berry patch, plus one other variable for all the data relating to current growth time, growth stage... I've made some studies in this matter, and could get 256 berry patches in the same way as the Dynamic OW switches, by using a compressed data system that would use the last 6 or 7 bits of the variable contents as the entry in that table (as there are less than 63 berries, if you want up to 127 berries, the growth time had to be sacrificed). And would require a secondary data table, to keep all the growth time tables, types of berries, and other data.
Third, I don't really believe in the RTC mechanics. I appreciate the work made by interdepth, as i checked it out and it's quite good, but I always disliked the fact you had to play at a certain time to work with it. Also, I would have no way to test anything with RTC, as my computer seems to hate it, and wouldn't have the time to make a full debugging of that function.

So, following all these reasons, I must say, if problem number one was fixed, I could probably go around the other two. Myself, I would prefer a simulated time system rather than a real one, and would more easily implement one and use it.

As for the second suggestion, porting the Contest system from R\S\E onto Fire Red would be really hard. Not only would it be necessary to know where all data related to the contests was, as well as routines, you would also need to find out which pointers to routines are also present in Fire Red (like the OW Map function), which to keep, which to change, and finally, after all that, we would need to repoint the data stored in the RAM so it doesn't overwrite the used by Fire Red. The amount of work required for that one would be so great, it would probably be best to remake it from scratch. So this one I might state that will not be ported to Fire Red.
Questions(also rant
1.Play at a certain time?
2.Use VBA-M or No$gba to use the engine to it's max.
The prior VBA's suck at RTC
3.There's an offset in my thread which tells what vars to set time with, it' just the matter of the hacker making a time setting function
4.ONLY ONE E >:(

psychicboy
January 26th, 2010, 02:06 PM
Alright JPAN or anyone else who can help me. Could you give me a detailed example of how the set healing place works? I looked at the manual and tried it out as a script and it simply would not work.. I'm just so confused.

Deokishisu
January 26th, 2010, 02:28 PM
Alright JPAN or anyone else who can help me. Could you give me a detailed example of how the set healing place works? I looked at the manual and tried it out as a script and it simply would not work.. I'm just so confused.

Sethealingplace, I had trouble with it too.
#org @start
sethealingplace 0x0 **Regular Pokemon Center Healing Place**
setvar 0x405A 0x50C **Map bank and Map Number in this format and in hex: 0x(mapnumber)(bank). The command I have in here is for bank 12 map 5.**
setvar 0x405B 0x7 **X-Coordinate in Hex**
setvar 0x405C 0x4 **Y-Coordinate in Hex**
end
Don't forget to include this too in a separate level script, or it will crash.
#org @start
special 0x182
end

psychicboy
January 26th, 2010, 04:14 PM
Sethealingplace, I had trouble with it too.
#org @start
sethealingplace 0x0 **Regular Pokemon Center Healing Place**
setvar 0x405A 0x50C **Map bank and Map Number in this format and in hex: 0x(mapnumber)(bank). The command I have in here is for bank 12 map 5.**
setvar 0x405B 0x7 **X-Coordinate in Hex**
setvar 0x405C 0x4 **Y-Coordinate in Hex**
endDon't forget to include this too in a separate level script, or it will crash.
#org @start
special 0x182
end
So do I use this as a script someone walks on?

Deokishisu
January 26th, 2010, 04:25 PM
So do I use this as a script someone walks on?

Levelscript. If you don't know what it is or how it works either take a look at a scripting tutorial or peek into the Pokemon Center of a clean ROM, this really isn't the place for generic unrelated scripting questions.

JPAN, I'm here again with another quick suggestion/question. Would there be a way to display images larger than 64x64 using a function similar to the "show fossil picture" command you fixed up? I know there would be the actual tileset of the image and RAWs involved due to the size, but could it be done? A function such as that would serve soo many purposes. From RPG-like cutscenes, to posters, to mini-game "titlescreens" and backdrops. You could probably even use it as a cheap extra image like those found when entering Mt. Moon and Viridian Forest, or a fun way to give signposts in towns a little extra "oomph".

JPAN
January 26th, 2010, 06:07 PM
JPAN, I'm here again with another quick suggestion/question. Would there be a way to display images larger than 64x64 using a function similar to the "show fossil picture" command you fixed up? I know there would be the actual tileset of the image and RAWs involved due to the size, but could it be done? A function such as that would serve soo many purposes. From RPG-like cutscenes, to posters, to mini-game "titlescreens" and backdrops. You could probably even use it as a cheap extra image like those found when entering Mt. Moon and Viridian Forest, or a fun way to give signposts in towns a little extra "oomph".
If you mean, manipulate the existing function to do it, I've tested it and no changes I made created any positive effects. I'm positive something can be done with it to create such displays, but haven't got much done in that area.
If you mean Full-display images, you can make a routine similar to the one of the map display (even simpler, as there would be no more button checking than the possible A\B button) and simply place the image on-screen. That image could be a 256 color image with a size up to the size of the GBA screen. I'm pretty sure the best way to do it would be to actually program something with the homebrew GBA lib and copy the results into a routine to be called by the script, that would replace the OW screen update. But here it's more guesswork than actual facts, as I have never even considered doing something like that prior to this post.

On a slightly related sidenote, I have finished the routines and data that would make a RTC-clock based berry system work. But after 8 hours of trying to index and insert the berry tree sprites, I came to the definite conclusion that I am incapable of putting OW sprites in a ROM through a PNG or BMP image. The mechanics are as follow:
The Plant data is composed of two variables, one that contains the total time and another that contains the actual berry data, watering times and a "watered" flag.
Two functions rule the berry tree behaviour. First is the "Update time" function. It is called at a very update-heavy routine (adding on in the keys hacked routine), and basically checks all associated variables for a plant, and if it's real, adds to its time variable. Loads it up, checks its contents to see if it's not real, if it is, adds the time, checks if the berry has expired (reverts back to seed stage) and erases the watered bit, that checks if you already watered that thing.
The other function is added to the OW hack, and checks if the OW number is 0xfeyy. If so, loads up the corresponding variable, checks for the berry tree table number, and if a berry is present, loads up the timer if it is and checks against the minimum values for that stage present in a small table (berry tree Table). At the end, displays one of those values or the seed one.
The berry tree table is a table that is composed of 24 bytes:
Berry tree data
2 bytes item number
1 byte item quantity
1 byte water quantity (not used, but balances out the address)
2 bytes seed stage end time
2 bytes OW for sprout
2 bytes sprout stage end time
2 bytes OW for small tree
2 bytes small tree end time
2 bytes OW for full grown
2 bytes full grown end time
2 bytes OW for ripe berry tree
2 bytes berry expiring time
2 bytes filler (for now)

Also, I assumed by default a time window of 1 minute, so planting a tree at minute 1:00 and the next at 1:50 would make it so both trees grow at the same time from that point forward.
The code is still in "trial mode", and it's somewhat buggy at times, but by tomorrow most bugs must be fixed. The only thing missing is some berry trees in the ROM.

So, if anyone out there wants to try, I would need as many trees as you can get working in a rom, with a total of 9 different palettes maximum. Make it over the data of any 16x32 Sprite, to make the transaction easier.

psychicboy
January 26th, 2010, 06:26 PM
Levelscript. If you don't know what it is or how it works either take a look at a scripting tutorial or peek into the Pokemon Center of a clean ROM, this really isn't the place for generic unrelated scripting questions.

.
Thanks for your answer. And not to sound rude but this wasn't a completely unrelated scripted question. It was a question on how to work a certain part of JPANs engine.

Deokishisu
January 26th, 2010, 09:25 PM
On a slightly related sidenote, I have finished the routines and data that would make a RTC-clock based berry system work. But after 8 hours of trying to index and insert the berry tree sprites, I came to the definite conclusion that I am incapable of putting OW sprites in a ROM through a PNG or BMP image.
So, if anyone out there wants to try, I would need as many trees as you can get working in a rom, with a total of 9 different palettes maximum. Make it over the data of any 16x32 Sprite, to make the transaction easier.

Maybe it's because those tree sprites are actually from D/P. I'll try some on my end tomorrow and if worse comes to worse, I'll find a GBA berry tree sprite sheet. I'm not sure what format you'd want it in though. The indexed images in a png file or a patch with them already inserted somewhere. I assume only the images would be easier on my part, seeing as I wouldn't have to worry about where to put the various frames in the ROM, all you'd have to do is import the indexed images the way you'd want them.

>Dante<
February 1st, 2010, 06:52 AM
from which offset is advisable to begin to make script??
It is usually begun by 0x800000 but..this ROM has very more space of a normal ROM ^^"

second thing, can seem perhaps banal, but I'm specialized in tiles and graphics...
and I have noticed that fire red contains, to inside, also animations of tiles from RSE..
the only problem is that these animations "don't exist"...
or better, they are not activated..

it's possible to activate it??

diegoisawesome
February 4th, 2010, 04:31 PM
JPAN, I've got a problem here:
Using your "change Pokémon species special", I successfully changed the species of Pokémon that the player had. But when I went into the status screen, the game crashed on a black screen. The thing is, after going into battle with it (successfully, no errors) and gaining some Exp., the status screen is again viewable.

Is there a fix to this?

Quil
February 5th, 2010, 05:11 AM
JPAN, I got an idea for a new addition ;D

A HM/TM hack, that makes TM show up with a blue name when you select a pokemon in the status screen, and make it possible to link it to a script. That means we can create custom HM's, and custom field TM's. That would be pretty cool, imo ;p

What do ya think?

HackMew
February 5th, 2010, 07:47 AM
from which offset is advisable to begin to make script??
It is usually begun by 0x800000 but..this ROM has very more space of a normal ROM ^^"

You could even start at 0x720000, if you want.


JPAN, I got an idea for a new addition ;D

A HM/TM hack, that makes TM show up with a blue name when you select a pokemon in the status screen, and make it possible to link it to a script. That means we can create custom HM's, and custom field TM's. That would be pretty cool, imo ;p

To be honest, I doubt that just linking them to a script might be a good idea.

Quil
February 5th, 2010, 09:14 AM
To be honest, I doubt that just linking them to a script might be a good idea.

What would be the problem? I don't know ASM myself, and I am just doing a suggestion.. I think that it would be pretty nice to have your 'custom' field-moves like Headbutt for headbutt trees also show up like Dig, Fly, and Surf. And as HM's are also being modified to give them a custom effect, the use in the status screen would stay the same, which isn't right.

HackMew
February 5th, 2010, 09:20 AM
What would be the problem? I don't know ASM myself, and I am just doing a suggestion..

Well, I'm just saying scripting could not be enough/appropriate to handle some HM moves.

Quil
February 5th, 2010, 02:30 PM
Well, I'm just saying scripting could not be enough/appropriate to handle some HM moves.

Ah, that way ;p I misunderstood you. Yeah, that's right. HM's like Surf and Fly can't be made though scripting. Headbutt, however, can. ;p

diegoisawesome
February 6th, 2010, 06:11 AM
JPAN, I have yet another bug:
When placing a script to be called at a button press, all the game does is not permit me to move while I have that button pressed. Once I let go, I can move again. The script is never called.

Also, on the trainer battle script runner, can you make a sound 0x15 happen at the ! mark?

Derlo
February 7th, 2010, 10:23 AM
JPAN I used the Specials 0x52 to the 0x55, and found a problem.

When we use the 0x52 or 0x54 to put a status on any of the pokemon (example: SLEEP), and when we use the 0x53 and 0x55 to "turn off" the special, everything is fine.

But .. when we catch the pokemon in question, it comes with with POISON status.

EDIT:
I found another problem.

When the routine is started, and the wild pokemon appearing on this being affected by it. Sometimes the status is only in Battlebox, but the pokemon in question is not suffering the damage status.

Example: A pokemon with SLEEP.

Sometimes the animation of Z (ZzZzZ. ..) does not appear, and the pokemon attacks us as if its status was normal.

No way to solve this problems?

Giga Universe
February 9th, 2010, 09:16 AM
JPAN, I have yet another bug:
When placing a script to be called at a button press, all the game does is not permit me to move while I have that button pressed. Once I let go, I can move again. The script is never called.

Also, on the trainer battle script runner, can you make a sound 0x15 happen at the ! mark?

JPAN already helped me solve this. Quite simple really (I assume you talking about place key script?)

Open the ROM you patched with the engine in a hex editor. Navigate to 0x16008C. Reverse the pointer stored at 0x16008C, add 0x12, then navigate to this new offset. The byte should be a 0x91, change it to a 0x81. Fixed!

Ah, that way ;p I misunderstood you. Yeah, that's right. HM's like Surf and Fly can't be made though scripting. Headbutt, however, can. ;p

Yes, however, the headbutt script can only be run when the user presses A on a tree, but Surf is a tile permission and fly is called through the party screen. Both of these would require ASM routines, and it would probably be hard to make them call a script without bugs. So if you wanted something like this,the best option would probably be to create an ASM routine that does what you want within the routine, rather than calling a script.

diegoisawesome
February 9th, 2010, 03:36 PM
JPAN already helped me solve this. Quite simple really (I assume you talking about place key script?)

Open the ROM you patched with the engine in a hex editor. Navigate to 0x16008C. Reverse the pointer stored at 0x16008C, add 0x12, then navigate to this new offset. The byte should be a 0x91, change it to a 0x81. Fixed!
Thank you! It works perfectly now!
The only odd thing is the 0x91 byte was one before the reversed offset+12 pointed to. Thanks again!

JPAN
February 9th, 2010, 06:57 PM
JPAN, I've got a problem here:
Using your "change Pokémon species special", I successfully changed the species of Pokémon that the player had. But when I went into the status screen, the game crashed on a black screen. The thing is, after going into battle with it (successfully, no errors) and gaining some Exp., the status screen is again viewable.
I warned about this when I first created the code, but it seems I forgot to add the disclaimer to the manual. Change pokemon species should only be used with pokemon that share the same experience curve. The reason the game crashes when you try to see the status screen is because the pokemon should already be at the next level, and has negative amount of experience until it reaches. That would make the blue bar on the bottom circle around the screen infinitely (if you're lucky, some experience differences can cause you to see it without crashing). This bug first appeared with the experience adding, but because I had no information about leveling up (the algorithm to level up a pokemon is still unknown to me), i couldn't make a decent level-up code. When you go into battle, the game calculates your level and experience based on the current species, and corrects the bug. For now, I have no fix other than ask you to only use the code with pokemon that share the same experience curve.

JPAN I used the Specials 0x52 to the 0x55, and found a problem.
When we use the 0x52 or 0x54 to put a status on any of the pokemon (example: SLEEP), and when we use the 0x53 and 0x55 to "turn off" the special, everything is fine.
But .. when we catch the pokemon in question, it comes with with POISON status.
The status code 0x54 is more of a "dumb" version of the 0x52 code. I created it to simplify trainer battles. It has several bugs that can be avoided with the use of 0x52. The status inducing specials use the game main status manager to replace the previous status with a new one. The game uses 5-7 times to manage a pokemon creation for battle, plus 2-3 for each other pokemon to create (trainer case). 0x52 counts those turns, and deactivates itself after the x time you gave it (usually 7). but 0x54 does not. That means any status is replaced by the code, even the ones induced with healing items and the like.
So, any bugs found with 0x54 will not be addressed. 0x54 is buggy by its nature.
If the POISON was caused by 0x54, change specials. If it happens with 0x52, then try different timers. 7 is the average, but 8 shouldn't be a problem. I myself tried with 0x52 several pokemon battles (activating with a level script, a walking script and even an item script), and in several roms, and the result seemed to be the same. Catching a pokemon was not affected (except for too high numbers on 0x8005, like 0xF) by the status inducer.

When the routine is started, and the wild pokemon appearing on this being affected by it. Sometimes the status is only in Battlebox, but the pokemon in question is not suffering the damage status.
Example: A pokemon with SLEEP.
Sometimes the animation of Z (ZzZzZ. ..) does not appear, and the pokemon attacks us as if its status was normal.
This problem is similar to the one above. It seems your game likes to generate pokemon with a higher number of status passes than usual. Try upping the counter a bit (9 tops) and check again. What is happening is that the status on the box and the one the pokemon has are calculated sperately (box is the 2-3 pass, pokemon actual status is the last).


On a separate note, I had to be away for a few days, so I did little work on the berry project until tonight. But until now the outlook looks good. I have successfully managed to make a "people tree" that cycles its look from hero, to hero bike to little kid to heroine, in 15 minutes. Longer tests are required, but the game is processing well the large time differences (up to 12 months difference in time), small intervals (minute updates) and graphic display (although the "tree" will not change until the OW is refreshed, be it through menu or moving to other map/loading zone).

Derlo
February 10th, 2010, 05:24 AM
Thanks, it was very good your explanation!

But the error should be remarked that actually the fact that my script HEADBUTT.
For some value is written to 0x8004 for the script, which makes any status becomes SLEEP in battle, but in POKEMENU become the POISON.

I will try to fix it.
Thank you and congratulations on the job.

NarutoActor
February 16th, 2010, 05:42 PM
I am not sure if this has been said but the program keeps asking me for the "chose the variable for the wild pokemon switch" I paced a variable in but I won't stop asking me for it. I have tryed switching to a different variable but nothing makes it happy.

EDIT: never mind I didn't know that you have to put 0x

altariaking
February 22nd, 2010, 07:06 AM
i'm confused. you said that there were more pallettes for overworlds, but when i opened the rom in my overworld editor, there were no new pallettes. is there something elde i need to do?

NarutoActor
February 22nd, 2010, 02:30 PM
Hex edit the table. look at the manual.

SuperJOCKE
February 28th, 2010, 06:02 AM
I don't know if this is the right thread to be asking this in, but do anyone of you know how many bytes one move/attack lies on? When I'm editing the attacks for the empty slots they overlap so the attacks from one Pokémon is also on the Pokémon before.

altariaking
February 28th, 2010, 06:39 AM
I don't know if this is the right thread to be asking this in, but to do anyone of you know how many bytes one move/attack lies on? When I'm editing the attacks for the empty slots they overlap so the attacks from one Pokémon is also on the Pokémon before.

the simple questions thread is where you should go i think.
jpan, is it possible to make it so that when you step on a green s, a shiny pokemon appears in your party if you use this?

NarutoActor
February 28th, 2010, 11:36 AM
there is a way, here is a quick basic script (of corse much needs to be added) but in jpans other thread he posted a routine that makes party pokemon shinny.
checkitem
if true goto @shinny
@shinny
callasm @shinny

SuperJOCKE
February 28th, 2010, 04:16 PM
the simple questions thread is where you should go i think.
jpan, is it possible to make it so that when you step on a green s, a shiny pokemon appears in your party if you use this?
And where might that be? I'v looked for it but I can't find it. If it's out there of course. xP

Midori
February 28th, 2010, 06:30 PM
Can this extended rom be hacked using the conventional tools like AdvanceMap?

NarutoActor
February 28th, 2010, 07:46 PM
up to $FFFFFF, advance map will support 7 digit offsets in it's next release.

altariaking
February 28th, 2010, 07:55 PM
And where might that be? I'v looked for it but I can't find it. If it's out there of course. xP

...it's in the rom hacking forum and it's stickied...

Gold Man
March 2nd, 2010, 03:18 PM
I have a problem when I open the tool to patch the rom and stuff the whole thing dosn't show help.

diegoisawesome
March 4th, 2010, 04:44 PM
JPAN, I have a bug.
With the RTC and D/N installed, the palette expansion will not work. It does not load the new palette whenever the time is not Day.

EDIT: It doesn't even load the palette when the time is NOT Day! I believe it is a conflict with the entire D/N system.

EDIT 2: Another bug I found: When you use Teleport, it asks you if you want to go back to Celadon Dept. Store. If you say yes, you get warped to map 0,0, and you're stuck there.

Prof. Briar
March 11th, 2010, 04:47 AM
All right...you asked for suggestions, so I've got some. Be warned, this is something specific. I don't know if it will have relevance to anyone else's projects, though I believe so.

First of all, some explaining is in order. I've been looking for ways to make the game more like the show. In that, I decided that the obvious place to start was the core of the game experience...the battle system. This means making some major changes to the battle engine itself. Since you've already built a framework, I thought I'd bounce some of what I would need to be done off you.

+ Ability to call up a command menu on the opponent's "turn"...by which I mean after their move is declared, but before the effect is applied.
+ Multiple battle menus called by variable.
+ Ability to define and call up multiple "versions" of a move (like how Secret Power changes by terrain, or Curse working differently for ghosts).

While there are a number of possible uses for these functions, it is my intent to use them to create a two-phase battle system, in which pokemon have not only an attacking turn, but also a defense turn. Of course, and so you don't think my request selfish, there are other ways it could be used as well. For example, multiple move versions could be used to make HM moves always the right type for the pokemon they're taught to (such as Fly becoming Dragon-Type for certain pokemon, or Flash changing to Fire for some users). The multiple battle menus and off-turn call systems might be used to make a battle in which a Trainer must be talked to during the fight.

Of course, it could be that some of this could be better accomplished through the creation of a utility. If you believe so, then I heartily thank you for your time, and apologize that my input has not been helpful.

icychill66
March 11th, 2010, 04:35 PM
To start off, I have to say that this is the coolest and most useful hacking thing I have stumbled upon so far! I'm definitely using this in my hack.

I can't seem to get all of the decrypter specials to work =/. I got special 0x14 to work, which is the change captured ball special, but I can't get special 0xF to work! It's the EV adder/subtracter. I want it to add 170 EV's to the HP stat, by the way.

#dynamic 0x800000

#org @start
lock
bufferpartypokemon 0x0 0x1
setvar 0x8004 0x1
setvar 0x8005 0x0
setvar 0x8006 0x0AA
special 0x6
special 0xF
release
end

mitchel1
March 14th, 2010, 07:37 AM
-Delete- Problem has been solved

iTeruri
March 15th, 2010, 11:44 AM
Hey, JPAN.

I still love your hacked engine, however I was wondering the following...
I need a normal wild battle, just like special 0x97 you made. However, I need the encounter rate to be separate from the map I use the special on. I was wondering if you could make it so you can set a var to the encounter rate you want (with special 0x97) and if you set that var to 0x0 it'll just use the encounter rate of the map you're on.

Alright, that's kinda vague, so I'll give an example...
If you use special 0x97 while on route 1, you have a 7% chance of fighting a pokémon.
However, with my idea, you can set a var (let's say 0x8004) to whatever amount you want, but the normal grass keeps it's 7% encounter rate. So I'll set var 0x8004 to 0x80 so the encounter rate becomes 50%. (I'm useing a-map's encounter ratio here)

Anyway, thanks in advance and keep up the great work.

metapod23
March 23rd, 2010, 09:28 AM
I've written a tutorial on how to add new OWs with JPAN's hacked engine here:

http://www.pokecommunity.com/showthread.php?t=211535

Thanks to JPAN for his help in figuring out how to do it correctly.

Any comments would be appreciated. :)

BlitŻ
March 23rd, 2010, 05:26 PM
Wow! I are amazed-zors just by the description. Just think of what you can do! All the Ow's you'll need, changing tile behaviors, <3. I do have a preliminary question before I start using this though, if I apply this to my hack, which is already pretty far on its way, can I still patch this to it and keep all my work, and still have all these great features?
Nvm, i are stupid to not look on the first page ;D

Full Metal
March 23rd, 2010, 06:07 PM
O.o?? u just now found this place?
jpan--did you use XSE/PKSV in removing all the scripts, or did you use some other sort of method that i don't know of..?
hm...i guess making a tool to do that (remove all scripts found in a game) wouldn't be hard...load the map header, load the maps, scan for scripts, remove scripts and continue. Granted the program would take ages to run, and a good while to code i think. Just kinda curious...(cuz the removal of scripts is the main thing i like about the patch, as i've not used much of the other features yet...)

NarutoActor
March 24th, 2010, 11:50 AM
Open up the offset of the script in a hex editor, and change the bytes to FF's.

Full Metal
March 24th, 2010, 01:44 PM
That sounds long and tedious...
--Thats why i asked him; you might be right, but there might be another way he did it...that is more effiicient

iTeruri
March 24th, 2010, 11:46 PM
JPAN also made a patch that removes all scripts from the game and nothing else. You'll have to look for it, but it's out there.

Full Metal
March 25th, 2010, 06:27 AM
yea, i know about that patch :P check my signature under "recommended patches"...
i was just curious about how he did it -.-??

ShinyBill
March 29th, 2010, 02:30 PM
I saw some post about saying that var 0x800C (Where the player is facing) is usable anymore. Is that true? Because I want to make a script and it needs the use of that variable.

NarutoActor
March 29th, 2010, 03:26 PM
I highly doubt that, but even if it is, just use a copy byte, and copy the facing into a different temporary var.

Darthatron
March 29th, 2010, 05:05 PM
I saw some post about saying that var 0x800C (Where the player is facing) is usable anymore. Is that true? Because I want to make a script and it needs the use of that variable.

I found that too. Just use this:

setvar 0x800C 0x0000
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x01 'Is the player facing down?
if 0x01 call @down
compare 0x800C 0x02 'Is the player facing up?
if 0x01 call @up
compare 0x800C 0x03 'Is the player facing left?
if 0x01 call @left
compare 0x800C 0x04 'Is the player facing right?
if 0x01 call @right

It works the same.

ShinyBill
March 30th, 2010, 12:22 AM
Thanks about that, now my script should work =D.

EDIT: Well my script didn't work.

I'm using PokéScript.

#org $start
lockall
special 0x8F
checkattack 0x1D
compare 0x800D 0x06
if 0x01 goto $dontknow
storepokemon2 0x00 0x800D
setanimation 0x00 0x800D
message $message1
$message1 1 = Do you want to use ROCK CLIMB\nto climb them?
boxset 5
compare 0x800D 0x00
if 0x01 goto $dontwant
doanimation 0x25
waitstate
setvar 0x800C 0x0
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x1
if 0x01 goto $down
compare 0x800C 0x2
if 0x01 goto $up
compare 0x800C 0x3
if 0x01 goto $left
compare 0x800C 0x4
if 0x01 goto $right
end

#org $down
addvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepdown
compare 0x8005 0x008D
if 0x00 goto $endingstepdown
end

#org $up
subvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepup
compare 0x8005 0x008D
if 0x00 goto $endingstepup
end

#org $left
subvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepleft
compare 0x8005 0x008D
if 0x00 goto $endingstepleft
end

#org $right
addvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepright
compare 0x8005 0x008D
if 0x00 goto $endingstepright
end

#org $stepdown
applymovement $1down
goto $down

#org $stepup
applymovement $1up
goto $up

#org $stepleft
applymovement $1left
goto $left

#org $stepright
applymovement $1right
goto $right

#org $endingstepdown
applymovement $1down
$1down 1 ; #binary 0x10 0xFE
pausemove 0
releaseall
end

#org $endingstepup
applymovement $1up
$1up 1 ; #binary 0x11 0xFE
pausemove 0
releaseall
end

#org $endingstepleft
applymovement $1left
$1left 1 ; #binary 0x12 0xFE
pausemove 0
releaseall
end

#org $endingstepright
applymovement $1right
$1right 1 ; #binary 0x13 0xFE
pausemove 0
releaseall
end

#org $dontknow
message $message3
$message3 1 = A Pokémon could climb them.
boxset 6
releaseall
end

#org $dontwant
releaseall
end

These settings are temporary, like behavior byte, the attack and such.
The scripts stops right before he checks the player facing location.

diegoisawesome
April 1st, 2010, 03:35 PM
I have a suggestion for this engine.
Why not make a tile-attribute hack, much like the other one, but this time, with walk-into scripts?

Ninja Caterpie
April 1st, 2010, 03:42 PM
Huh.

Is it just me, or does this remove everything from Pallet Town, including the Fly Spot? I tried it on a clean ROM and it does the same thing...

Darthatron
April 1st, 2010, 03:48 PM
Thanks about that, now my script should work =D.

EDIT: Well my script didn't work.

I'm using PokéScript.

#org $start
lockall
special 0x8F
checkattack 0x1D
compare 0x800D 0x06
if 0x01 goto $dontknow
storepokemon2 0x00 0x800D
setanimation 0x00 0x800D
message $message1
$message1 1 = Do you want to use ROCK CLIMB\nto climb them?
boxset 5
compare 0x800D 0x00
if 0x01 goto $dontwant
doanimation 0x25
waitstate
setvar 0x800C 0x0
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x1
if 0x01 goto $down
compare 0x800C 0x2
if 0x01 goto $up
compare 0x800C 0x3
if 0x01 goto $left
compare 0x800C 0x4
if 0x01 goto $right
end

#org $down
addvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepdown
compare 0x8005 0x008D
if 0x00 goto $endingstepdown
end

#org $up
subvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepup
compare 0x8005 0x008D
if 0x00 goto $endingstepup
end

#org $left
subvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepleft
compare 0x8005 0x008D
if 0x00 goto $endingstepleft
end

#org $right
addvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepright
compare 0x8005 0x008D
if 0x00 goto $endingstepright
end

#org $stepdown
applymovement $1down
goto $down

#org $stepup
applymovement $1up
goto $up

#org $stepleft
applymovement $1left
goto $left

#org $stepright
applymovement $1right
goto $right

#org $endingstepdown
applymovement $1down
$1down 1 ; #binary 0x10 0xFE
pausemove 0
releaseall
end

#org $endingstepup
applymovement $1up
$1up 1 ; #binary 0x11 0xFE
pausemove 0
releaseall
end

#org $endingstepleft
applymovement $1left
$1left 1 ; #binary 0x12 0xFE
pausemove 0
releaseall
end

#org $endingstepright
applymovement $1right
$1right 1 ; #binary 0x13 0xFE
pausemove 0
releaseall
end

#org $dontknow
message $message3
$message3 1 = A Pokémon could climb them.
boxset 6
releaseall
end

#org $dontwant
releaseall
end

These settings are temporary, like behavior byte, the attack and such.
The scripts stops right before he checks the player facing location.

Try replacing this line...
copybyte 0x020370D4 0x02036E58
With these...
#raw 0x15
#raw 0xD4
#raw 0x70
#raw 0x03
#raw 0x02
#raw 0x58
#raw 0x6E
#raw 0x03
#raw 0x02

Full Metal
April 1st, 2010, 04:08 PM
Thanks about that, now my script should work =D.

EDIT: Well my script didn't work.

I'm using PokéScript.

#org $start
lockall
special 0x8F
checkattack 0x1D
compare 0x800D 0x06
if 0x01 goto $dontknow
storepokemon2 0x00 0x800D
setanimation 0x00 0x800D
message $message1
$message1 1 = Do you want to use ROCK CLIMB\nto climb them?
boxset 5
compare 0x800D 0x00
if 0x01 goto $dontwant
doanimation 0x25
waitstate
setvar 0x800C 0x0
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x1
if 0x01 goto $down
compare 0x800C 0x2
if 0x01 goto $up
compare 0x800C 0x3
if 0x01 goto $left
compare 0x800C 0x4
if 0x01 goto $right
end

#org $down
addvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepdown
compare 0x8005 0x008D
if 0x00 goto $endingstepdown
end

#org $up
subvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepup
compare 0x8005 0x008D
if 0x00 goto $endingstepup
end

#org $left
subvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepleft
compare 0x8005 0x008D
if 0x00 goto $endingstepleft
end

#org $right
addvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepright
compare 0x8005 0x008D
if 0x00 goto $endingstepright
end

#org $stepdown
applymovement $1down
goto $down

#org $stepup
applymovement $1up
goto $up

#org $stepleft
applymovement $1left
goto $left

#org $stepright
applymovement $1right
goto $right

#org $endingstepdown
applymovement $1down
$1down 1 ; #binary 0x10 0xFE
pausemove 0
releaseall
end

#org $endingstepup
applymovement $1up
$1up 1 ; #binary 0x11 0xFE
pausemove 0
releaseall
end

#org $endingstepleft
applymovement $1left
$1left 1 ; #binary 0x12 0xFE
pausemove 0
releaseall
end

#org $endingstepright
applymovement $1right
$1right 1 ; #binary 0x13 0xFE
pausemove 0
releaseall
end

#org $dontknow
message $message3
$message3 1 = A Pokémon could climb them.
boxset 6
releaseall
end

#org $dontwant
releaseall
end

These settings are temporary, like behavior byte, the attack and such.
The scripts stops right before he checks the player facing location.

(sorry irish_witch)
DONT USE POKESCRIPT!
XSE, and PKSV are much better and updated, plus there is (that i know of) lots more support available.

PeregrineFig
April 1st, 2010, 04:49 PM
Huh.

Is it just me, or does this remove everything from Pallet Town, including the Fly Spot? I tried it on a clean ROM and it does the same thing...

I patched this over my hack, which was using only scripts in the 700000s. It wiped clean almost everything from what was formerly Pallet Town. But for me it left the flight spot intact, just deleted all my people, step-tiles, signposts, warps, and level scripts. Oddly, though, it only did this to map 3.0.

Ninja Caterpie
April 1st, 2010, 08:59 PM
I patched this over my hack, which was using only scripts in the 700000s. It wiped clean almost everything from what was formerly Pallet Town. But for me it left the flight spot intact, just deleted all my people, step-tiles, signposts, warps, and level scripts. Oddly, though, it only did this to map 3.0.

For me, it only did it to map 3.0 as well. It wiped everything except for warps and fly-spots from every other map, and absolutely EVERYTHING from 3.0, including the fly spot.

And this is on a clean ROM.

ShinyBill
April 2nd, 2010, 03:43 AM
Try replacing this line...
copybyte 0x020370D4 0x02036E58With these...
#raw 0x15
#raw 0xD4
#raw 0x70
#raw 0x03
#raw 0x02
#raw 0x58
#raw 0x6E
#raw 0x03
#raw 0x02

I'm gonna try that right now.



(sorry irish_witch)
DONT USE POKESCRIPT!
XSE, and PKSV are much better and updated, plus there is (that i know of) lots more support available.

Don't think that way... sorry but since I use XSE database, thu commands and functions are the same. I just use XSE for decompiling scripts.

altariaking
April 30th, 2010, 08:44 AM
ok, i did everything you said for new pallettes, but all it did was change the hero's pallette, and only in vba.
how do i fix that?

Criisss
April 30th, 2010, 04:55 PM
I'm trying to use the special 0x58, but not how to use the variable 0x8006 to load the pointer...

Someone can give me an example of how to use all special so I can understand?

I managed to use the special 0x56 to swarm-roam pokemon, but I could not with this ...

Shiny Quagsire
May 10th, 2010, 04:02 PM
I found a rather annoying problem in the application.
When you open the character hack or overworld hack, you can't close the dialog window. It is annoying if you pushed it by accident.

ShyRayq
May 17th, 2010, 09:54 PM
I found a rather annoying problem in the application.
When you open the character hack or overworld hack, you can't close the dialog window. It is annoying if you pushed it by accident.

Yeh that happens to me as well
and i also didnt understand the overworld tutorial very well
so can you explain it to me?

Sonikku17
May 25th, 2010, 03:25 PM
I have a quick question regarding special 0x18B, the "Show uncompressed picture" special. For the most part, I get how it works. However, I'm a bit confused about the first part of the table, the fossil pointer. It says it is a
"pointer to a section of data that has the needed information for the function to work," but I'm not sure what this means, or what the needed information would be. If anyone can help me understand this, it would be greatly appreciated!