.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
  #1  
Old June 12th, 2007, 01:21 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 ritual site search bug/feature request

The automated monthly site searching via ritual is great now that you can have more than one mage casting the same spell, but there is one minor annoyance which seems like it'd be easy to code a fix for. The auto-targeting logic targets provinces which can't have any more magic sites. In particular I'm talking about national capital provinces, but also to a much less common degree provinces which already have 4 discovered sites. I'm sure I'm not the only one who's anal retentive enough that seeing the mages target something that I *know* is a waste of gems and time is enough to make me manually re-target them...but then the next turn they're right back to targeting the waste of time because it still hasn't been searched! If you've captured two additional capitals, that's a swing of about 45 gems and 24 mage-turns to just grin and bear it if you're searching all paths...not trivial.

Anyway, not a huge thing, but if it's an easy change I'm sure I'm not the only one who would like it.
Reply With Quote
  #2  
Old June 12th, 2007, 01:37 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: ritual site search bug/feature request

I'll second the request, but I don't think it's quite that simple.

Is it always targeting capitals for you? I know I've seen it search some and skip others. It also will skip other provinces at times, for no obvious reason. I haven't seen it target provinces with 4 sites, but I haven't really looked.

It looks to me like the intent to skip capitals is there, but there's something wrong with whatever it's using to determine "capitalness". I haven't noticed a pattern though.

Maybe I'll put together a test game or two and see if I can pick something out.
Reply With Quote
  #3  
Old June 12th, 2007, 01:44 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default Re: ritual site search bug/feature request

If you're going to make the search math more complicated at all, it might as well generate a priority array of provinces each turn, and crawl through that list in descending order.
I'm just guessing about how this works and then writing in C to get what I mean accross.

Code:

for (prov = 0; prov < num_prov; prov++){
if (owners[prov] == currentplayer){

slevel = map.sitefrequency + sitefrequencyadjust(terrain[site]);

for (i = const_FIRE; i <= const_HOLY; i++){
/* If a site has been searched for one type and nothing has been found, chances of seeing something of another type go up. http://www.stat.sc.edu/~west/javahtm...MakeaDeal.html
Also Bayesian inference generally. This is not strictly the right adjustment. */
slevel += currentsearch[currentplayer][prov][i] * 25 / 7;
}

for (i = const_FIRE; i <= const_HOLY; i++){
spri[prov,i] = slevel * (4 - knownfeatures[i]);
spri[prov,i] /= exp(2,currentsearch[currentplayer][prov][i]);
/* This assumes that half of the sites are level 1, a quarter are level 2, etc. */
if (currentsearch[currentplayer][prov][i] >= 4){spri[prov,i] = 0;}
/* And of course no sites are above level 4. */
}

if (isForest(prov)){spri[prov,const_NATURE]*=1.2;}
if (isMountain(prov){spri[prov,const_EARTH]*=1.2; spri[prov,const_AIR]*=1.1;}
if (isWater(prov){spri[prov,const_WATER]*=1.2;}
if (isSwamp(prov){sprit[prov,const_DEATH]*=1.2; spri[prov,const_WATER]*=1.1; spri[prov,const_NATURE]*=1.1;}
if (isWaste(prov){sprit[prov,const_DEATH]*=1.1; spri[prov,const_FIRE]*=1.2;}
}
}



And then you sort the province #s according to their priority for each given search type. For Akashic Record or Voice of Tiamat, just some the priorities before sorting.

If someone wants to do a statistical analysis of Edi's site list and get real values... actually I'm probably the only person here who'd want to do that.
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote
  #4  
Old June 12th, 2007, 01:47 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: ritual site search bug/feature request

Technically a capital can have other sites but its a map thing so not very likely in most games.

I dont remember my mages hitting my castle.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #5  
Old June 12th, 2007, 01:50 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: ritual site search bug/feature request

Yeah, mostly it's the capitals I noticed, I just figured it'd be the same case for provinces with 4 sites. The capitols are really the main issue anyway, as it's pretty rare to have 4 magic sites on a province with any significant amount of site searching left undone on it. I've noticed it most in targeting capitals I've captured, but I've certainly also seen it target my own capital (and to be clear there are other valid targets). It seems like it steps up the province numbers looking for the next valid target, and I haven't noticed it skipping any capitals.

Yeah Dr. P, I thought about mentioning a prioritization, but I figured a change like this would be a low priority next to some of the other bugs, so the only way it'd be likely to get in is if it was trivial to do.
Reply With Quote
  #6  
Old June 12th, 2007, 01:57 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: ritual site search bug/feature request

That would be nice, but could you add in something to prioritize more easily defended provinces as well.
At least ones which are farther within your empire. Or castled?
It's frustrating to be expanding downwards on the map and have your searchers always searching the just taken provinces, that are most likely to be fought over again.

More seriously, while a more efficient gem gaining algorithm would be good, the current version seems broken. It searches provinces it shouldn't and ignores some that it should. Fixing that seems more urgent than improving the algorithm.


The current version also has another unrelated flaw. The next province is chosen based on those provinces held during the ritual magic phase of the turn. A province can be targeted and then lost in the battle phase. The search will still be cast on the next turn.
Reply With Quote
  #7  
Old June 12th, 2007, 02:46 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default Re: ritual site search bug/feature request

All ritual magic happens before battles, changing that is a non-starter. Site searching spells are a minor point to make them an exception to the ordinary order of turn resolution.

As far as I can tell, what it does now is: it crawls through the list in order until it finds a site that isn't being targeted and that has none-zip-zero search points in that magic path.

Now, on the one hand, you do *eventually* want to cast Haurspex on provinces that got only a nature-1 search. OTOH, it would be a major pain if the spell searched those provinces *first*. So if you're going to change the way it works at all, you should have a prioritization algorithm.
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote
  #8  
Old June 12th, 2007, 02:53 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: ritual site search bug/feature request

Anything could be made more efficient but sometimes I think they cut back on all the possible efficient code for hosting time.

Its too bad though. I would rather that ALL of the efficient code was put in. I dont really care how long a hosting takes.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #9  
Old June 12th, 2007, 03:20 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: ritual site search bug/feature request

You may be misunderstanding the problem. It's not that the province is searched and then taken on the turn the spell is cast. That's expected and can occur casting the spells manually.
It's that the automated caster can target a province that is then taken, leaving the caster with orders to cast on a province you no longer own. This can't be duplicated manually, since you can't select that province.

It could be fixed with a quick cleanup check after the battle phase to clear out any monthly orders no longer valid. (Or preferably re-target to a now valid province.)

Actually a better fix would be to handle all of next months monthly orders later in the sequence. This would let you use this months gem income on monthly spells.


As for the current order, it looks to me like you are right about the intent, except that it skips some provinces, often, but not always and not all, capitols.
Reply With Quote
  #10  
Old June 12th, 2007, 04:13 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default Re: ritual site search bug/feature request

Ah, you're right. I was 100% mistaken and thejeff makes a good point. An extra phase for autogenerated orders (after gem income) would probably be a good idea.
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote
Reply

Bookmarks


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 06:35 PM.


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