K-Mod: Far Beyond the Sword

Thanks for the latest update!

I have an idea for a future feature.

Preserve improvement: A way of telling your automated workers to not change the improvement on a particular tile.

I know you can do this globally, but generally that's not desirable. I just want a way to stop my workers building workshops etc in the middle of an elaborate irrigation scheme, cutting off irrigation to a whole bunch of farms elsewhere. When this happens, I manually take control of some workers to change the offending tile back to a farm, but another worker will change it back a few turns later. :hammer2: :badcomp:

Not sure how you would implement this but perhaps either:

- Add worker action "preserve improvement", which can be executed by a worker on any given tile, but would not take any movement points (it should allow for building of roads and railroads, however)

- Improve worker AI to take account of the effect on farms that are irrigated by a particular tile, before changing the tile away from a farm
 
Another AI tweak suggestion would be to estimate the size of a task force that it needs to send.

Boudica has just marched 3 machine guns, 19 cannon, and 77 infantry halfway across the map (through two other civs' territories, scaring the life out of me in the process!) to tackle a barbarian village with 3 unpromoted Longbowmen in it... :dubious:
 
Boudica has just marched 3 machine guns, 19 cannon, and 77 infantry halfway across the map (through two other civs' territories, scaring the life out of me in the process!) to tackle a barbarian village with 3 unpromoted Longbowmen in it... :dubious:

Only in Civ! Can't do anything but love it. :lol:

Now a question from me who is about to install K-mod for the first time: I have BUG/BULL installed in custom assets folder, having replaced original game files. Will this affect the intricate workings of K-mod? I would like to keep BUG/BULL for future non-K-mod games, if possible.
 
You should be fine as K-Mod has the NoCustomAssets = 1 flag set by default in it's ini file so it won't attempt to read anything from your custom assets folder
 
Karadoc, thanks for the continued work on Kmod, still having fun playing it. I noticed you buffed the German UB, and thank you for that, I've always thought it needed a buff.

I don't think balance tweaks are your favourite changes to make and I think the game needs tons of them. The few that you have made has improved the game considerably, such as the serfdom buff and panzer buff. The buff to the Celtic Dun was genius.


If I had to think of 2 balance changes that would really improve the game I would look at lumber mills and machine guns. Right now machine guns are vulnerable to cavalry, which I think is wrong. In Civ we see the advantage swing from the defender to the attacker and back again, and it's a cycle. I believe Firaxis meant for MG's to bring in a new defensive era, as they did in real life. These defensive windows make the game more interesting (like when longbows appear), otherwise every game would end with catapults. MG's do a good job of stopping infantry, they should also get a bonus vs mounted units, that way you need artillery to take them on. The fact that they lose to cavalry just means I never build them and if the AI ever does I just laugh at him and storm his MG's with my horses.

The other change that I think would add to the game would be allowing lumbermills earlier on, that way people wouldn't always chop everything... there would be an interesting strategic decision to be made. They could be allowed at guilds, for example, or machinery, or engineering. Does the AI ever build them, by the way? I don't recall really seeing any in AI lands.
 
[*]Completely redesigned the automatic assigning of worked plots and specialists in cities. (This will be an improvement for AI and for automated cities.)

You mean... now my emphasize commerce cities won't pick scientists when out of plots to use? They'll pick merchants? Or am I just projecting a fantasy?
 
@BlitzCon
No, emphasize commerce means emphasizing commerce, not gold. Gold is what commerce ist turned into when the slider is down.

From what I've seen of the new design, it is both better and worse than the old system. I've seen it assign other specialists after I had already forced a particular type and there were still open spots for that type, thus unnecessarily polluting my GPP pool. On the other hand, when gold multipliers in a particular city are bigger than the science multipliers, you can expect it to assign merchants instead of scientists.

My personal fantasy is a different one. In a recent game (already with the new design) I again spent far too much time microing my many coastal cities to keep them from growing onto coast tiles. I even worldbuildered away my lighthouses, but still they kept growing onto coast instead of working the workshops I had built. In my humble opinion, cities should only do that in slavery, when food is emphasized, or when there is much happiness to spare.

Anyway, I haven't looked at the code, but I can imagine how hard it must be to improve things in that regard without changing the interface. The city screen with its mere handful of emphasis buttons is a definite weak point of the game.
 
Karadoc, thanks for the continued work on Kmod, still having fun playing it. I noticed you buffed the German UB, and thank you for that, I've always thought it needed a buff.

If I had to think of 2 balance changes that would really improve the game I would look at lumber mills and machine guns. Right now machine guns are vulnerable to cavalry, which I think is wrong. In Civ we see the advantage swing from the defender to the attacker and back again, and it's a cycle. I believe Firaxis meant for MG's to bring in a new defensive era, as they did in real life. These defensive windows make the game more interesting (like when longbows appear), otherwise every game would end with catapults. MG's do a good job of stopping infantry, they should also get a bonus vs mounted units, that way you need artillery to take them on. The fact that they lose to cavalry just means I never build them and if the AI ever does I just laugh at him and storm his MG's with my horses.

**Improve worker AI to take account of the effect on farms that are irrigated by a particular tile, before changing the tile away from a farm**

Yeah Karadoc is awesome! I going to start playing the new patch tomorrow!

What I did was give drill1 and drill 3, a +5% vs mounted, in my own games. This is sort of a protective (archer, longbow) buff and sort of a machine gun directed buff. I'd also love for the ai to use farms more efficiently, maybe they would use serdom more? :D

So excited to possibly get my butt kicked from a new smarter ai :D.

Thanks Karadoc!
 
From the changelog: Tech trades in which the receiving player is more than 2/3 of the way through researching the tech or when the tech is behind the 'game era' no longer count towards tech trade memory. ie. They don't contribute to causing "we fear you are becoming too advanced".

Also from the changelog: The average game era no longer counts the barbarian's era.

Is that feature working for anyone? It's been bugging me for a while, but I always assumed I had miscounted or something. However, in my last game, the first tech I got traded was Alpha. At that point I had met all AIs and all of them had Alpha. Since Alpha is a classical era tech, this ought to have changed the 'game era' to classical, right? After that I went on to trade for Math (another classical era tech) and a handful of ancient era techs. That's when Pacal announced "We fear your are becoming too advanced." Bug? Removed feature? Outdated changelog? Or is there a problem on my end?
 
It looks like the previous era still counts as recent:
Spoiler :
Code:
// K-Mod only adjust tech_from_any memory if this is a tech from a recent era
// and the team receiving the tech isn't already more than 2/3 of the way through.
// (This is to prevent the AI from being crippled by human players selling them lots of tech scraps.)
// Note: the current game era is the average of all the player eras, rounded down. (It no longer includes barbs.)
bool bSignificantTech =
GC.getTechInfo((TechTypes)trade.m_iData).getEra() >= 
GC.getGame().getCurrentEra()[color=red]-1[/color] &&
GET_TEAM(GET_PLAYER(eToPlayer).getTeam()).getResearchLeft((TechTypes)trade.m_iData) > 
GET_TEAM(GET_PLAYER(eToPlayer).getTeam()).getResearchCost((TechTypes)trade.m_iData) / 3;
Due to the -1. Anyway, that's the only potential cause I can see in the code.
I haven't played a game with v1.43 yet. <-- Edit: Never mind that remark. Somehow I had thought this was a change in the most recent version.
 
f1rpo is right about the WFYABTA thing. That quoted bit of code is the relevant part. So I guess the code is not quite consistent with the statement in the changelog. I guess one of them should be changed... but I'm not sure which!

I actually did remember that the previous era still counted as 'significant' in the current rules; but I'm somewhat undecided as to what the rules should be. The whole system of WFYABTA is a bit crude really, but I do think there need to be something in place to discourage rampant tech trading.

As for the citizens plot system thing. Disappointingly, there are still a few problems with it that will need to be corrected; included the fact that existing specialists aren't reassigned when the player chooses to start "forcing" specialists.

I'm can't really work on it right now, but I might be able to get those things (and some other stuff mentioned in this thread) fixed after a week or so.

I've also finally found and eliminated some OOS bugs in random events. OOS bugs are extremely difficult to track down, and these particular bugs tend to only surface when two players are using different operating systems. Anyway, those were bugs that have existed all through Beyond the Sword, and they will finally be fixed in the next version of K-Mod.
 
You'd think Firaxis used a bunch of interns/or are severely understaffed or something to write the code + carry out the QA/QC for the entire Civ series, when compared to what Karadoc as 1 guy, (and all the other awesome modders) can do with their dedication and free time.
 
If you're going at the citizen system again, maybe you could look into creating another wealth project (in addition to the one unlocked by currency) which would make the city focus on producing gold. That would save so much time.
 
About tech trading, why not just make available later? maybe at paper or education. just my 2 cents

I myself have to say that later tech trade sound terrible. Less tech oriented leaders usually need that tech-trade to stay relevant. I don't even want to think about how screwed Japan would be if paper was required for trade. No offence, just my two cents.
 
I actually did remember that the previous era still counted as 'significant' in the current rules; but I'm somewhat undecided as to what the rules should be. The whole system of WFYABTA is a bit crude really, but I do think there need to be something in place to discourage rampant tech trading.

As far as tech trading goes, ideally each AI would do their decision case-by-case basis (depending on tech, on trade partner, on trade benefit). Giving a tech has many risks involved (boosting a harmful opponent) and some benefits (boosting a harmless opponent). Receiving a tech has benefits only, unless other AIs/players consider you more of a threat if you have some tech..

I would imagine that most parts of diplomacy are rather crude here to begin with. Friendliness levels, counting attitude modifiers (and showing them to the player) and probably much more.

With the crude rules, I'd say the earlier era should still count. That way there won't be any tricky relevant era transitions.
 
I've also finally found and eliminated some OOS bugs in random events. OOS bugs are extremely difficult to track down, and these particular bugs tend to only surface when two players are using different operating systems.

COOOOL! Just had one them (using WinXP and Win7) last week. Now only the 48 civ dll is waiting to be compiled (or I spend some to learn to do it myself finally;) )
 
I agree that tech should spread in some way for most of the game.

I've thought about ways to improve tech trades, e.g. trades only yielding partial progress towards a tech and cooldown periods in between trades. While that's got to be better than the current system, I can't come up with an implementation that sounds entirely convincing (even) on paper. I'd now tend towards disabling tech trading, and fleshing out the tech diffusion mod. Well, I doubt such major changes are a (current) consideration for K-Mod anyway.

On a different note, I've been reading through the AI code that governs war and peace, and came across two possible bugs in CvTeamAI.cpp:

Spoiler :
Code:
// K-Mod
else
{
	if (gTeamLogLevel >= 1)
	{
		logBBAI("      Team %d (%S) abandoning WARPLAN_LIMITED against team %d (%S) after %d turns with enemy power percent %d", getID(), GET_PLAYER(getLeaderID()).getCivilizationDescription(0), eLoopTeam, GET_PLAYER(GET_TEAM(eLoopTeam).getLeaderID()).getCivilizationDescription(0), AI_getWarPlanStateCounter(eLoopTeam), iEnemyPowerPercent );
	}
}
// K-Mod end
Looks like it could be missing
Code:
AI_setWarPlan(eLoopTeam, NO_WARPLAN);
and

Edit: Don't know about this second one anymore. It's a strange piece of code. Numerous conditions seem justifiable. Never mind, I guess.
Code:
// All alone in what we thought was a dogpile
if (AI_getWarPlan(eLoopTeam) == WARPLAN_DOGPILE)
{
	if (GET_TEAM(eLoopTeam).getAtWarCount(true) == 1)
	{
		int iOurValue = AI_endWarVal(eLoopTeam);
		int iTheirValue = GET_TEAM(eLoopTeam).AI_endWarVal(getID());
		[color=red]if ((iTheirValue > (iOurValue / 2)))[/color]
		{
			if( gTeamLogLevel >= 1 )
			{
				logBBAI("  Team %d (%S) making peace due to being only dog-piler left", getID(), GET_PLAYER(getLeaderID()).getCivilizationDescription(0) );
			}
			makePeace(eLoopTeam);
			continue;
		}
	}
}
We should continue war only if their peace value is much higher than ours, and, conversely, make peace if their peace value is not much higher than ours. :crazyeye:
Code:
if(iTheirValue < 2 * iOurValue) makePeace(eLoopTeam);
 
Top Bottom