SGOTM 15 - Kakumeika

There is a good chance that we will not be able to get Open Borders resolution even with the bug. If Toku declares war on us again (by being bribed by Shaka for example) then all bets are off. It looks like Toku might have a tech advantage so maybe we can hope they don't have any techs to bribe him with. But we want to closely monitor the tech situation.

Edit: Plus, even if we do enforce open borders with Toku, nothing prevents him from declaring war on us and canceling the open borders! So I think we should try to get Toku pleased with us. I think we should build a 2nd spy in CowTown with the OF from the whip and send him to the gift city. Then flip Toku to Hindu the first chance we get to reduce his relations with the other Buddhist and hopefully get him to pleased with us.
Once Toku is pleased with us we might be able to beg a small tech from him (like a small remainder of construction), so that we have enforced peace for 10 turns. That will give a safe window to send settlers and missionaries through Toku without sitting on eggshells waiting for him to declare war on us again.

edit #2: Toku might not be willing to trade construction to us even if he is pleased. We might have to figure out a different tech to almost complete so we can beg it from him... It would be easier if we had currency researched...

the espionage mission to flip Toku in a hindu gift city would be 600 * .6 (holy city and common religion bonus) * .5 (stationary spy bonus) *.8 (open borders) *1.12 distance * ~1.04 espionage spending = approx 167. So if we get the spy to the city T99 we could flip him about the same turn we get open borders. Testing seems that it is more like 204 espionage (no trade route for the additional 20% off).

CowTown can build a missionary spy next turn t97 so that frees up DeerGold to build another military unit or missionary as necessary.
When CowTown grows to 4 pop it can start another settler.

I don't think there is any chance we will be able to trade for iron working (Toku needs us to be pleased) Maybe we can get iron working in a trade! It might be worth trying to flip Toku to Hinduism not only to enforce peace from him but also to trade for Iron Working.
So I would suggest Iron Working 100% and then construction 100%
Maybe we want to start Construction immediately so that we are ready to ask for the small remainder as a gift from Toku (to enforce peace for 10 turns)

Karl is the worker that can be sent to the island.

I like settling 1nw of the lake. That doesn't have the corn in the initial radius but that city would be quite strong once we have the border pop. It has all the forests to chop in its BFC and could perhaps even build Moai which we could exploit for fail gold perhaps later on.

I think we probably should reevaluate all the builds. I think it does make sense to get a few settlers, military units and missionary units ready to go through the hoped for open borders. and enforced peace?
 
A missing isAlive() could be a contributing factor, but only if a non-existent team calls that member function. I don't see any evidence that a numeric playerID is used as a numeric teamID in the code snippet I posted above, and that would be the only way that the difference in the size of the set of players and the size of the set of teams could have an effect. Never mind that in C++ they should have been using a proper container & non-numeric iterator, or at least different enums for numeric IDs... :mad: Still, it's nice to think that a bug might be working for us, for a change!
This is how I understand the problem, but I'm not entirely sure:

Normally there are 18 player-slots and 18 team-slots in a game that can be filled with a certain number of actual players belonging to a certain number of actual teams. The slots that remain untaken are filled with 'dummy' players and teams, let's say in a regular SP game on a standard-size map there is the human player and 6 AI opponents, so the game will fill the team slots 8...18 with dummy teams that consist of the dummy players 8...18 (they can also later be taken by spawned colony AIs).

With one team in our SGOTM consisting of 2 AI players, there must be 1 dummy team that has no corresponding dummy player.
In CvGame::isValidVoteSelection() the code loops over all teams, i.e. also the dummy teams. The one player-less dummy team (ID=9 in the test game) erroneously returns true for CvTeam::isFullMember() because the check if (kLoopPlayer.getTeam() == getID()) always fails:

Spoiler :
Code:
bool CvTeam::isFullMember(VoteSourceTypes eVoteSource) const
{
	if (isForceTeamVoteEligible(eVoteSource))
	{
		return true;
	}

	for (int iI = 0; iI < MAX_PLAYERS; iI++)
	{
		CvPlayer& kLoopPlayer = GET_PLAYER((PlayerTypes)iI);
		[COLOR="Red"][B]if (kLoopPlayer.getTeam() == getID())[/B][/COLOR]
		{
			if (!kLoopPlayer.isFullMember(eVoteSource))
			{
				return false;
			}
		}
	}

	[B][COLOR="Red"]return true;[/COLOR][/B]
}
 
I also want a 2nd spy in case our first one is captured.
It might be OK to have him do the Hindu flip mission that bc suggested first and then head thru Toku. It wouldn't hurt to have a 3rd spy going thru Hammu.

It's sad we didn't get a free hindu spread to toku. Be sure to check first for hindu spread before using our missionary. If we get a free spread, I assume we will still go ahead with the city gift, true? But we won't spread hindu to that city.

Settling the island is a 'nice to have' but let's be sure we have at least 2 settlers ready to cross both borders T106. An extra 3rd settler (or 4th) is probably important too. It would be nice to send out a 3rd one in case there is land open to get that 5th OB, or have 2 city gifts for someone. Sure the next OB vote won't be until T115, but the land is filling up fast.
 
That is poorly written code!
 
Can someone figure out how we can get Toku to pleased so we can beg from him for enforced peace?

I don't think the +4 for gifting him a city, +1 from same religion, -1 close borders will cut it.
I think we have to gift him more resources. So Gold and Stone perhaps starting asap?
We have 12 turns of resource gifts we need 38 more turns that means 10 turns with 4 resources. That means by T106-7? we could have +1 from resource trades I believe. Which might just be enough to get him to pleased.
 
No, I don't think we are getting to pleased with him. Figure at least -2 close borders after we gift the city. If we make peace with Hammy and Shaka, aren't we pretty safe from another DoW for a little while? Hopefully, my turnset will get us 4 civs as voting members. After that, we can fight with Toku some more if he wants. For some reason I've been imagining a body of water we need to cross east of Toku, but world wrap is getting tighter and now I'm picturing that water crossing up north. So traveling thru Hammy is probably faster anyway. More likely, it is north east-- equal distance no matter which way we go around.

So my point is, I don't think we need to massage Toku. He will be a difficult True Friend. I don't think we need or want any other Full Members.
 
The reason I want to get Toku to please is the it would be really nice to have the option to beg something from him for enforced peace so we can safely transport a settler and missionary through his territory.

How can you be confident that we will be able to make peace with Shaka? He still won't talk to us. When will be able to talk to him? Have you figured that out somehow?

In the test game we still only had -1 close borders after the city gift, so it is possible to get Toku to pleased with resource gifts.
 
There is a good chance that we will not be able to get Open Borders resolution even with the bug. If Toku declares war on us again (by being bribed by Shaka for example) then all bets are off. It looks like Toku might have a tech advantage so maybe we can hope they don't have any techs to bribe him with. But we want to closely monitor the tech situation.

Edit: Plus, even if we do enforce open borders with Toku, nothing prevents him from declaring war on us and canceling the open borders! So I think we should try to get Toku pleased with us. I think we should build a 2nd spy in CowTown with the OF from the whip and send him to the gift city. Then flip Toku to Hindu the first chance we get to reduce his relations with the other Buddhist and hopefully get him to pleased with us.
Once Toku is pleased with us we might be able to beg a small tech from him (like a small remainder of construction), so that we have enforced peace for 10 turns. That will give a safe window to send settlers and missionaries through Toku without sitting on eggshells waiting for him to declare war on us again.

edit #2: Toku might not be willing to trade construction to us even if he is pleased. We might have to figure out a different tech to almost complete so we can beg it from him... It would be easier if we had currency researched...

the espionage mission to flip Toku in a hindu gift city would be 600 * .6 (holy city and common religion bonus) * .5 (stationary spy bonus) *.8 (open borders) *1.12 distance * ~1.04 espionage spending = approx 167. So if we get the spy to the city T99 we could flip him about the same turn we get open borders. Testing seems that it is more like 204 espionage (no trade route for the additional 20% off).

CowTown can build a missionary spy next turn t97 so that frees up DeerGold to build another military unit or missionary as necessary.
When CowTown grows to 4 pop it can start another settler.

OK, I like the addition of a spy and then settler.

I don't think there is any chance we will be able to trade for iron working (Toku needs us to be pleased) Maybe we can get iron working in a trade! It might be worth trying to flip Toku to Hinduism not only to enforce peace from him but also to trade for Iron Working.
So I would suggest Iron Working 100% and then construction 100%
Maybe we want to start Construction immediately so that we are ready to ask for the small remainder as a gift from Toku (to enforce peace for 10 turns)

Part of me cringes at the idea of teching Construction when nearly all the AIs have it, because it just perpetuates our tech deficit. Then again, fewer of them can trade it compared with normal, and fewer still might trade it with us.

If Toku DOWs us after the gift, then we will have the option of AP peace (but only with him) on the T105 vote. Then a Hindu flip will get +4 fair trade +1 shared religion vs -1 close borders, but our resource-gift counter will not have decayed fully, and we might get +1 shared resources, +1 peace and/or another +1 shared religion before another -1 close borders to get him up to Pleased for OB.

With that as an option, what does teching Construction really do for us? A handful of power doesn't seem all that great to me.

Karl is the worker that can be sent to the island.

Great.

I like settling 1nw of the lake. That doesn't have the corn in the initial radius but that city would be quite strong once we have the border pop. It has all the forests to chop in its BFC and could perhaps even build Moai which we could exploit for fail gold perhaps later on.

I don't like that site all that much because it requires the second city (if any) be 1S of sheep and that's never going to get settled. Once Currency becomes available and perhaps if we haven't secured reliable OB, a second island city seems likely to be going to be worthwhile. I had NE of corn and W of sheep in my mind.

I think we probably should reevaluate all the builds. I think it does make sense to get a few settlers, military units and missionary units ready to go through the hoped for open borders. and enforced peace?

Yeah we can start heading in that direction.
 
This is how I understand the problem, but I'm not entirely sure:

Normally there are 18 player-slots and 18 team-slots in a game that can be filled with a certain number of actual players belonging to a certain number of actual teams. The slots that remain untaken are filled with 'dummy' players and teams, let's say in a regular SP game on a standard-size map there is the human player and 6 AI opponents, so the game will fill the team slots 8...18 with dummy teams that consist of the dummy players 8...18 (they can also later be taken by spawned colony AIs).

With one team in our SGOTM consisting of 2 AI players, there must be 1 dummy team that has no corresponding dummy player.
In CvGame::isValidVoteSelection() the code loops over all teams, i.e. also the dummy teams. The one player-less dummy team (ID=9 in the test game) erroneously returns true for CvTeam::isFullMember() because the check if (kLoopPlayer.getTeam() == getID()) always fails:

Spoiler :
Code:
bool CvTeam::isFullMember(VoteSourceTypes eVoteSource) const
{
	if (isForceTeamVoteEligible(eVoteSource))
	{
		return true;
	}

	for (int iI = 0; iI < MAX_PLAYERS; iI++)
	{
		CvPlayer& kLoopPlayer = GET_PLAYER((PlayerTypes)iI);
		[COLOR="Red"][B]if (kLoopPlayer.getTeam() == getID())[/B][/COLOR]
		{
			if (!kLoopPlayer.isFullMember(eVoteSource))
			{
				return false;
			}
		}
	}

	[B][COLOR="Red"]return true;[/COLOR][/B]
}

Yeah that makes sense (as an explanation, not as code!)

That is poorly written code!

It might be even worse than we think - if the first player on an existent team is not a full member, and a subsequent player is a full member, the team routine might return false for isFullMember! We'd have to look at the code for CvPlayer::isFullMember(), however.
 
Yes, the teams membership status would be determined by the first players status. I would be amazed if the CvPlayer function took into account the team member, thats what CvTeam is for.

What amazes me is when 'true' is ever the default return value for a boolean function.

Also, the double negatives, it is classic rookie coding mistake, as you have to actually think about the logic.

I haven't done much Civ code diving (despite being a software engineer), is this code modifiable by a Mod?
 
Quote:
Originally Posted by bcool
I like settling 1nw of the lake. That doesn't have the corn in the initial radius but that city would be quite strong once we have the border pop. It has all the forests to chop in its BFC and could perhaps even build Moai which we could exploit for fail gold perhaps later on.
I don't like that site all that much because it requires the second city (if any) be 1S of sheep and that's never going to get settled. Once Currency becomes available and perhaps if we haven't secured reliable OB, a second island city seems likely to be going to be worthwhile. I had NE of corn and W of sheep in my mind.

I don't see the game going that long. I would rather have 1 strong city and forget about settling the 2nd city on this island. By the time the 2nd city would make sense I expect we would have at least some AI trade routes, so the value of that 2nd city wouldn't be that high.

I see us building almost exclusively settlers, missionaries, and military units designed to spread our religion. I doubt it will make sense to settle a city that just has a sheep resource to its name even if it is the 2nd overseas trade route for us. I suspect the increase in maintenance for that city wouldn't offset the increase in trade routes (or it would be very close to break even). I doubt the cost of producing that settler would pay off that quickly.
 
I've expanded 1695 into a full PPP for t96-99, roughly per current discussion. I've added some rationales for some builds that haven't been the subject of discussion so far.

I could play in 9 or 24 hours from this post.
 
Part of me cringes at the idea of teching Construction when nearly all the AIs have it, because it just perpetuates our tech deficit. Then again, fewer of them can trade it compared with normal, and fewer still might trade it with us.

If Toku DOWs us after the gift, then we will have the option of AP peace (but only with him) on the T105 vote. Then a Hindu flip will get +4 fair trade +1 shared religion vs -1 close borders, but our resource-gift counter will not have decayed fully, and we might get +1 shared resources, +1 peace and/or another +1 shared religion before another -1 close borders to get him up to Pleased for OB.

With that as an option, what does teching Construction really do for us? A handful of power doesn't seem all that great to me.

I understand researching construction is painful, but it really is much more useful than a little bit of power. Toku AI will not trade it to us until they all have it and one of them is pleased with us. It is a bit cheaper than most techs since most of them know it.

advantages
1) We can build catapults.
1a) We can defend against a stack that has catapults by sacrificing a few of our own catapults. Without catapults Toku could take SheepTown in less than 10 turns (so he might declare war on us after an AP vote and there would be little that we could do to stop his stack without significant loses). (And we have a chance to make peace without using an AP vote for peace. This means we could use the AP vote for something more useful.)
1b) We can build up a stack that might be necessary to take a far away coastal city that will give us access to the AI team (that might be isolated on another island).
2) We move faster across rivers (accelerating all of our settlers and missionaries)
3) We get a bit more power so our peace deals are bit easier/better.

Holy War best possible AP vote option?
Perhaps the best possible AP vote we could hope for is a holy war.
If we get Toku and Hammy into war with Shaka, they will open borders with us. AI at war with us will always open borders with us regardless of their relationship with us. Plus this prevents Toku and Hammy from declaring war on us.
 
Yes, the teams membership status would be determined by the first players status. I would be amazed if the CvPlayer function took into account the team member, thats what CvTeam is for.

It would depend whether CvPlayer::isFullMember then went back and looped over teammtes for determining membership status - I seem to recall seeing such a loop somewhere.

What amazes me is when 'true' is ever the default return value for a boolean function.

Also, the double negatives, it is classic rookie coding mistake, as you have to actually think about the logic.

I haven't done much Civ code diving (despite being a software engineer), is this code modifiable by a Mod?

I think so - it's CvGameCore.dll, and I think that's legitimate scope for MODding.
 
RE: 2nd island city.
If Hindu started to spread wildly, we might need to boost our population for the final vote, but that is certainly not urgent. Leaving room for a 2nd island city seems wise though.
 
OK here's a partial completed PPP. I think it will
a) get Toku's gift hindu city to him before he can re-DOW
b) get Hammu's liberated Hindu city before the hoped-for OB-resolution
c) get the island city settled
d) not rape too much population
e) not be too vulnerable to any boats or units hammu might have (but WastinTime will have to judge on the fly how to manage things, with a few turns of flex up his sleeve)
f) maybe get tech out of hammu for peace before gifting him the city... depending if he loses units some time

Diplo
Even if we have war success (e.g. galley kill), don't bother getting peace with Hamm or Shaka without them giving us stuff, unless they show up and look really scary
We're already gifting deer and marble to Toku for 12 turns of the needed 50. Gift him stone, pigs and crabs (we can afford that, and have cows coming in in 2 turns) since our whipping makes it fairly easy to dodge health caps. This will give +1 shared resources about T104 for possible Pleased status in the future.
Be prepared to gift small techs to newly-met AIs for big immediate diplo benefit. Apparently a Theology gift is acceptable if nothing else will do. I assume an MC gift is not acceptable.
Consider accepting a demand Toku makes.

Tech
t96-8 100% IW
t99 0% Construction (don't have enough cash to finish Compass anyway, so don't get involved in tech debate this turn set)
There is a very good chance that we can trade for iron working. So I think we have to debate tech this turn set.

There is a good chance we can get please with Toku and that means we would be able to trade for iron working. I need to double check, but I believe every AI knows Iron Working so they would be willing to trade it to us even with a Toku personality at pleased.
 
Diplo
You mention peace w/ Hammu if we can get a good trade, like IW. I realize you know this, but I want the PPP to be clear: we can't get peace until the Hammu-settler is past Nippur (or free hindu spread to Hammu).

Tech
Let's put the IW OF into Compass at 0% instead of Construction. We know for sure we have to get compass and Construction is still up for debate.

Argo will need to come back now if we want him to protect galleys. It's tempting to go around the corner though.
 
OK here's a partial completed PPP. I think it will
a) get Toku's gift hindu city to him before he can re-DOW
b) get Hammu's liberated Hindu city before the hoped-for OB-resolution
c) get the island city settled
d) not rape too much population
e) not be too vulnerable to any boats or units hammu might have (but WastinTime will have to judge on the fly how to manage things, with a few turns of flex up his sleeve)
f) maybe get tech out of hammu for peace before gifting him the city... depending if he loses units some time

Diplo
Even if we have war success (e.g. galley kill), don't bother getting peace with Hamm or Shaka without them giving us stuff, unless they show up and look really scary - edit and definitely not until we have got our units through for Hammu's city gift (and preferably retrieved the boats, unless AP-OB is on the cards)
We're already gifting deer and marble to Toku for 12 turns of the needed 50. Gift him stone, pigs and crabs (we can afford that, and have cows coming in in 2 turns) since our whipping makes it fairly easy to dodge health caps. This will give +1 shared resources about T104 for possible Pleased status in the future.
Be prepared to gift small techs to newly-met AIs for big immediate diplo benefit. Apparently a Theology gift is acceptable if nothing else will do. I assume an MC gift is not acceptable.
Consider accepting a demand Toku makes.

Tech
t96-8 100% IW
t99 0% Construction (don't have enough cash to finish Compass anyway, so don't get involved in tech debate this turn set)

100% Construction for the reasons bc listed

Toku-city settler building in cowtown
t97 moves 3e
t98 founds, converted to hinduism, gets gifted to toku

toku-city missionary
t96 moves toward toku gift site
t98 converts before gift

Delhi
t96 whip settler, work gmine
t97 start temple, gmine (temple pays off its base hammers in about 9 turns, so looks good to me given the huge unknowns we have)
t98 start monastery, grow, work gfarm gmine
t99 new gfarm available, work 2gfarm

t98 onwards spam missionaries, probably working some gmines

DeerGold
t96 start settler, gfarm 3gmine
t99 2-pop whip, 2gmine
t100 done settler, start missionary, 2gfarm
t101 done missionary, start archer (or whatever)

Sheeptown
Keep building monastery, add corn when available

Cowtown
t96 finish settler work gmine
t97 start spy, work gfarm
t98 finish spy, start settler work 2gmine

pigsgems
t96 switch to galley, 2gfarm (deergold is happy to give one up!)
t97 2-pop whip galley
t98 finish galley, named Raft, resume trireme, work gfarm
t99 finish trireme, named Dreadnought, start temple (happiness is a serious concern here now, Amundsen might have to serve as MP T101)

crabsville
t96 keep working crabs (it works out slightly better than switching to marble to accelerate granary)

fritz
t96 done
t97-8 road 1w of deergold
t99 move to 1s2e of deergold
t100-2 chop

eiffel
t96 done
t97 move 1nw and mine and wake
t98-100 move 1ne and chop

hoover
t96 done
t97-88 move 1sw and road
t99 farm 1N of delhi
t100 head east somewhere (road to gift city for espionage mission?)

karl
t96 done
t97 move to Ferry
t98 unload
t99 move 1w and prepare to chop granary for new city site 1NW of lake

Cook
t96 move to 2W of DeerGold
t100 load onto Raft
t102 offload from Raft to defend settler
t103 defend as necessary, maybe load back onto Raft, maybe threaten a Hammu city

ferry
t96 done
t97 move 1e, load settler from delhi, load Karl, move 1w
t98 move 1w, 1sw unload settler and worker for site 1NW of lake
t99 1ne, 1n
t100 1n and wait
t101 load missionary, move 2nw, maybe pack another unit so we can threaten another hammu city
t102 move 2nw, unload missionary

Hammu settler
t100 load into Raft
t101/2 offload from Raft
t102/3 found gift city

Hammu missionary
t101 load onto Ferry
t102 offload Ferry next to gift city
t103 convert gift city

raft
t98 move 2NW
t99 move 1nw and wait
t100 load settler from DeerGold and Cook, move 2NW unless it looks scary for some reason, and if so duck under dreadnought
t101 move 2NW and maybe unload
t102/3 land units on settling site (whatever it will be)

dreadnought
t99 move 2NW
t100 move 2NW providing cover for galleys as necessary

Argo
come back if he'll be on station near Nippur by T101 or so, otherwise keep going

Magellan
finish loop of island, remain if seafood discovered, head for Crabsville safety otherwise

Island axeman
Bust fog 1N of lake

Sneaky
Find Toku's last city, find potential gift city sites in gap between Toku and neighbour (Hatse?). Don't bother much about scouting fresh water lake coastline.

Forest axes
Taunt Hammu creatively

Every turn
check if some AI will give us peace with them giving us some stuff
look for AI culture on globe view - particularly for choosing Sneaky's travel direction
save game
record corn tile culture
check tile micro, including which city gets shared tiles
kill Hammu or Shaka scouts if they appear
kill Hammu or Shaka boats
pillage Hammu seafood
turn on show AI moves so stuff gets seen
watch for AI build-up via power ratios
laugh at Toku build-up
check if horses seen, so a spear is needed for NW front, and build same in DeerGold
check for Hindu spreads that mean our city gifts are not necessary

Stopping points
new contact with AI from spy, boats or them finding us
don't bother stopping if a barb galley appears somewhere, but consider whipping the next trireme to cope with it
disaster on hammu/shaka front
toku DOW
 
Back
Top Bottom