K-Mod: Far Beyond the Sword

Just starting to rebuild my own personal kitchen sink mod on top of K-Mod rather than BUG / BULL / BBAI. At this point I have done the basic merge of BUG / BULL / K-Mod and was testing this before I started adding all the clutter that I typically use. So far all seems to be running smoothly, but BULL calls CvGameTextMgr::getEspionageString which contains the following assertion:

PHP:
FAssertMsg(false, "obsolete function. (getEspionageString)"); // K-Mod

I have only just started with K-Mod so haven't learnt my way around it yet. I have had a look and can't see an obvious candidate for the code that obsoletes this method and was wondering if you could point me in the right direction. I realise that this is an informational message and not an error so can be safely ignored, but I would like to understand why it is obsolete.

Cheers
 
I think there are normally some other concerns that go along with extending the playercount, but I happen to be messing around with the latest K-Mod DLL, so here's a recompile with 48 civs crudely, haphazardly enabled. Let me know if it works!
 

Attachments

  • K-Mod 1.42b Modified 48Civ CvGameCoreDLL.zip
    1.6 MB · Views: 78
Not sure what the Ai was thinking here...I declared war on neighbor, and stole his worker.

After that he had a warrior and settler, and he founded a city and then moved the warrior back to his capital, leaving his expansion city Umung empty.

I can leave an earlier save if need be.
 

Attachments

  • Example.CivBeyondSwordSave
    95.7 KB · Views: 31
Great mod - I must congratulate you, the AI is much smarter - they don't let you build your economy easily, and they attempt badass invasions that often succeed.

Also, could you add the 'Cease Bothering Me' option in diplomacy? I think it was there in RevolutionDCM. The AI makes often unreasonable demands (asking for expensive techs for free) and the gets pissed of at me, resulting in almost the entire world being annoyed at me. Or maybe you could make the 'You didn't help us' and 'You refused to stop trading with our worst enemy" modifiers expire quicker.
 
Is there a way to make the ai less likely to submit to an apostalic edict (stop the war against our brother and sisters of the faith in particular) if they are heavily winning a war?

Ive stopped about 3 or 4 major wars by just telling them to stop with the apostalic palace...

I think Ill look in the leaderheadinfos and see if there is anything there...
 
Is there a way to make the ai less likely to submit to an apostalic edict
This decision is defined in the DLL in CvPlayerAI::AI_diploVote(). If you search for else if (GC.getVoteInfo(eVote).isForcePeace()) you will jump to the relevant section. Karadoc has heavily modified the code here. The key section is the one below
Spoiler :
PHP:
bool bWantsToEndWar = (kOurTeam.AI_endWarVal(ePeaceTeam) > (3*GET_TEAM(ePeaceTeam).AI_endWarVal(getTeam()))/2);
bValid = bWantsToEndWar;

if( bValid )
{
	bValid = bWinningBig || (iWarsWinning > iWarsLosing) || (kOurTeam.getAtWarCount(true, true) > 1);
}

if (!bValid && bThisPlayerWinning && (iWarsLosing >= iWarsWinning) && !bPropose )
{
	if( !kOurTeam.isAVassal() )
	{
		if( (kOurTeam.getAtWarCount(true) == 1) || bLosingBig )
		{
			// Can we continue this war with defiance penalties?
			if( !AI_isFinancialTrouble() )
			{
				int iDefyRand = GC.getLeaderHeadInfo(getPersonalityType()).getBasePeaceWeight();
				iDefyRand /= (bAggressiveAI ? 2 : 1);

				if (GC.getGame().getSorenRandNum(iDefyRand, "AI Erratic Defiance (Force Peace)") == 0)
				{
					bDefy = true;
				}
			}
		}
	}
}
The thing to see from this is in order to defy the resolution it has to think that ending the war isn't 50% more valuable for it than for the peace team. If it passes this check there are more checks, but the applicable ones to your question are that it must only be in one war or losing
PHP:
if( (kOurTeam.getAtWarCount(true) == 1) || bLosingBig )
There is a check against the LeaderHeadInfo iBasePeaceWeight XML value, but it will not get this far if it is winning the war against the target team.
 
I basically ended 3 wars when I had about 25 infantry not close to my borders against their two stacks of 60+ infantry and 30 cav and 30 cannon. Not to mention their complete naval blockade with more advanced ships.

I did have two vassals with small armies though? Think that matters?

Maybe if I lower the defy resolution penalties? Will the dll take those changes into account?
 
It may sound counter-intuitive but the AI will only consider defying the resolution if it is in a single war or losing overall in all its wars. I believe the logic is that if it is losing then it probably has territory it wants to win back. If the AI was in another war with someone else then it wouldn't get as far as checking for penalty costs.
 
Karadoc, great mod Its the only one I use. I think one thing that needs work is the colony system. I would suggest that each civ spawns civs of the same culture/race. Maybe also have unhappy cities on other continents revolt and spawn a new civ? Also over time your colonies should break off from you if they get more powerful than you or don't like you anymore. These are just some suggestions on a system that I loved but always thought needed work. Thanks
 
Karadoc, great mod Its the only one I use. I think one thing that needs work is the colony system. I would suggest that each civ spawns civs of the same culture/race. Maybe also have unhappy cities on other continents revolt and spawn a new civ? Also over time your colonies should break off from you if they get more powerful than you or don't like you anymore. These are just some suggestions on a system that I loved but always thought needed work. Thanks


That would be a good idea. Demands for independence should be proportional to distance from palace, population, nationality % and the civics you run (bureaucracy would increase demands). That would be pretty similiar to Revolutions though. Leoreth is also planning on adding a new colony independence system to RFC DoC.
 
Fixing the colony mechanic is probably beyond the scope of Kmod. It's a horribly broken mechanic and would need a complete overhaul.
 
^^ but how does that make it worthwhile to establish a colony? It never really improves one's position in the game, as it's almost always better to just keep the cities for yourself. The one exception I can even think of is in a terra map if you have a huge head start to colonizing the new world you might make your first 4-5 cities a colony simply to deny that land to your rivals. Even then, the problem is that your colony won't really do much for you. The problem is that the colony doesn't really treat you all that different than the other civs. You can trade research but it will trade with everyone, and you can have trade routes but it will do that with everyone. You can demand resources but it will trade resources with everyone. The one thing that it will do is join your side in a war but you'd have to wait a very long time for your colony to develop itself to the point where it would actually make a meaningful contribution to said war.

Colonies are basically the same as vassal states when it comes to economic benefits (which are almost nothing) and I don't think that's right. There are good reasons to take a vassal even if it doesn't directly benefit one's economy but a colony is very expensive to create. I think colonies should provide more direct economic benefits. Limiting a colony to only trading with its master would be a start.
 
Reducing maintenence fees for cities on different continents is another suggestion. I agrre with your suggestion aswell. Maybe a colonist unit that builds cities with some basic buildings to help them start off. Could be unlocked at astronomy. There should be a gold bonus sent each turn from your colonies. Spain shipped large amounts of gold from its colonies in the new world among other resources. I play the perfect world script on marathon which almost always has a unpredictable new world. I think the exploration and land grab at astronomy is the best part of te game and k-mod makes for the best experiance in my opinion. The only thing that needs working is the colony system. Hopefully someone is up to te task :)
 
I usually forget the option to colonize even exists in the game, because it's disabled when vassal states are disabled -- and I usually play with vassal states disabled. Why? Because they're clunky.

The main reason? Spontaneous new war/peace with an enemy due to vassaling. The worst is when a nearly-completely-destroyed foe vassalizes under someone else, anyone else, who just isn't me, and it results in peace. That should probably be considered a declaration of war by the vassalizing nation.

I don't recall: is creating a colony a vassal, or a permanent alliance? I believe it's the former, and it might be better if it were the latter, where you share research, and so on. I guess that would eliminate the chance of them breaking free, though.

Vassal state and colony mechanics are definitely something that could be approached by K-Mod within its scope.
 
Was it just me, or did steam release a patch for civ4 recently? Some of the xml seems changed.

It over-wrote alot of the changes I made to the base folder...kinda pissed.
 
Top Bottom