The PokéCommunity Forums  

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

Notices

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


Advertise here

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #251    
Old May 26th, 2010, 03:25 AM
JPAN
pokemon rom researcher
 
Join Date: Dec 2008

Advertise here
Quote:
Originally Posted by Sonikku17 View Post
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.
The table at the manual shows that data right below it. The data at the fossil table is composed of only two pointers, the data pointer and the palette pointer. The data pointer, the other structure I talk about, must be stored somewhere else in the ROM, and contains the pointer to the uncompressed image, and 12 extra bytes I know nothing about. Those bytes must be 00 08 58 1b 00 00 00 00 00 00 00 00, otherwise the image shows displaced (like some glitch pokemon from Red).
__________________
Here are the links for my work


Currently working on:
Battle Script Documentation
Another large project
Reply With Quote
  #252    
Old May 29th, 2010, 07:11 AM
Nikolai Fox's Avatar
Nikolai Fox
 
Join Date: Mar 2010
Gender: Male
How do you set one variable to a value, and then change it to another value?

I am using the Fire Red Hacked engine, and I used this code which changes the level of the Pokémon a gym leader has to three levels higher than your highest level Pokémon.

setvar 0x4052 0x203
trainerbattle 0x1 etc
setvar 0x4052 0x0

The var first gets set to the value that makes the Pokélevels what I wanted them to be, which worked. But after the battle, all trainer Pokémon levels are still 3 levels higher than my highest level Pokémon. If the value of 4052 is 0, it should cancel the change?

Thanks.
Reply With Quote
  #253    
Old May 29th, 2010, 07:16 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Scripts don't continue directly after the trainerbattle 0x1, they continue at the third pointer in the command. That might be your problem.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #254    
Old May 29th, 2010, 07:19 AM
Nikolai Fox's Avatar
Nikolai Fox
 
Join Date: Mar 2010
Gender: Male
Quote:
Originally Posted by diegoisawesome View Post
Scripts don't continue directly after the trainerbattle 0x1, they continue at the third pointer in the command. That might be your problem.
Nah, I actually used trainer battle 0x3, which has a script straight after the battle (and the following script does work, as I receive the rewards etc)

I even tried making a tilescript on the way out to set the variable to the new value. That didn't work either =/
Reply With Quote
  #255    
Old May 29th, 2010, 07:35 AM
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 40
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
Quote:
Originally Posted by altariaking View Post
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?
if anyone could help me on this i'd be really apreciative.
__________________
http://www.pokecommunity.com/member.php?u=253113
Reply With Quote
  #256    
Old May 31st, 2010, 05:11 AM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
I was trying to use special 0x13 to change a Pokemon's happiness, but couldn't get it to work. I have an adoption house for abused Pokemon, so if someone adopts, in this case, a Rattata, I want it to have low happiness.

So I make the script only work if you have 5 or less Pokemon in your party. Then, after I used the give pokemon command, I use countpokemon to determine how many are there so that I can set variable 0x8004 to the right number. Like, if the player has 6 Pokemon after "adopting" Rattata, I have the script go to this:

Code:
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
which, from my understanding, should make Rattata's base happiness be reduced by 60 (as 3C is 60 in hex, and you add 1 to the beginning to subtract from happiness). But when I have the guy rate its happiness, its still at its base happiness (70).

I've tried different things, including using special 0x6 with it, but nothing made it work for me. I'm moving on from it now, because it's not that important, but I was just wondering if there was anything I could do to make it work properly?
__________________
Reply With Quote
  #257    
Old May 31st, 2010, 05:17 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
@metapod23: Use special 0x6 before AND AFTER. Like so:
Code:
special 0x6
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
special 0x6
The first usage decrypts the Pokémon for editing, the second one recrypts the Pokémon into the party.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #258    
Old May 31st, 2010, 05:53 AM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by diegoisawesome View Post
@metapod23: Use special 0x6 before AND AFTER. Like so:
Code:
special 0x6
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
special 0x6
The first usage decrypts the Pokémon for editing, the second one recrypts the Pokémon into the party.
Well, weird glitchiness abounds. If I have my Pikachu at the front of my party when I receive Rattata, the Pokemon I receive is a clone of Pikachu, with the same amount of damage that Pikachu has at the time and same exact stats and level, but with a lower level of happiness. If another Pokemon is in front, I get Rattata, but its happiness is unchanged ...

For reference, this is the script - I have 5 Pokemon in my party when I go to get Rattata:

Code:
#org 0x836DD2
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x8836E87
fanfare 0x101
msgbox 0x8836E65 MSG_KEEPOPEN '"You adopted the abused RATTATA!"
closeonkeypress
setflag 0x1119
hidesprite 0x4
givepokemon 0x13 0x5 0x0 0x0 0x0 0x0
countpokemon
compare LASTRESULT 0x2
if 0x1 goto 0x8836E42
compare LASTRESULT 0x3
if 0x1 goto 0x8836E49
compare LASTRESULT 0x4
if 0x1 goto 0x8836E50
compare LASTRESULT 0x5
if 0x1 goto 0x8836E57
compare LASTRESULT 0x6
if 0x1 goto 0x8837941

#org 0x837941
special 0x6
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
special 0x6
end
__________________
Reply With Quote
  #259    
Old May 31st, 2010, 07:17 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Try setting 0x8004 to the party Pokémon number before using the special 0x6. Saying that, there was a much simpler way of making that script:

Code:
#org 0x836DD2
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x8836E87
fanfare 0x101
msgbox 0x8836E65 MSG_KEEPOPEN '"You adopted the abused RATTATA!"
closeonkeypress
setflag 0x1119
hidesprite 0x4
givepokemon 0x13 0x5 0x0 0x0 0x0 0x0
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
special 0x6
setvar 0x8005 0x13C
special 0x13
special 0x6
end
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #260    
Old May 31st, 2010, 10:08 AM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by diegoisawesome View Post
Try setting 0x8004 to the party Pokémon number before using the special 0x6. Saying that, there was a much simpler way of making that script:

Code:
#org 0x836DD2
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x8836E87
fanfare 0x101
msgbox 0x8836E65 MSG_KEEPOPEN '"You adopted the abused RATTATA!"
closeonkeypress
setflag 0x1119
hidesprite 0x4
givepokemon 0x13 0x5 0x0 0x0 0x0 0x0
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
special 0x6
setvar 0x8005 0x13C
special 0x13
special 0x6
end
It worked! Thanks! And thanks for the simpler script - I used it and it works fine.
__________________
Reply With Quote
  #261    
Old May 31st, 2010, 10:32 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by metapod23 View Post
It worked! Thanks! And thanks for the simpler script - I used it and it works fine.
You're welcome. Glad I could help. :D
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #262    
Old June 2nd, 2010, 02:00 PM
NarutoActor's Avatar
NarutoActor
The rocks cry out to me
Community Supporter
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 20
Gender: Female
Nature: Bashful
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
I am having problems with special 0x18b. After I applied it to my test rom, I looked at the changed data, jotted down the table pointer, and saved to rom. I made a script to test it out with 0x8004 0x1
0x8005 0x0
0x8006 0x0
It loaded aerodactal just fine, but if I change the pointer it still stays an aerodactal. If I change the var(8004) to any value other that one, the whole image is all screwed up. :/
__________________
~There are those people who understand hex, F the rest
Reply With Quote
  #263    
Old June 8th, 2010, 01:59 PM
TAKUORO's Avatar
TAKUORO
Pyro from WAH ;D
 
Join Date: Jul 2009
Location: Costa Rica
Gender: Male
Nature: Relaxed
I got a little outdated, If I apply this one to the old one, my progress would still be there or I have to start over?
Reply With Quote
  #264    
Old June 8th, 2010, 03:52 PM
Curt_09's Avatar
Curt_09
Also known as Chozo
 
Join Date: Feb 2009
Location: Oklahoma
Age: 23
Gender: Male
Hey guys, is anyone else having problems running Start Map Chooser Advanced with the hacked engine? I used the patch. Is this a problem that only occurs for me, only occurs for the patch, or only occurs for the hacked engine? I'm curious to know if I should have just used the tool, instead of downloading and using the first thing I saw, which was the patch. I applied it, then saw the tool and downloaded it as well. Didn't see any need to use the tool as I'd already applied the patch.
But anyway, yeah, the problem with SMCA. Am I the only one? And if not, what causes it?
This is the error I'm getting:
Spoiler:
__________________
Old hacks I liked back in the day:



Reply With Quote
  #265    
Old June 9th, 2010, 03:55 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
The problem you're getting is because SMCA reads a value in FR from a script. And, since the patch deletes all scripts from the game, it comes up as an FF byte (which SMCA doesn't know how to interpret). You'll have to edit the starting map/position in hex.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #266    
Old June 9th, 2010, 05:21 AM
Curt_09's Avatar
Curt_09
Also known as Chozo
 
Join Date: Feb 2009
Location: Oklahoma
Age: 23
Gender: Male
Quote:
Originally Posted by diegoisawesome View Post
The problem you're getting is because SMCA reads a value in FR from a script. And, since the patch deletes all scripts from the game, it comes up as an FF byte (which SMCA doesn't know how to interpret). You'll have to edit the starting map/position in hex.
Thank you diegoisawesome. Darthatron explained it to me last night and gave me the offsets so I could go edit it with hex.
Do you know why I couldn't get a level script to work in my start map? I'm assuming it's caused by the same thing.
__________________
Old hacks I liked back in the day:



Reply With Quote
  #267    
Old June 9th, 2010, 05:58 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
You might have forgotten to fix the glitch byte in the level script. Most level scripting tutorials should tell you how to fix this.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #268    
Old June 9th, 2010, 06:04 AM
Curt_09's Avatar
Curt_09
Also known as Chozo
 
Join Date: Feb 2009
Location: Oklahoma
Age: 23
Gender: Male
Quote:
Originally Posted by diegoisawesome View Post
You might have forgotten to fix the glitch byte in the level script. Most level scripting tutorials should tell you how to fix this.
I decompiled the map script and fixed the raw word, if that's what you mean. I tried moving the script to a different map, and it worked just fine. Something about the start map is jacked up.
__________________
Old hacks I liked back in the day:



Reply With Quote
  #269    
Old June 25th, 2010, 07:27 AM
louitzie
Beginning Trainer
 
Join Date: Aug 2009
Gender: Male
JPAN can you please make a manual for dummies i dont know how to use the most of this functions.
Reply With Quote
  #270    
Old June 25th, 2010, 07:41 AM
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 40
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
Quote:
Originally Posted by louitzie View Post
JPAN can you please make a manual for dummies i dont know how to use the most of this functions.
there already is a manual for dummies
__________________
http://www.pokecommunity.com/member.php?u=253113
Reply With Quote
  #271    
Old June 25th, 2010, 08:28 AM
louitzie
Beginning Trainer
 
Join Date: Aug 2009
Gender: Male
if if i aply the v1.1 ips with lunar ips
then i get this when i go outside my house
i patched it with a clean rom
Attached Images
File Type: png s1.png‎ (2.1 KB, 14 views) (Save to Dropbox)
Reply With Quote
  #272    
Old June 25th, 2010, 08:33 AM
vietazn654's Avatar
vietazn654
A sound soul dwells within me
 
Join Date: Feb 2010
Location: Virginia
Age: 19
Gender: Male
Nature: Adamant
Send a message via Windows Live Messenger to vietazn654 Send a message via Yahoo to vietazn654
Quote:
Originally Posted by louitzie View Post
if if i aply the v1.1 ips with lunar ips
then i get this when i go outside my house
i patched it with a clean rom
You're first supposed to use JPAN's Clean Fire Red ROM. Then patch it to this engine. Either than that, it looks like you messed with the warps.
__________________

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
Reply With Quote
  #273    
Old June 25th, 2010, 11:20 AM
louitzie
Beginning Trainer
 
Join Date: Aug 2009
Gender: Male
that doesnt work for me i used the us version from [MESSAGE FROM STAFF: NO LINKING TO ROM SITES]
first i patched with the clean fire red 1.ips
and then with the hacked engine.ips
and i get the same result

please see the next page for a walking script question.

Last edited by louitzie; June 26th, 2010 at 01:51 AM.
Reply With Quote
  #274    
Old June 25th, 2010, 11:29 AM
vietazn654's Avatar
vietazn654
A sound soul dwells within me
 
Join Date: Feb 2010
Location: Virginia
Age: 19
Gender: Male
Nature: Adamant
Send a message via Windows Live Messenger to vietazn654 Send a message via Yahoo to vietazn654
Quote:
Originally Posted by louitzie View Post
that doesnt work for me i used the us version from 3roms.com
first i patched with the clean fire red 1.ips
and then with the hacked engine.ips
and i get the same result
I know that picture. You need to fix the warps. Go to Pallet Town map and see if they are warps there. If not, add one to the house and make sure the map and bank areas are correct.
__________________

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
Reply With Quote
  #275    
Old June 25th, 2010, 11:49 AM
louitzie
Beginning Trainer
 
Join Date: Aug 2009
Gender: Male
Thanks Vietanz654
that just one problem solved

i'm try to make a script that you get money for each step you do

and i use this code

#org 0x800000
lock
givemoney 0x1 0x0
release
end

setting the walking script pointer to 800000

and i use a signpost to set var 0x407e to 0x1
#org 0x810000
lock
setvar 0x407e 0x1
release
end

and when i activate the signpost and doing the a next step the game freezes.

can someone say what i do wrong?

Last edited by louitzie; June 26th, 2010 at 02:49 AM.
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

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

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



All times are UTC -8. The time now is 07:10 PM.


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