Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
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.
Not even that
It's the wanting of it
And it REALLY doesn't matter the game you build on, CUZ YOU'RE CHANGING IT ANYWAY
It matters the ENGINE and FR's ENGINE is the better one of the 3, and more researched one, so why fight it
Bugs:
1. Fixed :D. Used cmd98 0x1 to fixed that problem and also placed the cureifburnedparalysedorpoisoned 0x81D7DF2 after setting the status so that you do not get affected by synchronize ability.
2. Fixed :D:D. Earlier, using the clearstatus command I partially managed to cure the user's sleep. But it still displayed the sleep icon.
Therefore the move can effectively shift paralysis, toxic, burn, poison and sleep (Creselia's sleeptalk,rest,psycoshift strategy XD).
This emulates the gen 6 buff for Knock Off. Using pawell and kurapika's Acrobatics' effect and reading the JPAN's incredibly useful Battle Script Thread, I managed to create this. The problem is that to emulate knock off's 1.5 increase when the foe is holding an item, the damage multiplier set to 3 and set to 2 for normal damage. To compensate for this you have to set its base power to 32 or 33 (i.e 65/2 to emulate Gen VI damage nearly) or 'the actual intended base power that you want to keep in you game' divided by 2. Because I am unable to manipulate damage increase in fractions using battle scripts.
Anyways, here is the code.
When writing a script or a programme of any description, the last thing you should be concerned about is the ROM space, as there is 114 times as much ROM space as there is RAM space in a GBA ROM (assuming a 32 meg ROM).
But that isn't even the biggest issue. Your script wastes unnecessary CPU cycles reading from and writing to these RAM addresses, meaning that the CPU has to sit and wait on data to be returned to it from the memory chip. Time where the CPU is idle, not processing anything, but continuing to drain battery power.
In order of importance, it's processor time, ram usage, rom usage. So if you can spare your processor from having to do more, even if it costs a significant amount of ROM space, you should do it.
ETA: Original post changed, so this is largely irrelevant now. Nonetheless, I'll leave it here as a cautionary post.
I'd like to point out, since a lot of people seem to be unaware, that the AI runs damage calcs to determine move power, but it does not run battle scripts beforehand. Damage-modifying effects like Sacred Sword, Venoshock, Brine, and Acrobatics should be implemented into the damage calc (x3ecec) if you want the AI to be able to use them in the proper context. In the same vein note which effect slot you're putting your scripts in if you want the AI to use them sensibly. While you can't expect the AI to be sane with unused effect slots, you can probably expect it to not be a complete idiot with Quiver Dance if it's mapped to Calm Mind, or Flame Charge that's mapped to Metal Claw.
Also is 0x02FF7D20 even a legal address on the GBA? I thought that part of RAM only went up to x0203FFFF.
@Jambo51 - Aah, thank you. I'm inexperienced, so I don't know about the GBA system properly. I will keep this in mind for the next time. I'll update this code so it will use only 2 RAM bytes and try to put it somewhere in the 0x02000000-x0203FFFF region if there is free space (I don't know the offsets, can anyone tell?. It would be a great help). And also thanks for the correction of the hex check, I really forgot about this.
@DoesntKnowHowToPlay - You are right about the AI. I am aware of this (I read one of your posts in this thread mentioning about this). I don't have the ASM skills to modify the command (hopefully,
someday I or someone else can). These types of scripts can serve as decent placeholders for the time being. Also, thanks for telling about the RAM region limit.
I tested this move. It was working properly in an emulator (in double battles too), but because i used an outside RAM region so it will not work on GBA.
EDIT: I have now updated the code in the OP (it is not complete because of not knowing the free RAM offsets). If further improvement need to be done, then advice is welcome.
On the first page, 11bayerf1 made an animation for Payback that doesn't work. The only thing that needs to be done to fix it is to add 08 after every pointer which 11bayerf1 seems to have forgotten when adding it.
This animation looks really nice so you should definitely add it with the added 08's after every instance of ZZ YY XX(2,3,4)
On the first page, 11bayerf1 made an animation for Payback that doesn't work. The only thing that needs to be done to fix it is to add 08 after every pointer which 11bayerf1 seems to have forgotten when adding it.
This animation looks really nice so you should definitely add it with the added 08's after every instance of ZZ YY XX(2,3,4)
also I tested the quiver dance one and it freezes after it says I used it
I added it 3 different times in different roms, so it's not my sanity :P
(not necessary for me but it's just to help)
Your Charge will freeze if you max out the Sp. Def and try to raise another level. You'll need to add "Jumpifstat 0x1 0x0 0x5 0xC 0x81D694E" after waitmessage 0x40 to fix it.
While both of these can be used fine, they have their problems.
Method 1 has an animation which is consistent with the rest of the game: 1 grey downwards anmation for both stats. However, if, say, the user Has -4 in Defense and -6 (maximum, - 3 and - 5 works fine) in Sp. Def at one point, neither will be lowered. It only works if the stats are lowered at the same phase.
Method 2 has good functionality as it treats both stats seperately. However, it has 1 animation for each stat so you have to go through two "lower stats animation" every time you use the move (which is inconsistent with the rest of the game).
So yeah, feel free to use whichever you want. I would love if someone else could help me see what I miss in the first animation to make it have 1 animation for lowering the stats but treat Sp. Def and Def separately.
Your Charge will freeze if you max out the Sp. Def and try to raise another level. You'll need to add "Jumpifstat 0x1 0x0 0x5 0xC 0x81D694E" after waitmessage 0x40 to fix it.
But first, I must show how it is possible to apply a new effect in the system.
You may have noticed that I used a very sinister method at this code.
Well, go to a table in 0x8025011C
This table is responsible for commands like "attackcanceler"
Leave in the first Halfworld an offset other to a free memory space +1.
In the free space that you chose, you must pass this routine that i will show:
_________________________________
.align 2
.thumb
________________________________
That code can read one byte at 0x2FF7D20 (or any other offsets)
and sum a number in a table that must be in "0xXXXXXX".
""setbyte 0x2FF7D20 0x1
attackcanceler
setbyte 0x2FF7D20 0x0""
________________________________
This table must to have in your first Halfworld these bytes:
D7 61 01 08
If 0x2FF7D20 is 0x0, run to the "attackcanceler".
So do not forget to always leave the "setbyte 0x2FF7D20 0x0"
________________________________
type in table "XXXXXX", an offset to a new routine ... here:
.align 2
.thumb
main:
push {r1-r3}
ldr r1, =0x2023Bcc
ldr r1, [r1]
cmp r1, #0x2
beq end
ldr r1, =0x02023d6c
ldrb r1, [r1]
ldr r2, =0x02023d6c
cmp r1, #0x2
beq zero
cmp r1, #0x3
beq one
cmp r1, #0x0
beq two
cmp r1, #0x1
beq three
end:
pop {r1-r3}
PUSH {LR}
LDR R1, =0x2023D74
LDR R0, [R1]
ADD R0, #0x1
STR R0, [R1]
POP {R0}
BX R0
This knock off script is much better it as does not required base power change (set to 65), and better AI understanding (not perfect though) and also does not give techician mons a undesirable boost as mine first script does, but requires the ability to insert ASM and repointing tables.
--
2. Metal Burst
Understanding Doesnt's point on mapping new effects to similar old effects so that AI can use them in a better way, this script is meant to replace the original counter script (so change the counter's original pointer in the effect table to the inserted scripts's location). It branches to counter's effect if the move ID is of counter, otherwise it executes metal burst's effect. This also requires Jambo's callasm method.
--
The way of inserting these two codes is:
i.) First use Jambo's callasm method, if already done then skip this step.
ii.) Insert this in command.bsh by opening in notepad, if already done then skip this step also
iii). View Tlachtli's ASM routines and change 0x020241F0 to 0x02023d50 in the last line before compiling to make them working for FR.
iv) Then insert the compiled decimal multiplier ASM routines using an Hex Editor.
v) Then insert the battle scripts using BSP.
--
3. Soak (no callasm required):
I've managed to port Chaos Rush's Roost over to FireRed. I'm just going to copy his explanation, and edit parts where applicable.
-------------------
Here's how to implement it:
1. First, you need Jambo51's callasm routine for Battle Script Pro. It is found right here. Your new command will be 0xF8.
2. Now to get BSP to recognize our new command, open up the folder where BSP is located, and then there should be another folder called "Data". Then you should see a file called, "commands.bsh". Open it up with Notepad, and put this in:
A couple things to note: At the top, we have "jumpifhalfword 0x0 0x2023D4A 0x163 @roost".
Replace 0x163 with your move ID for Roost.
Towards the bottom, at "#org @changetype", you see "callasm 0x(offset of your routine +1)". Obviously, put in the offset of the routine we added earlier, but add 0x1 to the offset.
So far, we have made it so that every time a Flying-type Pokémon uses Roost, it will turn into a ???-type. (If it was part-Flying, it would become part-???, and if it was pure-Flying, it would become pure-???).
5. Now we're going to insert another routine. This second routine will be called at the end of every turn and simply checks to see if there are any ???-type Pokémon, and then changes them back to Flying types.
6. At the following offsets, replace the pointers to instead point to the second routine +1:
0x13BBC
0x18254
Remember to add +1 to the routine's offset; this is NOT the case in the Emerald version.
And now we have a fully working Roost with Generation IV's effect, and the AI can use it properly too, since we're using Recover's battle script slot, but the battle script is designed so that Recover will still function separately from Roost.
A couple things to note, this routine replicates the Generation IV effect of Roost where if the user was pure-Flying, it would become ??? type upon using Roost. In Generation V+, a pure-Flying type using Roost would become Normal-type.. If anyone wants to mod my routine to have the Generation V effect, feel free to do so.
Credits:
Chaos Rush - creating the original
DoesntKnowHowToPlay - for the idea of the method to achieve this
Tchlatli - Chaos Rush looked at his custom Protean code to figure out how to correctly calculate the type offset of the attacking Pokémon
JPAN - documentation on FireRed battle-related RAM offsets
To verify that it's working properly, here are some useful RAM offsets:
02023BE4 - Battle Data (check out this post to see how its structured.)
02023C05 - Your(1) Type 1
02023C06 - Your(1) Type 2
02023C5D - Opponent(1) Type 1
02023C5E - Opponent(1) Type 2
02023CB5 - Your(2) Type 1
02023CB6 - Your(2) Type 2
02023D0D - Opponent(2) Type 1
02023D0E - Opponent(2) Type 2
-------------------
This probably has some mistakes, so feel free to correct me. It appears to work in-game properly without any bugs or side-effects, but who knows? If you find something out, please do tell me! This was my first real excursion into disassembly, etc. so it likely won't be perfect.
Edit:
Here's the animation, it's just a hybrid of Featherdance and the healing animation: