LowtherCastle
Deity
- Joined
- May 18, 2005
- Messages
- 23,756
Kaitzilla, have you tested T123 whether we get the AP city back before or after the +1
from Hanging Gardens?

I took teh price of Fishing as 40 from the main menu here at CFC, then multiplied it by 1.3. I also tried multiplying additional by 1.2. The answer seemed somewhere in between. But I set up a whole spreadsheet chart and tried every single tech cost in between 50 and 75 and couldn't get an answer that corresponded to what happened in the test game I made.My first hunch before reading that post was you maybe wrongly reported the tech cost as what we see in the tech tree is calculated/inflated of what an AI sees. AI sees what a noble human player would see. Therefrom the difficulty of tech trading on deity and the need of partially tech the wanted tech to be traded to us (like Alpha). [/COLOR][/B]
==========================
Results from the test game
==========================
Plusmods Plusmods
Brennus We meet
Turn meets us Brennus
---- -------- -------
0
1 4 4
2 4 4
3 3 <-----> 4
4 2 <-----> 3
5 2 2
6 2 2
7 1 [B][COLOR="red"]2 <------ CORRECTED!![/COLOR][/B]
8 1 1
9 1 1
10 1 1
11 1 1
12 1 1
13 1 1
14 0 <-----> 1
15 0 0
I'd love to, but I don't know how... How?
Can someone give me the iNonsense? I don't have the game right now, so I can't know Brennus' capital position.
Silu doesn't say how the counter is incremented or when. That's in the code for sure. And somehow something else is weird, although I realize it might have to do with Stalin or whatever.
I think that's the correct assumption. What I'm asking is, where does that i=i+1 occur in the sequence of actions in this particular code?Since then, I assumed those counters just worked like i=i+1, nothing more due to lack of material to read and understand.
I'd love to, but I don't know how... How?
//atleast I'm honest
int iNonsense = 0;
iNonsense += getCapitalCity()->getX();
iNonsense += getCapitalCity()->getY();
I think that's the correct assumption. What I'm asking is, where does that i=i+1 occur in the sequence of actions in this particular code?
It appears that it must be happening during Brennus' turn, because then it would make sense that when he meets us during his T0 turn, the counter increments to 1 and when we meet him during our T1 turn, it hasn't incremented to 1 yet.
But then does it start at default = 1, because in Silu's equation, we'd get a divide-by-zero error if it starts at zero. So you see, Silu doesn't epxlain the whole thing.
By the way, I also tried starting at 1 to see if that worked with teh equation better, but still not.
Here's some processed poop:
Code://atleast I'm honest int iNonsense = 0; iNonsense += getCapitalCity()->getX(); iNonsense += getCapitalCity()->getY();
Lol at this developper comment. "At least I'm honest" Reply: Nonsense.
I need Brennus' capital coordinates.
int CvTeamAI::AI_getHasMetCounter(TeamTypes eIndex) const
{
FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
FAssertMsg(eIndex < MAX_TEAMS, "eIndex is expected to be within maximum bounds (invalid Index)");
return m_aiHasMetCounter[eIndex];
}
void CvTeamAI::AI_setHasMetCounter(TeamTypes eIndex, int iNewValue)
{
FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
FAssertMsg(eIndex < MAX_TEAMS, "eIndex is expected to be within maximum bounds (invalid Index)");
m_aiHasMetCounter[eIndex] = iNewValue;
FAssert(AI_getHasMetCounter(eIndex) >= 0);
}
void CvTeamAI::AI_changeHasMetCounter(TeamTypes eIndex, int iChange)
{
AI_setHasMetCounter(eIndex, (AI_getHasMetCounter(eIndex) + iChange));
void CvTeamAI::AI_doCounter()
{
int iI;
for (iI = 0; iI < MAX_TEAMS; iI++)
{
if (GET_TEAM((TeamTypes)iI).isAlive())
{
if (iI != getID())
{
AI_changeWarPlanStateCounter(((TeamTypes)iI), 1);
if (isAtWar((TeamTypes)iI))
{
AI_changeAtWarCounter(((TeamTypes)iI), 1);
}
else
{
AI_changeAtPeaceCounter(((TeamTypes)iI), 1);
}
if (isHasMet((TeamTypes)iI))
{
AI_changeHasMetCounter(((TeamTypes)iI), 1);
}
if (isOpenBorders((TeamTypes)iI))
{
AI_changeOpenBordersCounter(((TeamTypes)iI), 1);
}
if (isDefensivePact((TeamTypes)iI))
{
AI_changeDefensivePactCounter(((TeamTypes)iI), 1);
}
else
{
if (AI_getDefensivePactCounter((TeamTypes)iI) > 0)
{
AI_changeDefensivePactCounter(((TeamTypes)iI), -1);
}
}
if (isHasMet((TeamTypes)iI))
{
if (AI_shareWar((TeamTypes)iI))
{
AI_changeShareWarCounter(((TeamTypes)iI), 1);
}
}
}
}
}
}
Last SGOTM we had that from Stonehenge (but screwed up our maths and got daggered anyway). We don't have that or Calendar yet, so no centered map, so no coordinates of anything, so no iNonsense.
Nonsense, on the other hand... that's what we're good at!![]()
I'm not worried about the offset. I'm worried about the equation. Those are big numbers and we need to know what works and what doesn't.@LowtherCastle
I repeat that's unnecessary as we got a large AI_getHasMetCounter. Even if you correct, I don't think it matters much between a divider of 89 or 90.
I'm looking at an alternate Trojan Horse city that maybe we can take back with 66% AP chance resolution.
Have both workers mining the Paris' hill T118. Have one road 1SE of Paris T119 for spy.
Whip a Confuscian Missionary in Horse City as soon as possible and spread it to Clams/Jungle Pigs on T121.
Settle JungPigs/Clams T120 with a whip T116 in Corn/Pigs/Fish
We get culture in it T121 and spread Conf. and gift it to Brennus at size 1 on T121 and a good spy steal attempt on T122.
We give Code of Laws earlier to counter -1 border tensions and -2 voted against us and we can sign open borders T122.
Then if we win the AP vote we get the city back on T123 just in time for Hanging Gardens to maybe give it Pop 2 and we had a good 80% steal attempt.
If the resolution is defied, we can keep trying to steal from the close by Clams/Jungle Pigs.
If we fail to steal and we get the city back, then we'd have delayed Iron Working steal by a large amount. We might have to give the city back again right away, but if it was size 2 we could whip it first and then it would be ok to declare war and take it without razing it but i still like the peaceful method/gems.
Sooooo Trojan Horse #2 with one good steal chance?
Spoiler :Tipping towards Craziest now...
This has a special benefit I hadn't thought of before. When we capture Camulodunum, we get one gems tile without having to wait for Camulodunum to come out of resistance, shortening the time we don't have the gems we've grown fond of.I'm looking at an alternate Trojan Horse city that maybe we can take back with 66% AP chance resolution.
Have both workers mining the Paris' hill T118. Have one road 1SE of Paris T119 for spy.
Whip a Confuscian Missionary in Horse City as soon as possible and spread it to Clams/Jungle Pigs on T121.
Settle JungPigs/Clams T120 with a whip T116 in Corn/Pigs/Fish
We get culture in it T121 and spread Conf. and gift it to Brennus at size 1 on T121 and a good spy steal attempt on T122.
We give Code of Laws earlier to counter -1 border tensions and -2 voted against us and we can sign open borders T122.
Then if we win the AP vote we get the city back on T123 just in time for Hanging Gardens to maybe give it Pop 2 and we had a good 80% steal attempt.
If the resolution is defied, we can keep trying to steal from the close by Clams/Jungle Pigs.
If we fail to steal and we get the city back, then we'd have delayed Iron Working steal by a large amount. We might have to give the city back again right away, but if it was size 2 we could whip it first and then it would be ok to declare war and take it without razing it but i still like the peaceful method/gems.
Sooooo Trojan Horse #2 with one good steal chance?
Spoiler :Tipping towards Craziest now...
D'oh! What have I been thinking?!? Any city we gift to Brennus will immediately make us a land target...Owning the clams-jungle-pigs city does make us Brennus war target, which might bother us in some scenarios, but we'd know where to concentrate the defence to buy time until we can lose it for an AP peace (if needed).
D'oh! What have I been thinking?!? Any city we gift to Brennus will immediately make us a land target...
int CvPlayerAI::AI_getTradeAttitude(PlayerTypes ePlayer) const
{
// XXX human only?
return range(((AI_getPeacetimeGrantValue(ePlayer) + std::max(0, (AI_getPeacetimeTradeValue(ePlayer) - GET_PLAYER(ePlayer).AI_getPeacetimeTradeValue(getID())))) / ((GET_TEAM(getTeam()).AI_getHasMetCounter(GET_PLAYER(ePlayer).getTeam()) + 1) * 5)), 0, 4);
}
========== ===============
Stalin Stalin and we
knows know each other
========== ===============
Turn us us+Wang +wang
---- -- ------- -----
0 4 4 4
1 4 4 4
2 3 4 4
3 2 3 3
4 2 3 3
5 2 2 2
6 1 2 2 Plusmods we get for gifting Fishing
7 1 2 1
8 1 1 1
9 1 1 1
10 1 1 1
11 1 1 1
12 1 1 1
13 0 1 1
14 1 1
15 1 0
16 1
17 0