The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

AI Skirmish Mod .25n Release 11/27/2010 (Major Revision)

By on November 23, 2010 7:57:17 PM from Demigod Forums Demigod Forums

 

Release 25 :  

Mod Version - Skirmish/Online Play: 

http://www.filefront.com/17572530/Skirmish_AI_v25n.zip

http://www.filefront.com/17572533/Skirmish_AI_v25n.exe

 

-This version only works in skirmish mode and has no lobby modifications.

 

Tournament Edition - Offline/Singleplayer:  http://www.filefront.com/17552549/Skirmish_v25_TEd.zip

-This version works in all game modes (tournament/skirmish) and adds some functionality to the auto-fill lobby button.

 

Gameplay should be the same in each version.

 


 

Major Changes:

Version D or later will support replay playback.  Thanks miriyaka

Stuck AI issue fixed by slowing down shopping to one action per second.  AI is a little slower to shop, but plays every game reliably.

AI goals are overridden based on conditions:

  • First 20 seconds of the game -> Shop.
  • Next 10 seconds -> capture flag (gets them all moving to nearest avialable flag).
  • If the enemy has the same or more flags and we are at full health -> capture flags
  • If we are war rank 3 and have enough money for currency -> Shop

The result of the above is a good clean opening.  And the AI spending most of the game capturing flags -> fighting at the flag -> retreating -> healing -> shopping -> leaving shop area -> capturing flags.   If it doesn't take a lot of damage it may only retreat a little and then rejoin the fight.  If it takes a lot of damage it usually retreats to the health crystal.

AI will spend much less time doing nothing or aimlessly wondering around.

 

Minor Changes:

Item weights for common items (health stacking items).  AI's will use similar items, with a few builds picking up class/build specific items.

Most builds have 1-3 achievement items, so the AI will be a little different game to game even if it only has one build for that Demigod type.

 

+48 Karma | 110 Replies
November 23, 2010 8:20:40 PM from Demigod Forums Demigod Forums

Good stuff!

November 23, 2010 8:25:38 PM from Demigod Forums Demigod Forums

Here you go, Peppe - compiled the mod version as an executable.  http://www.box.net/shared/yvh1f08jt2

Add to the OP if you like.

 

 

November 23, 2010 8:40:02 PM from Demigod Forums Demigod Forums

noticing a few things...

the ai seems to be taking a little more risk by its tower... like more than it should.  1 instance, we had a reg on the other team that backed up to his tower... but he just stood there refusing to run away while 3 of us wailed on him.

noticed the ai started buying xp also - good stuff!

At one point, an ai oak just stood slightly out of range while i took his portal from him.

Also noticed there is not messaging anymore for when a portal is threatened, etc.

November 23, 2010 8:50:09 PM from Demigod Forums Demigod Forums

 

Let me know if the reg thing happens often.  I didn't tweak any survival stuff.  It could be that the damage rate was so high it didn't bother to retreat.   I think i saw that in one of the functions. 

November 23, 2010 8:56:45 PM from Demigod Forums Demigod Forums

Quoting Peppe,
 

Let me know if the reg thing happens often.  I didn't tweak any survival stuff.  It could be that the damage rate was so high it didn't bother to retreat.   I think i saw that in one of the functions. 

so far, just one time.

November 23, 2010 8:58:00 PM from Demigod Forums Demigod Forums

oh and note - i'm testing this WITH the latest uberfix rc4

November 23, 2010 9:00:04 PM from Demigod Forums Demigod Forums

oh boy - and then late game, it i had 2 dgs on my team spamming the lock flag message on one of our portals.  lasted about 9 sec

November 23, 2010 9:02:38 PM from Demigod Forums Demigod Forums

I forgot to look at the lock message.

 

I can probably kill the announcement.  Or move it to just before the action fires if it is in the wrong place. 

November 23, 2010 9:07:56 PM from Demigod Forums Demigod Forums

 

Commented out the announcement code. 

November 23, 2010 9:08:02 PM from Demigod Forums Demigod Forums

I forgot to look at the lock message.

I can probably kill the announcement. Or move it to just before the action fires if it is in the wrong place.

Well, the notifications are good when they work as expected.  The messages that I don't think are spoken anymore are the portal threatened message (which is actually useful). 

Just had time for a 1 play through.  Was fun at any rate.  

November 23, 2010 9:09:06 PM from Demigod Forums Demigod Forums

What were they doing when this happened?  Were they trying to cast, or still moving around?

Edit: I just looked at UseItemActions.lua, and the AI is set up to send a message before it knows whether or not the ability is ready.  The announcement just needs to be moved down to within the 'if (result)' condition, so it only occurs when they're actually fully able to cast the lock.

November 23, 2010 9:15:37 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
What were they doing when this happened?  Were they trying to cast, or still moving around?

Edit: I just looked at UseItemActions.lua, and the AI is set up to send a message before it knows whether or not the ability is ready.  The announcement just needs to be moved down to within the 'if (result)' condition, so it only occurs when they're actually fully able to cast the lock.

At one point, my 2 ai's were standing right by my portal flag on cataract.  They were even threatened, then started spamming that message.  Then locked about 8-9 seconds later.  I don't think cooldown was involved on a lock in this case. 

November 23, 2010 9:16:20 PM from Demigod Forums Demigod Forums

 

If you like the message i can move it down as mireyaka suggested. 

 

 

November 23, 2010 9:17:13 PM from Demigod Forums Demigod Forums

Another interesting thing, that perhaps should be looked at.  I tried to view my last replay... invalid gamestate within about 1-2 seconds. 

Wonders if it uberfix or ai skirmish related...

November 23, 2010 9:19:28 PM from Demigod Forums Demigod Forums

Also found in UseItemActions: that pesky little AI-can-teleport-to-walls problem.  Not added by the mod, of course, but easily fixable.  Change the category vectors on lines 602-604 from 'categories.DEFENSE' to 'categories.DEFENSE - categories.WALL'.

November 23, 2010 9:22:22 PM from Demigod Forums Demigod Forums

Ok - just did some tests regarding the invalid gamestate in replays - its definitely caused by the ai skirmish mod.  Did a 10 sec test with just uber on - then replayed - no problem.  10 sec test with just skirmish on - then replayed.  Invalid gamestate almost instantly.

Hmm...

November 23, 2010 9:24:08 PM from Demigod Forums Demigod Forums

 

Version c released... with capture lock announcement moved down.  Should fire with the lock action.

Set category to defense - wall as suggested.

 

C re-released (had b in the name in game)

November 23, 2010 9:30:28 PM from Demigod Forums Demigod Forums

On the replay it seems to be triggered by the chat:

warning: 00:02:48: Error running lua script: Invalid army -1. (Use a 1-based index)
         stack traceback:
             [C]: in function `IsAlly'
             ...ardock\demigod\dgskir.zip\lua\sim\ai\aiutilities.lua(562): in function `AIChat'
             ...ir.zip\lua\sim\ai\strategic\assets\friendlyasset.lua(356): in function `PickSkillUpgrade'
             ...\stardock\demigod\dgskir.zip\lua\sim\ai\herogoap.lua(1164): in function <...\stardock\demigod\dgskir.zip\lua\sim\ai\herogoap.lua:1161>
warning: 00:02:48: Error running lua script: Invalid army -1. (Use a 1-based index)

 

I don't think the standard AI ever chats to its team.

November 23, 2010 9:38:31 PM from Demigod Forums Demigod Forums

That's because replays are in observer mode as far as the sim is concerned.  Observers are Army -1, which alliance functions don't like.  Make sure you're not using IsAlly or IsEnemy checks with GetFocusArmy without first checking that GetFocusArmy() > 0.  Add that to the AI chat check and you should be good.

Edit: There's another one of these in line 722 of HeroGOAP.  Same deal, just make sure GetFocusArmy() > 0.

Edit 2: These are both stock Demigod functions, I guess.  I understand why the chat one wasn't causing a problem before, but why wasn't the HeroGOAP one (AnnounceMasterGoal) not breaking replays?  Or was it?  I've never even tried watching an AI replay before..

November 23, 2010 9:43:31 PM from Demigod Forums Demigod Forums

 

No wonder they commented out all their AI chat items.

 

I'll make these tweaks and get version 'd' out.

 

Version D mod version posted and replay seemed to work fine.

November 23, 2010 10:19:44 PM from Demigod Forums Demigod Forums

 

Installer added. 

 

Pacov or anyone, I haven't used Inno Setup in a long while let me know if there are any issues with the installer.

November 23, 2010 11:03:14 PM from Demigod Forums Demigod Forums

Quoting Peppe,
 

Installer added. 

Pacov or anyone, I haven't used Inno Setup in a long while let me know if there are any issues with the installer.

Will do - no more time for testing today, but hopefully will get a chance tomorrow.  Thanks again for all the effort you guys put into this!

Sorry if I missed it, but any ideas regarding the invalid gamestates on replays using this mod?

November 23, 2010 11:24:24 PM from Demigod Forums Demigod Forums

 

It was cuased by the built in AI chat functions.   miriyaka told me what to fix, so the replay observer mode won't error out.

 

New games on version d above should be viewable as replays.

 

I tested offline with a 30 minute game and it ran from start to finish without issue.  My mod, Uber fix 1.03 rc4, and the 3 UI mods.

November 24, 2010 7:43:17 AM from Demigod Forums Demigod Forums

I've been trying to come up with a non-destructive fix for the boot shop issue for the UberFix, and it's been irritatingly complicated due to how they structured GetItemsList and and GetItemDesires.  There is absolutely no reason whatsoever for ScenarioInfo.AllItemsList to be a numerically-keyed table that has to be fully iterated every single time you want to do anything with it-- say, return an item's desire table, something that happens every time an AI shops.  That's just awful, awful design.

I don't think it's that big of a performance issue, since it's only happening maybe a handful of times per AI shopping trip, but it makes this fix basically impossible without completely mimicking the functionality of the whole function (and then some) to remove and re-add all of the boot items.  The whole thing could have also been avoided if they'd placed that shopIds table where it should have been: outside the function.  That would have also made the AI purchasing system easily and cleanly extensible for mods that add new shops or shop tabs.

 

So, I'm not going to touch this in the UberFix at this point.  It would only affect people who aren't using the Skirmish AI mod, and even then the AI would only be buying the items in question once in a blue moon, and most of them aren't actually any good.

November 24, 2010 11:42:26 AM from Demigod Forums Demigod Forums

sounds good. 

 

The current version has the little shop ID updated from 01 to 10, so the skirmish AI is good.  It really only became an issue when I filtered items above 1750 out of the early game shopping and expected most AI's to get unbreakable boots.

Stardock Forums v1.0.0.0    #108434  walnut1   Server Load Time: 00:00:00.0000156   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.