.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #21  
Old September 5th, 2011, 05:02 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: Gem Usage in Battle

Quote:
Originally Posted by Bananadine View Post
Quote:
Originally Posted by Chazar View Post
If I had only known those a single turn earlier! I guess that either knowing about the corner-self bless and/or the blood slave batteries would have saved my day.
I'm not sure, but it appears that the "corner" part of the corner-self-blessing idea was suggested because a unit by itself in the corner wouldn't be close enough to other sacred units to decide to bless them instead of itself. But if the unit is alone to begin with, there's no reason to put it in any particular spot just for the sake of blessing--it'll very likely hit itself on its first try no matter where you put it. (I think it's still possible for the blessing to miss, in spite of the maximal precision of the spell, but even if I'm right about that, it's still unlikely enough that you can safely ignore the possibility in most cases.)

I did extensive testing one this. It is not possible for a self bless to miss. (There's some evidence that long range 100 precision spells can miss, especially with low precision.) If there is no other unit within range, the blesser will always hit himself. Any other unit within range, even enemys or non-sacred units, makes it possible. The spell always hits it's target, but to choose that target the AI simulates casting it on the available targets, then picks the first target that got the best result. Since the AoE spread is random, the actual cast won't hit the same squares and thus maybe not the caster.
That's probably clear as mud, but I'm not sure how to say it better.


Quote:
Originally Posted by thejeff View Post
I would assume the "Is this battle a big enough threat to use gems" calculation, applies to using gems to counter fatigue. I'm not 100% sure, but it looks like that is what happened. 25 PD wasn't enough of a threat, so the fatigue checks didn't even come into play.
My experience suggests that the 1-or-0 gem-use switch that shows up in the debug log is the extent of the influence that the enemy's strength can have on gem use in this situation. Especially with a self-targeting spell like Soul Vortex that works no matter what enemies are present, I wouldn't expect enemy strength to have anything to do with the per-spell gem use decision. But I'm only speculating with little evidence. Can anybody confirm this one way or the other?
I think we agree. For some reason I was thinking that gems to avoid fatigue might ignore the gem-use switch. They don't of course.
Reply With Quote
  #22  
Old September 5th, 2011, 07:47 PM

Bananadine Bananadine is offline
First Lieutenant
 
Join Date: Nov 2007
Posts: 749
Thanks: 25
Thanked 28 Times in 18 Posts
Bananadine is on a distinguished road
Default Re: Gem Usage in Battle

Quote:
Originally Posted by thejeff View Post
I did extensive testing one this. It is not possible for a self bless to miss. (There's some evidence that long range 100 precision spells can miss, especially with low precision.) If there is no other unit within range, the blesser will always hit himself. Any other unit within range, even enemys or non-sacred units, makes it possible. The spell always hits it's target, but to choose that target the AI simulates casting it on the available targets, then picks the first target that got the best result. Since the AoE spread is random, the actual cast won't hit the same squares and thus maybe not the caster.
That's probably clear as mud, but I'm not sure how to say it better.
I can guess at an exact algorithm based on that, and it isn't what I'd vaguely imagined the actual algorithm probably was... interesting!

Anyway about the missing: I'm like 2/3 sure I've seen a blessing miss, but if you're right then it must have been because there were multiple units present... but surely not many, in fact maybe just two, because if there were many then I'd have expected the spell to miss some, so I wouldn't have been surprised when it did, and I wouldn't remember the incident now! But that's quite possible.

I thought I saw somebody say in some thread, though, that a 100 precision, single-tile spell could still straight-up miss. Like, somebody had seen a mind duel of all things miss, or something like that. I dunno. Of course magic duels tend to happen at much longer ranges than blessings.
Reply With Quote
  #23  
Old September 5th, 2011, 08:40 PM
Samhain's Avatar

Samhain Samhain is offline
Sergeant
 
Join Date: Jan 2010
Location: Michigan
Posts: 251
Thanks: 14
Thanked 13 Times in 8 Posts
Samhain is on a distinguished road
Default Re: Gem Usage in Battle

Quote:
Originally Posted by LDiCesare
Why would it be a bug? It's the ai gem usage, the ai decides to use it however it wants. If the wiki gives an inaccurate description of how the battle ai works, it's that site which is wrong, not the game which is bugged. It may as well be working as designed for all we know, and it's not an issue once you have done your homework of checking how many gems you actually need before going to battle.
Reply With Quote
It would be an issue if you gave your mage Pearls for the purpose of casting a particular spell but he or she burned them first casting magic duel.

Perhaps I was mistaken, but I inferred from your original post in this thread you felt that there was something particularly odd about gem usage for Magic Dual not that the claim in the Wiki about AI only using gems to reduce fatigue to 50 was in doubt.
Reply With Quote
  #24  
Old September 5th, 2011, 08:41 PM
Deathblob's Avatar

Deathblob Deathblob is offline
Corporal
 
Join Date: May 2011
Posts: 103
Thanks: 17
Thanked 24 Times in 17 Posts
Deathblob is on a distinguished road
Default Re: Gem Usage in Battle

The other units don't even have to be sacred to screw up a self-bless. Here is a Dai-Oni trying to bless himself. He's not very smart, so instead of targeting himself (at x6 y15), he targets his non-sacred wolf in (x5 y16), and hopes he gets a spalsh bless. He doesn't. Here's the relevant -dd info:

deploycom Shingen at 6 15
com Shingen cast spell (favspell Blessing) (mayusegems 1)
best Blessing this far, 5 15 (112 pnts)
castspell: cnr261 spl754 (Blessing) vis0 x5 y15 spldmg1
blastsqr: unr7365 x5 y15 aoe1 dmg1 eff10 spc1086373888 as10217 al9
affectvic vic7367 hv0
hitunit 7365 7367 dmg1 spec1086373888 ba-1
blastsqr: unr7365 x4 y16 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr7365 x6 y16 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr7365 x5 y14 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr7365 x3 y17 aoe1 dmg1 eff10 spc1086373888 as10217 al9

It looks like there's a no-debug-output stage building the scores for spells, where Bless is targeted at various squares, and scored based on the outcome. Perhaps the Dai Oni was splashed with a bless during the trial run cast at (5,15). I can't tell if (6,15) was even tested, since there's not enough output.

If you have a mixed squad of sacreds (S) and vanilla units (V) like this:

SVS
VVV
SVS

Then it may be optimal to target the center vanilla square.

But when there's only a single sacred unit on the battlefield, it's completely buggy that the unit does not target his own square when casting Bless.
Attached Files
File Type: zip blesstest.zip (52.1 KB, 453 views)
Reply With Quote
  #25  
Old September 6th, 2011, 07:38 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: Gem Usage in Battle

Yeah, that matches what I've seen.

It's completely buggy, except that it uses exactly the same code that's used for all the other spell targeting. Now that you know what it is, you can generally work around it. It's only really brutal, if you're using self-blessing thugs against Caelum or Pan. Flying PD means there are always targets around.

If it's really frustrating, mod in a new H1 bless at AoE 1 or caster only.
Reply With Quote
  #26  
Old September 6th, 2011, 08:02 PM
Deathblob's Avatar

Deathblob Deathblob is offline
Corporal
 
Join Date: May 2011
Posts: 103
Thanks: 17
Thanked 24 Times in 17 Posts
Deathblob is on a distinguished road
Default Re: Gem Usage in Battle

I wasn't sure what you meant at first, but I think I understand now... just like in the Dai Oni case of the spell targeting the wolves, if enemy PD flies over, the bless will target the enemy PD square, any just maybe splash onto your thug. Is that right? If so, that's even worse than I thought ... the enemy is of course not affected by the bless!
Reply With Quote
  #27  
Old September 7th, 2011, 08:09 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: Gem Usage in Battle

Yeah, that's about right.

It's not quite as bad as it sounds. It will only cast on an enemy if you can fall into the AoE. It does mean when you aren't solo it has a better chance of getting multiple targets.
Reply With Quote
  #28  
Old September 8th, 2011, 02:17 AM

Dimaz Dimaz is offline
First Lieutenant
 
Join Date: May 2005
Posts: 660
Thanks: 63
Thanked 75 Times in 31 Posts
Dimaz is on a distinguished road
Default Re: Gem Usage in Battle

I had Magic Duel (Prec 100) miss the target square, with S9 oracle too. I posted the -ddd logs somewhere and probably still have the turn in mail archives.
Reply With Quote
  #29  
Old September 8th, 2011, 02:37 AM
Deathblob's Avatar

Deathblob Deathblob is offline
Corporal
 
Join Date: May 2011
Posts: 103
Thanks: 17
Thanked 24 Times in 17 Posts
Deathblob is on a distinguished road
Default Re: Gem Usage in Battle

Was there a Storm or Mist up at the time? Were there so many units on the battlefield that the target was more than 100 squares away?
Reply With Quote
  #30  
Old September 8th, 2011, 03:03 AM

Dimaz Dimaz is offline
First Lieutenant
 
Join Date: May 2005
Posts: 660
Thanks: 63
Thanked 75 Times in 31 Posts
Dimaz is on a distinguished road
Default Re: Gem Usage in Battle

There were only 2 units (Oracle and Golem IIRC) or maybe some pd too, I'm not sure. No BF spells. The miss was one square, something like (5,15) instead of (5, 14).
Reply With Quote
Reply

Bookmarks

Tags
battle magic, battles, gems


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:49 PM.


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