- Pages:
- 1
- 2
| Quick guide to building AIs | |
|---|---|
| Topic Started: Apr 12 2011, 05:14 PM (4,435 Views) | |
| Prof. 9 | Apr 12 2011, 05:14 PM Post #1 |
![]()
Moderaptor
![]()
|
This little tutorial will explain how to use the MMBN6 Navi AI Editor once it's released. It's not a full guide yet as I wrote all of this up in a hurry. AIs and the Attack Grid The AI is what determines which attacks to use, and when to use them. The MMBN6 Navi AI Editor will compile into the game a custom type of AI called "attack grid". You can place an action on each block and the Navi's next action will be determined based on a specific set of rules: After executing an action from a block, the AI will pick the next block from above, below, or to the right. No going to the left. In addition, the AI will not go to the previous block. ![]() In this picture, the attack that was just executed was attack 3. The next attack will be either 4, 5 or 6. Each has 33% of being chosen. The next rule is that upon reaching the right edge and trying to go further right, the AI will jump to the leftmost block on the same row. In other words, the above grid really acts like this. ![]() However, this isn't the case with the top or bottom rows. Which brings me to the next rule. If the AI has no blocks left it can move to, it will selfdestruct. ![]() If the Navi decides to do attack 4, it will get stuck after that because it cannot go up (it's hit the edge), it cannot go down (that's where it came from) and it cannot go to the right (since that block is empty). The Navi has nothing it can do, so it will instantly reduce its HP to 0. The same happens if the Navi picks attack 5. The starting block is the first action the Navi will do in the battle. In the editor, you can set this by double-clicking a block. Chip Pools and the Chip Stack The AI editor lets you set two interesting actions: use from chip pool and use from chip stack. "Chip stack" refers to the chips that hover above an enemy's head in battle. For instance, some Mettaurs and Swordies use Invis and Recov chips. The chip stack is not set by or included in the AI. "Chip pool" refers to the 15 chip lists that are included in the attack grid AI. You can add chips to them and each time the AI encounters a "use chip from pool X" action, it will randomly pick one of the chips from that pool and use it. Chips from the chip pool are not displayed above a Navi's head. Attack Preparation and Base Navis In order to properly execute an attack, the Navi must first do some preparation. This preparation is different for pretty much each attack, hence why the custom AI uses a Navi to base the AI off. Unfortunately, not all Navi AIs are compatible (for now). If you want to make an AI mod for a certain Navi that's not supported try using a different Navi as the base. The way the custom AI handles attack preparation isn't 100% stable yet. Some Navis might not work at all. It may be improved on in future versions. Checkpoints and Jumps The "jump to X" action changes the current block to the checkpoint block indicated by the X. You can add multiple checkpoints but there's no point as only one of them will be used and the rest will just act like a "skip" action. |
Follow me on Twitter! Fork me on GitHub!
| |
|
|
|
| MegaRockEXE | Apr 12 2011, 05:19 PM Post #2 |
![]()
BN Guides Author
![]()
|
Neat write-up. Makes more sense now that the program coincides with the hax. Colonel was not working for me at all. Maybe it' how I set up the grid, though. I had completely forgotten you can make grids like you did; where one row has to be followed, then there are decisions. |
| The Rockman EXE Zone | YouTube | |
|
|
|
| Dramz | Apr 12 2011, 09:20 PM Post #3 |
|
Spastic Colon
![]()
|
Do any of the natrualy-occuring navis use an attack grid kind of setup? Will this program support all versions of the game? (Falzar, Gregar, and the Japanese versions) And is there any predicted release date for the program? |
|
|
|
| Greiga Master | Apr 12 2011, 09:56 PM Post #4 |
![]()
Admin of the stars, owner of your soul...
![]()
|
It's out already http://s6.zetaboards.com/The_Rockman_EXE_Zone/topic/8730759/1 and it should support Greiga, Falzer in US and PAL versions. |
|
|
|
| Dramz | Apr 13 2011, 12:54 AM Post #5 |
|
Spastic Colon
![]()
|
I posted that question before, or as you were posting the program. I am still very interested in the ASM notes. Don't make me construct an AI, and then figure out what the hell the program did! The amount of spaces the navi moves before attacking IS determined in the AI data 080F2C89 for Heatman 080FBB38 for Protoman ...etc I found these offsets awhile ago, why not release a more technical way to find them, as you obviously know how? Also, does the program have a limit to the number of attacks that a navi can use? By repointing the data, we are not restricted to 5 or 6 slots, so how many will the program allow? Also, I' like to know about locating Attack Variables within the AI data generated by this program. It'd be a pain to have to reimport and use the program each time you want to change it, especially since I fiddle with it an excessive amount. And for that matter, the guide does not discuss attack variables. Could you please elaborate on these things? I'm just really curious about this stuff in the absence of some notes to view. Edited by Dramz, Apr 13 2011, 04:09 AM.
|
|
|
|
| Prof. 9 | Apr 13 2011, 08:31 AM Post #6 |
![]()
Moderaptor
![]()
|
The program, as far as I know, doesn't delete the .asm files it inserts. What's stopping you from taking a look at the ASM source code full of comments and explanations? There really isn't a technical way to find Navi AI variables like amount of spaces to move because they mostly differ for each Navi. Really, by far the easiest and most straightforward way is to just look at their AI routines. Besides, if you wanted info on the amount of spaces the Navi moves you could just ask. I already told you over PM I would be happy to give you info or help you find info if you could at least be a little specific. As far as I know, Navis are always limited to 6 attacks, simply because the 6th attack has the value 0x0F, and everything 0x10 or higher is interpreted by the game as a chip attack. The reason Bass has more is because his attacks are actually several attacks in 1. Point me to a clear guide/notes on how to add more attacks to a Navi that doesn't involve "use Bass lol" and I could add it to the attack grid. Attack variables are not inside the attack selector part of the AI. They are inside the attack preparation routines (subroutines of those, even). Meaning the program doesn't change any of them (do note that the "base Navi" you use in the program also determines which Navi's attack variables are used; in future versions this should (hopefully) no longer be a problem). Speaking of attack variables, I'm pretty sure I've already posted a very easy way how to find them and there's already offset lists for them. This guide is just a quick write-up of how to use GM's AI compiler so that people wouldn't be clueless about how to use it. It also says in the first sentence that this is not a full guide yet. The only things I use when building ASM hacks is the information that's "publicly" available on TREZ and my own ASM source code. The only notes I make when building ASM hacks is stuff like calculations, offsets I'm currently debugging, etc. I really doubt there is anything useful. My notes are kind of like a RAM, which is why I don't save them. As far as I know, no (but I haven't looked at all of them in-depth). Some of them use a linear pattern, though. The custom AI is running on an engine I built myself. Edited by Prof. 9, Apr 13 2011, 08:31 AM.
|
Follow me on Twitter! Fork me on GitHub!
| |
|
|
|
| Naegi Makoto | May 29 2011, 06:03 AM Post #7 |
|
TREZian
|
Never thought would do this, but I tried the program just for fun. |
|
Currently: Working as an assistant programmer in this project : Ciel Fledge 3rd year of University, Information Technology Major | |
|
|
|
| timaeus222 | Jun 4 2011, 08:32 AM Post #8 |
![]()
The Tech Guy
|
I have a question. - What does Skip do? Edited by timaeus222, Jun 4 2011, 08:56 AM.
|
|
~Timaeus~ Web Designer, Music Composer "There's so much water under the bridge that the bridge is gone." ~ DarkeSword of OC ReMix My Technical Services || MPCR Home Page || My Best Game Mods || Music YT Channel || Gaming YT Channel || My Guides || My Challenges ![]()
| |
|
|
|
| Prof. 9 | Jun 4 2011, 09:48 AM Post #9 |
![]()
Moderaptor
![]()
|
Nothing. It's basically a block with no action assigned to it, but it's not Empty: it can be chosen as a path. |
Follow me on Twitter! Fork me on GitHub!
| |
|
|
|
| timaeus222 | Jun 4 2011, 03:06 PM Post #10 |
![]()
The Tech Guy
|
Cool. Well, I managed to create a working AI now! http://i55.tinypic.com/fu6cqq.jpg http://i55.tinypic.com/4ljbcm.jpg 11 moves, and it actually doesn't have any paths that freeze it. =D Edited by timaeus222, Jun 4 2011, 03:15 PM.
|
|
~Timaeus~ Web Designer, Music Composer "There's so much water under the bridge that the bridge is gone." ~ DarkeSword of OC ReMix My Technical Services || MPCR Home Page || My Best Game Mods || Music YT Channel || Gaming YT Channel || My Guides || My Challenges ![]()
| |
|
|
|
| brianuuu | Jun 4 2011, 07:08 PM Post #11 |
![]()
SF Noise Spriter
|
Man...this is just way too complicated lol |
![]() ![]() ![]()
| |
|
|
|
| timaeus222 | Jun 4 2011, 07:48 PM Post #12 |
![]()
The Tech Guy
|
Hehe, well, the key thing is to put Jumps at the top and bottom edges, because that's where it freezes if the navi goes up further or down further. =)
Edited by timaeus222, Jun 4 2011, 07:48 PM.
|
|
~Timaeus~ Web Designer, Music Composer "There's so much water under the bridge that the bridge is gone." ~ DarkeSword of OC ReMix My Technical Services || MPCR Home Page || My Best Game Mods || Music YT Channel || Gaming YT Channel || My Guides || My Challenges ![]()
| |
|
|
|
| brianuuu | Jun 4 2011, 09:34 PM Post #13 |
![]()
SF Noise Spriter
|
but it's a bit hard to use attack 4 and 5 cuz it may always jump to checkpoint 0 |
![]() ![]() ![]()
| |
|
|
|
| Prof. 9 | Jun 5 2011, 01:20 AM Post #14 |
![]()
Moderaptor
![]()
|
It freezes? It shouldn't freeze. If there's a legitimate issue with pathfinding, the Navi should selfdestruct, not freeze. How did you make it freeze? By the way, there might be some small bugs in the AI; if anyone finds any unexpected behaviour such as freezing, please report it, as I can easily fix these bugs without GM having to update his program. I made a v1.1 attackgrid.asm a while back but I overwrote it (<_______<) with an older version and now I don't have it anymore. |
Follow me on Twitter! Fork me on GitHub!
| |
|
|
|
| timaeus222 | Jul 23 2011, 02:32 PM Post #15 |
![]()
The Tech Guy
|
When you get back (end of July?), you'll see this: I tried the v1.1 asm file, and after the AI compiled and I reopened the game, the navi freezes right before it tries to use its first attack. (Yes, I back up my games. ;)) I think there might be an error in the asm. |
|
~Timaeus~ Web Designer, Music Composer "There's so much water under the bridge that the bridge is gone." ~ DarkeSword of OC ReMix My Technical Services || MPCR Home Page || My Best Game Mods || Music YT Channel || Gaming YT Channel || My Guides || My Challenges ![]()
| |
|
|
|
| Kid1513 | Oct 26 2011, 01:00 AM Post #16 |
|
TREZian
|
Strange, when I try using the program on Protoman, it basically doesn't change anything... I wonder what I've done wrong... |
![]() ...SF3 Random Battle modding Tool Detected! ...SF3 Auto Brother Modifying Tool Detected! ...BN5 E-Reader Modifying Tool Detected! ...Megaman Battle Network - Pokemon Crossover Patch Detected!
| |
|
|
|
| Prof. 9 | Oct 26 2011, 02:35 AM Post #17 |
![]()
Moderaptor
![]()
|
Did you change his AI pointer to the offset the program gave you? |
Follow me on Twitter! Fork me on GitHub!
| |
|
|
|
| Kid1513 | Oct 26 2011, 11:39 PM Post #18 |
|
TREZian
|
Thanks, that's what I forgot.
|
![]() ...SF3 Random Battle modding Tool Detected! ...SF3 Auto Brother Modifying Tool Detected! ...BN5 E-Reader Modifying Tool Detected! ...Megaman Battle Network - Pokemon Crossover Patch Detected!
| |
|
|
|
| Hub197 | Mar 22 2012, 05:41 PM Post #19 |
|
Regular Member
|
I know this topic died 5 month ago, but i have something to ask. I built a 5x10 will some cool chip pool for protoman, but i dunno how to import it to the game:facepalm: i asked mr.kid, he told me to press compile button, then notthing happened, the program gimme an offset, protoman's AI still normal. Please help me. |
|
|
|
| Prof. 9 | Mar 23 2012, 09:01 AM Post #20 |
![]()
Moderaptor
![]()
|
Did you change his AI pointer to the offset the program gave you? |
Follow me on Twitter! Fork me on GitHub!
| |
|
|
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Guides & Research · Next Topic » |
- Pages:
- 1
- 2


















Thanks, that's what I forgot.