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

This Month's Specials

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

   







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

Reply
 
Thread Tools Display Modes
  #1  
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
  #2  
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
  #3  
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
  #4  
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
  #5  
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
  #6  
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

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 11:05 AM.


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