Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub

Notices
For all updates, view the main page.

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #26376    
Old August 28th, 2013 (09:26 AM).
kelewele_
 
Join Date: May 2013
Gender: Male
thanks @awipe1 ... found the script that makes the player battle battle rival, i think that was main problem

also does anyone know what's wrong with script? i get the battle alright, but not the movement >.<

'#dyn 0x740000
#org @start
lock
applymovement 0x10 @walk
pauseevent 0x0
message @text
showmsg
playsound 0x11B 0x0
waitbutton
trainerbattle 0x3 0x146 0x0 @defeat
msgbox @text2
callstd MSG_NOCLOSE
fadescreen FADEOUT_BLACK
closemsg
disappear 0x10
fadescreen FADEIN_BLACK
release
end

#org @text
= Training has brought me further once\nmore!\pMaybe I'll restore TEAM ROCKET\nto it's former glory!

#org @defeat
= I would expect nothing less from the\nnew LEAGUE CHAMPION!

#org @text2
= I see that your still taining hard!\nFarewell until we meet again[.]

#org @walk
m walk_down walk_down walk_down walk_down walk_down walk_down end'
  #26377    
Old August 28th, 2013 (09:28 AM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by kelewele_:
thanks @awipe1 ... found the script that makes the player battle battle rival, i think that was main problem

also does anyone know what's wrong with script? i get the battle alright, but not the movement >.<

'#dyn 0x740000
#org @start
lock
applymovement 0x10 @walk
pauseevent 0x0
message @text
showmsg
playsound 0x11B 0x0
waitbutton
trainerbattle 0x3 0x146 0x0 @defeat
msgbox @text2
callstd MSG_NOCLOSE
fadescreen FADEOUT_BLACK
closemsg
disappear 0x10
fadescreen FADEIN_BLACK
release
end

#org @text
= Training has brought me further once\nmore!\pMaybe I'll restore TEAM ROCKET\nto it's former glory!

#org @defeat
= I would expect nothing less from the\nnew LEAGUE CHAMPION!

#org @text2
= I see that your still taining hard!\nFarewell until we meet again[.]

#org @walk
m walk_down walk_down walk_down walk_down walk_down walk_down end'
What script editor is this? And an FYI, this question should go in the script help thread. Make sure your movement is in hex, so 0x10 is hex.
__________________
  #26378    
Old August 28th, 2013 (09:29 AM).
Satoshi Ookami's Avatar
Satoshi Ookami
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Quote originally posted by gogojjtech:
What script editor is this? And an FYI, this question should go in the script help thread. Make sure your movement is in hex, so 0x10 is hex.
It's normal XSE with macros (those CAPS thingies that replace the hex.).
And why should this only go to script thread? This is also simple question

@kelewele: Care to post the movement as well? Btw you are missing waitmovement 0x0 after the movement command.
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #26379    
Old August 28th, 2013 (09:45 AM).
trafalgar's Avatar
trafalgar
Hasgana
 
Join Date: Aug 2010
Gender: Female
Quote:
Quote originally posted by trafalgar:
Is there any way to swap the values ​​of two registers?
r1 -> r2
r1 <- r2

Excuse my English but I use google translator: \
Quote originally posted by gogojjtech:
But anyway you could store r1 in r3, then put r2 in r1, then r3 in r2
Like this:
r1 -> r3
r2 -> r1
r3 -> r2

But clear r3 afterwards. The command you should use is mov.
I already tried with the exchange algorithms but nothing. However, I have to move many bytes: \
It would be a mess to do so. Also because I need to move the attributes of obj and send them forward.
  #26380    
Old August 28th, 2013 (09:47 AM). Edited August 28th, 2013 by GoGoJJTech.
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by Ash493:
It's normal XSE with macros (those CAPS thingies that replace the hex.).
And why should this only go to script thread? This is also simple question

@kelewele: Care to post the movement as well? Btw you are missing waitmovement 0x0 after the movement command.
No, look. There is a label at the bottom that says @walk. This is not XSE...

Quote originally posted by trafalgar:
I already tried with the exchange algorithms but nothing. However, I have to move many bytes: \
It would be a mess to do so. Also because I need to move the place of obj and send them forward.
Try the ldr, ldrb or ldrh, but of course choose the correct one.
__________________
  #26381    
Old August 28th, 2013 (09:55 AM).
trafalgar's Avatar
trafalgar
Hasgana
 
Join Date: Aug 2010
Gender: Female
Quote originally posted by gogojjtech:
No, look. There is a label at the bottom that says @walk. This is not XSE...



Try the ldr, ldrb or ldrh, but of course choose the correct one.
would be seen that the correct ldrh move 2 bytes but is not
to me, however, would move more than 2 bytes, it should move 8. There is not one specific swi that invert the values ​​in two registers?
  #26382    
Old August 28th, 2013 (09:57 AM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by trafalgar:
would be seen that the correct ldrh move 2 bytes but is not
to me, however, would move more than 2 bytes, it should move 8. There is not one specific swi that invert the values ​​in two registers?
Well if it's 8 bytes, you just simply cannot. The most a register can hold is a dword, which is 4 bytes. Like a pointer, that's a dword. 8 bytes would mean doing the operation twice.
__________________
  #26383    
Old August 28th, 2013 (10:00 AM).
trafalgar's Avatar
trafalgar
Hasgana
 
Join Date: Aug 2010
Gender: Female
Quote originally posted by gogojjtech:
Well if it's 8 bytes, you just simply cannot. The most a register can hold is a dword, which is 4 bytes. Like a pointer, that's a dword. 8 bytes would mean doing the operation twice.
For this I would need to know if there is a swi which allows the drive: \
  #26384    
Old August 28th, 2013 (10:00 AM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by trafalgar:
For this I would need to know if there is a swi which allows the drive: \
Sorry, I don't think there is. Try gbatemp. they might have one.
__________________
  #26385    
Old August 28th, 2013 (10:09 AM).
trafalgar's Avatar
trafalgar
Hasgana
 
Join Date: Aug 2010
Gender: Female
Quote originally posted by gogojjtech:
Sorry, I don't think there is. Try gbatemp. they might have one.
Thanks.
On gba tek I found this but I do not understand how it works.
Spoiler:
SWI 0Fh (GBA) - ObjAffineSet
Calculates and sets the OBJ's affine parameters from the scaling ratio and angle of rotation.
The affine parameters are calculated from the parameters set in Srcp.
The four affine parameters are set every Offset bytes, starting from the Destp address.
If the Offset value is 2, the parameters are stored contiguously. If the value is 8, they match the structure of OAM.
When Srcp is arrayed, the calculation can be performed continuously by specifying Num.
r0 Source Address, pointing to data structure as such: s16 Scaling ratio in X direction (8bit fractional portion) s16 Scaling ratio in Y direction (8bit fractional portion) u16 Angle of rotation (8bit fractional portion) Effective Range 0-FFFF r1 Destination Address, pointing to data structure as such: s16 Difference in X coordinate along same line s16 Difference in X coordinate along next line s16 Difference in Y coordinate along same line s16 Difference in Y coordinate along next line r2 Number of calculations r3 Offset in bytes for parameter addresses (2=continuous, 8=OAM) Return: No return value, Data written to destination address.

For both Bg- and ObjAffineSet, Rotation angles are specified as 0-FFFFh (covering a range of 360 degrees), however, the GBA BIOS recurses only the upper 8bit; the lower 8bit may contain a fractional portion, but it is ignored by the BIOS.
  #26386    
Old August 28th, 2013 (10:09 AM).
kelewele_
 
Join Date: May 2013
Gender: Male
gogojjtech oh right so sry for using the wrong thread... and thanks so much forgot abt the hex thing, i keep getting stuck in my hack with minor things and im too stubborn to move on before figuring it out lol ... oh and i was using PKSV
  #26387    
Old August 28th, 2013 (10:10 AM). Edited August 28th, 2013 by GoGoJJTech.
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by trafalgar:
Thanks.
On gba tek I found this but I do not understand how it works.
Spoiler:
SWI 0Fh (GBA) - ObjAffineSet
Calculates and sets the OBJ's affine parameters from the scaling ratio and angle of rotation.
The affine parameters are calculated from the parameters set in Srcp.
The four affine parameters are set every Offset bytes, starting from the Destp address.
If the Offset value is 2, the parameters are stored contiguously. If the value is 8, they match the structure of OAM.
When Srcp is arrayed, the calculation can be performed continuously by specifying Num.
r0 Source Address, pointing to data structure as such: s16 Scaling ratio in X direction (8bit fractional portion) s16 Scaling ratio in Y direction (8bit fractional portion) u16 Angle of rotation (8bit fractional portion) Effective Range 0-FFFF r1 Destination Address, pointing to data structure as such: s16 Difference in X coordinate along same line s16 Difference in X coordinate along next line s16 Difference in Y coordinate along same line s16 Difference in Y coordinate along next line r2 Number of calculations r3 Offset in bytes for parameter addresses (2=continuous, 8=OAM) Return: No return value, Data written to destination address.

For both Bg- and ObjAffineSet, Rotation angles are specified as 0-FFFFh (covering a range of 360 degrees), however, the GBA BIOS recurses only the upper 8bit; the lower 8bit may contain a fractional portion, but it is ignored by the BIOS.
It's still saying the max is 4 bytes long, so it won't work.

Quote originally posted by kelewele_:
gogojjtech oh right so sry for using the wrong thread... and thanks so much forgot abt the hex thing, i keep getting stuck in my hack with minor things and im too stubborn to move on before figuring it out lol ... oh and i was using PKSV
You SHOULD be using the XSE from gamer2020's toolbox, but PKSV is new-ish.
__________________
  #26388    
Old August 28th, 2013 (01:45 PM).
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 22
Gender: Male
Nature: Bold
I'm trying to change the grass animation via NSE 2.1 on a Pokemon Ruby rom. I load my rom then go to Navigate > POKEMON > BPRE > Sprites > Landscape > Grass

however when I get there, all I see is a bunch of dots going down vertically where the image should be. I'm not exactly sure if this is the right way to change it? I'm only trying to change the palette of the picture so I was wanting to insert a recolored animation image.
__________________







/// Pokémon: Discovery
/// Pokémon: Fat Kid
/// Tile Insertion Tutorial For AdvanceMap
/// Pokémon Emerald Specials Resource Thread
/// Pokémon Emerald Decapitalization Patch
/// Emerald Titlescreen Cloud Removal Tutorial
/// Tutorial For Fixing Any ROM-related Bug
  #26389    
Old August 28th, 2013 (01:51 PM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by Le pug:
I'm trying to change the grass animation via NSE 2.1 on a Pokemon Ruby rom. I load my rom then go to Navigate > POKEMON > BPRE > Sprites > Landscape > Grass

however when I get there, all I see is a bunch of dots going down vertically where the image should be. I'm not exactly sure if this is the right way to change it? I'm only trying to change the palette of the picture so I was wanting to insert a recolored animation image.
On a RUBY ROM, doing BPRE. Ruby's code is AXVE, not BPRE.
AXVE: Ruby
AXPE: Sapphire
BPRE: FireRed
BPGE?: Leaf Green (I think it's BPGE)
BPEE: Emerald

So you load with the correct game Code. That goes for all tools. If you want to find it, (and if it's not in NSE), look in VBA for the tiles, copy the offset, then go to the memory viewer, and search for the bytes at that offset in your ROM.
__________________
  #26390    
Old August 28th, 2013 (07:14 PM).
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 22
Gender: Male
Nature: Bold
On AdvanceMap 1.95 I have two maps perfectly connected and the movements are assigned correctly yet in game, I can't cross into the map over. When I try to change the name of the second (newest) map, I get the error "ERROR: (ENotAPointer) AdvanceMapError(5): The value #3E73C0 is not a pointer! Please contakt [email protected]"

Any way how to fix this?
__________________







/// Pokémon: Discovery
/// Pokémon: Fat Kid
/// Tile Insertion Tutorial For AdvanceMap
/// Pokémon Emerald Specials Resource Thread
/// Pokémon Emerald Decapitalization Patch
/// Emerald Titlescreen Cloud Removal Tutorial
/// Tutorial For Fixing Any ROM-related Bug
  #26391    
Old August 28th, 2013 (08:01 PM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by Le pug:
:/ http://www.pokecommunity.com/showpost.php?p=7781039&postcount=304
__________________
  #26392    
Old August 28th, 2013 (11:25 PM).
Satoshi Ookami's Avatar
Satoshi Ookami
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Quote originally posted by gogojjtech:
No, look. There is a label at the bottom that says @walk. This is not XSE...
Those are macros I mentioned. They are just not capsed...
For example end = #raw 0xFE
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #26393    
Old August 29th, 2013 (02:54 AM).
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by Ash493:
Those are macros I mentioned. They are just not capsed...
For example end = #raw 0xFE
Gogojjtech: I think he is mixing PKSV (which includes these automatically) with XSE. I don't know if you have ever looked into the header files, but you can VERY easily add new commands and such with just a simple:

#define walk_fast 0xDD

Then you can use walk_fast instead of 0xDD. I'm not sure if they already exist or if you have to create them.
__________________

Paired with Simba
  #26394    
Old August 29th, 2013 (07:33 AM).
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 22
Gender: Male
Nature: Bold
In 1.92, yes it will change the name.. for instance, I changed Route 102 to Path 1. However, it is ALSO changing the names of 25.24-25.39 and 25.41-25.43 which are non-named by default, however I used most of them for my own and renamed them. Now that I renamed Route 102 to Path 1, it's renaming the others also.
__________________







/// Pokémon: Discovery
/// Pokémon: Fat Kid
/// Tile Insertion Tutorial For AdvanceMap
/// Pokémon Emerald Specials Resource Thread
/// Pokémon Emerald Decapitalization Patch
/// Emerald Titlescreen Cloud Removal Tutorial
/// Tutorial For Fixing Any ROM-related Bug
  #26395    
Old August 29th, 2013 (07:35 AM).
kelewele_
 
Join Date: May 2013
Gender: Male
so my scripts works fine and stuff... bt i didnt know what var number to use?
i just used 4000 as a draft to test it and make sure it works, bt for the real thing what is var number is recommended? lots of places seem to say 4050?? O.o
  #26396    
Old August 29th, 2013 (07:58 AM).
awipe1's Avatar
awipe1
 
Join Date: Aug 2012
Gender: Male
Quote originally posted by kelewele_:
so my scripts works fine and stuff... bt i didnt know what var number to use?
i just used 4000 as a draft to test it and make sure it works, bt for the real thing what is var number is recommended? lots of places seem to say 4050?? O.o
To know which Var numbers to use, I recommened using this link.

http://www.pokecommunity.com/showpost.php?p=7563059&postcount=24067

What I do is I keep track of every flag and variable I use, so I never reuse the same ones.
__________________
Check out my Pokemon Rom! Click the Image Below!
  #26397    
Old August 29th, 2013 (08:04 AM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by Le pug:
In 1.92, yes it will change the name.. for instance, I changed Route 102 to Path 1. However, it is ALSO changing the names of 25.24-25.39 and 25.41-25.43 which are non-named by default, however I used most of them for my own and renamed them. Now that I renamed Route 102 to Path 1, it's renaming the others also.
What is probably happening is the names consist of the same pointer to the name. So if you don't understand:
Route 101 -> 0x64A524
Route 102 -> 0x64A524

These are examples. They point to the same location, so if you change one, you change the other. You could change a pointer so that way you have two separate names, and one changes at a time. Makes sense?
__________________
  #26398    
Old August 29th, 2013 (12:57 PM).
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 22
Gender: Male
Nature: Bold
Quote originally posted by gogojjtech:
What is probably happening is the names consist of the same pointer to the name. So if you don't understand:
Route 101 -> 0x64A524
Route 102 -> 0x64A524

These are examples. They point to the same location, so if you change one, you change the other. You could change a pointer so that way you have two separate names, and one changes at a time. Makes sense?
Makes sense. Do you know how I can change the pointers?
__________________







/// Pokémon: Discovery
/// Pokémon: Fat Kid
/// Tile Insertion Tutorial For AdvanceMap
/// Pokémon Emerald Specials Resource Thread
/// Pokémon Emerald Decapitalization Patch
/// Emerald Titlescreen Cloud Removal Tutorial
/// Tutorial For Fixing Any ROM-related Bug
  #26399    
Old August 29th, 2013 (12:58 PM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Quote originally posted by Le pug:
Makes sense. Do you know how I can change the pointers?
Search in your ROM for them. If you don't have a hex editor, then here: https://www.dropbox.com/s/o5ypef31rbg922n/HxD%20Hex%20Editor%20Portable.rar
__________________
  #26400    
Old August 29th, 2013 (02:30 PM).
Koolmaqe's Avatar
Koolmaqe
 
Join Date: Aug 2013
Gender: Male
Hey, I have a question. I am working on my first Rom, and I FINALLY discovered how to make pokeballs give pokemans. Now...

How do I make it so I don't have to run Oak's Parcel in this one???

(Fire red)

...Oak doesn't exist in this hack....

Advise??
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

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

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



All times are UTC -8. The time now is 08:16 AM.