|
|
|
|
|
July 22nd, 2010, 07:16 AM
|
General
|
|
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
|
|
Re: Bug Thread: Discussion
I can't look at the turn right now, but when you say by himself, there's no one, including enemies near him when he casts bless?
In my tests, targeting was the problem. Bless would target any unit as long as the AoE in its tests included unblessed sacreds. Since the AoE spreads randomly it doesn't always include the same squares and the actual cast might not cover any actual sacreds.
This isn't necessarily a bad approach. If a non-sacred is between 2 groups of sacreds, targeting him might actually cover more sacreds than aiming for any of the actual targets.
|
July 22nd, 2010, 09:34 AM
|
Corporal
|
|
Join Date: Apr 2010
Location: Wichtia, KS
Posts: 96
Thanks: 8
Thanked 5 Times in 4 Posts
|
|
Re: Bug Thread: Discussion
It's rare, but this can happen, I believe the bless spell hits squares randomly and can miss the square it was actually cast in. Not sure that it's a bug, you may have just been unlucky.
|
July 22nd, 2010, 10:22 AM
|
General
|
|
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
|
|
Re: Bug Thread: Discussion
I'm pretty sure the target square is always hit. My testing never showed that happening. The debug log will tell you which square was targeted.
I won't get a chance to look at this one until this evening.
|
July 22nd, 2010, 02:24 PM
|
General
|
|
Join Date: Oct 2007
Posts: 3,007
Thanks: 171
Thanked 206 Times in 159 Posts
|
|
Re: Bug Thread: Discussion
This has happened to me numerous times, particularly noticeably with hinnom/ashdod. I've never had it happen with a sidhe lord, funnily enough. But it's happened enough with hinnom/ashdod that I always script them to bless twice now in the early game....
__________________
"Easy-slay(TM) is a whole new way of marketing violence. It cuts down on all the red tape and just butchers people. As a long-time savagery enthusiast myself, I'm very excited about the synergies that the easy-slay(TM) approach brings to the entire enterprise." -Dr DrP
|
July 22nd, 2010, 03:52 PM
|
Major General
|
|
Join Date: Jun 2009
Posts: 2,157
Thanks: 69
Thanked 116 Times in 73 Posts
|
|
Re: Bug Thread: Discussion
Quote:
Originally Posted by thejeff
I can't look at the turn right now, but when you say by himself, there's no one, including enemies near him when he casts bless?
In my tests, targeting was the problem. Bless would target any unit as long as the AoE in its tests included unblessed sacreds. Since the AoE spreads randomly it doesn't always include the same squares and the actual cast might not cover any actual sacreds.
This isn't necessarily a bad approach. If a non-sacred is between 2 groups of sacreds, targeting him might actually cover more sacreds than aiming for any of the actual targets.
|
There is a single friendly unit in the combat - the caster. (Kinnara thug raiding Caelum PD).
There are non-sacred enemy Caelum PD infantry next to him, but why god why would he target an enemy unit with a spell that only effects allied sacreds? Targeting enemies with bless would surely also constitute a bug.
Anyway, with only one allied sacred (himself), the best way to maximize coverage is obviously to target himself. Its kind of inexcusable that he doesn't. 100% precision is supposed to mean he never misses - what good is that if the targeting behaves inappropriately.
|
July 22nd, 2010, 05:00 PM
|
BANNED USER
|
|
Join Date: May 2004
Posts: 4,075
Thanks: 203
Thanked 121 Times in 91 Posts
|
|
Re: Bug Thread: Discussion
I believe (but do not know) that dominions applies a standard template on Aoe effects.
I believe (but do not know) that it will run through target squares and see how many units are withing the Aoe without considering that template. It uses the first square with the highest number of targeted units.
It then casts the spell and the Template is applied which results in a miss.
Sometime ago I worked on determining what the template was. I dno't ahve the results to hand.
However suppose for example the AoE was 4. the template may result in something like this:
.X1
XTX
.X
where X is the template applied effects, T was the target square and 1 is where the caster is standing when he desired to be blessed.
Playing mictlan I need to bless a lot - I almost always bless twice due to the frequency of units being 'missed'.
|
July 22nd, 2010, 06:04 PM
|
General
|
|
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
|
|
Re: Bug Thread: Discussion
Ok, that clinches it then.
Yes, the AI will target enemy units with a bless. The targeting AI doesn't know what the spell does. It simulates casting the spell at a variety of targets, evaluates the results and chooses the target with the best score.
The code doesn't think. It can't look at the situation and decide that there is only one sacred unit and therefore it should be targeted. It just tries a bunch of locations and uses the one that seems to work best. In some situations that might legitimately be an enemy unit. If he'd been surrounded by your sacred troops, targeting the center enemy unit might actually get more.
In this case the debug log shows us he targeted the pair of Caelum's troops at 7,19 while your priest was at 6,18:
Code:
best Blessing this far, 6 17 (136 pnts)
best Blessing this far, 7 19 (140 pnts)
spellscore, Blessing score 146 (boost 106 scorat 0)
Eval: Blessing score 162 (fat 0)
comp_castspell: eval Blessing result 162
best spell so far Blessing (score100162)
...
castspell: cnr83 spl754 (Blessing) vis0 x7 y19 spldmg1
vis 0 xvis 0
blastsqr: unr2241 x7 y19 aoe1 dmg1 eff10 spc1086373888 as10217 al9
affectvic vic6186 hv1
hitunit 2241 6186 dmg1 spec1086373888 ba-1
affectvic vic6188 hv1
hitunit 2241 6188 dmg1 spec1086373888 ba-1
blastsqr: unr2241 x6 y19 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x8 y19 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x8 y18 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x9 y18 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x7 y18 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x9 y19 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x6 y20 aoe1 dmg1 eff10 spc1086373888 as10217 al9
blastsqr: unr2241 x7 y17 aoe1 dmg1 eff10 spc1086373888 as10217 al9
affectvic vic6184 hv0
hitunit 2241 6184 dmg1 spec1086373888 ba-1
blastsqr: unr2241 x8 y20 aoe1 dmg1 eff10 spc1086373888 as10217 al9
What isn't clear to me is how the evaluation is done. It may be that only 2 tries are made, at 6,17 and 7,19. More likely, I think, the log only shows those tries that produce the best results so far. If only one test is done per target, the results should be binary, either the priest was blessed or he wasn't. But they're not, 7,19 gets 4 more points than 6,17. If multiple tries are made, then self-targeting would have the advantage, since it would always hit. It's possible that multiple, but too few tries are made. It's also possible that something is wrong with the scoring algorithm.
chris: I don't know how the actual squares hit by a given AoE are selected, but it isn't as simple as a single template. If you check the patterns for a couple of casts of the same spell they are different. Just looking at the H2 blessings in Squirreloid's turn I saw 5 different patterns, no repetition. Either it's actually generating random squares by some algorithm or picking from a decent number of templates.
|
July 22nd, 2010, 06:24 PM
|
Major General
|
|
Join Date: Jun 2009
Posts: 2,157
Thanks: 69
Thanked 116 Times in 73 Posts
|
|
Re: Bug Thread: Discussion
Surely the AI should know which targets can be effected by a spell its casting? I mean, it doesn't cast 'effects only enemies' spells on your own troops, nor does it drop its fireball right on your guys right in front of it even though its going to hit a lot more often that way.
Surely if it knows who enemies are, it knows who friendlies are. Blessing only affects friendly units. It shouldn't even look at enemy units for targetting it.
|
July 22nd, 2010, 07:04 PM
|
General
|
|
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
|
|
Re: Bug Thread: Discussion
Handled differently, I think. The targeting may just try every unit within range. Or maybe a random subset.
The evaluation distinguishes. For damage spells, I believe, damage done to the enemy boosts the score and damage done to your own reduces it.
So, in most cases it doesn't matter who the actual target is. What matters is who is affected. It won't target clumps of your troops with damage spells because that isn't effective. Many of your own get hurt and few or no enemies.
Much of this is guess work. I can see in the debug log that it does target units from both sides. I can see that an evaluation is done. I don't know how it picks the targets to try or what factors into the evaluation. It does look to me as if something is sketchy in the blessing evaluation, but I don't know enough of the details to say.
It would be easy to mod a workaround for this. Just add a H1 Self-Bless spell with AoE 1. Or change the current H1 Bless to AoE 1, but that would make it much harder for nations with only H1 priests to use sacred troops. I'd like to see the Self-Bless added to CBM.
BTW: one quick caution on casting bless twice to avoid this. If the first one works, the AI will choose another spell to cast. Most of the time this will just be some added fatigue, which is still can be problematic for a SC/thug, but I've also had calamities like shockwave thugs casting Ironskin.
|
July 24th, 2010, 02:02 AM
|
BANNED USER
|
|
Join Date: May 2004
Posts: 4,075
Thanks: 203
Thanked 121 Times in 91 Posts
|
|
Re: Bug Thread: Discussion
In the nations I have played I have never seen the AI not cast bless twice if scripted. And I've done it *thousands* of times.
Someone wrote a little mod for just this purpose. Bless cast on caster, and then chained a regular bless.
I do think that bless is screwy.
By the way .. anyone notie that darkness in cave citadels is back working?
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|