• Civilization 7 has been announced. For more info please check the forum here .

K-Mod: Far Beyond the Sword

@charles
awhile ago i would have agreed with you but i'm very happy with the current implementation of city governor/ specialists (v1.36). productive tiles always seem to get worked before specialists are assigned as far as i can see. anyway, it's not like specialists are useful only for GP production.
i certainly hope karadoc sticks with the current set-up :)

you're hardly running an older version? or have emphasize GP turned on in city screen? speaking of, have you tried automating civilians/ emphasizing production/ food/ whatever you want, maybe that would help?

@karadoc

i notice you have some MapFinder stuff present, are you going to enable this in future or is it just a left over from BUG?

speaking of future plans, k-mod seems pretty tight mow, bugs/crashes/oos are almost a thing of the past. at least i havn't met anything in awhile and judging by posts in this thread, the same is true for most other site regulars. so i was wondering what, if any, plans you have for the project? if indeed you wish to share them.

actually i think i'll create a thread for this, try to get people talking.
 
No, Im running 1.36 and ofc NOT selecting focus on gp points lol. I have not tried using focus on production/food extensively to be confident in them.

The only other excuse I can think of, is that I play philosophic civs, so maybe the governor over uses them, if thats case? (greater perceived benefit etc)

I dont think thats it, but maybe.

I could micro jsut my cap for GP or ALL my cities, every time they grow, to prevent wasteful gp points/loss of production.

Seems like a no brainer to me.

BTw Im also in favor of a single super thread rather than wasting Karadoc's energy keeping up with multiple threads.
 
BTw Im also in favor of a single super thread rather than wasting Karadoc's energy keeping up with multiple threads.

ha, fair enough. im a fan of idle chitchat, unreasoned debate and ill-informed conjecture however;)
sure karadoc doesn't even have to respond to most things, looking at even the last page i can see plenty of the board's heavyweights and knowledgeable posters. and perhaps on a large single thread, direct questions to karadoc like yours might be lost if there's a subsequent page-long discussion on something of less import. muliple threads can help seperate the wheat from the chaff i think.

besides which, i like just generally discussing things i've an interest in, despite lacking the technical skills to contibute something meaningful, eg k-mod:)

i do get though that some people prefer a forum/thread to be more quality over quantity. and i get the feeling that karadoc probably agrees with your take on it.
 
Updates/problems/details?
No, to all three. No news.

--
On the topic of tech costs & tech 'trade value':
And another small question. If I play team with another human against solo computer AIs. Is there everything correct with the cost of techs when negotiating tech trades?
Because tech costs are doubled for teams, there might be a bug when the tech costs are compared between teams and non teams.

As far as i remember team games are supposed to work that way. So if both of u research the same tech it will have normal research cost. If u guys want to discover 2 different techs then they are more expensive (2x). Someone should confirm this.

@en_dotter
Yes, that's absolutely right. Techs in teams cost double, so if both are researching the same everything is ok.
My question was, if the doubled cost is reversed to single cost during tech trading. So if we trade aesthetics as a team with an AI to get Alphabet, the tech costs should be the same?

I've been thinking about this since TheOnlyDJCat first posted the question, and today I was just about ready to make the change. ie. I was going to change it so that the increase in tech research cost due to being part of a team is not taken into when evaluating trade, so that although tech would take more :science: to research they would not be more expensive to trade for when the AI. (whereas currently they are both more expensive to research and more expensive to buy). I think TheOnlyDJCat is right that each tech should essentially be worth the same to each team; rather than each beaker being worth the same to each team, which is how it currently works.

I'd only make this change for the team-size modifier. I'd still let the handicap modifier be factored into the trade value; so that players on high difficulty levels can only get poor deals when trading with the AI. It's unfair, but that's just part of what playing on a high difficulty level is about.

However... when I was about to make this change, I discovered that things were quite as we thought. TheOnlyDJCat and En_Dotter, and I all thought that the tech cost was proportional to the number of players, so that a 2 civ team would have double the tech cost of a 1 civ team. It turns out this is not the case. The actual increase in tech cost is defined by TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER, which is set to '50' in the current xml. ie. Techs cost 150% for a 2 civ team; not 200%.

This throws a spanner in my thinking. It would make sense to me for techs to cost 100% more for each civ on the team, because a two civ team would have roughly twice as much :science: per turn available to them compared to a one civ team, and so on. So I was surprised when I saw it was only 50%.

I'm thinking now that I might do the following:
  • Increase TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER from 50 to 100.
  • Removed the effect of TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER completely when evaluating trades.
  • When signing a permanent alliance mid-game, unfinished research should stay proportionally the same. (eg, if a tech is 50% complete with 2000:science: of progress, it should stay at 50% completion when the permanent alliance is created rather than staying at 2000:science:)

These changes would make permanent alliances much slower in terms of researching techs themselves, but it would give them a much greater ability to trade for techs with the AI. More importantly, I think the changes would make the rules more intuitive and fair.

But is there something I've overlooked? Is there some big reason to not make this change?

----

I was wondering if you could cause the automatic pop growth "selector" to NEVER make a citizen become a specialist, when a city cant then produce a great person in, say, 30 or less turns.

Basically I get most, if not all of my great persons from my cap. Yet, every turn, I have to fight with my numerous cities that grow, switching citizens constantly from producing a couple great person points back to actually productive tiles. I do play philosophic civs but still, this seems to be getting very micro heavy and seems like it should be very simple.

If you wont patch it, perhaps you could throw me some tips to avoid it.

I dont want specialists unless I, myself, and me, want that city to produce them! Ninja cities constantly sneaking in specialists that might make a great person in 200 turns!! Arghhhh.
There are a lot of things which affect how the city governor will choose to assign jobs. Cities will tend to start using specialists when they are at (or close to) their maximum happiness or healthiness, or when the non-specialist jobs are very poor. In my experience, if there are good plots to work, and the city is not close to the happiness cap, then cities will work the plots rather than the specialists. -- You're right that playing as a philosophical civ will make the governor more likely to use specialists, because of the :gp: multiplier, but that will only affect the :gp: component of the specialist evaluation. The :gp: value is scaled down quite quickly if you have another city producing far more :gp: points per turn. So... if you turn on emphasize :gp: in one city, then you may find that decreases the number of specialist assigned in your other cities - if not, then the specialists are probably being assigned so that your city doesn't go above the happiness cap.

I understand that the governors decisions won't always be what the player wants. In general I think it's working pretty well, but only for some players. There was an issue posted on the K-Mod github page basically asking for more governor control, and you're essentially suggesting the addition of an 'avoid great people' button. By the sounds of things, there is some interest in having a complex system for controlling the automation of the cities. But I don't intend to work on any such controls in the near future. I'm much more likely to work on improving the way the automation works in general, so that human players and AI players can both benefit from the improvements.

Manual micro-management will always be required for the absolute optimal jobs assignment, because no matter how many settings the governor has, it can never really know exactly what the player wants. Any additional fine-control governor settings would just put us somewhere between the current system of roughly-guided automation, and manual micro-management. I'm worried that such settings would only rarely be useful, and that for most people in most situations they'd just add confusion and clutter to the UI; at least, it might be cluttered and confusing if the system is not carefully designed and implemented... and I'm not personally keen to take on the work of carefully designing and implementing controls like that because I personally think it would only be marginally useful.

One thing I have been thinking about though is removing the "avoid growth" button. The city governor already understands that they shouldn't try to grow the city above the happiness cap, and so the "avoid growth" AI effect is kind of implied. However, unlike the rest of the emphasis buttons in the city panel, the "avoid growth" button actually has a unique effect on the game-mechanics: it doesn't just tell the governor to avoid working food plots. It actually prevents the city from growing regardless of how much food the city has. In my view, this effect is unintuitive and bizarre. .. So I'm thinking of removing that button and replacing it with something else; perhaps emphasize culture or something like that. (or 'avoid great people'!)

--

i notice you have some MapFinder stuff present, are you going to enable this in future or is it just a left over from BUG?
That stuff was just left over from when I put the first BUG stuff into the mod. I don't currently intend to enable it; partially because I just have no interest in using it - but also because I suspect it might be a bad idea to 'legitimize' regenerating the map for strong starting position. I don't think picking the map should be part of the strategy of the game - I think players should play the start they've been dealt - and I think having an automated system for searching for strong starts would discourage players from trying to play on (apparently) weak starts. -- So in some sense not implementing the MapFinder is laziness / indifference from me, but on the other hand it could be considered to be a gameplay decision...
 
After writing that post, I think I've realized why TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER is only 50 rather than 100: it's a kind of fudge-factor to balance the world-wide tech rate in team based games.

Here's an example to illustrate what I'm talking about: Imagine a 'duel' size map, which has just two players. Imagine that the two players each have around half the map under their control, and that they are mostly peaceful. -- These players will often research the same techs as each other, but sometimes they'll trade. And so in terms of the world-wide tech rate, some techs are researched twice (200% cost), and some are only researched once (100% cost).

If these two players were actually on the same team, we're still want the world-wide tech rate to be roughly the same. So if we had 200% cost for each tech, that would slow the world-wide tech rate down. The 150% cost that the game currently has is just a rough guess as to what the tech cost should be to keep the overall tech rate the same.

I think all that is fine for the world-wide tech rate, but it still leaves us with the balance problem when there are different size teams playing in the same game. I maintain that it would probably be better if the tech cost was proportional to the number of civs on the tech (ie. 100% per player), and if this cost increased was not applied to trade value... So I suppose that in addition to the changes I described in my previous post, I'll need to do one more thing to maintain the current scaling of world-wide tech rate.

I thing the best way to do it would be to scale up the tech cost for all teams based on how many teams there are in the game compared to the default number of teams for the given map size. ie. If the default number of teams is 6, but there are only 3 teams - we'd then estimate that the average number of civs per team must be 2, and so we'd increase the cost of all techs for all teams by 50% to be consistent with the original rules. This could be done either based on the number of teams at the very start of the game, or it could be based on the number of teams currently (so that if one team is eliminated mid-game, tech costs go up). ... I'd be inclined to base the scaling on the starting conditions only.
 
Thanks for all your hard work, its been fun playing civ 4 using k-mod.

1. I was wondering if you might consider adding a box to remove nuclear weapons when creating a custom game. ICBM spamming by the AI can be annoying, but that might only be a problem for me since I play on huge maps with lots of resources and enchanted started conditions (units, gold and tech for all). Its a valid strategy but its a bit to blunt for my taste.

2. Is the AI prevented from targeting cities directly with nuclear weapons? It looks like they only hit the tiles around the city.

3. Do you have any plans/idea on improving the AI when they face units in forts on choke points on a map (all land paths are blocked). They tend to attack with stacks that cant do enough damage and only gives my units xp. It feels like the follow a plan, but they have zero chance to win.
 
I think your example with the two players in a duel map is not quite fair.
If we want to compare the tech rate of a 1 vs 1 game with a team game, we have to compare with 2 vs 2, not 2 vs 0.
For example if only one player plays solo the overall tech rate would also double (200%), as it should be in the case of a 2 vs 0. So I do not understand why it should be reduced to 150%.

If we look at 2 vs 2 with an TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER of 100. We would have the same rate as 1 vs 1. Becuase every techcosts double but the team contributes 200% of the beakers.

I would assume, that the cause for the modifier value of 50 (instead of 100) might be to give a permanent alliance, which is formed during the game, some kind of additional bonus against the solo players, so they can research faster. But this is a problem when team games with different numbers of players per team at the start are created, and the same research algorithm as permanent alliances is used.
 
I think your example with the two players in a duel map is not quite fair.
If we want to compare the tech rate of a 1 vs 1 game with a team game, we have to compare with 2 vs 2, not 2 vs 0.
For example if only one player plays solo the overall tech rate would also double (200%), as it should be in the case of a 2 vs 0. So I do not understand why it should be reduced to 150%.

If we look at 2 vs 2 with an TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER of 100. We would have the same rate as 1 vs 1. Becuase every techcosts double but the team contributes 200% of the beakers.

I would assume, that the cause for the modifier value of 50 (instead of 100) might be to give a permanent alliance, which is formed during the game, some kind of additional bonus against the solo players, so they can research faster. But this is a problem when team games with different numbers of players per team at the start are created, and the same research algorithm as permanent alliances is used.
I agree that my 1v1 example was quite unrealistic. The only thing I wanted to illustrate was that some techs would be researched twice and some would be researched only once.

2v2 with double-tech cost is not the same as 1v1, because 2v2 is played on a larger map, and larger maps are scaled to have larger tech costs in general (to balance the more land will mean more :science: will be generated per turn); so 2v2 with TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER=100 would have a slower tech rate than 1v1.

1. I was wondering if you might consider adding a box to remove nuclear weapons when creating a custom game. ICBM spamming by the AI can be annoying, but that might only be a problem for me since I play on huge maps with lots of resources and enchanted started conditions (units, gold and tech for all). Its a valid strategy but its a bit to blunt for my taste.
I reckon nukes are an unbalanced part of the game; and I usually prefer to play without them - and some players really like them. I think it might be fair enough to have an option to simply disable them at the start of the game; but so far, I've been satisfied with my alternative approach for dealing with nukes - which is to just have the AI only rarely build the Manhattan project. So basically, if the human builds the Manhattan project, then nukes are on, and if they don't then... well... only AIs who are seriously focused on war - and who see significant advantage in nukes being enabled with build the Manhattan project. For my games, this has worked well. Nukes are hardly ever used - and I think it's good for variety that they might be used in any given game.

But as you say, maybe it doesn't work so well with your settings. I don't really know. What proportion of games would you estimate that the AI builds nukes? For my settings I'd say it's probably less than 10%.

2. Is the AI prevented from targeting cities directly with nuclear weapons? It looks like they only hit the tiles around the city.
The AI is not prevented from targeting cities. In fact, with ICBMs they will only target cities. The key thing to keep in mind though is that nuclear weapons have a blast-radius. The explosion hits 9 plots with equal impact, and so it is sometimes adventitious to target the plot adjacent to a city rather than directly on top of the city - it will still hit the city just as hard as before and it will also hit whatever other plots are adjacent to the plot at the center of the explosion. -- In the original BtS AI, they would alway aim directly at the city with their ICBMs, but in K-Mod they consider which of the adjacent plots would be the best place to aim. (If you've seen an example of the AI completely missing a city with an ICBM, let me know - it's almost certainly a bug. Note though that they won't always target cities with tactical nukes.)

3. Do you have any plans/idea on improving the AI when they face units in forts on choke points on a map (all land paths are blocked). They tend to attack with stacks that cant do enough damage and only gives my units xp. It feels like the follow a plan, but they have zero chance to win.
The current AI is quite bad at dealing with choke points which they cannot walk around; and although I'd like to fix it, I don't have any plans to work on it currently. It's actually a pretty tricky problems to solve given the current AI. :( I do have one idea in mind which may stop them from suiciding against the choke point in the way you described, but that particular idea might make the game run slower (at least, that's what I decided when I chose not to implement it ages ago... maybe I was wrong back then.)
 
Do you think it makes sense that if civ A and B are at war, and both have open borders with C, they can attack each other on C's territory? I've always thought that it's counterintuitive.
 
1. I hadn't actually thought of not building the Manhattan project, I just didn't think of never building it and let it be. I'll try your approach and see how it goes. Thanks for the tip :D

2. kk, it looks like it work as intended as far as I have seen.

As the writer of the mod you might be interested to know that the AI sometimes is good enough to use tactical nukes on choke point and attacking with units afterwards. Although I'm not sure if its because it was a choke point or that there was a lot of units on the plot.

3. Yeah I can understand that it might be quite a problematic situation since there has to be some kind of evaluation if the AI should attack or not and those calculations can easily slow the game down especially when there is large stacks involved. I think drill 4 units with high defensive bonuses are the most problematic challenge for the AI.
 
Karadoc,

You may want to look at the save which I attach. It looks like that a Zulu stack 2N from Lubeck got stuck in place: it hasn't been moving for many turns.
(Lubeck is on the eastern border of my empire, neat Aztec borders.)

Update: Two turns from the save Shaka DOWed me. I don't know, if it is possible, that this stack positioning was a part of war preparation. Still, it is unusual: his stack was standing on my territory and was clearly heading to Montie's land before it stopped.
 

Attachments

  • K - Boudica - 6.CivBeyondSwordSave
    825.7 KB · Views: 42
@Leoreth it probably is a bit unrealistic... I'm not going to change it though.

@Gavagay, thanks for the save. Shaka's stack was basically being stalled by a couple of weak defenders on that fort. On the line of code responsible for this problem, I'd actually written a comment to remind me that it might be problematic -- but I guess I just never came up with a good way to deal with the problem.

Here's the gist of what's happening: Shaka's stack is en-route to attack a city, but along the way it sees some couple of units that it can destroy with excellent odds -- Shaka's stack wants to kill these units while the opportunity is there, but he doesn't want to split up his stack.. so he just attacks until there is one defender left so that his stack stays intact.

Of course, after his done this, his stack can't move anymore until the next turn. Meanwhile, Monty can put another weak defender on the tile for Shaka to attack on the following turn. And so what ends up happening is that Shaka's entire 35 unit stack is being stalled in one place just so it can kill one or turn Monty units each turn.

Obviously it's poor strategy - but it isn't really easy to fix. The stack needs to be able to attack stray units which happen to be nearby - and it needs to be careful not to allow such stray units to lure the stack into a trap... but it also needs to not be stalled indefinitely by far weaker forces - which is what's happening in this example. :(

Anyway, I'll try to come up with something a bit better.
 
Two points:

1. The City Governor uses alot of great people when your city is one person below the happyness threshold, like 10 unhappyness with 11 sources of happyness. Would it be more efficient to change it to only using specialists (with a long long time to actually produce a great person) as the city grows to even unhappyness and sources of happyness (as a city grows to become 7 unhappy, 7 happy).

2. I have attached a save, shouldnt the ai have spread irrigation from the wheat to Debre Berhan (a city)? I havent changed the improvements from when I took the cities from the Ethiopians.
 

Attachments

  • forkaradoc.CivBeyondSwordSave
    891.8 KB · Views: 37
must subscribe to this ... looks awesome.

Do people MP with this?
 
Wow this latest game I got an early source of Marble and using great people to unlock techs (instead of using them as super specialists) is crazy good. Maybe thats where Ive been sucking at. I got a great merchant to unlock metal casting really early and then built Colossus with copper, got great prophet and unlocked theology to get the Apostolic palace.

Important question:
Whats the advantage of a watermill over a cottage or a workshop...seems like a bad middle ground...
 
Minor issue

Ai was gonna to plant a city somewhere and I took Varanasi...so the stack with the settler runs back into my territory and the settler doesnt stay in the stack.

Karadoc, let us know if you need help, like donations or testing specific things :D
 

Attachments

  • forkaradoc2.CivBeyondSwordSave
    494.4 KB · Views: 35
  • TurnBeforeforKaradoc2.CivBeyondSwordSave
    492.4 KB · Views: 51
1. The City Governor uses alot of great people when your city is one person below the happyness threshold, like 10 unhappyness with 11 sources of happyness. Would it be more efficient to change it to only using specialists (with a long long time to actually produce a great person) as the city grows to even unhappyness and sources of happyness (as a city grows to become 7 unhappy, 7 happy).
Well, it's not really as binary as that. There's nothing in the AI which says "use specialists when there is only 1 spare happiness" or anything like that. The way it works is that specialists are actually always roughly the same value, but the value of :food: depends on lots of different stuff, including how happiness the city has, and how good the unworked plots are, and stuff like that. The governor will be less interested in trying to grow the city if there are no good improvement available to work; and they'll generally slow down the growth when getting close to the happiness cap. -- So it isn't really a matter of saying 'use specialists only when at the happiness cap'; but rather it's a matter of tuning the way the unworked plots are evaluated, and tuning the target city size and target growth rate, and so on.

2. I have attached a save, shouldnt the ai have spread irrigation from the wheat to Debre Berhan (a city)? I havent changed the improvements from when I took the cities from the Ethiopians.

In that save, that wheat is already irrigated via the farm on the south side of the river (which spreads irrigation to the city plot). I have thought in the past that the 'emphasize irrigation' part of the AI's improvement evaluation probably should carry a bit more weight; but this particular situation looks fine to me.

must subscribe to this ... looks awesome.

Do people MP with this?
It is awesome ;), but I'm not sure how many people play MP with it. I play a local multiplayer game at my house almost every weekend - but that's probably not what you meant. There's a thread in this sub-forum asking if people want to set up a multiplayer game; there haven't been many responses. I'm not really sure if it's best to organize K-Mod multiplayer on this forum or on the general Civ4 multiplayer forum. -- In general, I reckon more people would play multiplayer K-Mod of there were more people playing multiplayer K-Mod... ie. I think it's pretty clear that the OOS fixes and so on mean that K-Mod is superior to standard BtS for multiplayer, but it doesn't have the critical mass of players required to get people to play it. :(

Important question:
Whats the advantage of a watermill over a cottage or a workshop...seems like a bad middle ground...
Basically I think you're right that its middle-ground between a cottage and a workshop. I wouldn't always say 'bad' middle-ground though. All of those improvement (cottages, workshops, and watermills) change throughout the game depending on techs and civics. I'd agree that for most of the game watermills are quite weak - essentially only useful if you really need some productivity, and you can't afford to reduce the food of the tile with a workshop. But towards the end of the game, watermills are actually quite good. They don't take time to grow like towns do, and they give some pretty big bonuses. With State Property, I'd even say watermills are the best improvement possible.

But I agree that for most of the game watermills are pretty weak; and the dynamics of the way they improve throughout the game are not really as interesting as windmills and workshops.

--
I haven't yet looked at the settler save thing, but I can say there are some situations in which the AI will deliberately ungroup their settler from its escort. -- I won't assert that it's always a smart thing to do; but I can at least say it isn't a bug.
 
Top Bottom