[MOD] Assimilation

Kael

Deity
Joined
May 6, 2002
Messages
17,401
Location
Ohio
Assimilation
Version 2

[TAB]Assimilation adds 2 new game variant options and 4 challenge modes to the game. Outside of that nothing in the game has been changed. In fact if these options are selected int he custom game menu when the game is started it will play exactly as a normal game of Beyond the Sword.

They are as follows:


Game Variant Options:

Assimilation: With this option selected captured cities retain their original build abilities. So if you capture an Egyptian city you will be able to build War Chariots (Egyptian UU) and Obelisks (Egyptian UB) in it. If you capture a Roman city you can build Praetorians and Forums in that city. Captured cities will not be able to build your real civilization units and buildings, so if you are playing as Babylon and you capture an Egyptian city you won't be able to build Bowmen (Babylonian UU) in it. You can now build diverse empires where samurai are trained in your Japonese holdings while your German territories enjoy the benifits of their Assembly Plants.

[TAB]I've also add a text tag to the city bar stating a cities civilization if it doesn't match the players civilization to make it easy to see what a cities civilization is.

Flexible Difficulty: With this option selected the difficulty level is checked every 20 turns. If the players rank (by score) is int he top third then the difficulty is increased. If the players score is in the bottom third, then the game difficulty is decreased. This can cause the difficulty level to go anywhere between settler and deity. Single player only.


Challenge Mode Options:

Barbarian World: The barbarians start the game with a free city for every player in the game.

Final Five: Every 50 turns the lowest ranked player is removed from the game until there are only 5 players remaining.

High to Low: Become the player with the highest score, then you switch to controlling the civilization with the lowest score. Raise that civilization to have the highest score and you will be switched again to civilization with the lowest score. That third civilization will be the one you have to win the game with. Single player only.

Increasing Difficulty: Every 50 turns the difficulty level is increased by 1 until it reaches deity.


[TAB]Enjoy the Mod, I probably won't be spending much time updating or supporting this. Modders are encouraged to use this and incorporate it into their own mods if they find it helpful, I only ask to be credited if you use it. All of the source code is contained with the download.


Requirements:

[TAB]Civilization IV: Beyond the Sword version 3.17 or later.


Download:

[TAB]Assimilation version 2.0


Updates:
07/07/2008
[TAB]Included a CtD fix (fix by MatzeHH).
07/12/2008
[TAB]Fixed an issue where Barbarian cities kept their old nationality (so they couldn't build any UU's or UB's)
[tab]Fixed an issue that caused cities to be "assimilated" even if the game option was disabled.
07/14/2008
[tab]Added a new installer that detects the install location
10/13/2008
[tab]Added the Flexible Difficulty game option
[tab]Added the Challenge- Barbarian World game option
[tab]Added the Challenge- Final Five game option
[tab]Added the Challenge- High to Low game option
[tab]Added the Challenge- Increasing Difficulty game option


Installation Instructions:

[TAB]Run the Assimilation.exe file. It will pull the install location from the registry and should install correctly and place an icon on your desktop.


Screenshot

[TAB]In the attached screenshot you can see that I am playing as Babylon but I have captured an egyptian city (Memphis). I am now building the Babylon UU (Bowman) in my capital and the egyptian UU (War Chariot) in the captured egyptian city.
 

Attachments

  • Assimilation.jpg
    Assimilation.jpg
    364.9 KB · Views: 3,004
So is this ever coming to FFH (I know it doesnt look it by your post) :king: Or even better to the ancient med. mod?


Edit: Ok i would have to agree about FFH after thinking about it more. But for TAM now that would be a good match.
 
Very good idea, Kael! This is a great idea for a modcomponent. We may incorporate this into TAM! :)
 
Very good idea, Kael! This is a great idea for a modcomponent. We may incorporate this into TAM! :)

Thats really good news. I think TAM is perfect for this sort of option.
 
this is actually quite perfect for a couple things I'm working on too. Thanks a lot. :thumbsup:
 
Nice but I think unique units should remain unique for each nation. If I understand you correctly, you can now build UU's in assimiliated' nations Barracks. It would be more realistic if your troops build in an assimilated city only gain the default bonus promotion belonging to the UU of the assimilated city's original owner.

I.e., the Dutch have the Fluyt as UU which starts with a sentry promotion. Now the Russians assimilated my coastal city of Zierikzee and all Russian naval units build in Zierikzee will from now on gain the sentry promotion. However, the Russians cannot build a Fluyt.
 
I like the idea. Good job and thank you.
 
Is anyone else getting CTDs? It might be because I patched the game wrong.

Just wondering.
 
:scan: We are the borg. Resistance is futile. You will be assimilated. :scan:


:assimilate:


Sorry. I absolutely had to.
 
I think this makes even more sense in FfH than in Vanila. Having a captured elven city build elven units or an Amurite city that cranks out firebows and powerful adepts would make keeping captured cities that much better. Maybe the Unique Building would not be buildable, but would stay in the city when captured.
 
Is anyone else getting CTDs? It might be because I patched the game wrong.

Just wondering.

My game froze when I clicked a city bar and tried to change production (without entering city screen). I needed to restart the PC to get out of it.

BTW, the idea is quite fabulous. I agree that it makes sense in FfH even more than in vanilla.
 
Oatse
I found a repeatable crash bug when you switch production from one building to another (like when I switched from building a warrior to building a lighthouse).
It's the kind where you have to alt tab out of the game to select a dumping option rather then just a plain CtD.

Kalimakhus
This issue is related to Assimilation as I experienced it when I tested Assimilation as stand-alone mod. In my case I wasn't even able to Alt-Tab out of BTS. I needed to restart the PC.

Assimilation will CTD I added your mod into beginning and it will ctd. I removed it for now, hope you can fix it because I do like the idea you have here.
 
Very interesting, I'll check it out.
 
Hey, Kael, I love the idea behind this mod! I'm definitely going to make another version of Cultural Diversity just so I can include this (default Cultural Diversity doesn't change the vanilla rules).
 
Very interesting, I'll check it out.

The problem occurs in CvDLLWidgetData:doTrain (doConstruct).
You have to make sure that widgetDataStruct.m_iData2 is valid.

This code should do it:
Code:
void CvDLLWidgetData::doTrain(CvWidgetDataStruct &widgetDataStruct)
{
	UnitTypes eUnit;

	//Assimilation Start
	//eUnit = ((UnitTypes)(GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationUnits(widgetDataStruct.m_iData1)));
	
	if (widgetDataStruct.m_iData2 != FFreeList::INVALID_INDEX)
	{
		eUnit = ((UnitTypes)(GC.getCivilizationInfo(GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCity(widgetDataStruct.m_iData2)->getCivilizationType()).getCivilizationUnits(widgetDataStruct.m_iData1)));
		gDLL->sendPushOrder(widgetDataStruct.m_iData2, ORDER_TRAIN, eUnit, false, false, false);
	}
	else
	{
		eUnit = ((UnitTypes)(GC.getCivilizationInfo(GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCity(gDLL->getInterfaceIFace()->headSelectedCitiesNode()->m_data.iID)->getCivilizationType()).getCivilizationUnits(widgetDataStruct.m_iData1)));
		GC.getGameINLINE().selectedCitiesGameNetMessage(GAMEMESSAGE_PUSH_ORDER, ORDER_TRAIN, eUnit, -1, false, gDLL->altKey(), gDLL->shiftKey(), gDLL->ctrlKey());
	}
	//Assimilation End

	gDLL->getInterfaceIFace()->setCityTabSelectionRow(CITYTAB_UNITS);
}



void CvDLLWidgetData::doConstruct(CvWidgetDataStruct &widgetDataStruct)
{
	BuildingTypes eBuilding;

	//Assimilation Start
	//eBuilding = ((BuildingTypes)(GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationBuildings(widgetDataStruct.m_iData1)));

	if (widgetDataStruct.m_iData2 != FFreeList::INVALID_INDEX)
	{
		eBuilding = ((BuildingTypes)(GC.getCivilizationInfo(GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCity(widgetDataStruct.m_iData2)->getCivilizationType()).getCivilizationBuildings(widgetDataStruct.m_iData1)));
		gDLL->sendPushOrder(widgetDataStruct.m_iData2, ORDER_CONSTRUCT, eBuilding, false, false, false);
	}
	else
	{
		eBuilding = ((BuildingTypes)(GC.getCivilizationInfo(GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCity(gDLL->getInterfaceIFace()->headSelectedCitiesNode()->m_data.iID)->getCivilizationType()).getCivilizationBuildings(widgetDataStruct.m_iData1)));
		GC.getGameINLINE().selectedCitiesGameNetMessage(GAMEMESSAGE_PUSH_ORDER, ORDER_CONSTRUCT, eBuilding, -1, false, gDLL->altKey(), gDLL->shiftKey(), gDLL->ctrlKey());
	}
	//Assimilation End

	if (isLimitedWonderClass((BuildingClassTypes)(widgetDataStruct.m_iData1)))
	{
		gDLL->getInterfaceIFace()->setCityTabSelectionRow(CITYTAB_WONDERS);
	}
	else
	{
		gDLL->getInterfaceIFace()->setCityTabSelectionRow(CITYTAB_BUILDINGS);
	}
}

Matze
 
Top Bottom