K-Mod: Far Beyond the Sword

yeah I have to agree that the Angkor Wat giving great prophets an extra hammer would not at all be "insanely powerful". As it is, the wonder is virtually worthless, I can't even remember ever building it. Even with that buff it would still be virtually worthless and almost never worth the hammers. When are you ever running tons of priests in every city? I might even go so far as to argue the Chichen Itza is better than the AW- at least the Chich will buy you a couple of bombardment turns, allowing you to run troops to the threatened city.
 
Random thoughts:

Human invasion of an island ai country involved massing a large army, sailing next to their capital and burning 2 or 3 cities- generally before the ai reacts.

1. Increase Capital only culture spread over water. +2 to max water culture radius for capital.

2. Have a -1 or -2 diplomatic penalty for having a large army near an ai while at peace. This could mitigated by joining a war on the side of the ai in question. So traveling an army through a friendly country, wouldnt take it the wrong way.

Generally this could give a very simple and weak way to encourage an ai to react before an obvious back stab hits.

3. Increase minimum naval unit movement to 3 from 2. Reduce maxmium naval unit movement to 9 or 10. Early naval transport too slow, late game naval invasion too long range.
 
I brought up the whole naval invasion thing a few months ago but Karadoc said he didn't want to change the mechanics. I don't like it either. On land it is usually impossible to declare war and raze cities on teh same turn, except for border cities and even that isn't usually possible. Major core cities are never threatened on the turn of declaration. By sea, however, you can declare and annihilate everything in one turn. It doesn't make any sense from a balance perspective. I don't buy the argument that this was an intentional move of the developers. If it were, why don't modern armour units have 10 movement points, and mech infantry? I mean... tanks move faster than ships... blitzkrieg was done with bombers and tanks not ships. It just seems to be to be yet another thing overlooked by lazy Firaxis developers. They didn't really look at the fact that water tiles extend perhaps 4-5 tiles out and modern ships have a range of 6-8
 
2. Have a -1 or -2 diplomatic penalty for having a large army near an ai while at peace. This could mitigated by joining a war on the side of the ai in question. So traveling an army through a friendly country, wouldnt take it the wrong way.

I think that if an AI meets all these criteria:
Is bordering you
Has demographics on you
Notices you are building up your army

They should open diplomacy and say 'hey, what's with the army?'
The player can then declare war immediately, or claim that they don't plan any hostilities.

But, if the player says no hostilities and then attacks within (however many) turns, every AI gets a negative relation modifier with the player for lying.
 
Love that idea.

Extra criteria: ai takes note of stacks with 6 or more units outside of cities or 10+ units inside of a single city that it has vision of.
 
I think I have found a bug in CvCityAI::AI_buildingValue lines 4492 and 4499:

Code:
// We've already subtracted the number of eBuilding that are already built.
// Now we subtract the number of eBuilding that we are currently constructing.
//iPrereqBuildings -= kOwner.getBuildingClassMaking(eBuildingClass) - (getFirstBuildingOrder(eBuilding) < 0 ? 0 : 1);
iPrereqBuildings -= kOwner.getBuildingClassMaking(eBuildingClass); // (keep it simple)
if (iPrereqBuildings > 0)
{
	// Now we work out how valuable it would be to enable eLoopBuilding;
	// and then scale that value by how many more eBuildings we need.
	CvCity* pLoopCity;
	int iLoop;
	int iHighestValue = 0;
	int iCanBuildPrereq = 0;
	for (pLoopCity = kOwner.firstCity(&iLoop); pLoopCity != NULL; pLoopCity = kOwner.nextCity(&iLoop))
	{
		if (canConstruct(eBuilding) && getProductionBuilding() != eBuilding)
			iCanBuildPrereq++;
	}
	if (iCanBuildPrereq >= iPrereqBuildings)
	{
		for (pLoopCity = kOwner.firstCity(&iLoop); pLoopCity != NULL; pLoopCity = kOwner.nextCity(&iLoop))
		{
			if (canConstruct(eLoopBuilding, false, true) && getProductionBuilding() != eLoopBuilding)
				iHighestValue = std::max(pLoopCity->AI_buildingValue(eLoopBuilding, 0, 0, bConstCache, false), iHighestValue);
		}

		int iTempValue = iHighestValue;
		iTempValue *= iCanBuildPrereq + 3*iPrereqBuildings;
		iTempValue /= (iPrereqBuildings+1)*(3*iCanBuildPrereq + iPrereqBuildings);
		// That's between 1/(iPrereqBuildings+1) and 1/3*(iPrereqBuildings+1), depending on # needed and # buildable
		iValue += iTempValue;
	}
}

The problem is that both of the city loops call canConstruct() and getProductionBuilding() on the local city instead of the loop city. For example this:

Code:
	for (pLoopCity = kOwner.firstCity(&iLoop); pLoopCity != NULL; pLoopCity = kOwner.nextCity(&iLoop))
	{
		if (canConstruct(eBuilding) && getProductionBuilding() != eBuilding)
			iCanBuildPrereq++;
	}

Should be this:

Code:
	for (pLoopCity = kOwner.firstCity(&iLoop); pLoopCity != NULL; pLoopCity = kOwner.nextCity(&iLoop))
	{
		if (pLoopCity->canConstruct(eBuilding) && pLoopCity->getProductionBuilding() != eBuilding)
			iCanBuildPrereq++;
	}

The same thing goes for the second city loop, which should be:

Code:
for (pLoopCity = kOwner.firstCity(&iLoop); pLoopCity != NULL; pLoopCity = kOwner.nextCity(&iLoop))
{
	if (pLoopCity->canConstruct(eLoopBuilding, false, true) && pLoopCity->getProductionBuilding() != eLoopBuilding)
		iHighestValue = std::max(pLoopCity->AI_buildingValue(eLoopBuilding, 0, 0, bConstCache, false), iHighestValue);
}

-Josh
 
I think you're right, sjodster.

Looking at it now, I think the first of those two loops is very obviously wrong - because there's nothing inside the loop that actually depends on the loop variable. The second loop is wrong too, as you say, but I think it's less obvious.

I'm sure I've read over that piece of code heaps of times to fix earlier bugs - but I didn't spot that mistake. I guess this is just another example of how an author of something can become blind to their mistakes. ie. I look at the code and see only what I meant to write rather than what is actually written.

Thanks for finding the mistake.
 
Just curious if there is an eta on another patch? But its not like Im winning much on emperor right now anway, :)


EDIT: Can Shwedagon Paya get a production bonus with Either gold or silver? I'd love to be able to build that wonder more and adding silver seems reasonable to add.
 
I do not know if this is related to K-mod but definitely looks like a bug.
I managed to build Christian Cathedral without having the prerequisite temples.
And now it shows this.
Any ideas?

civ4screenshot0000.jpg
 
hey k-master,

how are you?

its been quite here.


anyway -i found something in the autoai code,

this section - makes some python mods not to work - and that may be a problem for other modders :

Code:
            try :
                self.customEM.removeEventHandler( "BeginGameTurn", customEM.onBeginGameTurn )
                self.customEM.addEventHandler( "BeginGameTurn", self.onBeginGameTurn )
            except ValueError :
                print "Failed to remove 'onBeginGameTurn', perhaps not registered"
                self.customEM.setEventHandler( "BeginGameTurn", self.onBeginGameTurn )

i removed it and everything worked fine.

thought id share this with you.


anyway - any new version soon?
 
Eh Angkor Wat, the problem with running all those Priests is you get Prophets.
: P



I'll chime in on the topic of surprise attacks against the AI. In Civ IV all you get is maybe a couple -1:mad: for attacking someones friend. Big deal, we human players are way better at warring so it's always worth it.

I think starting from the Renaissance era onward (when things get a lot faster) there should be a diplomatic penalty for entering any tile of enemy territory on the same turn that you declare war. An extra turn to prepare could make a big difference if the AI knows how to respond with their units.

The penalty should be harsh enough that you have to pause to consider if a surprise attack is worth it. How it could work is that if you enter their territory on the same turn that you declare war a warning pops up and if you ignore it you get a -3:mad: "Dastardly attacker" reputation with anyone that was pleased or better with the target and a -1:mad: with anyone that knew the target. Or maybe the penalty scales with game speed to not penalize faster speeds too much. It wouldn't count if you attack them in a neutral civs area or unclaimed territory, only those Pearl Harbor's that go down as a date which will live in infamy.

There could be another one for backstabbing too; joining in a war on your own, without being asked is diplomatic hit with both fighting civs. Common player tactic is to bribe Civ A into war against Civ B and turn around and attack Civ A while they're occupied, or sometimes even sniping cities from the AI who was winning the war in the first place. It would be like a -3:mad: "Mind your own business!" modifier.

You could add the caveat that if the Civ you surprise attack or backstab is eliminated the diplomatic penalties fade away over time depending on the leader personality. And have the diplomacy go both ways so the AI can't blindside you with those massive K-Mod naval invasions that we all enjoy so much. : )



Another option for preventing sea borne raids could be to expand the Sea Patrol mission into a zone-of-control where your ships will guard all tiles in a radius around them from any enemy ship entering. Triremes could do range 1, Age of Sail range 2 and Oil based navy range 3 zone-of control. Kinda like the opposite of a blockade mission so any ship that enters your Sea Patrol radius has to fight the ships you have patrolling before they can land any troops on shore.



And well, I'll just lump a few more ideas into this post. : P I've got a couple games that went late in v1.41's "Adjusted the tech value of air units" and I still don't think the AI puts enough emphasis on getting oil and Flight; I can't remember the last time I saw an AI Carrier loaded with planes meanwhile it's the most powerful conventional modern unit.

And even if the AI is defending with Machine Guns and Fighters in their cities.. interceptions are usually just a minor inconvenience and you can insta-heal your plane with promotions for the next bombing run. I'm not even 100% sure how Air Combat works but I think the rule should be changed to anytime an Airship or Bomber is intercepted the unit should be lost. At least there'd be a better way to gain experience with Fighters that way.

And just an idea for waypoints and Airports. It would be great if you could set waypoints that would use the Airports airlift ability if it was available and faster than the "goto" function. You could even mass troops from all other continents at one jumpoff point if all the cities had Airports.
 
look, with the naval invasions, the ONLY way to defend against them is to stop...every single turn, and scour the oceans. You need a fleet of sentries, guarding all of your coastlines, and you need to take the time and scroll your mouse over the map and look for a possible invasion fleet. You have to do this EVERY SINGLE F@#%@#ING TURN. Seriously... is that fun for anyone? I play games for fun... that is some serious un-fun BS going on right there. In the retail game the AI was just so horribly incompetent that a naval invasion was never a serious factor but in Kmod it of course is. So either you spend all that time every single turn watching out for one, or you get lazy and then get your A$$ handed to you.
 
look, with the naval invasions, the ONLY way to defend against them is to stop...every single turn, and scour the oceans. You need a fleet of sentries, guarding all of your coastlines, and you need to take the time and scroll your mouse over the map and look for a possible invasion fleet. You have to do this EVERY SINGLE F@#%@#ING TURN. Seriously... is that fun for anyone? I play games for fun... that is some serious un-fun BS going on right there. In the retail game the AI was just so horribly incompetent that a naval invasion was never a serious factor but in Kmod it of course is. So either you spend all that time every single turn watching out for one, or you get lazy and then get your A$$ handed to you.

I enjoyed it, but I would probably come closer to your position if I played more games.

A quick-fix is to turn off city-razing. That way getting a city sacked isn't as devastating. Still requires you to have a solid army overall, but a backwards AI can't do a hit-n-run razing one of your major cities.

But I seriously don't see good solution to this. It would probably be necessary with some patrol/zone-of-control implementation.
 
If I don't have vision on a potential enemy with espionage I use recon missions with Airships once they're available when I suspect an attack. In between Astronomy and Physics I try not to piss off any A.I. who is strong and has Astronomy. Free Religion helps and so does joining wars against the weaker nation on the other continent that's going to die anyways.

If you have an Astro enemy that might attack, watch the A.I.'s coastal cites and you can see them assemble a fleet which you then follow. If they have their stack in one city and their fleet in another you're not in danger. When you see the fleet leave port and it might be heading for you, assemble troops that can respond on that coastline. Defend cities and defensive terrain that could be landed on around cities. Machine Guns are awesome at defending like this. Frigates vs. Caravel/Galleon stacks are dominant before they land. Privateer promoted Destroyers with Sentry and eventually Blitz against Wood navy is the ultimate beatdown. I wish Submarines were better at sinking ships but see my post in the future ideas thread for that.

A.I. naval invasions are one of my favourite K-Mod features compared to BTS. The problem is when humans do it to the A.I. who can't see it coming.
 
Anyone else think the philosphical trait is just weaker than the industrious trait at all points of the game?

Maybe give philosophical civs a 25%-50% discount on the heroic epic/national epic and/or philosophy tech?

Heres hoping Karadoc is doing ok and comes back :P
 
Anyone else think the philosphical trait is just weaker than the industrious trait at all points of the game?

Maybe give philosophical civs a 25%-50% discount on the heroic epic/national epic and/or philosophy tech?

Heres hoping Karadoc is doing ok and comes back :P
I think fastest way to summon a Karadoc is to post a bunch of code or an OOS error. : P I hope he's doing well also.

I don't think PHI is too bad, you always get a few extra great people and Oxford is much easier to get for super science city in the late game. IND is generally more useful but resource dependent in order to get the most out of it.
 
Back
Top Bottom