Ewok - Omega Test 1.1
Moderators: Duke, trewqh, korexus
- SmashFace
- Moderator
- Posts: 565
- Joined: Wed Sep 04, 2002 7:00 am
- Location: Appleton Wisconsin U.S.A.
- Contact:
- Dameon
- Moderator
- Posts: 1056
- Joined: Tue Sep 03, 2002 7:00 am
- Location: Valn Ohtar Chapterhouse
Thanks for all the memories, Kaomaris, and good luck!
Last edited by Dameon on Thu Jan 17, 2008 4:45 am, edited 1 time in total.
"A Knight is sworn to valor, his heart knows only virtue, his blade defends the helpless, his might upholds the weak, his word speaks only truth, his wrath outdoes the wicked."
- SmashFace
- Moderator
- Posts: 565
- Joined: Wed Sep 04, 2002 7:00 am
- Location: Appleton Wisconsin U.S.A.
- Contact:
- Xarfei
- Veteran
- Posts: 410
- Joined: Sun Nov 02, 2003 8:00 am
- Location: Munich, Germany - The Scholars
- TBert
- Veteran
- Posts: 279
- Joined: Tue Sep 03, 2002 7:00 am
- Location: Denver, CO
- Contact:
- korexus
- Moderator
- Posts: 2830
- Joined: Tue Nov 12, 2002 8:00 am
- Location: Reading
- Contact:
- korexus
- Moderator
- Posts: 2830
- Joined: Tue Nov 12, 2002 8:00 am
- Location: Reading
- Contact:
Ok, the market place should work properly. (I know I said that last time, but I've tested it in the practice game now!)
As the market place trades can affect paying troops, tech advances, upgrades, feeding levels and spell making I figured it would be a lot of picking through turn reports to make sure everything was right. I'm playing in this game, so people may not appreciate me doing that, so I've just set the turn back and flagged it as ready to run. Hope that's ok with everyone.
Chris.
As the market place trades can affect paying troops, tech advances, upgrades, feeding levels and spell making I figured it would be a lot of picking through turn reports to make sure everything was right. I'm playing in this game, so people may not appreciate me doing that, so I've just set the turn back and flagged it as ready to run. Hope that's ok with everyone.
Chris.
With Great Power comes Great Irritability
- korexus
- Moderator
- Posts: 2830
- Joined: Tue Nov 12, 2002 8:00 am
- Location: Reading
- Contact:
- Xarfei
- Veteran
- Posts: 410
- Joined: Sun Nov 02, 2003 8:00 am
- Location: Munich, Germany - The Scholars
Well, I am the one who complained
But Ulty has a good point so I therefore withdraw my complaint.
I still think that in a normal game the Oop / weather should remain the same when a turn is re-run (to avoid manipulation of these values).
But as this is a test game it doesn't matter, we should just get on with the next turn so that we can start the real games asap.
Xarfei
But Ulty has a good point so I therefore withdraw my complaint.
I still think that in a normal game the Oop / weather should remain the same when a turn is re-run (to avoid manipulation of these values).
But as this is a test game it doesn't matter, we should just get on with the next turn so that we can start the real games asap.
Xarfei
- SmashFace
- Moderator
- Posts: 565
- Joined: Wed Sep 04, 2002 7:00 am
- Location: Appleton Wisconsin U.S.A.
- Contact:
- SmashFace
- Moderator
- Posts: 565
- Joined: Wed Sep 04, 2002 7:00 am
- Location: Appleton Wisconsin U.S.A.
- Contact:
- korexus
- Moderator
- Posts: 2830
- Joined: Tue Nov 12, 2002 8:00 am
- Location: Reading
- Contact:
The Marketplace has been having trouble spotting when players are neighbours. Gaz tried to fix it when it first came up, then I tried to fix it, now I've tried again. Hopefully I've got it this time.
Xarfei's score jumped in both versions of the turn, to find out what he's done, you'd have to ask him I guess, but here is the score calculation function.
So, score is:
Tech level + gold + bank balance + corn + wood + 5 * white diamonds + 8 * yellow diamonds + 9 * red diamonds + 10 * green diamonds + 15 * blue diamonds + 30 * grey diamonds + 60 * black diamonds + the cost of each spell in the SPP + total pop + total wok + (troops * total defensive ability of troops) summed individually over each province, counting the bonus from creatures and terrain.
If I had to guess, I'd say this last part is how Xarfei's score jumped so much. The number of troops are multiplied by the PDEF which, if you have upgrades is already a function of number of troops. For example 100 level 1 catapults in a mountain would net you around 10,000 points on this formula. The same troops in a different terrain would be worth only 1,400.
This scoring formula is not the same as the one Al used in WoK V, and it's fully up for debate if people want to change it.
Chris.
Xarfei's score jumped in both versions of the turn, to find out what he's done, you'd have to ask him I guess, but here is the score calculation function.
Code: Select all
<?php
/* Function calculates players scores*/
function score($player)
{
global $provinces, $provincesstart, $active, $constants, $players, $db, $GameID, $TurnNR, $gamedata, $commentary, $attacked, $TurnNR, $colour, $GameID;
$score = 0;
$tec = $players[$player][TEC];
$gold = $players[$player][Gold];
$bank = $players[$player][Bank];
$corn = $players[$player][Corn];
$wood = $players[$player][Wood];
$white = $players[$player][White] * $constants[whitecost];
$yellow = $players[$player][Yellow] * $constants[yellowcost];
$red = $players[$player][RedD] * $constants[redcost];
$green = $players[$player][Green] * $constants[greencost];
$blue = $players[$player][Blue] * $constants[bluecost];
$grey = $players[$player][Grey] * $constants[greycost];
$black = $players[$player][Black] * $constants[blackcost];
$eff = $players[$player][EFF];
$score = $gold + $bank + $corn + $wood + $white + $yellow + $red + $green + $blue + $grey + $black;
for ($i = 1; $i <= 10; $i++)
{
if ($i < 10)
{
$slot = "SPP0" . $i;
}
else
{
$slot = "SPP" . $i;
}
$id = $players[$player][$slot];
if ($id > 0)
{
$needwhite = $stone[$id][White];
$needyellow = $stone[$id][Yellow];
$needred = $stone[$id][Red];
$needgreen = $stone[$id][Green];
$needblue = $stone[$id][Blue];
$needgrey = $stone[$id][Grey];
$needblack = $stone[$id][Black];
$cost = $needwhite * $constants[whitecost] + $needyellow * $constants[yellowcost] + $needred * $constants[redcost] + $needgreen * $constants[greencost] + $needblue * $constants[bluecost] + $needgrey * $constants[greycost] + $needblack * $constants[blackcost];
$cost = intval($cost);
$score = $score + $cost;
}
}
for ($i = 1; $i <= 70; $i++)
{
if ($provinces[$i][Owner] == $player)
{
/* Add POP & WOK to score */
$pop = $provinces[$i][POP];
$wok = $provinces[$i][WOK];
$score = $score + $pop + $wok;
/* Get Number, type, level and defense of units.*/
$armd = $provinces[$i][ARM];
$pikd = $provinces[$i][PIK];
$arcd = $provinces[$i][ARC];
$knid = $provinces[$i][KNI];
$catd = $provinces[$i][CAT];
$cread = $provinces[$i][CREA];
$levd = $provinces[$i][LEV];
$defd = $provinces[$i][DEF];
$levd = sprintf("%01.3f", $levd);
$defd = sprintf("%01.1f", $defd);
$terd = $provinces[$i][TER];
$city = $provinces[$i][CITY];
$totald = $armd + $pikd + $arcd + $knid + $catd;
if ($cread > 0)
{
$totald = $totald + 1;
}
/* Calculate creature bonus */
$white = array(1,8,15,22,29,36);
$yellow = array(2,9,16,23,30,37);
$red = array(3,10,17,24,31,38);
$green = array(4,11,18,25,32,39);
$blue = array(5,12,19,26,33,40);
$grey = array(6,13,20,27,34,41);
$black = array(7,14,21,28,35,42);
$dragon = array(1,2,3,4,5,6,7);
$golem = array(8,9,10,11,12,13,14);
$lizard = array(15,16,17,18,19,20,21);
$spirit = array(22,23,24,25,26,27,28);
$bear = array(29,30,31,32,33,34,35);
$snake = array(36,37,38,39,40,41,42);
if (in_array($cread, $white))
{$bonusd = 0.2;}
if (in_array($cread, $yellow))
{$bonusd = 0.3;}
if (in_array($cread, $red))
{$bonusd = 0.4;}
if (in_array($cread, $green))
{$bonusd = 0.5;}
if (in_array($cread, $blue))
{$bonusd = 0.6;}
if (in_array($cread, $grey))
{$bonusd = 0.8;}
if (in_array($cread, $black))
{$bonusd = 1.0;}
switch ($terd)
{
case("PL"):
if (in_array($cread, $spirit))
{$bonusd = $bonusd * 2;}
$pikx = 0.0;
$arcx = 0.0;
$knix = 0.06;
$catx = 0.0;
$defx = 0.0;
break;
case("DS"):
if (in_array($cread, $snake))
{$bonusd = $bonusd * 2;}
$pikx = 0.02;
$arcx = 0.0;
$knix = 0.0;
$catx = 0.0;
$defx = 0.0;
break;
case("FO"):
if (in_array($cread, $dragon))
{$bonusd = $bonusd * 2;}
$pikx = 0.0;
$arcx = 0.04;
$knix = 0.0;
$catx = 0.0;
$defx = 0.3;
break;
case("MO"):
if (in_array($cread, $golem))
{$bonusd = $bonusd * 2;}
$pikx = 0.0;
$arcx = 0.0;
$knix = 0.0;
$catx = 0.08;
$defx = 0.4;
break;
case("SW"):
if (in_array($cread, $lizard))
{$bonusd = $bonusd * 2;}
$pikx = 0.0;
$arcx = 0.0;
$knix = 0.0;
$catx = 0.0;
$defx = 0.2;
break;
case("TU"):
if (in_array($cread, $bear))
{$bonusd = $bonusd * 2;}
$pikx = 0.02;
$arcx = 0.0;
$knix = 0.0;
$catx = 0.0;
$defx = 0.0;
break;
}
$bld = $provinces[$i][LEV];
$eld = ($pikd * $pikx) + ($arcd * $arcx) +($knid * $knix) + ($catd * $catx);
$cbdmax = ($bld + $eld) / 3;
if ($cread > 0)
{$cbd = $bonusd;}
else
{$cbd = 0.0;}
if ($cbd >= $cbdmax)
{$cbd = $cbdmax;}
$bld = sprintf("%01.3f", $bld);
$eld = sprintf("%01.3f", $eld);
$cbd = sprintf("%01.3f", $cbd);
$cbdmax = sprintf("%01.3f", $cbdmax);
$fld = $bld + $eld + $cbd;
if ($city == "Yes")
{$defcity = 0.5;}
else
{$defcity = 0.0;}
$deftotal = $defd + $defx;
$pdef = ($fld * 10 + $deftotal * 4) * $eff / 100;
$score = $score + ($pdef * $totald);
}
}
$score = intval($score);
Return($score);
}
?>
Tech level + gold + bank balance + corn + wood + 5 * white diamonds + 8 * yellow diamonds + 9 * red diamonds + 10 * green diamonds + 15 * blue diamonds + 30 * grey diamonds + 60 * black diamonds + the cost of each spell in the SPP + total pop + total wok + (troops * total defensive ability of troops) summed individually over each province, counting the bonus from creatures and terrain.
If I had to guess, I'd say this last part is how Xarfei's score jumped so much. The number of troops are multiplied by the PDEF which, if you have upgrades is already a function of number of troops. For example 100 level 1 catapults in a mountain would net you around 10,000 points on this formula. The same troops in a different terrain would be worth only 1,400.
This scoring formula is not the same as the one Al used in WoK V, and it's fully up for debate if people want to change it.
Chris.
With Great Power comes Great Irritability
- Xarfei
- Veteran
- Posts: 410
- Joined: Sun Nov 02, 2003 8:00 am
- Location: Munich, Germany - The Scholars
SF, I was as suprised as you were that my score jumped that much.
This is not due to a bug in the game engine (I can show you my turn reports once our fight is over -> I could even post them here).
Nevertheless, it is hard for me to believe that the score is being calculated as it used to be. The "stuff" that I did the last turn is no different than what I did in previous "offline" wok 5 games before (and my score never went up even nearly as much).
In my opinion, the score function needs to be changed. Once I our fight is over, I can tell you exactly what made my score jump up that much (I have recreated this in the test game as well).
Like I said before, once my fight with SF is over, I am more than wellcome to share any data that I have so that we can discuss the matter openly.
Xarfei
PS: As this is a test game, I am happy to give you the hint that Korexus is on the right track....
Edit:
PPS: I just came home after a "few" beers with my colleages, I completely missed the last sentence from korexus post, that actually just verifies it.
This is not due to a bug in the game engine (I can show you my turn reports once our fight is over -> I could even post them here).
Nevertheless, it is hard for me to believe that the score is being calculated as it used to be. The "stuff" that I did the last turn is no different than what I did in previous "offline" wok 5 games before (and my score never went up even nearly as much).
In my opinion, the score function needs to be changed. Once I our fight is over, I can tell you exactly what made my score jump up that much (I have recreated this in the test game as well).
Like I said before, once my fight with SF is over, I am more than wellcome to share any data that I have so that we can discuss the matter openly.
Xarfei
PS: As this is a test game, I am happy to give you the hint that Korexus is on the right track....
Edit:
PPS: I just came home after a "few" beers with my colleages, I completely missed the last sentence from korexus post, that actually just verifies it.