The Forums Are Now Closed!

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

AI Skirmish Mod, v. 23 (big update! - 8/16/2010)

Some revisions to Peppe's mod

By on August 16, 2010 7:15:36 PM from Demigod Forums Demigod Forums

the_hunger

Join Date 05/2009
+9

This mod is a revised version of Peppe's AI Skirmish mod, version .22 (https://forums.demigodthegame.com/369930).  It further refines Peppe's excellent work by fixing a few outstanding issues.  The mod is designed to make single-player skirmishes more challenging and enjoyable.

Current Features (v .23):

  • Teleporting: AI demigods will no longer teleport very short distances.  Demigods are likely to carry at least 1 teleport scroll, but a little less likely to carry more than 1.  Generally, AI demigods teleport more intelligently.
  • Flag Capturing: Greatly increased desire of AI demigods to capture and hold flags for warscore.  Also, coded custom flag-capturing routine for most maps.  AI demigods battle for flag control more and are more aggressive at capturing portals (and recapturing their own portals and other important flags).
  • Tweaked AI builds for Rook and Regulus.
  • This mod is best played on Nightmare difficulty, with the Conquest win condition, and with 2v2 or larger teams.  However, the AI improvements apply to other difficulties and win conditions.  The AI in the single-player tournament is unchanged.

Known Issues (v .23):

  • Occasionally starting Regulus, Oak, or Unclean Beast in the number 2 slot on either the Light or Dark team will result in the demigod not leaving the health crystal at the beginning of the game.  I am not sure why this is, and it does not occur every game.  The solution is simple: Don’t place any of these three demigods in the number 2 slot.
  • On a few maps, AI demigods can be overly aggressive about going after portals in enemy territory.  Generally, AI demigods are good about avoiding enemy towers and staying away from tower-protected portals.

Installation:

Place the Skirmish_AI_v23 folder in your Mod folder in your Demigod game directory.  This is usually found in C:\Program Files\Stardock Games\Demigod\bindata\mods.  After starting the game, go into the “Mods” option and enable the mod.  Be sure to disable any previous version of this mod.

Disclaimer:

I should say here that all praise should go to Peppe for this mod.  Just looking at his work, I am amazed by his grasp of the coding and the things that he's accomplished. Thus, I make no claims to this mod.  He's done 90% of the work; I just added 10% tweaks to refine it a bit.  I hope that he's cool with these tweaks (and maybe flattered by our continuing interest in his work), though he seems to have left the community some months ago.  In any event, I do take just a little credit for inspiring him to start the mod in the first place (see https://forums.demigodthegame.com/369842).  Again, many thanks to Peppe for giving this game some extended life.

Download:

Get version .23 of the Skirmish Mod at: http://www.filefront.com/17207898/Skirmish_AI_v23.zip/. Download includes mod folder and readme.

 

______________________________________________________________

.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.

 

Locked Post 37 Replies +2
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
August 16, 2010 8:10:25 PM from Demigod Forums Demigod Forums

Nice work.  It sounds like you've solved most of the major problems with .22.

A few weeks ago I worked on revamping the AI's citadel upgrade purchase priorities using the PriorityFunction extension that the AI mod added, and it just needs some final testing and tweaking.  They're currently buying Experience and Currency I at appropriate times, and occasionally Currency II on high gold if they can afford it early enough in the game.  I've also got them upgrade-matching reinforcements, so if one team suddenly dumps everything up to Giants on the enemy team, and they don't have enough war score for Giants themselves, they'll still get the best reinforcements they can, and even Armory + Blacksmith I-II if they're really outmatched.  They'll also super-prioritize Structure Defense if their citadel starts taking damage, and Graveyard if they're dying a whole lot.

I should probably add some minimum gold limits to some of the upgrades, so they don't spend every last cent they have when the need isn't critical, but once I've got that done I'll post it for you to add if you'd like.

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 12:31:35 AM from Demigod Forums Demigod Forums

First off, thanks for taking up where peppe left off.  I took a stab at it and found a weak solution.  You actually appear to have to fixed the crappy porting problem, so kuddos to you, sir. 

That said, I was doing some quick testing and just played a 1v1 vs nightmare ai.  As expected, it was easy for me to win, but ai is ai. But there were some obvious problems.  First, the positives, tp's worked great.  The ai even faked tps when I was working on its tower, which is behavior good players use, so that is perfect.  I didn't see any 5 foot tps, so that seems to be resolved and is a huge improvement over the peppe's last version. 

BUT - the ai is still terrible in a few areas.  In 1v1 on cataract - the ai had ZERO interest in flags.  It was more interested in attacking my towers in the middle.  The exact scenario was rook (me) vs reg (ai) on cata.  I held the flags 90% of the time, only retaking a flag like once or twice.  The rest, the ai just gave to me.  When I pushed a portal, the ai MAY have shown up a littler earlier than normal, but only half capped the portal flag back, and then never bothered to retake.  So, the bottom line, in 1v1, the ai is abysmal.  Giving up flags the entire game is a big problem, and the ai was much more concerned with hurting a few towers than retaking (even walking past flags it could easily kill just to start hitting towers).

So, +1 on tweaking peppe's tp code to make it work, but I really don't see any real improvement in flag control.  Honestly, if the ai got good at flag control, I'd think this mod is pretty damn near complete.  And at that, I simply mean if that ai ran back and forth to recap flags, that would be huge.

Thanks again for your work on this mod, hunger!

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 9:34:27 AM from Demigod Forums Demigod Forums

>>Occasionally starting Regulus, Oak, or Unclean Beast in the number 2 slot on either the Light or Dark team will result in the demigod not leaving the health crystal at the beginning of the game.  I am not sure why this is, and it does not occur every game.  The solution is simple: Don’t place any of these three demigods in the number 2 slot.

This happens even with the Skirmish AI disabled, and in the number 1 slot too.

Notice alot of times when testing a mod that if I do a 1vs1, those AIs just sits there.

But still... good work with the TP fix. That is a major problem... so now others can be worked on.

I have the feeling alot of people know this game is on life support now, and like me, are working on improving the offline experience. (my 1st big mod is coming soon, thanks to help from miriyaki and ptarth) So keep at it, I know I am interested in any new work on the skirmish AI, and will get around to working on a version of it too... and you solved this 1st problem I wanted to fix, so much the better.

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 12:32:52 PM from Demigod Forums Demigod Forums

At this point, the mod is designed for team play and works best for 2v2 and larger teams (for clarity, I've inserted this in the description above).  Since I never play 1v1, I haven't observed the AI's capping behavior under this condition.  However, I am not surprised that a single AI player would lose the flag-capping race against a human player.  The AI prioritizes portals, then whatever flags are nearest and random flags.  On most maps, I have customized it to go after certain flags more often.  I think that making the AI more competitive regarding flag capturing in 1v1 is going to take some significant work, if it's indeed possible. On Nightmare difficulty, the AI has a lot of competing priorities to think about that will constantly distract it from flag capping.  For example, since it has more gold, it wants to shop a lot.  It starts hanging around the artifact shop sooner than a human player would, and its desire for artifacts and some of the other high-end gear gets pretty high once it has the gold.  Also, citadel upgrades are very high priorities, starting with FS1 and Currency.  Moreover, the AI knows that it needs to farm lanes in order to get experience, and this can take precedent over flag capping.  When all of these priorities are divided between a few different AI teammates, the AI does much better.  There may be a way to balance all of this for 1v1, but I'm not sure.   

Thanks for the feedback, guys.   My hope is that this mod becomes a community mod, where different people continue to work on improving it. 

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 12:55:09 PM from Demigod Forums Demigod Forums

Quoting the_hunger,
At this point, the mod is designed for team play and works best for 3v3 and larger teams (for clarity, I've inserted this in the description above).  Since I never play 1v1, I haven't observed the AI's capping behavior under this condition.  However, I am not surprised that a single AI player would lose the flag-capping race against a human player.  The AI prioritizes portals, then whatever flags are nearest and random flags.  On most maps, I have customized it to go after certain flags more often.  I think that making the AI more competitive regarding flag capturing in 1v1 is going to take some significant work, if it's indeed possible. On Nightmare difficulty, the AI has a lot of competing priorities to think about that will constantly distract it from flag capping.  For example, since it has more gold, it wants to shop a lot.  It starts hanging around the artifact shop sooner than a human player would, and its desire for artifacts and some of the other high-end gear gets pretty high once it has the gold.  Also, citadel upgrades are very high priorities, starting with FS1 and Currency.  Moreover, the AI knows that it needs to farm lanes in order to get experience, and this can take precedent over flag capping.  When all of these priorities are divided between a few different AI teammates, the AI does much better.  There may be a way to balance all of this for 1v1, but I'm not sure.   

Thanks for the feedback, guys.   My hope is that this mod becomes a community mod, where different people continue to work on improving it. 

 

This reminds me of the red probes in Star Control II.

PRIORITY OVER-RIDE. NEW BEHAVIOR DICTATED.
MUST BREAK TARGET INTO COMPONENT COMPOUNDS.

We should start making a TO-DO list of AI things that would be nice, and whoever has an inclination can try and fix it, and then include it in the skirmish AI.

If only the AI could sort of think like a human.

Creepwave is there? OK, kill it and then get the flag. Creepwave is enroute? Get the flag and then go to the creep wave.

Other team just did 3x TPs? Run to portal.

Do not overextend past uncaptured flags and towers.

Overextended demigod? All TP in and gank.

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 3:34:36 PM from Demigod Forums Demigod Forums

OK, I tried to reproduce Pacov's experience with Rook vs. Regulus in Nightmare 1v1 on Cataract.  Regulus did exactly what Pacov experienced: almost no flag capturing and preoccupation with shooting towers.  Very strange.  So, I decided to try Rook against other demigods under same conditions (Nightmare, 1v1, Cataract).  I played against Sedna, UB, and Erebus.  All three went after the flags.  By the end of the game, Sedna got 18 flags, Erebus had 21, and UB had 26.  The problem seems restricted to Regulus, though I haven't tried all of the demigods in 1v1.  

Sedna, UB, and Erebus had strong early games when it came to flag capping and were quick to recapture any lost portals or other flags near their stronghold.  I still won the games handily, but not because the AI demigods would not capture flags.  I think the problem lay in the fact that by mid-game, the AI is concerned about other priorities, especially shopping.  Thus, while it would capture flags, it would then immediately go back to the citadel to snatch up gear.  It all fell apart for them once my Rook had destroyed most of their towers and then sent priests and angels which tied down the AI demigod in front of its citadel. 

I really think that there should probably be a separate 1v1 version of this mod.  While I don't really play 1v1, I was struck by how different it felt compared to, say, a 3v3 or even a 2v2.  There were very few confrontations with the AI demigod since we were both preoccupied with capping flags, shopping, etc.  Thus, in the few games that I played, there were no deaths or kills.  The games had a cat-and-mouse quality about them, where you are primarily playing tag with flags.  In team games (esp. 3v3, 4v4, or 5v5), the AI teams play much better since they can multitask much easier.  I suppose the AI could be made to do this better in a 1v1, but the cost would be decreasing its desire to shop--which, of course, would mean that it would have to give up the fighting advantage that it gets for constantly upgrading to the best gear. 

If someone wants to try this out, they would simply need to go into the AIGlobals.lua (found in hook/lua/sim/AI) and lower the PriorityFunction variable for artifacts (many are presently set for 100) and for citadel upgrades.  You would also need to go into the AIblueprint.lua of each demigod (found in hook/units/heroes) and lower the priority variable for gear associated with each demigod custom build.  After doing this, the AI demigods should be less interested in citadel upgrades and item purchased and more concerned about flags. 

For now, I'll leave the .23 version of the mod alone until people have a chance to do more play testing and to report results.  Beyond the issue with 1v1, it would be good, as Orion said, for us to compile a list of issues that need to be addressed in future versions of the mod.  In your reporting, be sure to mention the conditions of your game (that is, number of demigods, map, difficulty level, etc.).

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 3:45:01 PM from Demigod Forums Demigod Forums

One things I want to know, can you actually change the tournament AI?

It's weird that nobody has done it, so is it possible?

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 4:55:18 PM from Demigod Forums Demigod Forums

I'm not sure that priority alone is what is causing shopping frequency.  Unless everything in the AI's shopping priorities (both upgrades and items) returns 0, or it doesn't have enough money for those that return > 0, it'll still go and shop for that one item/upgrade when it decides to shop.  What I haven't figured out by looking through the AI, is when / how frequently it decides to check priorities, and if that can be controlled (modified by, say, how much gold it's accrued or what other goal priorities currently are).

The best example of this is the perpetual desire to teleport / run back after capturing flags.  From what I can tell, your modifications lessened this, but it still happens.  It's as though they're re-evaluating their goals after completing one, and somehow shopping ends up really high, especially for nightmare AIs (implying that it must already have something to do with gold, even if it's just that they are more likely to afford things).

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 5:40:22 PM from Demigod Forums Demigod Forums

However, I am not surprised that a single AI player would lose the flag-capping race against a human player. The AI prioritizes portals, then whatever flags are nearest and random flags.

I know the code you are talking about, but I'm just saying the AI did not prioritize flags at all after like 3 minutes.  Eg "oh look, a flag controlled by the other team.  I will run past that and peck at another tower.  My portal is only half capped?  Who cares.  I need to go work on towers." 

Ah - I see that you checked this out yourself, thanks for that.  Also glad that the behavior might be limited to reg for some strange reason... might be due to ranged attack perhaps...

There were very few confrontations with the AI demigod since we were both preoccupied with capping flags, shopping, etc. Thus, in the few games that I played, there were no deaths or kills. The games had a cat-and-mouse quality about them, where you are primarily playing tag with flags.

That's actually how most 1v1 games against people go.  Lots of cat and mouse games followed by confrontations here and there.  Also, I get your logic on changing the shopping priorities for the ai in 1v1, but I do find that my 1v1 purchasing order and citadel upgrade purchases are very similar. 

Reason for Karma (Optional)
Successfully updated karma reason!
August 19, 2010 8:34:14 PM from Demigod Forums Demigod Forums

Quoting LORD-ORION,
One things I want to know, can you actually change the tournament AI?

It's weird that nobody has done it, so is it possible?

This should be possible.  The tournament does allow for UI mods so that you can see your allies' gear.  I haven't figured it out yet, but the tournament AI should be moddable as well.

Reason for Karma (Optional)
Successfully updated karma reason!
August 22, 2010 9:30:17 PM from Demigod Forums Demigod Forums

Good AI. A shame the slot bug is still there though. I never remember who those 3 demigods are when setting up a game.

 

I noticed that the AI sometimes thinks it can go past 4 towers to capture a flag. On a bright note, they always fell back in time to survive. I mean, to survive the towers. Their 4 remaining hp didn't last long.

 

If you could put the AI in tournaments, it would be great. Thanks again for your efforts.

Reason for Karma (Optional)
Successfully updated karma reason!
August 23, 2010 9:13:12 AM from Demigod Forums Demigod Forums

Hi, I'd like to send you a very big thank you note for continuing the work on this mod. I've been playing Demigod over at a friend's house and I must say that this work is truly great for making all our Demigod games truly compelling.

As far as performance goes (and we've not tested it with 1vs1) the only quirky thing we've found is that sometimes enemy Demigods go through a *lot* of flak just to try and cap a portal. Like Nemado said, most times they're good enough not to get killed by the towers nearby... any other intervention, however, and they're toasted.

Thanks again for all the work!

Reason for Karma (Optional)
Successfully updated karma reason!
September 2, 2010 3:36:53 AM from Demigod Forums Demigod Forums

Ok, so I promised I'd finish refining my citadel upgrade priorities, but as usual I ran out of steam and I just haven't been playing the game enough lately to fully test and tweak the exact priority amounts.

However, I do have a pretty nice framework set up with a bunch of utility functions for modifying priorities based on everything from game settings, to team and AI demigod levels/deaths, to citadel health, enemy upgrades, etc.  So I'm going to post my current AIGlobals.lua, and maybe someone with more time and desire can finish tweaking the actual priority amounts.

 

The script:

http://pastebin.com/vCyHAxYd

(Updated, now works without AIBrain.lua hook - sorry if you tried it before and it errored out!)

 

This can be pasted directly onto the end of the existing Skirmish AI Mod AIGlobals.lua, or added to a separate mod with a higher UID (later load order).  The only things it overwrites are the max ping value and the CitadelUpgradeWeights tree, which it completely reworks.

I've applied nearly all of the utility functions found at the top of the file to the upgrades that they make sense with, the only thing that needs to be done is to fine-tune the actual priority amounts returned.   Some of the priority functions might be a bit confusing at first, because I use math.min and math.max a lot to create minimum and maximum thresholds for a lot of values (e.g. so Graveyard I has 0 priority until enough team members have died and/or the average team level is high enough to justify a reduction to death penalty), but I've found this to be a very effective way to make sure the upgrades are only used at the appropriate times.  Some of these thresholds might need to be adjusted slightly, and I usually provide a variable that can be directly changed for tweaking this.

You may also notice that I only used the GoldThreshold function a few times, as it's the last thing I added.  It might need to be sprinkled in more liberally depending on how much gold the AI ends up spending on potentially unnecessary or poorly-timed upgrades, and it should be fairly obvious how I've used it (to multiply the priority set by other conditions by a 0 to 1 fraction) and how you would need to modify the other priority functions to use it.

 

If anyone cares / has any questions about it, ask me here.   Or, if you want to just play with it and let me know which upgrades are being bought too early or too late / not at all, I can make some changes to it myself.  What it needs most is testing and observation.  Try to post what game settings you were using, and if you can, any other team/game stats applicable to the upgrades you think are off (deaths, levels, game time, what have you).

 

Edit: If you do try this out, make sure you're running the latest Uberfix test release, which fixes several citadel upgrade bugs, otherwise the AI will not even be able to buy some upgrades like Experience:

http://code.google.com/p/uberfix/downloads/detail?name=UberFixv103_RC2.zip&can=2&q=

(New test release, updated link)

Reason for Karma (Optional)
Successfully updated karma reason!
September 2, 2010 3:44:35 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
Ok, so I promised I'd finish refining my citadel upgrade priorities, but as usual I ran out of steam and I just haven't been playing the game enough lately to fully test and tweak the exact priority amounts.

However, I do have a pretty nice framework set up with a bunch of utility functions for modifying priorities based on everything from game settings, to team and AI demigod levels/deaths, to citadel health, enemy upgrades, etc.  So I'm going to post my current AIGlobals.lua, and maybe someone with more time and desire can finish tweaking the actual priority amounts.

 

The script:

http://pastebin.com/guKLjU4u

This can be pasted directly onto the end of the existing Skirmish AI Mod AIGlobals.lua, or added to a separate mod with a higher UID (later load order).  The only things it overwrites are the max ping value and the CitadelUpgradeWeights tree, which it completely reworks.

I've applied nearly all of the utility functions found at the top of the file to the upgrades that they make sense with, the only thing that needs to be done is to fine-tune the actual priority amounts returned.   Some of the priority functions might be a bit confusing at first, because I use math.min and math.max a lot to create minimum and maximum thresholds for a lot of values (e.g. so Graveyard I has 0 priority until enough team members have died and/or the average team level is high enough to justify a reduction to death penalty), but I've found this to be a very effective way to make sure the upgrades are only used at the appropriate times.  Some of these thresholds might need to be adjusted slightly, and I usually provide a variable that can be directly changed for tweaking this.

You may also notice that I only used the GoldThreshold function a few times, as it's the last thing I added.  It might need to be sprinkled in more liberally depending on how much gold the AI ends up spending on potentially unnecessary or poorly-timed upgrades, and it should be fairly obvious how I've used it (to multiply the priority set by other conditions by a 0 to 1 fraction) and how you would need to modify the other priority functions to use it.

 

If anyone cares / has any questions about it, ask me here.   Or, if you want to just play with it and let me know which upgrades are being bought too early or too late / not at all, I can make some changes to it myself.  What it needs most is testing and observation.  Try to post what game settings you were using, and if you can, any other team/game stats applicable to the upgrades you think are off (deaths, levels, game time, what have you).

 

Edit: If you do try this out, make sure you're running the latest Uberfix test release, which fixes several citadel upgrade bugs, otherwise the AI will not even be able to buy some upgrades like Experience:

http://code.google.com/p/uberfix/downloads/detail?name=UberFixv103m.rar&can=2&q=

Yeah, but for the most part, CIT upgrades are not so complicated. They can't be purchased before the war rank is reached, and they are rarely more valuable then buying the standard items.

I'm not saying you didn't so an awesome job, but is seems like misplaced effort.

It would have been better if you directed this effort towards item buying decisions instead.

eg: Priority of Narmoth's ring is 0 until you have Unbreakable / Nimoth / Vlemish, then it becomes a high priority.

Often the Nightmare AI has the gold to buy expensive items that do not give as good a return on investment as the standard 1500-1750 gold items players will always buy first... but it will purchase them first anyways because the priority is higher.

This leads to some funky orders of purchasing by the AI, because for sure the item is better, but should be an upgrade once you've filled out the efficient items, not a buy this first item.

Reason for Karma (Optional)
Successfully updated karma reason!
September 2, 2010 5:20:05 PM from Demigod Forums Demigod Forums

With stock Demigod item balance, there are only 3-4 cases like that you'd have to set.  The reason I didn't do that for items is because the Skirmish AI Mod has item priorities set individually for each demigod, so I would have to change those item priorities in every single demigod AI blueprint.  This would require a lot more work and testing than citadel upgrades, which nightmare AI usually do have enough gold to purchase later in the game - especially on high gold setting.

 

I actually have worked on framework improvements for item prioritization, but I mostly focused on returning to dynamic prioritization based on item stats, using a better method for evaluating them - and this is only valuable when used in conjunction with a mod that rebalances all the items, since right now there are really only 10-15 items worth buying.  Because of this, I never finished it, and while it worked slightly better than the original dynamic prioritization, it still required each demigod's AI blueprint priorities to be wiped out, so I didn't get around to testing it extensively.

Even non-dynamic item prioritization is a lot more complicated for several reasons (different demigods have different needs, timing and pairing of item purchases are critical, and selling is based on the same priority number as buying, which is a problem), and the multiplication of work across 10 demigod AI blueprints makes it far more time-consuming than this was.

 

If someone else wants to take a stab at item prioritization, the utility functions can be used in each Demigod's AIBlueprint by importing AIGlobals.lua and calling them from there.

 

Edit: The best way to handle item prioritization without a total re-write of the whole system is to return to a single table of priorities + priority functions, and then to use each demigod's AIBlueprint priority value as a modifier to that global priority.  This makes it possible to do unified and complex priority functions that better inter-relate items, and have lower gold cost items being purchased at the appropriate levels, while still keeping some degree of specificity to each demigod's needs or build.  This would require minor rewrites of some of the AI mod's AIShopUtilities functions.

Of course, then there's still selling to deal with.  I'm not really sure how to fix selling.

Reason for Karma (Optional)
Successfully updated karma reason!
September 2, 2010 5:41:01 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
With stock Demigod item balance, there are only 3-4 cases like that you'd have to set.  The reason I didn't do that for items is because the Skirmish AI Mod has item priorities set individually for each demigod, so I would have to change those item priorities in every single demigod AI blueprint.  This would require a lot more work and testing than citadel upgrades, which nightmare AI usually do have enough gold to purchase later in the game - especially on high gold setting.

 

I actually have worked on framework improvements for item prioritization, but I mostly focused on returning to dynamic prioritization based on item stats, using a better method for evaluating them - and this is only valuable when used in conjunction with a mod that rebalances all the items, since right now there are really only 10-15 items worth buying.  Because of this, I never finished it, and while it worked slightly better than the original dynamic prioritization, it still required each demigod's AI blueprint priorities to be wiped out, so I didn't get around to testing it extensively.

Even non-dynamic item prioritization is a lot more complicated for several reasons (different demigods have different needs, timing and pairing of item purchases are critical, and selling is based on the same priority number as buying, which is a problem), and the multiplication of work across 10 demigod AI blueprints makes it far more time-consuming than this was.

 

If someone else wants to take a stab at item prioritization, the utility functions can be used in each Demigod's AIBlueprint by importing AIGlobals.lua and calling them from there.

 

Edit: The best way to handle item prioritization without a total re-write of the whole system is to return to a single table of priorities + priority functions, and then to use each demigod's AIBlueprint priority value as a modifier to that global priority.  This makes it possible to do unified and complex priority functions that better inter-relate items, and have lower gold cost items being purchased at the appropriate levels, while still keeping some degree of specificity to each demigod's needs or build.  This would require minor rewrites of some of the AI mod's AIShopUtilities functions.

Of course, then there's still selling to deal with.  I'm not really sure how to fix selling.

I'm just projecting... I have 30+ new skill builds for CrazyTown, and items that compliment said builds. Also debugging the AI files is a pain, it simply tells you the AI file is invalid.

It is about a week's worth more work then I anticipated. But hey, the good thing is when I release it, there will be a template in there that includes many items. Anyone who wants to tweak the items the AI can choose simply has to copy paste it into the item section of the builds.

Reason for Karma (Optional)
Successfully updated karma reason!
September 2, 2010 5:49:00 PM from Demigod Forums Demigod Forums

Oh, and the other thing I forgot to mention is how insane the nightmare AI can be with high gold and Currency III.  If they do well early on, and have enough money to buy C3 within the 15 minute cutoff, it pays for itself in something like 5 minutes for a nightmare AI, and boosts the hell out of any others on the team.  Remember that nightmare AI get double gold for absolutely everything, which means 16 gold/s out of Currency III.

Reason for Karma (Optional)
Successfully updated karma reason!
September 2, 2010 5:54:05 PM from Demigod Forums Demigod Forums

Idea for selling:  An optional list for which items to sell when buying each item, that the sell weighting function checks (if present).  This would create some more logical upgrade paths without too much work (though still necessitating a return to a global item weight table), and would allow the AI to avoid selling items that may complement the one it's trying to purchase.

Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 11:42:01 PM from Demigod Forums Demigod Forums

Just a quick note to miriyaka:  MANY, MANY thanks for the new code. I especially like the checks for enemy-team citadel upgrades and status.  Makes the AI more "human-like" and dynamic (+1 karma).

Now, if someone could figure out how to get all of this into the single-player tournament.  I've had no luck doing this, even after spending about 3 days on it.  There is some code for the single-player tournament and even reference to tournament (or "scenario") mods.  However, I haven't been able to enable anything but UI mods in the tournament.  It would be nice if someone from Stardock or GPG could just tell us the trick for this.  However, I suppose GPG has moved on, and Stardock is swamped with the Elemental debacle.

Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 11:51:46 PM from Demigod Forums Demigod Forums

Rook could be ALOT better by pooping out more towers.

He should be doing it non-stop when
1) He is capping a flag
2) He is fighting creeps
3) He is getting shot up by a tower

Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 11:57:51 PM from Demigod Forums Demigod Forums

indeed - I'm sure that rook towers should be like erebus summons.  And the one's he casts himself are just bonus. 

Its prob best if he craps a tower any time he gets hit by a dg.  Getting hit by a creep is op.  We are trying to be fair. 

/ends completely off topic rant - sorry!

Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 11:59:21 PM from Demigod Forums Demigod Forums

Quoting the_hunger,


Now, if someone could figure out how to get all of this into the single-player tournament.  I've had no luck doing this, even after spending about 3 days on it.  There is some code for the single-player tournament and even reference to tournament (or "scenario") mods.  However, I haven't been able to enable anything but UI mods in the tournament.  It would be nice if someone from Stardock or GPG could just tell us the trick for this.  However, I suppose GPG has moved on, and Stardock is swamped with the Elemental debacle.

Been looking at this too, it is hard to follow, since the tournament mode is basically calling functions to populate the tournament's data. Somewhere in there, when it is populating the AIs, there must be a way to also make it use the builds.

I also saw a setting that sets the tournament to 8 demigods and a whole crap load of scripts to pick 8 of the 10 demigods, wonder if we can make it 10? That might be fun.

Also, another thing I want is to set the team AIs to the same difficulty level.

Having nightmare allies fighting nightmare enemies might make a battle easier to win, but it will make it much harder to win the tournament. As it is now, the AI loses the favor point battle because one battle it is tearing up the map and scoring high , and the next battle it is a docile pussycat on your team and gains no score.

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 12:04:11 AM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
indeed - I'm sure that rook towers should be like erebus summons.  And the one's he casts himself are just bonus. 

Its prob best if he craps a tower any time he gets hit by a dg.  Getting hit by a creep is op.  We are trying to be fair. 

/ends completely off topic rant - sorry!

With the new skirmish AI I made for CrazyTown, I had alot of opportunity to watch the rook AI. He'll often just stand around like a tard in those 3 situations, which is why I mention them.

I'm not saying he should cheat the refresh timer on towers, but he really needs to be dropping towers in those scenarios. As it is now, it seems he only really does it when he is taking damage from DGs and creeps. When he smacks a creep or DG, the cript should check if he could summon a tower and do it if he is able.

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 12:09:05 AM from Demigod Forums Demigod Forums

Well, I traced the single player launch process up to LaunchSession(SetupSinglePlayerSession(sessionInfo)), which is an engine command that does who-knows-what.

Do you have to do anything special to use UI mods in single player?  If not, there should be code somewhere that differentiates between UI and sim mods for a single player session, and it should just be a matter of finding out what happens after LaunchSession, lua-wise.  This is a part of the engine I don't have much experience with - I know some lobby code, and plenty of in-session stuff, but not what order the whole session init process happens, or how it's different in SP vs MP.

 

Edit: LO, when I see a tower Rook in .23, he's always, always raising towers.  During an average mid-game fight, he pops at least 2-3 of them, and usually chains them out properly when advancing on a creep wave.  Are you sure you're not doing something that's disrupting this?

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 12:15:05 AM from Demigod Forums Demigod Forums

With the new skirmish AI I made for CrazyTown, I had alot of opportunity to watch the rook AI. He'll often just stand around like a tard in those 3 situations, which is why I mention them.

I'm not saying he should cheat the refresh timer on towers, but he really needs to be dropping towers in those scenarios. As it is now, it seems he only really does it when he is taking damage from DGs and creeps. When he smacks a creep or DG, the cript should check if he could summon a tower and do it if he is able.

heh - less insane then... but your mod is called crazy town, so, perhaps I have the right idea

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