[SDK MODCOMP] Influence Driven War

I have a question about pillaging. Does pillaging a resource give the same influence as pillaging a town, or more? Because one can pillage a town 4 times but only pillage a resource once, and so it seems like one could accumulate alot more influence on a town square than a resource square and end up taking alot of worthless tiles after pillaging the town square completely, but not acquire the resource square at all because of the pillage limitation on it. Or does the mod take this into account and give more influence per pillage action for a square that can only be pillaged once vs. one that can be pillaged many times?
 
Moctezuma,

I noticed in CvUnit.cpp, under void CvUnit::updatePlunder(int iChange)
you have a bunch of new code that isn't commented under Influence Driven War.

Is this part of the mod, or something extra you put in the SDK files?
 
I only now discovered this... all I can say is un-be-liev-ab-le. You definitely get five starts for this one. I can already see huge potential for a World War II scenario... Great work!! :thumbsup:
 
I have encounted some performance issues when running this DLL. The problem isn't your code, it's the way the Firaxis code deals with culture. What happens is that in a large war where you capture several cities the culture gets all mixed up (good thing) from the fighting, when you have more than two civs fighting in an area it gets even more mixed up (also a good thing). However, somewhere Firaxis has to be iterating over every tile to look at culture so what happens is that the game starts to really slow down. The slowdown will disappear as soon as you eliminate the opposing civ and their influence is removed from every tile.

One thing you could do is change it so that the cultural influence only affects tiles where you already have influence. This would preserve most of the effect your mod has on borders. Or, if you have no influence in the tile but you have > 50% in an adjacent tile it could still work. And, of course, cities would need to be an exception, perhaps forts as well. Alternatively, you could iterate over ever tile yourself and decay influence in tiles not adjacent to those where you have > 50% influence. That wouldn't speed things up during the war but it would allow things to return to normal after the war without either side being eliminated entirely.
 
Check original post for BTS 3.13 compatible version!


Thank everybody for your feedback.

@Seven05
You are right. After many wars can mixed culture cause slowdowns especially on large and huge maps. Maybe disabling pillage influence will help performance a little: open xml file and set IDW_PILLAGE_INFLUENCE_ENABLED to 0.

Your suggested changes are great and very well thought out (maybe 50% culture requirement is too high). I'm now thinking how to implement them. Yes, city plot must be exception; otherwise city capture will be impossible due my rules.
 
For me, the 3.13 version is crashing on load...

Same here.


For the most part, the v3.03 code and the v3.13 code look the same, except in CvUnit.cpp, where it looks like you added something about Blitz attacks in the v3.13 version?
 
I took the v3.03 version, and merged it in with vanilla v3.13 SDK files, and it compiled smoothly. I was also able to start a game up without crashing. Maybe that Blitz addition is screwing something up?

I'll test it out more and see if anything bad happens. :)



Well, played until 1 AD on Marathon with the DLL I compiled from v3.03, and no issues. :)
 
Sorry I made a mistake. An old DLL file (for BTS 3.03) was inside BTS 3.13 version. It should be fixed now ;)

@Grave
That new code is just small fix for following problem in Vanilla: if you attack with stack of units and some your unit in stack withdraws from combat, it is still selected and therefore your stack cannot attack any longer without manual unselecting.

I made an exception for blitz units that can still move because they can attack in the same turn again.
 
Moctezuma,

I noticed this small difference between you CvUnit.cpp and the vanilla CvUnit.cpp for v3.13. The code highlighted red was in your CvUnit.cpp and not the vanilla one:

Code:
//update graphics models
m_eLeaderUnitType = pWarlord->getUnitType();
[COLOR="Red"]gDLL->getInterfaceIFace()->removeFromSelectionList(this);[/COLOR]
reloadEntity();

I also noticed this in CvUnit.cpp:

Code:
bool CvUnit::verifyStackValid()
{
	[COLOR="Red"]if (plot()->isVisibleEnemyUnit(this) && !isSpy())[/COLOR]
	{
		return jumpToNearestValidPlot();
	}

	return true;
}

This is the vanilla v3.13 for that:

Code:
bool CvUnit::verifyStackValid()
{
	[COLOR="red"]if (plot()->isVisibleEnemyUnit(this))[/COLOR]
	{
		return jumpToNearestValidPlot();
	}

	return true;
}

I didn't see any comment tags around it, so I wasn't sure if this was part of your code or not?
 
This mod rocks. It's really added to the gameplay, I wish fireaxis would have incorporated this in base BTS, it's great.

I'd love to see this combined with the revolutions mod, but I don't know how to compile stuff, should learn C++. Anyway awesome job, and thanks for keeping this updated with the unofficial patch.
 
Back
Top Bottom