Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2021-12-16 03:38:56

BOOST15673
New member
Registered: 2020-12-30
Post 3/4

AI types & switch states help?

I am not good at explaining, my apologies. I THINK it should be simple to answer, regardless if anybody can help me or not, if that makes any sense.

In the Pokecrystal disassembly, I have been looking in data\trainers\attributes.asm and noticed two things, first, is the context use "SWITCH_SOMETIMES" or "SWITCH_OFTEN". I am unable to find any info over other states and how exactly this affects switching as the trainer classes that use SWITCH_OFTEN are only Schoolboy, Lass, Fisher, Twins, and they switch no more often than anybody else, the switch state seems to determine nothing or a very miniscule percentage difference, am I misunderstanding something? Are there not more than just two states?

Secondly, in the same file, you have the line above it listing what AI types each trainer class will use. I have read through the /engine/battle/ai/scoring.asm file, and this combined with the various files in data\battle\ai already explain and help a lot. BUT, my issue is understanding the logic of the line where you have, i.e. AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_STATUS itself. How this works. My example is this. Would adding EVERY AI type on that line make a specific trainer class equipped for every possibility that Gamefreak could think of, potentially countering everything with the right team and movesets, or would it cause too many conflicts with itself and cause more harm than good? Would adding just a single type, i.e. "AI_AGGRESSIVE" ONLY make the AI use only that specific AI and never any other one? Does the order in which the AI types are listed, first to last, affect priority or anything? Curious if I could mix and match some AI types to make the gym leaders more unique as all 16 including the E4, Champion and Red use the same types.

Minor final questions relative to the second one above, any idea why the TWINS trainer class have "NO_AI", meaning they behave like wild Pokemon? Red has the same AI as every other "leader" type trainer but is still better in game, just a placebo effect or something else going on here?

Just wondering since I can't find anything describing what these things do by the AI or examples of how to make an AI behave in a certain way, the following video is what sparked my interest:
https: // www .youtube .com / watch?v=2gXu7AuPvE4
I realize it is a heavily modified version of the AI, but still, would this be possible at all without overhauling everything, or maybe possible to make the AI at least a little bit in the direction of the video? It's hard to find anything on Crystal's AI with or without examples/explanations/proof, etc. like this video. This video is a great example of the AI you want for the E4 for example.

Offline

Board footer

Powered by FluxBB