Ewok - Omega Test 1.1

WOK for Advanced Players

Moderators: Duke, trewqh, korexus

User avatar
SmashFace
Moderator
Moderator
Posts: 565
Joined: Wed Sep 04, 2002 7:00 am
Location: Appleton Wisconsin U.S.A.
Contact:

Post by SmashFace » Wed Jan 16, 2008 8:54 pm

have a fun rest of game guys, i hope you have fun TESTING.
God of WOK

User avatar
Dameon
Moderator
Moderator
Posts: 1056
Joined: Tue Sep 03, 2002 7:00 am
Location: Valn Ohtar Chapterhouse

Post by Dameon » Thu Jan 17, 2008 12:21 am

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."

User avatar
SmashFace
Moderator
Moderator
Posts: 565
Joined: Wed Sep 04, 2002 7:00 am
Location: Appleton Wisconsin U.S.A.
Contact:

Post by SmashFace » Thu Jan 17, 2008 3:09 am

Dameon, i ask you to reconsider, i have been talking with scholars and i think this will be resolved.
God of WOK

User avatar
Xarfei
Veteran
Veteran
Posts: 410
Joined: Sun Nov 02, 2003 8:00 am
Location: Munich, Germany - The Scholars

Post by Xarfei » Tue Jan 22, 2008 1:57 pm

I guess we are just waiting for TBert to "be ready". Who is in charge of this game now (i.e. the Gamemaster). Could he email him?

I think we should speed up the game a little bit if possible (unless we run into more bugs).

Xarfei

User avatar
TBert
Veteran
Veteran
Posts: 279
Joined: Tue Sep 03, 2002 7:00 am
Location: Denver, CO
Contact:

Post by TBert » Tue Jan 29, 2008 2:59 am

I'm ready, though I just barely caught that last turn.
pro libertate eos occubuisse - "they died for liberty"

Clan Head - Valn Ohtar

SGT - US Army

23-year-old father of 3 - really needs a beer

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Fri Feb 01, 2008 8:10 am

There is [another / more of the same] bug in the marketplace. I'll try to fix it without a re-run, but it may not be possible. At the least, expect a small delay while I tinker with the engine...


korexus.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Sun Feb 03, 2008 10:25 am

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.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Sun Feb 03, 2008 4:10 pm

I've had one player ask me to reset the weather forecast and OOP to the pre-re-run values.

I personally can't remember the OOP, but I know that the weather was predicted at 10.

Does anyone have any thoughts?


Chris.
With Great Power comes Great Irritability

User avatar
Ultyguy
Trooper
Trooper
Posts: 220
Joined: Fri Nov 09, 2007 8:00 am
Location: Canada

Post by Ultyguy » Sun Feb 03, 2008 8:27 pm

We didn't have them re-adjusted on any of the previous re-runs, so I don't see a need to now.

Ulty

User avatar
Xarfei
Veteran
Veteran
Posts: 410
Joined: Sun Nov 02, 2003 8:00 am
Location: Munich, Germany - The Scholars

Post by Xarfei » Sun Feb 03, 2008 11:16 pm

Well, I am the one who complained :twisted:

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

User avatar
SmashFace
Moderator
Moderator
Posts: 565
Joined: Wed Sep 04, 2002 7:00 am
Location: Appleton Wisconsin U.S.A.
Contact:

Post by SmashFace » Mon Feb 04, 2008 4:17 am

so wait, a rerun was because of a marketplace issue? hmm..... i'll elaborate tomorrow. do not run the next turn.......
God of WOK

User avatar
SmashFace
Moderator
Moderator
Posts: 565
Joined: Wed Sep 04, 2002 7:00 am
Location: Appleton Wisconsin U.S.A.
Contact:

Post by SmashFace » Mon Feb 04, 2008 4:53 pm

also, how did xarfei's score jump so much? i can't really see any possible way unless there was some sort of bug.
God of WOK

User avatar
korexus
Moderator
Moderator
Posts: 2827
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Mon Feb 04, 2008 5:50 pm

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.

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);
	}
			
?>
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.
With Great Power comes Great Irritability

User avatar
Xarfei
Veteran
Veteran
Posts: 410
Joined: Sun Nov 02, 2003 8:00 am
Location: Munich, Germany - The Scholars

Post by Xarfei » Mon Feb 04, 2008 10:58 pm

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.

Post Reply