Conversation Between Blah and Anthroyd
Showing Visitor Messages 1 to 13 of 13
-
October 2nd, 2016 2:37 PMBlahIt's definitely a worthwhile skill to learn when it comes to ROM hacking, though takes some commitment. There will be people to help if you get stuck :)
-
October 2nd, 2016 2:09 PMAnthroydThank you. I really feel like I should learn ASM and how all of that works so I can be more independent when it comes to this kind of intricate work.
-
October 2nd, 2016 1:23 PMBlahCheck 0x2023E8A to figure out of the last battle was won or lost. It should be 0 if you lost the battle & the routine ran. Else it will be 1 if you won normally.
-
October 2nd, 2016 12:33 PMAnthroydBackground: When the player fights a trainer and loses, the trainer's flag remains cleared. When the player fights a trainer and wins, the trainer's flag is set. I often use the checktrainerflag command to determine if the player won or lost some past battle.
Problem: After 2 hours of attempts, I've come to realize that your ASM routine actually sets a trainer's flag regardless of whether the player won or lost the battle. This is bad, since I can no longer act on the result of a trainer battle.
Question: To your knowledge, is there any way to know if the player won or lost a battle after returning to the overworld? Possibly a byte I could reference? -
September 29th, 2016 1:19 PMAnthroydI'm very glad that trainerbattle 0x1 continues upon loss when using this. Clears my worries that the player will just be left with a fainted party, haha.
-
September 29th, 2016 1:13 PMBlahI assume it worked now, and yes the table needs to be terminated with 00s because that's how the routine determines it's finished running all the other routines :)
-
September 29th, 2016 1:08 PMAnthroydAhh no I completely forgot that line existed! I didn't understand what it meant at first so I guess I just forgot about it.
By the way, what does that mean? ^_^
Are you saying to add the 00 00 00 00 pointer to the end of the table?
EDIT: Yes, that's what you're saying. Thanks for your assistance! -
September 29th, 2016 1:06 PMBlah"The last pointer in the routine NEEDS to be 00 00 00 00." Did you do this too? It should read last pointer in the table of routines, but I make a small typo :)
-
September 29th, 2016 12:23 PMAnthroydThe Beginner's Lounge question:
http://www.pokecommunity.com/showthread.php?t=379350
Your ASM Thread:
http://www.pokecommunity.com/showpost.php?p=8527650&postcount=213 -
September 29th, 2016 10:38 AMBlahcan you link me to the post again please?
-
September 29th, 2016 10:12 AMAnthroydChanged to 0x8FFFA00, recompiled, reinserted at same offset. Unfortunately nothing changed. :/
Is there maybe supposed to be more to the routine table? It's literally four bytes long. -
September 29th, 2016 9:35 AMBlahThe ".word 0x[pointer to routine table]" was replaced with: 0xFFFA00.
Replace it with ".word 0x8FFFA00" -
September 29th, 2016 8:04 AMAnthroydHi there,
I've implemented the "Prevent Loss" ASM routine, but I've run into an issue.
When a battle commences, the game freezes at the point I've screenshoted in the spoiler guards below:
Spoiler:[img]http://imgur.com/VXhQKst[/img]
I'm not sure why this is happening. I'll give you as much information as possible about how I inserted each routine and their pointers.
The main Battle Routine By Move ASM was compiled and inserted at: 0xFFFF80.
The ".word 0x[pointer to routine table]" was replaced with: 0xFFFA00.
The bytes at offset 0xE2E0 were changed to: 00 4D 28 47 81 FF FF 08.
The "Prevent Loss" ASM was compiled and inserted at: 0xFFF900.
At offset 0xFFFA00 (the routine table mentioned earlier) exists the bytes: 01 F9 FF 08.
This reverse hex is the pointer 0xFFF901, which is supposed to correspond with 0xFFF900 which is where I inserted the "Prevent Loss" ASM.
Clearing flag 0x2FC nullifies the ASM as expected, and setting it causes the game to freeze (with the music still playing).

