• 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?".
  • 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.

[ARCHIVE] Simple Questions (SEARCH BEFORE ASKING A QUESTION)

Status
Not open for further replies.
21
Posts
14
Years
  • Age 36
  • Seen Feb 24, 2015
awesome....thanks.....that makes mapping alot easier...il find the guide later but thanks for the direction...im toying with firered ive only done to viridian forest and thats wo changing alot of scripts sigh like 4hrs work :( i changed an item on a signpost and wow had delete the sign cuz the sign made it very glitchy. The smallest change can freeze the game up didnt know that. Anyways thanks again
 
32
Posts
13
Years
  • Seen Dec 5, 2023
Not in an overly easy way, no. You can either implement some ASM code to store the level of a pokemon in a variable then use a script to display it, or you can do it ALL in a script. The ASM code is a much better option.

ASM Code option:
Code:
.align 2
.thumb

start:

	push {r0-r3, lr}
	
		ldr r0, Var_8004		/*load the pointer of variable 0x8004 into r0*/
		ldrh r1, [r0]			/*load the value of variable 0x8004 into r1*/
		
		cmp r1, #0x5			/*compares the value of r1 to 0x5*/
		bgt quit				/*if greater than 0x5, goto quit label*/
		
		mov r0, #0x64			/*set the value of r1 to 0x64*/
		mul r1, r0				/*multiply by r1 (0x64) to 'move' to that pokemon slot*/

		ldr r2, Party_Pointer	/*load the pointer for party data into r2*/
		add r2, #0x54			/*move to where the level is stored*/
		add r2, r1				/*add the value of r1 to r2*/
		
		ldrb r3, [r2]			/*load the level byte into r0*/

quit:

		ldr r1, Var_800D		/*load the pointer for variable 0x800D into r1*/
		strh r3, [r1]			/*store the (halfword) level value into var 0x800D*/
 
	pop {r0-r3, pc}

Party_Pointer: .word 0x02024284
Var_8004: .word 0x020370c0
Var_800D: .word 0x020370d0

Script option:
Code:
#dynamic 0x800000

#org @Pokemon1
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020242D8
return
end

#org @Pokemon2
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x0202433C
return
end

#org @Pokemon3
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020242A0
return
end

#org @Pokemon4
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x02024404
return
end

#org @Pokemon5
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x02024468
return
end

#org @Pokemon6
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020244CC
return
end

Hope that helps.

I still remain somewhat confuzzled as to the operations occurring here. Are both options independent of each other?
If so, what is LASTRESULT referencing in the script option?

In either case, with the level of the pokemon loaded into variable, it is then possible to run a compare function and split the script dependent on the value the variable was set to, yes?
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I still remain somewhat confuzzled as to the operations occurring here. Are both options independent of each other?
If so, what is LASTRESULT referencing in the script option?
They're completely independent. LASTRESULT is another name for Variable 0x800D, and in the script version, you're basically copying the data from the Pokemon section of RAM, to the RAM address used to store LASTRESULT's value. Think of it as a roundabout "setvar". (The "setvar" before the "copybyte" command works because LASTRESULT is a two-byte value. Copybyte only changes one byte. Setvar deals with the byte that Copybyte misses.)

In either case, with the level of the pokemon loaded into variable, it is then possible to run a compare function and split the script dependent on the value the variable was set to, yes?
Yes. Just your standard compare/comparevar and if statements.
 
32
Posts
13
Years
  • Seen Dec 5, 2023
They're completely independent. LASTRESULT is another name for Variable 0x800D, and in the script version, you're basically copying the data from the Pokemon section of RAM, to the RAM address used to store LASTRESULT's value. Think of it as a roundabout "setvar". (The "setvar" before the "copybyte" command works because LASTRESULT is a two-byte value. Copybyte only changes one byte. Setvar deals with the byte that Copybyte misses.)

Yes. Just your standard compare/comparevar and if statements.

Awesome, thanks!

Where am I messing up here, then?

...
#org @start
lock
faceplayer
checkflag 0x6C
if 0x1 goto @other
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020242D8
compare 0x800D 0x5
if 0x1 goto @weak
compare 0x800D 0x7
if 0x1 goto @strong
msgbox @fight 0x6
release
end
...

It seems to go right from faceplayer to release.
Perhaps I'm copying the wrong bytes? (I'm using Ruby)
 
3
Posts
12
Years
  • Seen Nov 22, 2011
Hello

Im trying to hack pokemon fire red for my personal use, and i was thinking about create some other islands with legendaries from other versions. What i want to know is the way to go to them with tickets like we go to birth island or navel rock. I also want to obtain rainbow/mystic... tickets without cheats (finding them on the wild or someone giving them to me) and make the sailor on virmilion recognise them. I've tryed this and he only recognise the tri-pass.

Thanks in advance
 
4
Posts
13
Years
Hey guys. I have a couple of questions that have been asked before, but I couldn't seem to find any clear answers. Let me know if any of you have an idea how to accomplish these. Thanks in advance! - Devinsparce

I am working with Fire Red

1. After you press start at the intro, the game explains the controls. How can I completely remove this section.

2. After it shows you the controls, before Professor Oak comes on screen, there is a preface with Pikachu in the corner. I would like to either (1) get rid of pikachu, or (2) remove this part all together.

Thanks again everyone!
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Im trying to hack pokemon fire red for my personal use, and i was thinking about create some other islands with legendaries from other versions. What i want to know is the way to go to them with tickets like we go to birth island or navel rock.
You'll need to create or modify items to function as tickets, and then write scripts that check for them.

I also want to obtain rainbow/mystic... tickets without cheats (finding them on the wild or someone giving them to me) and make the sailor on virmilion recognise them. I've tryed this and he only recognise the tri-pass.
If flags 0x84A and 0x84B are not set, then the Mystic and Aurora tickets, respectively, will be ignored even if the player has them in their Bag. I don't know when or how these flags get set, or what else they might affect, however.
 
73
Posts
14
Years
  • Seen Aug 31, 2014
Question:

Is there a Third Gen Casino prize editing program? I think I can figure it out by hand, but I always like tools to make it faster and coordinate it easier.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Hey guys. I have a couple of questions that have been asked before, but I couldn't seem to find any clear answers. Let me know if any of you have an idea how to accomplish these. Thanks in advance! - Devinsparce

I am working with Fire Red

1. After you press start at the intro, the game explains the controls. How can I completely remove this section.

2. After it shows you the controls, before Professor Oak comes on screen, there is a preface with Pikachu in the corner. I would like to either (1) get rid of pikachu, or (2) remove this part all together.

Thanks again everyone!

If you want to remove those two screens from the game completely, you would have to use ASM, which far beyond the ability of a regular hacker. You can however, remove the Pikachu in the second screen.

In unLZ.GBA you can find parts of the moving Pikachu at 345, 346 and 2028 in an untouched FR ROM. Replace them with the transparent colour and it won't show up in-game.

Question:

Is there a Third Gen Casino prize editing program? I think I can figure it out by hand, but I always like tools to make it faster and coordinate it easier.

Nah, I don't think there is such a program. Though, to be honest, it isn't too hard to change manually.
 
24
Posts
12
Years
  • Seen Apr 15, 2012
Using a FireRom, in XSE version 1.0, whenever I go to compile a script that involves the 'giveitem' command, I am told:

Error 13 'Type mismatch' on line 166. Missing #define or parameter. Line: giveitem2 0x4 0x5 0x101
(obv. the line number varies).

But this is even when I go to compile an entirely unaltered script (therefore I know it must work)! For example, the quote above is from when I have been trying to reset Professor Oak's script (by pasting the original script over my altered one). But, it will not accept the 'giveitem2' command. The same thing happens when I go to compile Brock's speech, when he gives you TM39.

Is this a problem with this version of XSE, or the ROM I'm using, or what? Please and thank you.


Nevermind. I found version 1.1 and it seems to compile it fine now.
 
Last edited:
124
Posts
12
Years
I am in need of some help.

I need to know how to add 'crys' to a script.
And also how do I find out the cry number for each Pokemon?

If someone could help me in Pokescript format, that would be nice.
But I will accept XSE format as well.

Please help =]
 
1,344
Posts
14
Years
  • Seen Dec 10, 2021
I am in need of some help.

I need to know how to add 'crys' to a script.
And also how do I find out the cry number for each Pokemon?

If someone could help me in Pokescript format, that would be nice.
But I will accept XSE format as well.

Please help =]
Code:
cry 0xA1 1
nop
nop
in Pokescript, the 1 represents which Pokemon the cry is from (In my case, it's bulbasaur), so you just change the 1 to whatever Pokemon whose cry you want. you'll have to add two nops for it to work correctly.
----------------------------------------
On to my question, I know there's a command that makes the last sprite you talked to disappear (#raw 0x53 0x0F 0x80), but is there a way to make the last sprite you talked to move? This is using Pokescript. Thanks. :)
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
On to my question, I know there's a command that makes the last sprite you talked to disappear (#raw 0x53 0x0F 0x80), but is there a way to make the last sprite you talked to move? This is using Pokescript. Thanks. :)

The variable 0x800F always refers to the person you spoke with last and can be used in a regular applymovement script in place of the person's number. It is quite useful and should hopefully be compatible with PokeScript :D
 
124
Posts
12
Years
Code:
cry 0xA1 1
nop
nop
in Pokescript, the 1 represents which Pokemon the cry is from (In my case, it's bulbasaur), so you just change the 1 to whatever Pokemon whose cry you want. you'll have to add two nops for it to work correctly.
Thanks for that. I just want to know, what does the 0xA1 do in the script?
 
3
Posts
12
Years
  • Seen Dec 3, 2011
Hi guys, I'm hacking Ruby/Emerald and I want to use rematchable trainers in my hack, but when I move them from the Route they were into to another place, it still requires me to walk in the original Route to trigger the rematch... is there a way to "move" also the required steps to the other Route?
 
12
Posts
12
Years
  • Age 39
  • Seen May 10, 2014
Building a shop

Using Advance map, I decided to build a shop in Dewford, by using the shop tilesets, and copying the inside of Oldale town's shop.

Yet, despite that, AdvanceMart doesn't recognize that there's now a shop in Dewford, and it's selling the same stuff as Oldale. Otherwise, the shop works like normal.

All I wanted to do is make a small change and have them sell Fresh Water rather than Potions (with Dewford being a coastal town, and Soda available in the next town, it makes sense). Any way I can change it, or at least have AdvanceMart recognize it as a legitimate shop?
 
12
Posts
12
Years
  • Age 39
  • Seen May 10, 2014
I'm hacking Emerald.

I built a shop in Dewford with Advancemap. The outside was done by hand (still got to fix a part of the tiles so I have a sandy beach instead of a small grass patch), and the inside was copied from Oldale town's pokemart, with the warps changed so the player exiting ended up in Dewford like s/he should.

However, the problem is that Advancemart doesn't recognize it, so I can't change the items sold. Not a huge deal, except that I wanted to add Fresh Water (They ARE on a beach, and Soda Pop is available in the next town anyway. So it makes some sense).

Is there something I can do so AdvanceMart notices the new mart? Or is there a way to change the items sold without it?
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
I'm hacking Emerald.

I built a shop in Dewford with Advancemap. The outside was done by hand (still got to fix a part of the tiles so I have a sandy beach instead of a small grass patch), and the inside was copied from Oldale town's pokemart, with the warps changed so the player exiting ended up in Dewford like s/he should.

However, the problem is that Advancemart doesn't recognize it, so I can't change the items sold. Not a huge deal, except that I wanted to add Fresh Water (They ARE on a beach, and Soda Pop is available in the next town anyway. So it makes some sense).

Is there something I can do so AdvanceMart notices the new mart? Or is there a way to change the items sold without it?
Yes, you could script it. You can use the pokemart command.
I hope you have a grip on some XSE.
Spoiler:

The pointer after the pokemart command directs the script to the item values that denotes items that will appear on the screen. You can enter multiple items just using #raw word 0x(item value) for multiple items. You should know the item values in hex; For Example, Fresh Water would be #raw word 0x1A . #raw word 0x0 is used to terminate the item line, hence should be used after the item values.
 
Last edited:
Status
Not open for further replies.
Back
Top