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

This Month's Specials

Air Assault Task Force- Save $8.00
World Supremacy- Save $10.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old March 26th, 2008, 03:01 PM
ano's Avatar

ano ano is offline
Lieutenant Colonel
 
Join Date: May 2007
Posts: 1,462
Thanks: 34
Thanked 59 Times in 37 Posts
ano is on a distinguished road
Default Mass flight bug - wrong script processing

I just didn't get it...
I had a huge army storming the castle defended by many mages and some troops and an A3 Rakhsharaja with 3 gems scripted to cast Mass Flight (spell requires A4 and 2 gems). It should have been an easy victory.
But he due to some reason decided to cast Arrow Fend and Storm Warriors and obviously things went in quite another way with much more losses.

Can anyone explain this? Maybe there're some bugs with this spell?
Reply With Quote
  #2  
Old March 26th, 2008, 03:37 PM

K K is offline
First Lieutenant
 
Join Date: Feb 2007
Posts: 773
Thanks: 2
Thanked 31 Times in 28 Posts
K is on a distinguished road
Default Re: Mass flight issue

Check the file.

If there was a Storm going on, then flight wouldn't have worked, so the AI may have decided not to cast it.

Also, the AI prefers a buff for round 1, and it may not consider Mass Flight a buff.
Reply With Quote
  #3  
Old March 26th, 2008, 03:45 PM
Baalz's Avatar

Baalz Baalz is offline
Major General
 
Join Date: Feb 2004
Location: Houston, Texas
Posts: 2,435
Thanks: 57
Thanked 662 Times in 142 Posts
Baalz will become famous soon enough
Default Re: Mass flight issue

This can be one of the more frustrating things about the spell casting AI, it sometimes decides to override your "suggestions" regarding what spells to cast. Most of the time this can be a good thing, it keeps you from blowing a bunch of gems if an enemy scout attacks your army, or shooting lighting bolts at a lighting immune guy. Sometimes though, it seems like the AI's thought process goes like this:
This battle is easy, no need to cast mass flight, I'll save the gems
Hmmmm, no script, let me see what I should cast...
Wow, I've got some gems, I'll cast arrow fend!

This is one of the more frustrating things in dominions IMO.
Reply With Quote
  #4  
Old March 26th, 2008, 03:55 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: Mass flight issue

Rerun the battle with debug on, see what the log says about the casting decision.

Takes a little work to interpret, but can be helpful...
Reply With Quote
  #5  
Old March 26th, 2008, 03:56 PM
ano's Avatar

ano ano is offline
Lieutenant Colonel
 
Join Date: May 2007
Posts: 1,462
Thanks: 34
Thanked 59 Times in 37 Posts
ano is on a distinguished road
Default Re: Mass flight issue

I'll check it at home with debug options, probably with all those priorities displayed.
Yes, it's really frustrating, but if AI decided not to cast Mass Flight at this situation, I really can't imagine the situation when it would cast it. Two big armies (about 1300 units) were at the different sides of the walls and it was the prefect situation to cast it, but I've got Arrow Fend instead.
Did you successfully cast it at all?
Reply With Quote
  #6  
Old March 26th, 2008, 06:08 PM
ano's Avatar

ano ano is offline
Lieutenant Colonel
 
Join Date: May 2007
Posts: 1,462
Thanks: 34
Thanked 59 Times in 37 Posts
ano is on a distinguished road
Default Re: Mass flight issue

This is what I found there (extracts):
Quote:
com Aksa(A) cast spell (favspell Mass Flight) (mayusegems 1)
est. choices 59
spellscore, Arrow Fend score 220322 (boost 91 scorat 262128)
Eval: Arrow Fend score 179123 (fat 33)
comp_castspell: eval Arrow Fend result 179123
best spell so far Arrow Fend (score179123)
spellscore, Mass Flight score 873 (boost 92 scorat 1023)
Spell punished for excessive fatigue 459 -> 153
Eval: Mass Flight score 153 (fat 100)
comp_castspell: eval Mass Flight result 153
looser spell Mass Flight (score 100153)
SO!
The spell is punished for excessive fatigue! And thus Arrow Fend was definitely a better choice...
I can't call this a bug, this is just a bad algorithm that costed me a half of my army (or even more). Actually, this either has to be changed or anyone planning to script some big battlefield spell will have to think about this algorithm and the fact that AI may find another *not so exhausting* spell instead of the one your whole strategy is based around.
Actually I think that scripted spells should never be be *punished for excessive fatigue*. If someone disagrees, let's discuss this.
Reply With Quote
  #7  
Old March 26th, 2008, 06:20 PM
ano's Avatar

ano ano is offline
Lieutenant Colonel
 
Join Date: May 2007
Posts: 1,462
Thanks: 34
Thanked 59 Times in 37 Posts
ano is on a distinguished road
Default Re: Mass flight issue

One more thing...
In this very case I could have given my raksha an air booster but let's imagine the situation where someone is planning to cast something like mast flight (I don't mean exactly this spell as it is useless in the storm) with A2 mage and storm power. He will never be able to do this as the mage will always be *punished for excessive fatigue*.
If it is really so, I think, it's unacceptable.
Reply With Quote
  #8  
Old March 26th, 2008, 09:53 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: Mass flight bug - wrong script processing

Would it have also helped to have given your ape four gems--2 for the spell cost, 1 for the level gain, and 1 more for fatigue reduction? That seems much more convenient than having to spend multiple turns forging an item and getting the mage to a lab to equip it, just so he will feel comfortable about casting one spell that he could have cast anyway if he weren't so worried about losing consciousness. And presumably it would work with Storm Power too.

I agree though, it's lame that such an obviously good spell choice would be overriden by a commander who should know better. The spells in this game are so varied and quirky, it seems very natural that big, special-effects like universal flight should get their own special priority determination methods (and maybe they do). For instance if Mass Flight was always given a priority boost when a large enemy army could be seen beyond a wall, then maybe that would overcome the excessive fatigue penalty. Or maybe the excessive fatigue penalty should be reduced when the friendly army is very large (thus meaning the tired-out mage won't be lying unconscious on a battlefield all by himself). And maybe it is, how would I know?

There are so many details that could go into their spell-scoring system--how interesting that code may be!
Reply With Quote
  #9  
Old March 26th, 2008, 10:11 PM
ano's Avatar

ano ano is offline
Lieutenant Colonel
 
Join Date: May 2007
Posts: 1,462
Thanks: 34
Thanked 59 Times in 37 Posts
ano is on a distinguished road
Default Re: Mass flight bug - wrong script processing

I could not give four gems because Raksha is level 3 air mage and thus can use only 3 gems per cast. So the only option is giving a booster item (Flight has obviously no sense during storm). This means (as I mentioned above) that this spell seems to be uncastable at all for a A3 mage without boosters once Arrow Fend is researched.
As for the battle mechanics, I just think that scripted spells should never be overridden because of "excessive fatigue". They still should be overridden if the spell cannot be cast or if the opponent army is *too weak* (I think, this is a separate discussion topic) but NOT in the case when everything is ok but the non-scripted spell which AI likes very much (Arrow fend in my case with 220322 score) is cast instead of scripted one just because it causes less fatigue. It makes no sense at all in my opinion.
Reply With Quote
  #10  
Old March 26th, 2008, 10:13 PM
NTJedi's Avatar

NTJedi NTJedi is offline
General
 
Join Date: Jun 2003
Location: az
Posts: 3,069
Thanks: 41
Thanked 39 Times in 28 Posts
NTJedi is on a distinguished road
Default Re: Mass flight issue

Quote:
Baalz said:
Sometimes though, it seems like the AI's thought process goes like this:
This battle is easy, no need to cast mass flight, I'll save the gems
Hmmmm, no script, let me see what I should cast...
Wow, I've got some gems, I'll cast arrow fend!

This is one of the more frustrating things in dominions IMO.
These are two of my most annoying AI battlefield scenarios:

1) Front Mage Guard says, "Mage Leader we're winning and the troops of the enemy are now on the run."
Mage Leader says, "Let's see I'm done with my script orders... the enemy is retreating so I'll use my last earth gems and summon earth elementals!"
Front Mage Guard says, "Why waste those earth gems on elementals which won't even be able to fight???"
Mage Leader says, "Because using lots of gems gets me high."

=======================
=======================

2) Main Commander says, "Our troops are starting to fall... what shall we do Mage Leader?"
Mage Leader says, "Yikes you're right... I'm casting astral shield on myself and some other self help spells."
Main Commander responds, "This won't help our troops and it will make you fall asleep plus astral shield has almost no value for someone with low hitpoints such as yourself."
Mage Leader says, "It's all about me."
__________________
There can be only one.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 01:24 PM.


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