Advertiser Content

Research Trainer AI Command Research Page 2

Started by AkameTheBulbasaur November 25th, 2017 1:41 PM
  • 5369 views
  • 32 replies

Skeli-

Lord of the Rings

Age 20
Male
Canada
Seen 2 Hours Ago
Posted 1 Day Ago
235 posts
5.6 Years
In the JumpIfDamageBonusEquals AI commands, I used the Fairy type move, Fairy Wind that its hex code is 0x166. But the error of "invalid immediate: 358 is out of range" appearred while I was compiling the routine. Is there any way to solve it?
Are you using the old AI Script Pro? I rewrote it last week and I recommend using it instead. https://github.com/xizqu/FR_AI_Script/tree/master/Python_Compiler

As for your bug, JumpIfDamageBonusEquals takes a byte as its first argument; a number up to 0xFF or 255. You're getting that error because 0x166 or 358 is larger than a byte. In any case, the argument does not take a move ID as its argument. Look through the OP again to see what you should be putting there.
Pokemon Unbound

Male
Forina
Seen 4 Days Ago
Posted July 13th, 2019
110 posts
12.4 Years
Are you using the old AI Script Pro? I rewrote it last week and I recommend using it instead. https://github.com/xizqu/FR_AI_Script/tree/master/Python_Compiler

As for your bug, JumpIfDamageBonusEquals takes a byte as its first argument; a number up to 0xFF or 255. You're getting that error because 0x166 or 358 is larger than a byte. In any case, the argument does not take a move ID as its argument. Look through the OP again to see what you should be putting there.
Thanks a lot for the updating of the tools. Is it means that the move hex code must less than 0xFF and there is no other ways to make the command to take two bytes as its argument?

Skeli-

Lord of the Rings

Age 20
Male
Canada
Seen 2 Hours Ago
Posted 1 Day Ago
235 posts
5.6 Years
Thanks a lot for the updating of the tools. Is it means that the move hex code must less than 0xFF and there is no other ways to make the command to take two bytes as its argument?
The move hex code can be more than 0xFF, it's just that command isn't looking for a move ID. Read through what the command does and you'll understand.
Pokemon Unbound

Male
Forina
Seen 4 Days Ago
Posted July 13th, 2019
110 posts
12.4 Years
The move hex code can be more than 0xFF, it's just that command isn't looking for a move ID. Read through what the command does and you'll understand.
What I see is the hex code is really move ID, such as "mov r0, #0xF /*Cut*/", cut move hex code is 0xF, others are also the same except dragon type move, dragon rush.

Skeli-

Lord of the Rings

Age 20
Male
Canada
Seen 2 Hours Ago
Posted 1 Day Ago
235 posts
5.6 Years
What I see is the hex code is really move ID, such as "mov r0, #0xF /*Cut*/", cut move hex code is 0xF, others are also the same except dragon type move, dragon rush.
Ah, I see where you're confusion is coming from. If you're using the rewritten JumpIfDamageBonusEquals, the first argument takes a move type, or 0x12 to compare the current move. You cannot check if it's a certain move. If you use the rewritten command, you'll also need to update the command in the commands file.
Pokemon Unbound

Male
California
Seen September 29th, 2019
Posted July 27th, 2018
82 posts
1.8 Years
What I see is the hex code is really move ID, such as "mov r0, #0xF /*Cut*/", cut move hex code is 0xF, others are also the same except dragon type move, dragon rush.
Just going on what skeli said, if you need to update your commands, I have a tool in the tool/resource section. Akame has updated 5+ commands so I'll be adding them this week. Just wait a few days if you're interested in it. It'll add all new commands, repoint the table and repoint the commands in the table to the new ones. Only thing it doesn't do is clear out the old command data. Too lazy to add it and it you ever need to repoint back, it's easy.

AkameTheBulbasaur

Akame Marukawa of Iyotono

Age 22
Male
A place :D
Seen 4 Weeks Ago
Posted July 19th, 2019
361 posts
6.5 Years
I'm nearing the end of my work on AI Scripting, as I'm almost finished with the scripts for my game. Once I'm finished with bug testing those, I'll have all the commands I plan to do done.

Current updates are that I fixed a bug with the Double Battle Target Select routine (it was small, nothing game breaking, but still). Basically it never set the Defender Partner bank to anything if you were in a single battle. This wouldn't mean much except that a few of the new commands use DPartner as a bank regardless of whether you are in a Double Battle or not (and thus won't work correctly if that bank isn't set correctly).

I've also updated the Google Drive folders with the new commands I did within the past months. If the command doesn't have a number, it means I used it with the CallASM command. You could technically use any AI command at all with CallASM as long as you know the address of the routine and what the proper arguments are.

When I'm finished, I may upload a patch with all of this stuff complete for Default Fire Red (in case you want to play Fire Red with smarter AI, or don't want to add new moves or whatever). More likely I will just upload the scripts I used and let people look at those.

I changed quite a bit from default FireRed for my game (although most of it is the same) so I would have to alter a few things before creating the patch. It's doable, but I'm not too sure if I will get around to it (or if there is even interest at all).

EDIT: After 503,234,526,544,585 years I have finally finished all of my AI Scripts!!!

I've attached a PDF of all seven scripts that I used, in case anyone is interested in referencing it when making their own scripts.
"The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
Advertiser Content