[2K3] CREATING ENEMY AI PATTERNS
Posts
Pages:
1
So, I'm going to feel really REALLY silly for asking this, but since this is literally the first time I've done an actual AI pattern, kinda need to ask.
Ok, so here's the dealio, and I'll use this current boss that I need to work on as an example, I need to make a boss follow a strict AI pattern of using skills on each of its turn, since it has a gimmick of its own. Pattern is subject to change depending on how hard the fight may be:
Turn 1-4: Specific actions, or it can be randomized as to what the abilities are. Not sure yet.
Turn 5: Summon 2 spirit flames.
Turn 6-7: Random actions probably
Turn 8: If one of the spirit flames is alive, absorb it and regain 10% Max HP. Adds +1 to a variable which is stored upwards to +8.
Turn 9: Random action
Turn 10: Absorb spirit flame if the other is still alive. Otherwise, summon 2 spirit flames again.
Rinse and repeat until variable hits 8 for absorption, at which instance boss changes forms for 8 turns which is invincible and has a more powerful, different skillset. After it uses up 8 turns, will revert back to normal and repeat the pattern.
The spirit flames will not have a specific AI pattern of their own. I don't know what any of the other abilities will be for them or the boss yet. They're all flagged as Undead (they're ghosts).
So yeah, I'm not sure what to do for making sure the AI is followed exactly as planned. I don't remember if it's the first number or second number in Turns Elapsed that dictates it'll be used on each of its own turns (if that can happen) or if I need to set a switch randomly or something in battle events or what. x_x;;
Ok, so here's the dealio, and I'll use this current boss that I need to work on as an example, I need to make a boss follow a strict AI pattern of using skills on each of its turn, since it has a gimmick of its own. Pattern is subject to change depending on how hard the fight may be:
Turn 1-4: Specific actions, or it can be randomized as to what the abilities are. Not sure yet.
Turn 5: Summon 2 spirit flames.
Turn 6-7: Random actions probably
Turn 8: If one of the spirit flames is alive, absorb it and regain 10% Max HP. Adds +1 to a variable which is stored upwards to +8.
Turn 9: Random action
Turn 10: Absorb spirit flame if the other is still alive. Otherwise, summon 2 spirit flames again.
Rinse and repeat until variable hits 8 for absorption, at which instance boss changes forms for 8 turns which is invincible and has a more powerful, different skillset. After it uses up 8 turns, will revert back to normal and repeat the pattern.
The spirit flames will not have a specific AI pattern of their own. I don't know what any of the other abilities will be for them or the boss yet. They're all flagged as Undead (they're ghosts).
So yeah, I'm not sure what to do for making sure the AI is followed exactly as planned. I don't remember if it's the first number or second number in Turns Elapsed that dictates it'll be used on each of its own turns (if that can happen) or if I need to set a switch randomly or something in battle events or what. x_x;;
e: Holy shit my posting is bad. Let me rewrite this...
Rm2k3 "Turns Elapsed" is useless because anybody doing anything will count as a turn. It's like poison/regen, it ticks all the damn time and it isn't a reliable means of telling what turn it is.
You do get direct control over switches when setting AI actions though so abuse the hell out of those. You can read variables too I think. The basis of my (inefficient) idea is to have a separate switch for each turn the boss can take. Then create an AI action that requires a Turn# switch to be on and when you make the action they turn off the current Turn# switch and turn on the Turn#+1 switch. I think you can turn off, I know I turned on in my 2k3 game.
Since the AI decision making blows beyond "is switch on" you need to make a battle event helper that executes after every action. Its job is to see how many flames are alive (if any) and flag a different switch accordingly. Then for the Turn 8/10 AI Actions you can make a separate AI Action if the "Flames Alive/Dead" switch is on so the boss will act accordingly. If 2k3 doesn't support "are two switches on" for AI actions you'll have to rework the event logic a bit so when the Turn8 switch is on AND the Flames are Alive/Dead then you turn off the Turn8 switch and turn on Turn8+1 switch so the boss can act accordingly based on if the flames are dead/alive and it is turn 8.
If AI actions can watch variables just make a max priority action when your FlameAte variable is >= 8 and have the boss transform into its superform. Have the battle event helper watch this (also see if variable >= 8, or have the transform action also turn on a switch and have the helper do something when it is on) and have it reset all of the turn switches. Repeat the same AI action requiring Turn# switch and turning on Turn#+1 switches on performing an action eight times and on the eight action have it transform back to the original boss. Make sure the helper battle event resets the FlamesAte variable to zero too.
There's hopefully a better way of doing this and this should cover most of the bases (Hopefully I'm remembering 2k3's capabilities as well). I don't know how to do the specifics of eating flames via battle events but it shouldn't be too hard.
Rm2k3 "Turns Elapsed" is useless because anybody doing anything will count as a turn. It's like poison/regen, it ticks all the damn time and it isn't a reliable means of telling what turn it is.
You do get direct control over switches when setting AI actions though so abuse the hell out of those. You can read variables too I think. The basis of my (inefficient) idea is to have a separate switch for each turn the boss can take. Then create an AI action that requires a Turn# switch to be on and when you make the action they turn off the current Turn# switch and turn on the Turn#+1 switch. I think you can turn off, I know I turned on in my 2k3 game.
Since the AI decision making blows beyond "is switch on" you need to make a battle event helper that executes after every action. Its job is to see how many flames are alive (if any) and flag a different switch accordingly. Then for the Turn 8/10 AI Actions you can make a separate AI Action if the "Flames Alive/Dead" switch is on so the boss will act accordingly. If 2k3 doesn't support "are two switches on" for AI actions you'll have to rework the event logic a bit so when the Turn8 switch is on AND the Flames are Alive/Dead then you turn off the Turn8 switch and turn on Turn8+1 switch so the boss can act accordingly based on if the flames are dead/alive and it is turn 8.
If AI actions can watch variables just make a max priority action when your FlameAte variable is >= 8 and have the boss transform into its superform. Have the battle event helper watch this (also see if variable >= 8, or have the transform action also turn on a switch and have the helper do something when it is on) and have it reset all of the turn switches. Repeat the same AI action requiring Turn# switch and turning on Turn#+1 switches on performing an action eight times and on the eight action have it transform back to the original boss. Make sure the helper battle event resets the FlamesAte variable to zero too.
There's hopefully a better way of doing this and this should cover most of the bases (Hopefully I'm remembering 2k3's capabilities as well). I don't know how to do the specifics of eating flames via battle events but it shouldn't be too hard.
I'm sure for eating the flames, I'd just have to turn on a switch for like Eat Flame, and then run the battle event accordingly that way, then turn the switch off at the end.
AI actions can only check variables in Battle Events and not in the Monster tab itself sadly, so I'm stuck with using switches (as much as I'd like to avoid using too many switches right now but eh, whatever). Though I guess I can have it set to that if it's like say:
Turn 1: Flare (Turns on Turn 2 switch and turns off turn 1 switch; 10 for the frequency/chance/whatever. Don't have 2k3 open to check what it's called. Priority?)
Turn 2: Curaga (6 priority) or Death (10 priority) (Both can turn on Turn 3 switch, both turns off turn 2 switch)
Turn 3: Flare (same as turn 1, but will turn on turn4 switch and turns off turn 3 switch)
Turn 4: Summon Flame (Turns on turn 5 switch, will also make the skill be a Switch skill that'll call the enemies (which are dead at the start of the fight). Turns off turn 4 switch.
Etc. etc. Should work like that, yes?
AI actions can only check variables in Battle Events and not in the Monster tab itself sadly, so I'm stuck with using switches (as much as I'd like to avoid using too many switches right now but eh, whatever). Though I guess I can have it set to that if it's like say:
Turn 1: Flare (Turns on Turn 2 switch and turns off turn 1 switch; 10 for the frequency/chance/whatever. Don't have 2k3 open to check what it's called. Priority?)
Turn 2: Curaga (6 priority) or Death (10 priority) (Both can turn on Turn 3 switch, both turns off turn 2 switch)
Turn 3: Flare (same as turn 1, but will turn on turn4 switch and turns off turn 3 switch)
Turn 4: Summon Flame (Turns on turn 5 switch, will also make the skill be a Switch skill that'll call the enemies (which are dead at the start of the fight). Turns off turn 4 switch.
Etc. etc. Should work like that, yes?
That should work, but I'd use lower priority values. This way when FlamesAte variable hits 8 you can use a max priority action to get the boss to transform on its next turn regardless of what turn it is. Unless you want to do it via battle events, I think a transform command would be easier but I've forgotten a lot of how 2m3k works.
Hmm...actually, for some reason I didn't think of using the Transform command at all. I don't know why. I just had the 2nd form as a Hidden monster that'd appear when the variable hit max. Using Transform would also require me to not have to keep track of the HP of both forms too. Probably didn't think of using it seeing as it's not exactly the most viable way of doing cutscenes and/or special bosses (such as Barrier Shift bosses, which I'll have to deal with eventually too...).
I think if I set anything to 100 Priority, it'll do that regardless of any of the other actions. Or I can set a switch for when the variable does hit 8 for it to automatically do the transform on its next turn anyways.
I think if I set anything to 100 Priority, it'll do that regardless of any of the other actions. Or I can set a switch for when the variable does hit 8 for it to automatically do the transform on its next turn anyways.
Ok, so giving this a try (and being very confused and unmotivated to try this), this is what I have:
Enemy Page:

Enemy Group Page (the 2nd Louise may not be needed here I think if I do the Transform option?? I don't know):

What I'm trying to do is set it up so that if there aren't any spirits around, she won't waste her turn trying to Devour Spirit something that's not there. I'm also trying to set it so that for the 2nd form, it'll tick down each time one of the switches is activated (I'll only need one switch, so that when it turns on, the battle event will run and it'll tick down the variable by 1. Once that hits 0, I'll have a switch turn on and for her next turn will be to revert back). Then the pattern starts all over again. Any help in making this work correctly would be greatly appreciated. ^^;;
EDIT - One of the issues I'm having with 2nd form is that I can't really do specific abilities that require switches due to the nature of how I have them set up (the abilities themselves aren't switch abilities, so that you can actually see if they hit or not. The battle events for monsters generally turn them on). I don't know if there's an easier way to track when a specific enemy takes its turn, but if there is, that'd be nice to know...
Enemy Page:

Enemy Group Page (the 2nd Louise may not be needed here I think if I do the Transform option?? I don't know):

What I'm trying to do is set it up so that if there aren't any spirits around, she won't waste her turn trying to Devour Spirit something that's not there. I'm also trying to set it so that for the 2nd form, it'll tick down each time one of the switches is activated (I'll only need one switch, so that when it turns on, the battle event will run and it'll tick down the variable by 1. Once that hits 0, I'll have a switch turn on and for her next turn will be to revert back). Then the pattern starts all over again. Any help in making this work correctly would be greatly appreciated. ^^;;
EDIT - One of the issues I'm having with 2nd form is that I can't really do specific abilities that require switches due to the nature of how I have them set up (the abilities themselves aren't switch abilities, so that you can actually see if they hit or not. The battle events for monsters generally turn them on). I don't know if there's an easier way to track when a specific enemy takes its turn, but if there is, that'd be nice to know...
oshit I forgot 2k3 priority goes up to 100, I thought 10 was the max like Ace (ps Ace's enemy AI options suck)
For Devour Spirit I think having the battle event helper watch when the Turn 7 switch is turned on. If a flame is alive then don't do anything as Louise's AI is on the right track. However if no flames are found then turn off the Turn 7 switch and turn on Turn 7 Alternate switch. Give Louise an AI action for when Turn 7 Alt. is on which is the backup move to do when no spirits are alive and have it turn off Turn 7 Alt. and turn on Turn 8.
For the countdown I think it'd be best to give Alternate Louise turn switches like you already have. Just make the eighth move transform her back to normal. Have the switch that keeps track of the spirits devoured count reset the variable and turn switches (or use a different set of turn switches?).
I don't know of any better ways to track when enemies take a turn unfortunately.
For Devour Spirit I think having the battle event helper watch when the Turn 7 switch is turned on. If a flame is alive then don't do anything as Louise's AI is on the right track. However if no flames are found then turn off the Turn 7 switch and turn on Turn 7 Alternate switch. Give Louise an AI action for when Turn 7 Alt. is on which is the backup move to do when no spirits are alive and have it turn off Turn 7 Alt. and turn on Turn 8.
For the countdown I think it'd be best to give Alternate Louise turn switches like you already have. Just make the eighth move transform her back to normal. Have the switch that keeps track of the spirits devoured count reset the variable and turn switches (or use a different set of turn switches?).
I don't know of any better ways to track when enemies take a turn unfortunately.
Only 10 in Ace? Ew...that's god awful. D:
Also, just realized I didn't turn off the switch at the end. Oops. The problem though is if Devour Spirit is used anyways when there are no flames left. I mean, you can only have one trigger condition per ability (and one switch turned off and one turned on, which makes it super annoying to do anything with custom AIs as you can't use moves that require switches to be on to work, such as my Gravity spells or Level 5 Death or whatnot). So....hmmm.
Hmm...could. But again, this also falls back to the whole "Cannot use special abilities that require switches" issue, as I was thinking of having her use moves such as Maelstrom (HP to 1 to the party, or chance of it) and Level 5 Death.
2k3, why are you decent with some things but suck so hard with others? If making this gimmick work isn't going to happen, I'll have to dump it entirely and just go with a boring route with the boss...
Also, just realized I didn't turn off the switch at the end. Oops. The problem though is if Devour Spirit is used anyways when there are no flames left. I mean, you can only have one trigger condition per ability (and one switch turned off and one turned on, which makes it super annoying to do anything with custom AIs as you can't use moves that require switches to be on to work, such as my Gravity spells or Level 5 Death or whatnot). So....hmmm.
Hmm...could. But again, this also falls back to the whole "Cannot use special abilities that require switches" issue, as I was thinking of having her use moves such as Maelstrom (HP to 1 to the party, or chance of it) and Level 5 Death.
2k3, why are you decent with some things but suck so hard with others? If making this gimmick work isn't going to happen, I'll have to dump it entirely and just go with a boring route with the boss...
The one trigger is why I proposed using two switches for Turn 7, one when its time to Devour Spirit and one when Louise can't and using a separate event to manage what move to do. I do think this is possible in 2k3. Maybe work on getting one part of it to work, like summoning and devouring spirits correctly. Once that works then get the transform to go and immediately transform back. Then work on adding the AI to super Louise so she does her eight actions before reverting. Break down making the boss into smaller steps you can accomplish instead of trying to get it all done at once.
I suppose that is ideal. Big reason I haven't been trying to do it step by step is due to how crappy my computer's been (there's no reason it should take 20-30 seconds or longer for 2k3 to boot up the game...). I'll give it a try and see what happens. I guess I COULD use a battle event for if Turn 7 switch is on and if none of the flames are alive, then turn on the alt turn 7 switch instead and turn off the turn 7 switch itself there. Would have to do that for the turn 10 switch too.
Pages:
1















