.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   AI spell casting priorities (http://forum.shrapnelgames.com/showthread.php?t=38538)

Endoperez April 27th, 2008 03:06 AM

Re: AI spell casting priorities
 
Quote:

Sombre said:
Scripted to spend gems? How does that work Loren?

I think he meant "scripted to use spells that consume gems".

There's at least one major problem with this: Blood magic. Everything worthwhile needs gems. All other paths can do something pretty good even without gems, but Blood must flow if it's to be of any use.

Saulot April 27th, 2008 03:41 AM

Re: AI spell casting priorities
 
This one of those things that always bothered me, blood magic shouldn't just be about sacrificing slaves, though that's certainly an important part. Another good method would be sacrificing of self, as in cutting open bleeding wounds of various sizes on one's own body. This actually does fit historically with what we know of the Maya and Aztecs.

When I first tried the dom series, I was somewhat surprised there was no 'hitpoint cost' spells. I suppose it might be difficult to balance with healing spells and regeneration, though in that sense, the spells/effects shouldn't work on a blood mage.

Endoperez April 27th, 2008 03:58 AM

Re: AI spell casting priorities
 
There are Leech, Leeching Touch and Hellfire... Not much, granted, but at least Hellfire's description mentions that it's possible, but the amounts of blood required are too big for single person to handle without passing out.

Kristoffer O April 27th, 2008 06:31 AM

Re: AI spell casting priorities
 
Initially (long before dom-ppp was released) magic gem use was optional and only a way of reducing fatigue. At this time sacrifice of slaves was optional and most blood spells were exhaustive enough to make sacrifice almost obligational.

I agree that self sacrifice (and HP loss) is thematic and sadly missing from the game. Not sure how viable it is atm. Most mechanics available in the game would probably be a bit ad hoc.

Zeldor April 27th, 2008 06:34 AM

Re: AI spell casting priorities
 
That's why you should really start writing new code from scratch for Dom4!

Kristoffer O April 27th, 2008 07:42 AM

Re: AI spell casting priorities
 
Utterly boring http://forum.shrapnelgames.com/images/smilies/happy.gif

cleveland April 27th, 2008 09:24 AM

Re: AI spell casting priorities
 
Quote:

cleveland said:
Marble Warriors seems to take priority over Army of Gold, strangely.

So I wanted to get to the bottom of this, which just cost me, albeit only marginally, in a current game: I outfitted an E1 mage with Earth Boots (now E2), who casted Summon Earth Power (now E3) in round 1 (Exhibit A), and who had 4E gems in stock, scripted to cast Army of Gold next.

[Exhibit A]
http://img76.imageshack.us/img76/561...golduu5.th.jpg

As mentioned, the guy cast Marble Warriors instead, which offers less protection to far fewer troops.

I did the Dom3 -ddd switch, the relevant debug code is below:

Celarim cast spell (favspell Army of Gold) (mayusegems 1)
...
comp_castspell: eval Army of Gold result -1
...
castspell: cnr1007 spl394 (Marble Warriors) vis3 x8 y13 spldmg65536

So the game didn't even think my guy could cast it, which is extremely odd to me. It's a E4 spell, requiring 3E gems, so 4E should be enough to boost him to cast it, or to at least evaluate it. The previous turn I was able to get an E2 mage with Earth Boots (now E3) to cast Summon Earthpower (now E4) in round 1, followed by Army of Lead in round 2, with the same 4E gems in stock; hypothetically this is an identical scenario.

[img]/threads/images/Graemlins/Bug.gif[/img]?
<font color="red">Edit: Not a [img]/threads/images/Graemlins/Bug.gif[/img]! Can't use more gems than your current path level!</font>

johan osterman April 27th, 2008 09:36 AM

Re: AI spell casting priorities
 
You can never spend more gems in a turn than you have in the path. So to cast a spell that have the same path requirement as gem cost you must have that same path value before the gem boost

cleveland April 27th, 2008 10:36 AM

Re: AI spell casting priorities
 
Quote:

johan osterman said:
You can never spend more gems in a turn than you have in the path. So to cast a spell that have the same path requirement as gem cost you must have that same path value before the gem boost

Ohhhhhhhhhhhhhh.... It all makes perfect sense now. Thank you for the very prompt &amp; thoughtful reply.

Manual: A mage can only use as many gems as his current skill level in that path.

For whatever reason, I interpreted this to mean "After spending one gem to temporarily boost me to level X+1, I can spend an additional X+1 gems to cast this spell." But the current, more aesthetically pleasing paradigm is that Boosting &amp; Casting are fundamentally inseparable. Very cool.

I'm editing my posts above to reflect my newfound wisdom.

<font color="red">Edit: New question...Since path bonuses received from being a communion master don't actually increase your base magic path totals, communion masters do not see increased max gem expenditure, correct? For example, had I made an E2 mage the master of a 2 slave communion, he could NOT cast an E3 spell requiring 3E gems, right?</font>

DonCorazon April 27th, 2008 01:43 PM

Re: AI spell casting priorities
 
In addition to the limit on not using more gems than your current path level, would the AI use one of your gems on the Summon Earthpower to reduce fatigue of casting the spell, thus leaving you only 3 gems - not enought to both boost and case the Army of Gold? In your case, you would clearly not want the AI to use a gem to reduce the fatigue of casting the Summon EP spell.

btw - would anyone be so kind as to point me to an FAQ or something that explains how to use this "-ddd switch" if one exists. Many thanks.

Twan April 27th, 2008 01:48 PM

Re: AI spell casting priorities
 
Quote:


<font color="red">Edit: New question...Since path bonuses received from being a communion master don't actually increase your base magic path totals, communion masters do not see increased max gem expenditure, correct? For example, had I made an E2 mage the master of a 2 slave communion, he could NOT cast an E3 spell requiring 3E gems, right?</font>

No. Communion (as other boost spells) increase base level of the master, there is just one display bug, so it's not shown.

Saulot April 28th, 2008 12:35 AM

Re: AI spell casting priorities
 
Quote:

DonCorazon said:
btw - would anyone be so kind as to point me to an FAQ or something that explains how to use this "-ddd switch" if one exists. Many thanks.

Sure. (Since strangely, this isn't listed in the FAQ, and it's not in the manual index either)

-d is a commandline switch which triggers Dominions to run in debug mode.

During the debug mode, a log is created of everything that happens in the game. If you want to just see the details of a battle, just load up the dominions in debug mode, and then view the battle, and then quit. This is the most common use of the debug mode. The second most common is likely to examine conflicts or problems in mods.

The level of debug desired, can be changed by the amount of d's used. So, -ddd would be more thorough than just -d

I've seen -dddddd used, but that's rather extreme, and shows a LOT of information, most of it difficult to make out and unnecessary. Remember, logs can become huge.

As to how to load up a commandline switch, since I'm a windoze user, I'll explain the two common windows methods.

1. Is to use dos, by loading up run 'cmd' to get a dos prompt. From there, get into the dominions directory, and load up dom3 with 'dom3 -d' (no quotes)

2. Is to use the dom shortcut most windows users are familiar. Before you click on the shortcut, right click on it, go the shortcut tab, and where it says target you should see something like "C:\Games\Dominions 3\dom3.exe"
Change it so the end of it looks like: dom3.exe" -d

Of course, if you use method two, you should remember to change it back after you've finished the debug run.

The log is located in your dominions folder.

I hope that answers your question fully. http://forum.shrapnelgames.com/images/smilies/happy.gif

DonCorazon April 28th, 2008 01:30 AM

Re: AI spell casting priorities
 
wow, thanks saulot.

i also got some tips from cleveland who mentioned pasting the log text into excel, which made it easier to read in my test run.

i had almost forgotten my dos commands. http://forum.shrapnelgames.com/images/smilies/happy.gif

Twan May 10th, 2008 08:21 AM

Re: AI spell casting priorities
 
Summon imp seem to get too much value.

In a game with Utgard I sent a lone werewolf with a slave scripted to cast quicken self, breath of winter and then reinvigoration, to start the melee without fatigue.

He overwrited breath of winter to cast summon imp, getting 102 fatigue (by chance his natural reinvigoration allowed him to recover and win against the weak ennemy PD, but with more opposition it would have been sure death) .

Meglobob May 10th, 2008 09:09 AM

Re: AI spell casting priorities
 
Yes, I would like to see reinvigoration given higher scripting priority. Several times the AI has overwritten it with a silly blood spell resulting in the death of my blood SC's due to high fatigue.

kasnavada May 10th, 2008 09:37 AM

Re: AI spell casting priorities
 
The orb lighting spell costs 10 fatigue... The spell is overwritten by something else everytime I try to cast it. I'm outnumbering my opponents but still...

I don't get it.

Amhazair May 10th, 2008 09:51 AM

Re: AI spell casting priorities
 
Are you sure you're in range? Orb lightning has a much shorter range than most other evocation spells.

kasnavada May 10th, 2008 02:03 PM

Re: AI spell casting priorities
 
Ah. Well.

That's it. Thanks. I should have checked the range too.

NTJedi May 15th, 2008 06:38 PM

Re: AI spell casting priorities
 
Quote:

Kristoffer O said:
Hi,

Seems like some spells might be too popular.

I've heard about:
Astral Shield
Arrow Fend (recently heard of this, so I'm not sure how bad it is)

Any others since last patch?

I think I found another spell too popular during battle. It's happened multiple times for underwater battles.

This is specific for underwater battles where level_1 astral mages are casting blink... over and over and over. Randomly blinking around on the battlefield every turn is not useful and risky.

thejeff May 16th, 2008 09:14 AM

Re: AI spell casting priorities
 
That's probably more a matter of not having anything else valid/useful to cast. What were they scripted for?

Once everyone in range is Ethereal and Lucky, what else can a S1 mage do? (Without communion)

Depends on what you had researched.

I'll agree that blink is very rarely wanted.

Niarg May 16th, 2008 09:34 AM

Re: AI spell casting priorities
 
Is there any way of ensuring that a reasonable number of gems are used for each spell.

I had an E4 tartarian with earth boots and wanted it to cast earthpower, curse of stones, earthquake, earthquake so I gave it 10 gems. By my calculations each casting should take 3 gems and cost about 100 fatigue (dominion was drain 2) however in practice the ai used up all of my gems in two turns.

I appreciate that you don't usually want to go over 200 fatigue but my tartarian had easily enough hp to cope with taking the direct hp loss. As it turned out I won the battle anyway and the one cast of earthquake hurt me far more than it hurt my opponent so maybe it wasn't too bad a thing that I didn't get the second cast off, however would there be any chance that the gems used could take into account what has been scripted and leave the necessary gems to complete the script even if it looks like it should be overridden.

Sombre May 16th, 2008 09:58 AM

Re: AI spell casting priorities
 
I have no idea how a E4 mage used 10 gems. That goes against everything I know regarding gem usage.

thejeff May 16th, 2008 10:08 AM

Re: AI spell casting priorities
 
Well, with Earthpower he's a E6 mage, so he could use them in 2 turns. I can't remember how many gems Curse of stones cost, but if it's 3 as well, he should be able to use 4 gems for that and for Earthquake, leaving him with 2 -- not enough for the second earthquake.

That's assuming I'm remembering the rule about only one more gem than the cost correctly. I think I've seen that not hold, if so, he'd happily use the full 6 gems casting Curse, then cast one Earthquake with the remaining 4.

Sombre May 16th, 2008 10:12 AM

Re: AI spell casting priorities
 
I was told casters could never use more gems than their level in the appropriate path. That must mean in a single casting then? I thought it meant for the entire battle.

thejeff May 16th, 2008 10:22 AM

Re: AI spell casting priorities
 
Definitely in a single casting.

(And I'm not entirely sure about that. I could swear I've seen B1 mages burn 2 slaves at once.)

sansanjuan May 16th, 2008 11:07 AM

Re: AI spell casting priorities
 
Quote:

Twan said:


He overwrited breath of winter to cast summon imp, getting 102 fatigue (by chance his natural reinvigoration allowed him to recover and win against the weak ennemy PD, but with more opposition it would have been sure death) .

Ditto here.
-SSJ

Humakty May 16th, 2008 11:28 AM

Re: AI spell casting priorities
 
Is blood magic under the same limits than other magics regarding gem/slaves usage ?

Meglobob May 16th, 2008 11:34 AM

Re: AI spell casting priorities
 
Quote:

Humakty said:
Is blood magic under the same limits than other magics regarding gem/slaves usage ?

Yes, 1 blood slave per level in blood just like gems AFAIK.

MaxWilson May 16th, 2008 12:06 PM

Re: AI spell casting priorities
 
Quote:

thejeff said:
Well, with Earthpower he's a E6 mage, so he could use them in 2 turns. I can't remember how many gems Curse of stones cost, but if it's 3 as well, he should be able to use 4 gems for that and for Earthquake, leaving him with 2 -- not enough for the second earthquake.

That's assuming I'm remembering the rule about only one more gem than the cost correctly. I think I've seen that not hold, if so, he'd happily use the full 6 gems casting Curse, then cast one Earthquake with the remaining 4.

I think you're thinking of this passage, on p. 89: "By using a magic gem, a caster gains one skill level in that magic path. This can be used both to allow a mage to cast a spell for which he would not normally have the skill, or to reduce the fatigue of a spell, or both. However, a mage may never increase his skill level by more than one by using gems, or gain skill in a path in which he or she did not already have at least one skill." Translation: you can spend as many gems as you have path levels, and each extra gem you spend beyond the minimum raises your skill level by 1--but the full, boosted skill level only counts for fatigue calculations. For purposes of which spells you can cast, your boosted level is capped at +1.

I'm quite certain I've seen D9 casters blow 5 or 6 gems on Shadow Blast. It's quite annoying. Gem management is the primary reason I stick mostly to gemless spells. It's not that I can't afford it, but I hate the micromanagement of gem-shuffling, and also the unpredictability (if I want one A8 caster to cast Fog Warriors AND Wrathful Skies, how many gems do I need to give him? If I give him the minimum 5, he'll probably blow them all on Fog Warriors so Wrathful Skies never gets cast. If I guess high and give him 15, he'll blow them all anyway).

I guess I'd really like to know why and when units decide to use gems they're holding.

-Max

thejeff May 16th, 2008 01:11 PM

Re: AI spell casting priorities
 
I'm actually basing this on several extensive discussions here, which resulted in the conclusion that the passage you quoted was misleading. Particularly here, where KO says so explicitly.

There have been several reports and a couple of incidents I've seen since that make me think those conclusions may not be true. If so, then the only limit on gem use is based on your level. (And I'm only 95% sure on that.)

My suspicion is that casters will use gems to try to keep their fatigue below 100. I had one Crone recently who I had scripted for Arrow Fend, Strength of Gaia, Mass Regen, with just enough gems for the gem costs. (I was using Bards with Soothing Song to drop her fatigue.) So in the second round her fatigue was in the 90s and she used at least one gem casting Strength, keeping her from casting the Regen. In an earlier battle I'd had another Crone start with Strength of Gaia and Mass Regen, and she did them fine, wasting no gems on the booster.

I can't really imagine a D9 caster using multiple gems on Shadow Blast though, unless he'd cast something big first and was already heavily fatigued.

I'll use the BF gem spells, but I won't try to spam things like Shadow Blast. Maybe one to start off. And I'll try to have a caster for each spell to avoid wasting extra gems.
If I had to, I'd assume they were going to use the max on the first spell and give gems to cover that.

fantasma May 16th, 2008 01:48 PM

Re: AI spell casting priorities
 
I had a battle recently against an enemy I outnumbered. One mage scripted for master enslave (mostly for capturing the enemy eagle kings) decided to cast will of the fates instead and blew all the gems. The next round another mage - scripted and executed as such - cast again will of the fates! Of course, zero effect! Doh

Sorry for spamming the thread.

thejeff May 16th, 2008 01:51 PM

Re: AI spell casting priorities
 
Had anyone cast any summons in between? That's the usual cause for double casts of Battlefield buffs.

fantasma May 18th, 2008 09:28 AM

Re: AI spell casting priorities
 
enslave mind, I guess. I'd need to load the old turn to be sure. But that would make only a few units (mammoths) compared to several hundred.

Cipher May 22nd, 2008 05:08 AM

Re: AI spell casting priorities
 
black list: Touch of Madness..

cleveland July 13th, 2008 09:52 AM

Re: AI spell casting priorities
 
Against a 31MR SC with zero shock resistance, two A6 casters spammed Confusion, rather than the intended Thunder Strike.

Perhaps a minor adjustment is in order?

Cheers,
cleveland


All times are GMT -4. The time now is 05:19 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.