The Forums Are Now Closed!

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

[MOD Project] DG Skirmish AI .22 -- 2/08/2010

By on November 24, 2009 12:11:24 AM from Demigod Forums Demigod Forums

This mod will seek to make a challenging AI to play against in single player and multiplayer.

Currently mods can only be applied to 'skirmish' games offline, so offline tournaments are out at the moment.  Multiplayer can only use mods in custom games.

I hope to have many contributors and please post ideas here.   I am no expert on this game and can use every input available.  I also welcome other developers if anyone is interested.

 

Current Features:

  • Each demigod has custom build(s) reflecting a focused skill and item plan
    • Each build supports custom favor item and item priorities to taylor item selection to each build.  
    • Where it made sense the AI skill plans hold skill points for use at a later level. 
  • The AI purchases Citadel Upgrades like a human:
    • Priests, Angels, and Cats purchased in warrank 8 (if it has the money)
    • Giants and armor upgrades purchased at a high priority in warrank 10

Under Development:

  • Refine conditions for when to use an item with an 'on use' property.
  • Improve AI macro through goal priority level manipulation.

 

Downloads:  

Installer - http://peppe-dg-mods.googlecode.com/files/Peppe_DG_skirmish_AI_setup.exe

Zip - http://peppe-dg-mods.googlecode.com/files/Skirmish_AI.zip

Newer versions available in this thread: https://forums.demigodthegame.com/400825

To add an installer to your mod follow instructions here: [MODDING-UTIL] Mod Setup Script


.22 Changes: 2/08/2010

Tweaks to new or changed items in 21.  Should avoid flags protected by towers (more often).

 

.21 Changes: 2/07/2010

Custom actions created to teleport to towers and portals under attack by enemy Demigods.

When looking for flags to capture all Demigods consider all flags.   Actions for flags nearest HQ, near to demigod, and portal flags.

Capture lock changed to only lock portals and valor flags under enemy threat.

 

.20 Changes: 2/03/2010

Rook arrow tower firing rate dropped and damage increased in attempt to improve the AI Rook retreating stutter-step issue.

 

.19 Changes: 1/25/2010

Mainly Stun/Interrupt Changes.

UB + Rook will save thier skill for interrupt or a low health target.

Sedna + Oak, will fire thier interrupt skills as long as they have mana and should stop using it once they reach low mana, but will fire if an interrupt opportunity presents itself.

Erebus,  Will use charm mostly for interrupt, but if he can stun multiple demigods will fire it off.

Demon Assassin,  Didn't test this, but should only shadow swap to interrupt may add additional conditions later.

Teleport and Large potions set back to require a safe distance from enemies to use.

 

.18 Changes: 12/15/2009

Sedna Heals earlier, @75%

QoT Casts shield earlier, @75%

Some flag cap changes.

 

.17 Changes: 12/14/2009

Sedna build changed.

Minor changes to survival goals.

Flag capture range extended.

 

.16 Changes: 12/13/2009 Mark II

Minor changes to Teleport distance check and consumable item priorities.

UB build changed to Ooze + Spit maxed by lvl 10.

Sedna Item priorities changed.

 

 

+48 Karma | 262 Replies
November 24, 2009 1:04:32 AM from Demigod Forums Demigod Forums

 

Archiving change log to first reply in thread:

.15 Changes: 12/13/2009

Teleport home for health: removed check for enemies, so will use a TP if it gets overwhelmed in a crowd.

Teleport home to shop: No action for this before, so the AI would walk home to shop even if it had a TP scroll. Created action similiar logic to TP home, but the AI decides when it really wants to shop.  Not triggered often.

Teleport to squad target.  This is the only teleport from home to outside, I have double the minimum range twice to hopefully get it to save the teleport for a longer trip.  

Sigil is now mainly an escape valve.  It will usaully trigger when the AI is fleeing or about to flee and once triggered instead of evaluating its health as good it will ignore the buff and run.   Sedna is about the only one i have seen heal a sigiled ally and stop its retreat.

Capture Lock reduced range check to 10 instead of 20.  20 seemed to be about 2 times the range of most skills.  10 should ensure a threat is at least near enough to warrant a lock

Towers for the early game should have it pretty scared.  Found an on taking damage event/action, so when a tower hits a hero its survival and health goals go way up, which should get it to back off.

Found a 'Health' Sensor that has an interesting affect on survivability and flee timing // priority.

Also adjusted minimum health before fleeing is even considerd, was 80% is now 50%.

Reduced big health potion buy priority.  More likely to cary a teleport scroll and TP to the health statue.

 

.14 changes:  12/09/2009

Heroes should respect towers more early.

Heroes should value portal flags more at higher warrank

 

.13 changes: 12/02/2009

Again nothing drastic, but added a few more files to mod relatd to goals.  Master goals added and capture priority given a higher priority there.

Failover item selection added for when a player drops and AI takes over.

 

.12 changes:

Minor changes to AI attack (targetting), creeping (range) and capture actions.

Minor changes to AI goal priority levels.

 

.11 changes:

Comments added to each demigod's template to describe how to edit it.

Bug fixed in UB template  'UnitAITemplate' should have been 'UnitAITemplates'

 

.10 changes:

Code cleaned up thaks to bman.

Blade of Serpant achievement item conditions for activation modified

Goals modified somewhat to see what impact it has on the game.  Hope for more flag capping and moving as a team.

Alternate builds put in for most demigods.  Sedna, DA, OC, and Erebus have a single build.

 

.09 changes:

Default shop priority added to force AI to shop at start. 

Rook has a second build added.  Now has hammer+boulder and tower spam build.

 

.08 changes:

Consumable item sell/buy cycling fixed *crosses fingers

Every build given a custom item set 7-8 items deep. (ability to do item weights by build was also added in this version)

 

.07 changes:

Oculus build added.

Custom favor items defined for each demigod build

 

.06 Changes:

Custom build for each Demigod.  Mostly popular anti-demigod builds so kills may be up.

Builds can save 1 or 2 points for use at a later level as most player builds make use of this saving level 6 skill point to buy two level 7 skills.

 

.05 Changes:

Block selling consumables to fix repeat buy/sell.

 

.04 Changes:

Building health regen becomes a priority at 300 warscore (part way through warrank 1).  This lets the AI get items to start and on the first trip back one will get this upgrade.

At Cats reinforcement damage becomes priority.

At war rank 10 giants, armor, and damage upgrades become priority (it should get them all)

Artifacts will be ignored until the DG has 10k, this should get them focused on being fully equipped before holding cash to get an artifact.

Achievements items locked to teleport amulet for testing.

 

.03 Changes:

Minor tweaks to item priorities

Custom logic processing added to upgrades

With the above, Priests set to not be purchased until warrank 8 at which point all the reinforcements become high priority.

 

.02 Changes:

Items all giving some semblance of priority.  This has results in less variety in what AI uses, but it should use good items early to midgame.

Citadel Upgrades set to a minimum set for early game.  Right now priests and angels are given a higher priority than i would like, but it will ensure when cats and giants come available the AI can sucessfully buy them.

 

The initial release, .01 changes:

AI Citidel Upgrades priorities tweaked. 

Death penalty priority reduced to default. 

Building health1, building damage 1, Gold 1, and XP 1 set to priority 3. 

Catapults and giants set to priority 10.

File changed: lua\sim\AI\AIGlobals.lua

 


Playing with priorities will probably be critical.  Looks to support a wide range.  Not sure if 0 results in never buying, but it is probably pretty close to never buy.

 

A value of -1 is the default for most items.  The resultant priority is one of the following:

function GetPriorityFromCost(cost)
    if cost < 1250 then
        return 5
    elseif cost < 2000 then
        return 15
    elseif cost < 4000 then
        return 30
    elseif cost < 7500 then
        return 50
    elseif cost < 11000 then
        return 100
    elseif cost < 17500 then
        return 150
    else
        return 200
    end
end

I don't think the file needs to be edited at the moment, but the above function is from lua\sim\AI\AIShopUtilities.lua. 

The file above also has some priority modifiers around the various buffs health, armor, mana, speeds, etc.

 

 

November 24, 2009 1:06:52 AM from Demigod Forums Demigod Forums

Peppe - I can see that you are going to be a great asset to the DG community and I, for one, appreicate you taking the time to work on mods for all of us.  Do you think you could explain a little more about what you are doing with this mod?  I don't quite follow. 

So - your goal is to create a mod so that playing aginst the AI is more challenging.  Is that correct?  Is this mod only for single player or multiplayer?  You appear to be starting by changing the order the AI prioritizes upgrades.  Is that right?  I'm not sure if you'd consider yourself an expert at demigod or what have you, but would you like some expert opinions on when to by X citadel upgrade?  And last, if so, can you help us understand how the code in the LUA files works?  Can you literally tell the AI that is should buy catupults as soon as possible (for instance) or is it just the priority system?

Any answer you can provide will help.  Thanks!

November 24, 2009 2:03:28 AM from Demigod Forums Demigod Forums

 

Yes the target is a Better AI to play against.  I guess everyone isn't familiar with Dawn of War's skirmish AI mod

I definatley need expert advice.  I have read the forums and been playing a couple weeks (whenever they had the 50% off deal)

 

My target is single player, as i play on a laptop with the wife interupting me often, but if everyone has the mod it can be enabled for multiplayer games.

 

The current LUAs appear to just dynamically build a shopping list of items and upgrades stored in the same list.   The shopping functions look rather complex, but each item can be given a base priority which should control the order it is bought.  I have not gone into the hero LUA files to see if certain DG's have certain priorities, as there are 'modification' functions to resort the list based on a need (health, armor, mana, etc).

 

My plan was to stop the AI buying res upgrade cuase it always seem to get that.  My next priority was to have it get the useful level 1 upgrades as i always find myself buying those cuase the AI takes so long to get them on thier own.   Then once warscore allows it get cats and giants.

 

About done for today, but i'll have to see if warscore can be an event to modify the priorities.  If it is then we can add in some timing to the AI.  Example: not buy priests and angels until cats are available and hope it can grap all 3 at once.

November 24, 2009 2:28:18 AM from Demigod Forums Demigod Forums

Thanks for the quick reply.  I think i understand what you are after.  Sounds great to me.  Just to guage your skil level, against AI, can you beat 5 on nightmare when using the default settings?  For me, it is not challenging due to predictable AI behavior.  That said, with the new AI features (being able to set them to high HP and low gold/exp), I actually do find 5v1 QUITE challenging. 

I personally don't play alot of SP. but I can see this mod being highly useful for MP in the event of a players dropping. 

If you can find a waw to prioritize based on warscore, then that would be excellent.  There all LOTS of considerations that go into when to buy priests, if you buy xp1, etc.  If we can really get quite specific, I could easily come up with a substantial amount of logic that would be the best course of action.  For instance, if the MAP is cataract and there are 2 players on each team and no deaths have occured and the warscore 2, then buy BLANK asap.  But if the coding really just comes out to being priority 1-10, then I don't we can smarten the AI up all that much outside of changing its silly current priorities.  Its still an improvement, to be sure, but the AI will still be QUITE dumb. 

November 24, 2009 3:24:55 AM from Demigod Forums Demigod Forums

.2 is up. 

Changes.  Upgrade priority and items... should use the common items i have seen recommended here for early/midgame.  If it gets rich enough it should slowly replace with artifacts, but i didn't let my test games go that far.

 

Like i said only been playing a couple weeks.  I have not tried nightmare, but am finding hard easy now 3v3.

 

Didn't look into warscore event based priority tonight.  In my head i think it can be done

 

Right now it is not smart enough to buy the lower upgrades if you put say giants in at high priority. 

 

Here is a shot that may be new.  10k AI (sigil)   

I wasn't playing just letting it run in background:

November 24, 2009 10:05:23 AM from Demigod Forums Demigod Forums

Peppe,

I am following your AI mod with much interest.  I haven't had a chance to test it yet, but I have looked at the code.  I'll play around with some of this later today.  However, I have a few questions.

It appears that you have prioritized most of the item purchases the same as I would. (I would give Slayer's Wraps a bit more priority, and less for Journeyman Treads.  Some of the attribute values in the AIGlobals file are actually wrong, such as Banded Armor providing 500 health, not 400 [the actual amount]. See http://demigod.wikia.com/wiki/Equipment_Items for more reliable stats).  Have you seen the AI limit itself mostly to these prioritized purchases?  Also I have noticed that you set the first level of citadelhealth, citadelcurrency, citadelfirepower, and citadelexp higher.  Does the AI reliably prioritize and purchase these items pretty quickly (that is, buy them early on)?  Finally, you have set the priority variables for additional troops quite high (1000 for giants!). Does this guarantee that the AI buys these upgrades?  Was 1000 priority necessary for catapults and giants, or were you simply not taking any chances on the AI overlooking these upgrades?

Again, thanks for your work.

EDIT: I, too, am curious about whether a 0 priority results in no purchase by the AI.  That would make sense, but at the same time the default priority variable is negative (-1) for most things, but the AI still buys them.

November 24, 2009 10:23:14 AM from Demigod Forums Demigod Forums

I set it very high to see if the game would accept it and not crash   good there.   I left the -1 entries on artifacts, but everything else should be manually set.   I kept the range similiar to what the -1 would have done to hopefully not affect sell decisions when it has cash to upgrade.  Also kepts the values close, so if one of the extra weighting factors might be able to have an affect. 

 

Really the only thing to balance manual priorities against is artifacts, which at -1 will have an auto priority of 50-200 based on thier cost.

Also set it high as one of the functions i took a brief look at seemed to take priority + distance.   A high enough priority might get an AI that just walked out of base to turn around and buy cats on warscore 8.   This will take a lot of games to confirm...

 

The hard thing to test this is citidel upgrades are not visible in replays.  Can someone make a mod for that?    My solution was to set the game to windowed mode and let it play in the background while i did other things.  I'd listen for war score rank being upped and then watch the citadel with my guy.

 

Overall they picked up the upgrades i enabled very quickly.   I dropped experience becuase it seems bugged to never be picked up and i don't think it is that useful.   The bug is probably in a flipped ordering like angels (06?) and catapults (05?).

 

It deffinatley stuck close to the item chioces.   With the Rollover Ally Info v1.3 probably the only tweak i would have is reduce plenor a hair to see it take unbreakable boots over it for some builds and plenor for others.   I'll have to look at the weighting functions and i think the hero lua to see how they use the weight.   I'll have to load the replay to see what consumables it picked up, but it should be teleports 1-2, sigil 1-2, and maybe a trinket or lock.

November 24, 2009 10:32:40 AM from Demigod Forums Demigod Forums

Quoting Peppe,
The hard thing to test this is citidel upgrades are not visible in replays.  Can someone make a mod for that?

You can observe citadel upgrades in replays by clicking on the little citadel icon on the left side of the screen, right at the top of the list of player names. If you are observing a light-side player, you can click the icon and see the light citadel upgrades. Same for dark.

November 24, 2009 11:31:52 AM from Demigod Forums Demigod Forums

 

I see.  That whole menu is not active in windowed mode replays.   I guess i'll switch to full screen to watch the replay.

November 24, 2009 1:36:13 PM from Demigod Forums Demigod Forums

Looking good man looking good

November 24, 2009 5:45:43 PM from Demigod Forums Demigod Forums

 

Made some progress today.

 

Items have a built in custom logic function, so any conditions you can dream up we can probably apply to item purchases.  Though the simpler the better.

 

Example:

Sigil of vitality

Instead of a fixed priority it has some logic to decide when to buy it:

    # Sigil of Vitality
    # Use: Temporarily increase Maximum Health by 50% for 10 seconds.
    Item_Consumable_110 = {
        SellPriority = 5,
        MaxPurchase = 3,
        PriorityFunction = function(unit, itemCount)
            if unit:GetMaxHealth() < 4000 then
                return 0
            end
       
            if itemCount == 0 then
                return 25
            elseif itemCount == 1 then
                return 10
            else
                return 5
            end
        end,
    },

 

The PriorityFunction above says don't even consider it if I have less than 4000 max health.   As the game progresses it will eventually pass that check through items or leveling.   Once the 4000 health check is passed it will buy the first Sigil at 25 priority and if its flush with cash may even buy 2 or 3 (likely other items will be in priority range 10-25 that it will pickup ahead of another sigil.

 

Now initially upgrades did not have an equivilent function.

I have modded two additional files to allow logic around upgrade priorities, and am in the process of testing this now.

 

I am starting with priests:

    # Priests
    CTroopNumber03 = {

   
     PriorityFunction = function(unit)
            if unit:GetAIBrain().Score.WarRank  >= 8 then
                return 1000
            else
                return 0
            end
         
     end,
       
    },

This will tell the demigods do not buy priests until warrank 8 or more.  At which point the static values for angels, cats will also allow a high priority upgrade as soon as thier pre-reqs are purchased.

 

.03 release coming out shortly after this game finishes

 

Please provide any item priorities and upgrade priorities you think the AI should prioritize.  Also any logic you think should go with it.  I have taken a stab at it.

 

Once we have item and upgrade chioces down fairly good we can try and get into more advanced stuff.  I just thought this stuff would be easy and create a good foundation to build off of.

 

November 24, 2009 6:03:50 PM from Demigod Forums Demigod Forums

Quoting Peppe,
 

I see.  That whole menu is not active in windowed mode replays.   I guess i'll switch to full screen to watch the replay.

 

It was not windowed mode it was the current Bman's Godlike Team Panel v1.2.

 

November 24, 2009 6:04:45 PM from Demigod Forums Demigod Forums

Hi Peppe,

 

this mod will be kinda important for me and my friends, cause we often play together gainst some ai...and any mod that makes it more challenging is warmly welcome....

 

1. Getting Gold upgrades asap is most important in my eyes...

2. Getting Velmish, Nimoth, Unbreakable, Narmoth, etc.....

3. Getting Tower upgrades at least 1 in HP and 1 in Dmg

4. Focusing on Reeinforcements and more Tower upgrades

5. if all other priorities fullfilled let AI buy artifacts.....

 

looking forward to your new versions of this mod......thx peppe

November 24, 2009 6:11:28 PM from Demigod Forums Demigod Forums

Some thoughts on citadel upgrades:

Warscore 1:  get tower regen 1 only
Warscore 2:  get XP1
Warscore 3:  currency 1 (if the AI has not purhcased XP1 by this point, currency 1 should become the priority)
Warscore 8:  priests/angels/catapults/blacksmith 1
Warscore 10:  giants, several troop upgrades

I've played QUITE a few games and this is the build I use 90% of the time. 

Consumable items:

The AI seems to use these very poorly.  teleport scrolls seem a smart choice along with capture locks.  Sigils and potions as well should get a decent priority. 

I have an idea that might be interesting though.  Can you make it so the AI would choose the teleport favor item by default and them see how well it utilizes if in a few tests? 

Regular items (armor, weapson, etc): 

Can you code it so that a particular demigod would purchase specific items?  For instance, can you code it so the sedna AI would always use one build, while the rook AI would use a different one?

November 24, 2009 6:27:30 PM from Demigod Forums Demigod Forums

great idea...specific item builds for the different demigods....

if thats possible...some pro´s could list up their builds.....would be awesome

November 24, 2009 6:47:03 PM from Demigod Forums Demigod Forums

 

@Pacov

So the damage upgrade to towers that adds AOE is out?

 

"Warscore 10:  giants, several troop upgrades"  is this armor and damage or just damage upgrades?

 

Now that i think we any easy way to controlupgrades and early-mid game items done i can look for how the demigods make item and skill chioces.

November 24, 2009 7:19:30 PM from Demigod Forums Demigod Forums

 

For some reason i can't get the AI to buy the XP citadel upgrades.  Anyone seen them buy it in a non modded game?  Not getting any errors, so am thinking something is not named in the code or the global file after they changed the upgrade from more frequent reinforcements to XP.

 

Other than that the nightmare AI 4v4 with me idle is wrapping up cat games on its own in about 25 minutes.  Giants at about 23 minutes.   Demigods level around 15.

 

Looks good for editing skill chioces. 

Each hero has a folder here: dgdata\units\heroes

Each hero then has a heroname_AIBlueprint.lua

Tested and it successfully hooked the file (meaning the modded version would be used).

 

Inside that file all have at least some builds listed.    Occy and DA don't have builds they select skills based on weighting at the moment.

 

I'll start with oak here are the existing builds, we can scrap them all, tweak the existing ones, or add new ones etc:

   SkillBuilds = {
        Army01 = {
            'HOAKRaiseDeadWard01',  # 1
            'HOAKSoulPower01',      # 2
            'HOAKDivineJustice01',  # 3
            'HOAKRaiseDeadWard02',  # 4
            'HOAKSoulPower02',      # 5
            'HOAKDivineJustice02',  # 6
            'HOAKRaiseDeadWard03',  # 7
            'HOAKLastStand01',      # 8
            'HOAKDivineJustice03',  # 9
            'HOAKRaiseDeadWard04',  # 10
            'HOAKSoulPower03',      # 11
            'HOAKPenitence01',      # 12
            'GeneralStatsBuff01',   # 13
            'HOAKPenitence02',      # 14
            'HOakSoulFrenzy',       # 15
            'HOakRally',            # 16
            'HOAKLastStand02',      # 17
            'GeneralStatsBuff02',   # 18
            'HOAKPenitence03',      # 19
            'GeneralStatsBuff03',   # 20
        },
        Support01 = {
            'HOAKShield01',         # 1
            'HOAKPenitence01',      # 2
            'HOAKDivineJustice01',  # 3
            'HOAKShield02',         # 4
            'HOAKPenitence02',      # 5
            'HOAKSurgeofFaith01',   # 6
            'HOAKShield03',         # 7
            'HOAKPenitence03',      # 8
            'HOAKDivineJustice02',  # 9
            'HOAKShield04',         # 10
            'HOAKPenitence04',      # 11
            'HOAKSurgeofFaith02',   # 12
            'HOAKDivineJustice03',  # 13
            'GeneralStatsBuff01',   # 14
            'HOakPurity',           # 15
            'HOAKSurgeofFaith03',   # 16
            'HOakRally',            # 17
            'GeneralStatsBuff02',   # 18
            'GeneralStatsBuff03',   # 19
            'GeneralStatsBuff04',   # 20
        },
        AntiDemigod01 = {
            'HOAKPenitence01',      # 1
            'HOAKRaiseDeadWard01',  # 2
            'HOAKSoulPower01',      # 3
            'HOAKPenitence02',      # 4
            'HOAKRaiseDeadWard02',  # 5
            'HOAKSoulPower02',      # 6
            'HOAKPenitence03',      # 7
            'HOAKRaiseDeadWard03',  # 8
            'HOAKSoulPower03',      # 9
            'HOAKPenitence04',      # 10
            'HOAKRaiseDeadWard04',  # 11
            'HOAKLastStand01',      # 12
            'HOAKShield01',         # 13
            'HOAKSurgeofFaith01',   # 14
            'HOakSoulFrenzy',       # 15
            'HOAKLastStand02',      # 16
            'HOAKShield02',         # 17
            'HOAKSurgeofFaith02',   # 18
            'HOAKShield03',         # 19
            'HOAKSurgeofFaith03',   # 20
        },
    },

 

I am familiar with oak and would say all the builds above have wasted points.

 

November 24, 2009 8:19:24 PM from Demigod Forums Demigod Forums

@Pacov

So the damage upgrade to towers that adds AOE is out?

That's my personal opinion from playing in high skill level games.  I very rarely bother with that upgrade.  Honestly, it wouldn't be terrible if the AI did pick it up, but if you are trying to fine tune this, I wouldn't have the AI purchase it. 

"Warscore 10: giants, several troop upgrades" is this armor and damage or just damage upgrades?

This is armor and damage troop upgrades.  I don't always do this, but it might be beneficial for the AI to do so. 

For some reason i can't get the AI to buy the XP citadel upgrades. Anyone seen them buy it in a non modded game? Not getting any errors, so am thinking something is not named in the code or the global file after they changed the upgrade from more frequent reinforcements to XP.

I don't often pay attention to what the AI purchase in replays, but from the one's I have watched, I don't think I've seen the AI purchase XP1 ever.  I might be wrong, though.

November 24, 2009 8:21:28 PM from Demigod Forums Demigod Forums

The builds are going to be tricky - we can't necessarily pick a solid build (for instance, Kestrel's oak build - see strat forum).  It's a good build, but we still have to keep in mind that the AI's are quite dumb.  The question should be, what skills should we choose to keep an AI alive or doing the most damage or... etc.  I do think that a solid human build is going to be quite different than a solid AI build. 

November 24, 2009 8:34:39 PM from Demigod Forums Demigod Forums

The builds are going to be tricky - we can't necessarily pick a solid build (for instance, Kestrel's oak build - see strat forum). It's a good build, but we still have to keep in mind that the AI's are quite dumb. The question should be, what skills should we choose to keep an AI alive or doing the most damage or... etc. I do think that a solid human build is going to be quite different than a solid AI build.

hmm but the question is will the ai know how to use skill X. That will probably require play testing the different builds

November 24, 2009 8:59:56 PM from Demigod Forums Demigod Forums

hmm but the question is will the ai know how to use skill X. That will probably require play testing the different builds

Indeed. 

Here are some thoughts for oak's skill build for AI:

I don't think I've ever seen the AI use shield intelligently, but that's a great skill for oak.  I'd go so far as to NOT have the AI even get a level of shield as it will most likely just be a waste of mana. 

The Ai seems to actually do fairly decent with raise dead wards. 

Here's the build I'd recommend based on how I've seen the AI play.  All are welcome to disagree, but please keep in mind I'm recommending this specific build based on how AI's play, not on how I'd choose to play oak.

  1. Raise Dead Ward 1
  2. Penitence 1
  3. Soul Power 1
  4. Raise Dead Ward 2
  5. Surge of Faith 1
  6. Soul Power 2
  7. Raise Dead Ward 3
  8. Soul Power 3
  9. SAVE
  10. Raise Dead Ward 4 + Surge of Faith 2
  11. Penitence 2
  12. Penitence 3
  13. Penitence 4
  14. Save
  15. Soul Frenzy + Surge of Faith 3
  16. Morale 1
  17. Morale 2
  18. Morale 3
  19. Morale 4
  20. Morale 5

I'd configure it that way initially.  As he seems to do ok with spirits, it might be smarter to tweak the build more in line with minion Oak later. 

Anyway - if you can configure it so the AI will purchace specific items based on character, we can get into what items would be best for this build/character

November 24, 2009 9:32:00 PM from Demigod Forums Demigod Forums

 

From the logic I am seeing it doesn't look like the AI can save skill points, but that is only a minor change.

 

I did some test runs and the file hooks, but the original file builds seem to still be active.   The original file is loaded as well, and where a function overlaps the new one is used.   Seems skill builds and other settings are merged. 

 

I tried to move the files into a shadow folder.  Demigod's modding readme says files in a shadow folder should totally replace files of the same name.   Where as hooked files extend a file.  The shadow folder overide doesn't seem to be working though.

 

I am testing a little hackish work around   There is a function that selects the builds.  If i assume the default builds are indexed as 0, 1, 2

my custom builds would be added at index valye 3, 4, 5 etc.

So i replaced: 

 local num = math.random(table.getn(buildNames))

with

 local num = 3

With a hard code to a specific build number the AI will always use the same build.  That sounds a little boring to me.    We would probably want multiple builds, so maybe a little tweak to the random math. 

Something like:  local num = math.random(table.getn(buildNames)-3)+3 

That should result in getting a random number between the number of builds we have added and selecting one of our builds.

This will need more testing, but i will try it with the build above.

November 24, 2009 9:53:34 PM from Demigod Forums Demigod Forums

I just did a play test of version .03.  I played as rook vs 2 ai on cataract.  Both AI were set to nightmare.  AI settings were for high HP + low gold/exp if they die.  All other settings were set to default. 

Here are some of my thoughts:

I was somewhat impressed seeing the AI popping sigils at somewhat reasonable times. 

I'm skimming through the replay now (will post later if seems applicable).  At start, the ai did not buy any upgrades (fortified structure), but on the 1st trip back to the base, the ai did pick it up.  1 AI (QoT) was buying things very intelligently.  Had ok armor, tp's, locks, etc. 

The other Ai (tb) was behaving quite foolishly... at this point(2 min in), it has 6k gold and has not bought a single item or upgrade.  At 4min 40 seconds, the tb is just spent all of his money on an artifact (the orb of veiled storms).  So, the tb has no items outside of this one artifact and has bought no upgrades.

This looks like it might be working correct for 1 AI, but not for 2.  Hmmm.

November 24, 2009 9:53:43 PM from Demigod Forums Demigod Forums

Peppe -- This is great work.  I hope you keep at it with the Skill trees and such.  I'll try to pipe in suggestions, but I'd certainly trust everything (well, maybe not *everything*) Pacov says. 


Just a quick question:  have you also looked at how AI's choose their favor items?  Once I started watching replays and noticed that AI's will choose Baubles and Coin Pouches and other crap, I started realizing the depth of the problem...

November 24, 2009 10:10:33 PM from Demigod Forums Demigod Forums

 

  1. Raise Dead Ward 1
  2. Penitence 1
  3. Soul Power 1

No point to get Raise Dead without getting Soul Power ASAP afterwards. Even with a minino build I get Penitence 1 to start with so at least I can burn all my mana with it from the get go. (1 Penitence and 2 Wards is a early-game Oak mana supply).

if you get Raise Dead / Soul Power / Penitence that's a long time with a full mana bar.

In addition, if your'e on the mana side, you can get to level 2 without farming a creep with 2 lucky flag caps (rarely happens against good players, but it is theoretically possible), which makes going level 1 Raise Dead an even weaker choice.


So, I'd do Penitence, Raise Dead, Soul Power

Raise Dead

Surge of Faith

 

Then is whether or not to get shield. It's uncommon to see an Oak AI use it effectively, but Soul Power 2 is only a +40 Weapon Damage skill... assuming you have a spirit build in some ways it could be better to get Morale in those situations (if you went horn) because once you get Raise Dead Ward IV, morale one == 4 * 10 minion weapon damage on top of everything else.

Now, again, I don't really consider Morale a good skill, but if we are going no-Shield with Horn of Battle I can see the value in it. (Though, btw, the way AI choose Favor items is completely random as well, they choose based on cost).

So this is what I would recommend for an AI minion build:

1. Penitence I

2. Raise Dead Ward I

3. Soul Power I

4. Raise Dead Ward II

5. Surge of Faith I

6. Penitence II

7. Raise Dead Ward III

8. Penitence III

9. Save

10. Surge of Faith II + Raise Dead IV

11. Pentitence IV

12. Divine Justice I

13. Morale I

14. Save

15. Surge of Faith III + Frenzy

16-20. Morale II & III & IV & V

Favor: Horn of Battle

Items:

Monks

Banded Armor

Scaled Helm

Haubrek of Life

Carries a Sigil (always, for the +100 hp bonus on minions as well as emergency use)

Gladiator Gloves (+4 minion damage)

Unbreakable Boots

Banded Armor -> Nimoth Chestplate

Scaled Helm -> Vlemish (this is a low mana build so Scaled Helm + Unbreakable Boots lasts awhile)

Level 10 Stats assuming following kit:

Scaled Helm, Unbreakable, Haubrek, Gladiator's Glove, Banded Armor, Sigil

== 5200 gold

4560 HP

2742 Mana

625 Armor (20%)

.8379  Rate of Fire

233.8 Weapon Damage + 120 from Soul Power == ~350

196 DPS

35 HPS

8.4 MPS

minions:

1360 HP

40 Weapon Damage 

.5 Rate of Fire

*10

== 800 DPS

 

Realitively high-hp, decent damage output, low-cost, low-mana build that is relatively easy to use:

Plant Ward

Surge of Faith, Penitence

Right Click + Minions

Horn of Battle

Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000500   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.