• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

HackMew's Knowledge

FlameShocker

C++/ASM Programmer
64
Posts
15
Years
I was wondering, is the
Code:
.VAR:
     .word 0x020270B6 + (0x800D * 2)
in the ASM code in lesson 1 for the buffer part of the script? I don't know since I'm still new to assembly and scripting. The main reason I'm asking is because I'd like to know how I can modify the .word portion. Additionally, what is the
Code:
+ (0x800D * 2)
for?

Edit: One thing I forgot to mention: I'm hacking Fire Red.

I found out that 0x800D is the buffer (yay, scripting tutorials), but what's the times 2 thing for?

Also, what does address 0x020270B6 do (in Fire Red)?
 
Last edited:

colcolstyles

Yours truly
1,588
Posts
15
Years
I was wondering, is the
Code:
.VAR:
     .word 0x020270B6 + (0x800D * 2)
in the ASM code in lesson 1 for the buffer part of the script? I don't know since I'm still new to assembly and scripting. The main reason I'm asking is because I'd like to know how I can modify the .word portion. Additionally, what is the
Code:
+ (0x800D * 2)
for?

Edit: One thing I forgot to mention: I'm hacking Fire Red.

I found out that 0x800D is the buffer (yay, scripting tutorials), but what's the times 2 thing for?

Also, what does address 0x020270B6 do (in Fire Red)?

That is the address of the variable '0x800D' (more commonly known as 'LASTRESULT') in the WRAM. The reason that "+ (0x800D * 2)" is appended to the main '0x020270B6' part is that if you multiply 0x800D by 2 and then add it to the main part, you get '0x020370D0' which is the actual address of '0x800D'. HackMew formatted it that way for convenience. If you wanted to use variable '0x8004' instead, all you have to do is change '0x800D' to '0x8004'. Otherwise, you'd have to calculate what address '0x8004' is at and that's just no fun.
 
2
Posts
13
Years
  • Seen Jul 8, 2014
Hi, how exactly the extended script looks like regarding to the Trainer ID + Secret ID in the 1st ASM Lesson? I just manage to get the Trainer ID to show up but not the Secret ID.

I'll just recopy the script part from the 1st Lesson so anyone of you don't have to look back:
Spoiler:

and the ASM that I'm based on (Emerald):
Spoiler:

And, do you set the [buffer1] twice in the strings area or split it to something like [buffer1] and [buffer2]?

I really like to know how it's done because the extended script isn't covered in any of the tutorials (only the crucial asm part was covered in the end of 2nd ASM Lesson).
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Hi, how exactly the extended script looks like regarding to the Trainer ID + Secret ID in the 1st ASM Lesson? I just manage to get the Trainer ID to show up but not the Secret ID.

I'll just recopy the script part from the 1st Lesson so anyone of you don't have to look back:
Spoiler:

and the ASM that I'm based on (Emerald):
Spoiler:

And, do you set the [buffer1] twice in the strings area or split it to something like [buffer1] and [buffer2]?

I really like to know how it's done because the extended script isn't covered in any of the tutorials (only the crucial asm part was covered in the end of 2nd ASM Lesson).

The ASM looks fine as far as I can tell. Here's how I would do the script:
Code:
#dynamic 0x800000

#org @start
callasm YourOffset
buffernumber 0x0 0x800D
buffernumber 0x1 0x800E
msgbox @secret 0x2
end

#org @secret
= Sshh! I'll tell you a secret[.]\nYour Secret ID is [buffer1]! Also, your Trainer ID is [buffer2].

So, yes, you would use 'buffer2'. Just remember that you have to buffer the second number and use '0x01' as the first parameter. It's a little counterintuitive because the number stored in 'buffer 0x0' is accessed via 'buffer1' and the number stored in 'buffer 0x1' is accessed via 'buffer2' but you'll get the hang of it. Also note that since you stored the second number at 'r0 + #0x02', the number would be contained in the variable after LASTRESULT (0x800D), i.e., 0x800E.
 
2
Posts
13
Years
  • Seen Jul 8, 2014
Thank you!

Once, I thought I had to make some comparative function. The closest thing I did was:

Code:
#dynamic 0x800000

#org @start
callasm YourOffset
buffernumber 0x0 LASTRESULT
buffernumber 0x1 LASTRESULT
msgbox @secret 0x2
end

#org @secret
= [buffer1] and [buffer2].

All this while, I thought that the LASTRESULT (0x800D) was the only carrier for an output/result, lol. I should be more careful in reading any scripts/tutorials after this.

So, yes, you would use 'buffer2'. Just remember that you have to buffer the second number and use '0x01' as the first parameter. It's a little counterintuitive because the number stored in 'buffer 0x0' is accessed via 'buffer1' and the number stored in 'buffer 0x1' is accessed via 'buffer2' but you'll get the hang of it. Also note that since you stored the second number at 'r0 + #0x02', the number would be contained in the variable after LASTRESULT (0x800D), i.e., 0x800E.

Thank you again for the reminder, the actual 2nd call is at 0x800F.
 
Last edited:

EdensElite

No0b, but getting there.
190
Posts
12
Years
  • Age 28
  • UK
  • Seen Jul 4, 2014
This has cleared a few things up for me thanks ^.^, But just a question, do you actually need ASM to script, or can I just never go near ASM and just use XSE to compile scripts without it?
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
This has cleared a few things up for me thanks ^.^, But just a question, do you actually need ASM to script, or can I just never go near ASM and just use XSE to compile scripts without it?

ASM and scripting are two different things. ASM is actual coding that the game uses to manage data. Scripting is string of commands used for events. While scripting can call ASM, ASM isn't needed to script.
 
11
Posts
12
Years
  • Age 29
  • USA
  • Seen Aug 9, 2013
Hello, is there a way to change the names of the main Pokemon natures? For example instead of GENTLE, I could rename it SILLY, while keeping the same effects that GENTLE would in the game. I'm using Emerald version, by the way. Thanks!
 
11
Posts
12
Years
  • Age 29
  • USA
  • Seen Aug 9, 2013
Thanks, I only have one more question. I can get my scripts to work, but only if I start a completely new file! How do I fix this? I want to be able to load my old file and see the changes I made. Oh and when I load my save-states, I can't go through any doors.
 
14
Posts
14
Years
  • Seen Feb 16, 2014
white screen

please, I really can't see what I'm doing wrong

when I open the rom, it's just a white screen, the rom doesn't start...

that fine, I was missing the vba-over.ini file

so if soemone else has the error, that solve the problems
 
Last edited:
24
Posts
12
Years
  • Seen Jun 11, 2013
I might look like an idiot, but.... I need an advancemap tutorial.Its simple,but I'm simpler.And the tools are really good!
 
2
Posts
12
Years
  • Seen Aug 16, 2012
I have a question about your debbuger,because the command prompt dysplays this message:

..............
Unknown file type pokemon.

Also,when trying to open a fire red rom,only a white image is displayed in the emulator.

But apart from all this all your tools are exellent,specially xse because I really like scripting in an easy way(not like pokescript or scripted).

Sorry for any mistake I commit but English is not my native language.
 
94
Posts
13
Years
  • Seen Nov 2, 2016
This is way more complicated than it needs to be... 080440F4 is the shiny decision routine. Go to 0804411E and replace it with 00 20. This is the spot that it checks whether the value is greater or less than 7. Replacing that will make the value always 00 right before the check, and that means all pokemon will be shiny. Much easier to replace 2 bytes.

just throwin that out there
 
Back
Top