[eMod][LH] AI Plus

By on December 4, 2013 9:24:54 PM from Elemental Forums Elemental Forums

DsRaider

Join Date 11/2008
+69

First of all I would like to thank Frogboy for all the hard work he has put into the AI and making the game moddable.

This mod is for everyone looking for a more challenging AI. It basically teaches the AI to play more like me!

 

Changes

-Reprioritizes the build order of practically every improvement and several techs. In particular they will build unrest and production buildings first most of the time. As a result AI cities are much more developed midgame.

-The AI likes to build more elite units now.

-Changes and adds tons of units to make sure the AI has good choices to choose from. Removes tons of bad designs.

-AI is is sightly better at choosing spells and champion traits.

-AI is more effected by distance and less by time. So far away players will tend to ignore you and you will receive less diplomatic penalties late game. I tried to get AIs to fight to the death more.

-Taught the AI to better play as the more unique factions such as Roseln and Magnar.

-Added some isworthy tags to several spells, so for instance Widows will no longer debuff the same unit twice.

-1 or 2 tiny balance changes to underpowered units or abilities to make the AI better at using them. These are in the AIBalance+ file and you can delete them if you want.

-Other stuff I forget.

 

Download: Here

To install unzip the files to the mod folder at My Games\LegendaryHeroes\Mods and then go into the core files at Program Files\Steam\SteamApps\common\FE Legendary Heroes\data\English and delete the CoreAIUnits file. I also recommend you check the units folder and delete any old units.

Only compatible with my armor visual mod so far, but they do work nicely together. I am working on my Additional Races mod as well. 

Please comment below on bugs and balance. I am also looking for some well thought out unit designs to include. PM me or give me a link. 

 


Plans and Random Thoughts

-The Magnar AI still builds nothing but slaves ever. I tried adding AItags to their units with no luck. Thus I had to do a workaround and remove every slave unit that wasn't basic infantry, so they will build some Quendar units.

-The AI stunts some of its cities by training units immediately after they settle a new city. This is not smart.

-More unit designs!

-Roseln builds a lot of useless spiders.

-I wish there was a proximity variable that showed how many tiles away the nearest enemy is. I could write a lot of nice isworthy tags for spells with that.

-The AI still chooses stupid paths for it's sovereigns and champions. I wish I could add a AITrait to champions so that I could prioritize them choosing certain traits.

-Other stuff.

Locked Post 81 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2014 12:24:45 AM from Elemental Forums Elemental Forums

Another example of a unit made for end game:

 

Tarth Foot Bow

 

<Equipment>ChainHelmet_Masterwork</Equipment>
        <Equipment>DragonHideCloak</Equipment>
        <Equipment>ChainVambraces_Masterwork</Equipment>
        <Equipment>ChainGreaves_Masterwork</Equipment>
        <Equipment>ChainBoots_Masterwork</Equipment>
        <Equipment>ChainBreastpiece_Masterwork</Equipment>
        <Equipment>YewLongbow_Tarth</Equipment>
        <Equipment>AmuletofWarding</Equipment>
        <Equipment>AmuletOfHaste</Equipment>
        <Equipment>FirstAidKit</Equipment>
        <Equipment>AmuletOfFrost</Equipment>

 

<SelectedAbilityBonusOption>Blood_Tarth</SelectedAbilityBonusOption>
        <SelectedAbilityBonusOption>ArmorProficiency1</SelectedAbilityBonusOption>
        <SelectedAbilityBonusOption>Fast</SelectedAbilityBonusOption>
        <SelectedAbilityBonusOption>Bloodthirsty</SelectedAbilityBonusOption>

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2014 10:32:33 AM from Elemental Forums Elemental Forums

Yep that's a good example. I have added a ton of units like that to every race. It was a lot of work, especially since I had to do it again for B&M.

I have been experimenting with a bunch of stuff to make the AI better. Trying to get them to specialize cities more by playing with the priority of improvements and trying to get them to develop more by having them build less units. The next release should make a big difference especially with 1.7 coming out. I can't wait for that. I was hoping 1.7 would include strategic IsTargetWorthy tags and some city specialization love for the AI, so I could get all the unused city enchantments working, but its looking very unlikely now. [e digicons]:'([/e]

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2014 12:10:20 PM from Elemental Forums Elemental Forums

DO you have a version control (ex: a changelog) for this mod?

 

Maybe we could get the community to contribute some "good" endgame units for each faction so that you won't have to do it all yourself.

Reason for Karma (Optional)
Successfully updated karma reason!
June 18, 2014 5:56:02 PM from Elemental Forums Elemental Forums

Been trying to optimize the AI build order for late game. I have had it optimized for early and mid game but noticed recently it tended to stall early late game. If I did it right it should make a big difference on top of everything else I have added for the next version. Only problem is that I am LH'ed out. I have played it quite a bit recently and don't feel like playing more.

Reason for Karma (Optional)
Successfully updated karma reason!
June 18, 2014 9:06:32 PM from Elemental Forums Elemental Forums

OK, since this an AI thread, I have a question for the Collective...

So the AI Tags on techs, abilities and such are all currently taged wtih AIPersonality=AI_General.

 

It is implied by the AI code that different personalities/priorities can be assigned.  Certainly, on the weapons side this can be done fairly easily (focus on horses, bows, piercing, etc.).  But as for the more nebulous stuff, say Sorceror vs Greedy, I'm not seeing anything in (our end of) the code that seems to do anything to implement these personality tags.

What I'm wondering is if anyone has tried sometthing along these lines yet...


            <AIData AIPersonality="AI_Sorceror">
                <AIPriority>5</AIPriority>
            </AIData>

Essentially, you'd assign these tags to the focus points for the ability/tech/spell in question, to assign a higher rating than what is normally assigned by AI_General...  This tag would appear immediately below the AI_General priority tag.

It seems to me that this is how the personality tags should work, but that Stardock may not have gotten around to fleshing these out yet.  Has anyone experimented with this at all as of yet, and if so what were your findings?

Just checked the GalCivII code, and I didn't see any AI Personality tags in my brief perusal (although I did see a detailed stat system that would work something along these lines), so apparently this is an Elemental thing...

Reason for Karma (Optional)
Successfully updated karma reason!
June 18, 2014 9:46:26 PM from Elemental Forums Elemental Forums

Check out the bottom of the CoreAIDefs.xml file. I think this is where and how you would actually create a new AI. Then as you said you would have to tag practically every entity in the game with it. I have no idea if it would actually work though. I haven't even got the general AI to where I want it let alone had time to create new ones. If it does work you could do cool things with it though. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 18, 2014 10:15:51 PM from Elemental Forums Elemental Forums

I'm thinking you'd only tag the abilities where the 'Non-General personality' would be looking for a stronger (or maybe weaker) focus than what the General AI would normally do, i.e. you would use the default 'General' value unless the ability was flagged for your unique personality.  Again though, haven't tried this, it is just something that seems to make sense based on how the tags are set up.  Hence my inquiry as to whether anyone had tried this.

A quick way to check would be to 'heavily weight' the first build for something, to make sure the AI would normally always build this first, and then flag the special personality tag to another starting improvement with say double the AI weighting.  If the AI normally always builds the first item due to your AI weighting, but you suddenly see the second item being built (because you've limited that Sov to the one possible trait you are assigning the bump to), then we'd know if this works.

If no one else has tried anything on these lines, I may get around to it, but in the meantime it's just a thought that occured to me, that I wanted to share.

Reason for Karma (Optional)
Successfully updated karma reason!
June 18, 2014 10:38:48 PM from Elemental Forums Elemental Forums

I believe which AI personality the AI would use is set in the faction xml. That being the case I think it would mean that if you changed from AI_General to a new AI then you would have to tag everything as the AI would completely stop using the old tags.

Reason for Karma (Optional)
Successfully updated karma reason!
June 25, 2014 12:31:46 AM from Elemental Forums Elemental Forums

Did this mod get updated? Should I delete the old version and download again?

Reason for Karma (Optional)
Successfully updated karma reason!
June 25, 2014 10:20:53 AM from Elemental Forums Elemental Forums

No I haven't updated this yet. Been waiting for 1.7, as it includes its own AI stuff. That might change if it takes much longer.

Reason for Karma (Optional)
Successfully updated karma reason!
August 2, 2014 5:20:58 PM from Elemental Forums Elemental Forums

Well it's looking like 1.7 is out. Some of the issues in the game have been addressed, but the issue of the AI not building more higher end units seems to remain a problem.

Reason for Karma (Optional)
Successfully updated karma reason!
August 3, 2014 3:18:31 AM from Elemental Forums Elemental Forums


not a good mod when one has to delete something core about the game. Sounds good but I ain't deleting nothing ever that is core to the game. I'll wait for Froggy to update the ai.

Reason for Karma (Optional)
Successfully updated karma reason!
August 3, 2014 4:21:23 AM from Elemental Forums Elemental Forums

Quoting rossanderson48,

not a good mod when one has to delete something core about the game. Sounds good but I ain't deleting nothing ever that is core to the game. I'll wait for Froggy to update the ai.

That's fair enough and in principle modding entirely from the mod folder is the way to go.  But the problem there is that certain things are not possible to mod without touching the core folder.

It's completely safe in any case, given that if you don't like the results you can just go to your Steam properties for the game and reevaluate the local cache which restore all the original files.

Fair enough if you don't want to do that, but it doesn't' make the mod "not good".  You could actually be missing out on something that is in fact, rather good.

Reason for Karma (Optional)
Successfully updated karma reason!
August 3, 2014 10:42:37 AM from Elemental Forums Elemental Forums

Quoting rossanderson48,

not a good mod when one has to delete something core about the game. Sounds good but I ain't deleting nothing ever that is core to the game. I'll wait for Froggy to update the ai.

I don't really consider that file to really be core. It's just a extra file the devs added a while back that contains a bunch of bad player designed units, it has never even been updated to reflect code changes. This mod also works fine if you want to keep it although the AI will build a bunch of dumb useless units.

Also I guess I should really update this. I have a bunch of tweaks and improvement I have been to lazy to release.

Reason for Karma (Optional)
Successfully updated karma reason!
August 3, 2014 12:09:09 PM from Elemental Forums Elemental Forums

I'd love to see the next update for 1.7. AI seems to play better than ever, and with AI Plus I bet the 1.7 AI will do really well.

Reason for Karma (Optional)
Successfully updated karma reason!
August 10, 2014 1:59:45 PM from Elemental Forums Elemental Forums

Updated to v1b.

-Added a ton of late game units with crystal items for the AI.

-Tweaked build priorities to prevent the AI from stalling midgame. Feedback is welcome here.

-Added compatibility with Unitstat Background mod.

Reason for Karma (Optional)
Successfully updated karma reason!
August 10, 2014 5:44:50 PM from Elemental Forums Elemental Forums

Tried playing a game with this mod using the Altarians and my city defenders were not showing up. 


Is there  something missing? I added your visual armor mod to see if that would help, but no luck. I have no other mods running. 

 

Note: I do not have any of the DLC.

Reason for Karma (Optional)
Successfully updated karma reason!
August 10, 2014 8:46:02 PM from Elemental Forums Elemental Forums

Oops. Accidentally mixed in some city defender stuff from B&M. I fixed and uploaded.

Reason for Karma (Optional)
Successfully updated karma reason!
August 10, 2014 8:56:00 PM from Elemental Forums Elemental Forums

I tracked down the problem. Has to to with this tag.

 

Code: xml
  1. KingdomMaleMilitia

 

This model is missing.

Reason for Karma (Optional)
Successfully updated karma reason!
August 10, 2014 8:57:25 PM from Elemental Forums Elemental Forums

Quoting DsRaider,

Oops. Accidentally mixed in some city defender stuff from B&M. I fixed and uploaded.

 

Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2014 12:32:10 PM from Elemental Forums Elemental Forums

Quoting DsRaider,

Quoting rossanderson48,

not a good mod when one has to delete something core about the game. Sounds good but I ain't deleting nothing ever that is core to the game. I'll wait for Froggy to update the ai.



I don't really consider that file to really be core. It's just a extra file the devs added a while back that contains a bunch of bad player designed units, it has never even been updated to reflect code changes. This mod also works fine if you want to keep it although the AI will build a bunch of dumb useless units.

Also I guess I should really update this. I have a bunch of tweaks and improvement I have been to lazy to release.

This is why I hesitate to use most mods or especially use something that changes the "core" elements of the game. Modders get lazy and do not continue to support their mod or make necessary changes that need to be made. Thanks for proving my point about mods. )

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2014 12:47:46 PM from Elemental Forums Elemental Forums

Quoting rossanderson48,

This is why I hesitate to use most mods or especially use something that changes the "core" elements of the game. Modders get lazy and do not continue to support their mod or make necessary changes that need to be made. Thanks for proving my point about mods.

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2014 1:34:33 PM from Elemental Forums Elemental Forums

[classified]

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2014 1:35:05 PM from Elemental Forums Elemental Forums



Quoting rossanderson48,

Modders get lazy and do not continue to support their mod or make necessary changes that need to be made. Thanks for proving my point about mods.




Nothing lazier than someone who makes new content for you, FOR FREE! I mean, the nerve of these modders to give you something, with NO EFFORT OR MONEY on your part!

Good thing you're here to put these lazy modders in their place rossanderson. Show us all your strong example of industriousness by going back to waiting for the next patch!

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2014 1:51:34 PM from Elemental Forums Elemental Forums

Really nice to just show up to troll a modder thread ross, if you're not offering any constructive criticism or actually using mods at all why post here.

Davrovana is right on his response lol.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0000235   Page Render Time: