K-Mod: Far Beyond the Sword

Yes, really. Slavery has two main uses: 1) It makes up for the fact that mines are the only useful production improvements in the early game, and 2) it allows stored-up food (in the form of population points) to be rapidly converted into modern military units.
Actually you missed the main one - it provides a solution that converts unhealthy / unhappy citizens into Production, instead of being a problem they become an opportunity. Slavery is incredibly powerful and I doubt whether many serious players will agree with you. Not saying your style doesn't work for you but I very much doubt your statement "Completely skipping Slavery is something frequently done by players of all skill levels." Lower levels certainly but not at the mid to higher ones.
 
I've got a couple of ideas in mind, but I'm interested to hear if anyone can come up with something better.

In RoM AND they have implemented a mechanism where tech costs are multiplied if you enter an era earlier than historically accurate. That is a possibility you could consider. It does as you wish, slow down quick games while not effecting slow games, and also serves as a balance where the most advanced civ is slowed down the most. It is however another advantage to the human player, who knows to research the remaining techs in an era before advancing to the new one.
 
Actually you missed the main one - it provides a solution that converts unhealthy / unhappy citizens into Production, instead of being a problem they become an opportunity. Slavery is incredibly powerful and I doubt whether many serious players will agree with you. Not saying your style doesn't work for you but I very much doubt your statement "Completely skipping Slavery is something frequently done by players of all skill levels." Lower levels certainly but not at the mid to higher ones.

Really? You want to make this about the specific wording of what I said? Fine, let's take a closer look at it then.

"Completely skipping Slavery is something frequently done by players of all skill levels."

What does that statement mean and what is necessary for it to be true? "Skipping Slavery" merely means that you go from Tribalism directly into something other than Slavery. "Frequently" means that it's a move done commonly or often, as opposed to rarely. And "players of all skill levels" means that there is a non-negligible number of players of all skill levels for which this is true. It's not necessary for this play to be particularly popular and it's completely irrelevant whether many serious players share this view. It's only necessary for a non-negligible minority to play this way some of the time.

Keep in mind that this is a mod development forum and not the general strategy forum. The issue here is not whether Slavery is incredibly powerful, which it is, or even if it's the best civic choice for most of most games. The issue here is whether Slavery is too powerful. And that is the essence of my argument: Slavery isn't overpowered because Caste System and Emancipation can compete with it. It's only Serfdom that's stuck in the "useless" corner.

And for the record, I didn't forget that main use of your's, I merely view it as the flip side of Slavery's use as a substitute for mines.
 
Really? You want to make this about the specific wording of what I said?
Well in a forum where we communicate via specific words, er yes. I agree Slavery is too powerful and not sure, even in K-Mod, there have been enough changes to make your statement true.
 
Research speed:
Games with slow and fast research add to the variety of Civ. It's also sensible that research gets ahead of the real timeline when the players play or cooperate well. Perhaps it does happen too often that the game becomes degenerately fast towards the end. Slow games have rarely bothered me, but I can see peaceful victory becoming improbable if late-era tech costs are further increased.

Maybe it would suffice to decrease iResearchPercent in CIV4HandicapInfo.xml for the low and middling difficulty levels. I'm a little uncomfortable with rubber-banding tech costs.

In any case, balancing improvements through commerce might blur the distinction between them.
 
Speaking of radical changes; I'm looking for ways to slow down the late game a little bit. More specifically, I want to slow down the game if there is particularly fast tech progression.

Currently, one of the key effects for slowing tech in the late game is "inflation". The way it works is to slowly increase all gold costs with each passing turn. I think it's a decent way to keep costs relevant into the late game while commerce and productivity are increasing. However, there is a major problem in that if the game goes very fast, then inflation has less of an effect in the late game. So in games with heavy tech trading or just strong economies, the effects of inflation are relatively small, and so the late game just flies by.

This isn't really a big problem, but I would like to solve it if there is a good way to get it done. But it's a bit tricky. Simply increasing tech-costs doesn't solve the issue, because that would slow down the game in all cases - which would hit particularly hard on low-difficulty games (where the AI researches slower, and so the total research rate is slower). Increasing inflation doesn't really solve the problem either, because the crux of the issue is that fast games essentially bypass the effects of inflation. Again, higher inflation would slow down all games, and would be particularly hard-hitting on slow games.

I want an effect that slows games that are too fast, but doesn't slow down games that are already slow. And I want it to be a fairly intuitive and simple system which is easy to understand and easy to implement.

I've got a couple of ideas in mind, but I'm interested to hear if anyone can come up with something better.

This may not be something that I actually change; but it's something that comes to mind every time someone mentions adding commerce to lumbermills, or watermills or whatever - because adding more commerce to these things would speed up the game even further. There are lots of potentially good changes which would have the unwanted side-effect of speeding up the late game. So it would good to have some kind of reliable counter-balance.

You're really stuck between a rock and a hard place on that one. Tech trading is clearly the main culprit, but you can't easily mess with it without radically changing the game.

Anyway, you could teach the AI the proper use of tactical nukes and submarines. In my experience, use of those slows down games quite a bit.

In any case, balancing improvements through commerce might blur the distinction between them.

I don't see how that's a problem. Even in stock BtS most improvements aren't pure in their effects. Special resource tiles aside, it's really only Farms and Mines that don't have something extra going for them.
 
I too think that late game (renaissance and onwards) often progresses too fast to really enjoy a single moment of it, in that I rarely have goals towards things in that time period, but am planning far ahead.
Rubberband teching does not sound good, but maybe there should be one that makes research harder for new era, the strength of penalty being directly propotional to the amount of players that have not reached that era (so, for example, if half of all players have reached the era, no penalty is added; if you're the only one, some percentage is added; and as the amount of players reaching the era increases towards half of them, the lesser the penalty).
This would have interesting effect in that the first tech of an era would be cheap to research (as you have not reached the era yet). The half of all players is for if there is somekind of default era the game checks based on the player reached eras.
But I don't know, that could be a terrible idea. I trust someone else to figure out a better one. As said, rubber bands can be REALLY annoying and deppressive.
 
I don't see how that's a problem. Even in stock BtS most improvements aren't pure in their effects. Special resource tiles aside, it's really only Farms and Mines that don't have something extra going for them.
True enough. I've re-examined the 7 basic improvements in Civilopedia -- Workshop and Cottage are reasonably focused as well, but Watermill and Windmill have indeed always been hybrids. So I guess it wouldn't hurt if all mills had a mixed effect (and buffing the non-mill improvements isn't a consideration anyway).
 
Here a new revision of my Forests, Mills and Serfdom suggestion that gets rid of the civic independent commerce bonus for Lumbermills to address karadoc's concern of accelerating the game too much:

Forest
+1 :hammers:
Movement Cost: 2
+0.7 :health: in nearby cities
Defending units get +50% strength

Lumbermill
Available at Machinery
-1 :food:
+1 :hammers:
+1 :commerce: (next to river)
+1 :hammers: (with Serfdom)
+1 :food: (with Replaceable Parts)
+1 :hammers: (with Railroad)

Watermill
Available at Machinery
+1 :hammers:
+1 :commerce: (with Serfdom)
+1 :hammers: (with Replaceable Parts)
+1 :food: (with State Property)
+2 :commerce: (with Electricity)

Serfdom
Available at Feudalism
Upkeep: Low
Workers build improvements +50% faster
+1 :hammers: from Lumbermill
+1 :commerce: from Watermill, Plantation

Unfortunately, this variant would require some doing to make sure Lumbermills can't be built on 0 :food: tiles before Replaceable Parts, similar to how Farms need irrigation until Biology.
 
Penalties are not so fun. That would make all slavery/caste/serfdom tied to food conversion. I'd keep the base lumbermills from my earlier suggestion, which is the same as your original but with commerce bonus just for compensating the lost river bonus. There is still that health tweak.

Considering that lumbermills would become stronger than mines with serfdom, it would go with the same theme to give mines +1 hammer from serfdom. For both lumbermills and mines, the Railroad bonus is not that far from Emancipation.

I'd perhaps remove watermill +1 commerce from serfdom, as it seems a bit arbitrary. Watermill seems thematically like a late-game improvement. Considering that, the commerce boost from Electricity could be increased. It shouldn't be a problem if watermill rivals non-free-speech towns, either thematically or gameplay-wise. It is still annoying to build, as it cannot be built on both sides of the river if I recall? And requires a river flatland to begin with.

Out of context, considering the Serfdom picture, +1 hammer from farms would be hilarious.
 
A small way to make game go slower, would be to increase the time it takes to make railroads. I upped mine to 800, 4x the amount of roads (200). (civ4buildinfos)

AND/OR

increasing the turns worked for cottages/hamlets etc to progress to the next level

AND/OR

Increasing the amount of power needed to vassalize another civ. (Leaderheadinfos, <iVassalPowerModifier>70</iVassalPowerModifier>)
 
Just spotted a bug in CvPlot::canBuild that can cause a CTD. The bug exists in the BTS code and is not something added by K-Mod but you may want to consider adding the fix given that it is trivial; it would also make my life easier doing those 3-way diffs when you make an update ;)

The following code exists in the function:
Code:
	if (eImprovement != NO_IMPROVEMENT)
	{
		if (!canHaveImprovement(eImprovement, [COLOR="Red"]GET_PLAYER(ePlayer)[/COLOR].getTeam(), bTestVisible))
		{
			return false;
		}
which will CTD in GET_PLAYER if ePlayer == NO_PLAYER

A simple check at the top of the function, returning false if this is the case fixes it as obviously NO_PLAYER cannot build an improvement.

I don't think there are any places where the current code base call this function with NO_PLAYER so it only rears its head if someone extends K-Mod. I only found it when I was creating some unusual test scenarios for a new building effect I am writing, but given the trivial fix thought you might like to add it in for completeness.
 
I've encountered inconsistencies or my lack of understanding of how does overflow system work when producing workers and settlers.

When I am building Worker (with no helping trait) and I am missing 1 hammer, and the city is producing 2 surplus food and 5 hammers I get overflow of 6 hammers for the next thing I choose to build. So the food overflow isn't lost.

When I am building Settler (with no helping trait) and I am missing 1 hammer, and the city is producing 4 surplus food and 10 hammers I get overflow of 13 hammers for the next thing I choose to build. So the food overflow isn't lost.

However when I am building Worker (with +25% trait) and I am missing 1 hammer, and the city is producing 4 surplus food and 10 hammers (+2 from trait for 12 total) I get overflow of 12 hammers. So the food overflow is lost?

And when I am building Settler (with +50% trait) and I am missing 1 hammer, and the city is producing 2 surplus food and 5 hammers (+2 from trait for 7 total) I get overflow of 5 hammers. I don't even know what happens here...
 
Blindly reading the code here. The overflow you will get is 100*overflow/productionmodifier

modifier=125
overflow=4+10+2-1=15
100*15/125=12

modifier=150
overflow=2+5+2-1=8
100*8/150=5

In short, leaders with production modifiers to units with food converted production get effective production penalties in cities that primarily utilize food for production, because the game forgets the source of the hammer when compensating against overflow tricks.
 
I have found what I think is another CTD bug that exists in a K-Mod function this time ... though the function looks to be based on BTS code. The CTD occurs when processing espionage modifiers if neither the target nor the player have any espionage points.

The root of the bug appears to be in CvGameCoreUtils::getEspionageModifier. The final statement is:
Code:
	return GC.getDefineINT("ESPIONAGE_SPENDING_MULTIPLIER") * [COLOR="Red"][B](2 * iTargetPoints + iOurPoints)[/B][/COLOR] / std::max(1, iTargetPoints + 2 * iOurPoints);
If both iTargetPoints and iOurPoints are 0 then the highlighted section evaluates to 0 which is then returned by the function.

This value is used in CvPlayer::getEspionageMissionCostModifier (line 14988) at the end as a multiplier so that will also return 0

This value is used in CvUnitAI::AI_specialSeaTransportSpy in a divisor on line 18566:
Code:
		CvCity* pPlotCity = pLoopPlot->getPlotCity();
		if (pPlotCity && !kOurTeam.isAtWar(GET_PLAYER(ePlotOwner).getTeam())) // don't go directly to cities if we are at war.
		{
			iValue *= 100;
			iValue /= std::max(100, 3 * [COLOR="Red"][B]kOwner.getEspionageMissionCostModifier(NO_ESPIONAGEMISSION, ePlotOwner, pLoopPlot)[/B][/COLOR]);
		}
		else
		{
			iValue /= 5;
		}
This causes a div by 0 error and a CTD

In my code I have changed the return from CvGameCoreUtils::getEspionageModifier to be the following with the effect of returning 1 as the multiplier in this scenario, which seems to be the logical place to place a fix:
Code:
	return GC.getDefineINT("ESPIONAGE_SPENDING_MULTIPLIER") * [COLOR="Red"][B]std::max(1, [/B][/COLOR](2 * iTargetPoints + iOurPoints)[COLOR="Red"][B])[/B][/COLOR] / std::max(1, iTargetPoints + 2 * iOurPoints);
 
Do you guys know how I could switch the Great Wall from keeping out all barbarians to providing a small bonus vs barbs- which would be more historically accurate.

I think removing the 1 from <bBorderObstacle>1</bBorderObstacle> would let the barbs in...

But where would I add the bonus vs barbarians in the buildinginfos code? Is it possible?
 
But that 0 would be std::max(100,0). Doesn't it return 100 as a minimum value?

You are correct that would return 100+. I made this change a while ago and forgot where it actually caused the CTD, which is in CvUnitAI::AI_getEspionageTargetValue(CvPlot* pPlot) line 23062
Code:
				// K-Mod. Dilute the effect of population, and take cost modifiers into account.
				iValue += 10;
				iValue *= 100;
				iValue /= GET_PLAYER(getOwnerINLINE()).getEspionageMissionCostModifier(NO_ESPIONAGEMISSION, pCity->getOwner(), pPlot);
 
Back
Top Bottom