Jump to content

Enemy AI try to attack village THEN attack.


JFierce
 Share

Recommended Posts

I was curious if there was an AI combo that lets the enemy head for a village first but if there isn't one available then attack

This is the only topic I could find and the AI string that lets them destroy villages also has the side effect of not attacking anything because it is 'heal allies'.

[0x00,0x04,0x01,0x00]

http://serenesforest...showtopic=25452

The only thing I can think of as an alternative is to link the Village that 'the enemy is supposed to head for' with an event that changes the Enemy AI once you reach it to attack mode. But there's ways to glitch them out then like just standing on the village they'll just do nothing or go right next to your character not attacking.

Edit: that and i Just thought of the fact that if they're already heading for the village you can't change their individual AI if they're a generic character used for enemies that's duplicated.Unless you make it literally I guess a character each for a village destroyer. This one for this village that one for that village. Might work. But there's still the issue of glitching them out.

Edited by JFierce
Link to comment
Share on other sites

from Unit Helpers.txt:

#ifdef _FE7_
#define NoAI 				[0x00,0x00,0x00,0x00]
#define PursueWithoutHeed 	        [0x00,0x02,0x02,0x00]
#define GuardTile 			[0x03,0x03,0x09,0x20]
#define Guard 				[0x00,0x03,0x00,0x20]
#define AttackInRange 		        [0x00,0x03,0x09,0x00]
#define DestroyVillages 	        [0x00,0x04,0x01,0x00]
#define HealUnits 			[0x0F,0x04,0x00,0x00]
#define StealFromUnits 		        [0x10,0x05,0x09,0x00]
#define StealFromChests 	        [0x06,0x05,0x09,0x00]
#define TalkToLord 			[0x06,0x0B,0x0A,0x00]
#define AttackWall 			[0x00,0x1B,0x01,0x00]
#define SeizeThrone 		        [0x00,0x1E,0x00,0x00]
#endif

Isn't [0x00,0x04,0x01,0x00] destroy villages, and [0x0F,0x04,0x00,0x00] heal units? Have you actually tried using any of them? I'm fairly certain that DestroyVillages will make an enemy attack if there aren't any villages around.

Link to comment
Share on other sites

Just tested it. . I think I found what was bugging me and made me think they weren't attacking at all. For some reason their AI with Destroy Villages they'll attack you but not after moving. As in they'll run up to your character. Then just end turn. Then NEXT turn if your still there they attack. That's a bit odd.

I don't know if that's the normal behavior or if it's caused by the fact I have an "INN" tile doing nothing (if that even effects anything at all no clue what an Inn does), and another village behind a gate they can't get to. But at least I guess they attack even if it's half assed.

Guess I'll try not to put too many with Destroy village on.

Edited by JFierce
Link to comment
Share on other sites

the problem with AI is that afaik nobody cares enough/is savvy enough to actually figure out how it works beyond straight observation (i have nothing against observation but there are times it can lead to quirks like this)

Link to comment
Share on other sites

I spent a whole month with Hextator on FEU/SoS trying to figure out AI. AI is painful in GBAFE because it's extremely limited and, to be honest, pretty goddamn stupid. There's no way to prioritize healing before attacking or attacking VS healing or combine three different AI types (Like making a valkyrie that attacks, heals, and raids villages whilst being smart about it too.) and often times you get stupid random AI, like giving someone attack AI but then they raid chests because you gave them a droppable chest key.

Yeah believe me, I went over close to a thousand combinations of AI and what's listed in the above post is probably all the AI you'll ever get, everything else defaults to "charge forward and attack".

Link to comment
Share on other sites

Not trying to hijack the thread by any means but the talk of limited AI brought up a question of my own. I noticed one of the AI's was to talk to your lord. Would it be possible to set an AI to approach and talk to a specific unit assuming it was deployed? Or is it limited to your primary lord character(s)?

Link to comment
Share on other sites

If I recall correctly there is one byte somewhere that determines which character that AI will talk to; therefore, anyone that uses this AI will always target that one character.

From one of Arch's docs:

In FE7 there is a specific AI command that tells Farina to talk to Hector. I've had to use this AI for FE4A and I figured I should post my notes on making things work for others just in case they want to use this feature.

First of all, without ASM hacking you can only do this once throughout your entire game. The AI command doesn't say "talk to the main lord" as some people have previously suggested. You must specify which character to talk to and which two characters the conversation is between.

0x06,0x0B,0x0A,0x00 is the AI we'll be using. Simply give the character you want to move and talk to another character this AI.

b97FE0: the ID of person the character will move toward.

1D3B54: The IDs of people who have the convo. First the initiator (character with the AI) and then the other character.

In FE4A I used this AI to have Alvis (7A) talk to Sigurd (03) in the prologue. At b97FE0 I wrote 03. At 1D3B54 I wrote 7A 03.

Special thanks to Nintenlord for his huge help with this. My notes are nearly 100% based off his findings.

Link to comment
Share on other sites

Yeah, I have a feeling I'm not going to worry about exact AI. I just needed to make sure those that destroy villages at least CAN attack. I'll just have to do what most do and prep AI around simple strategies.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...