1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

[MOD] Assimilation

Discussion in 'Civ4 - Modpacks' started by Kael, Jul 2, 2008.

  1. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,400
    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.
     

    Attached Files:

  2. Avahz Darkwood

    Avahz Darkwood Chieftain

    Joined:
    Oct 26, 2001
    Messages:
    1,220
    Location:
    Behind You!!!!
    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.
     
  3. Circuit

    Circuit Writing Letters

    Joined:
    Aug 16, 2005
    Messages:
    1,927
    Location:
    United States
    I love the idea! All of a sudden, there's one uber-powerful civ throwing another civ's UUs against it!
     
  4. PotatoSamurai

    PotatoSamurai ChooseReligion enthusiast

    Joined:
    Aug 27, 2007
    Messages:
    168
    Location:
    Acworth, GA
    Wow, this is really cool. I know civfusion has a similar element using the Petra wonder, and I love.
     
  5. Shqype

    Shqype Shqyptar

    Joined:
    Nov 15, 2005
    Messages:
    2,468
    Location:
    New York + Shqypni
    Very good idea, Kael! This is a great idea for a modcomponent. We may incorporate this into TAM! :)
     
  6. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,400
    Location:
    Ohio
    Thats really good news. I think TAM is perfect for this sort of option.
     
  7. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    this is actually quite perfect for a couple things I'm working on too. Thanks a lot. :thumbsup:
     
  8. Hyronymus

    Hyronymus Chieftain

    Joined:
    Nov 25, 2003
    Messages:
    1,845
    Gender:
    Male
    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.
     
  9. Circuit

    Circuit Writing Letters

    Joined:
    Aug 16, 2005
    Messages:
    1,927
    Location:
    United States
    ^^ Nah.

    Maybe you could allow a city to build a UU only after the previous civ is destroyed.
     
  10. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Wow, nice one Kael. This I got to try. :band:
     
  11. jojoweb

    jojoweb Chimpa-Z

    Joined:
    Jun 6, 2004
    Messages:
    486
    Location:
    Lyon, France
    great idea ;)
     
  12. ruffriders23

    ruffriders23 Chieftain

    Joined:
    Jun 6, 2006
    Messages:
    399
    I like the idea. Good job and thank you.
     
  13. mice

    mice Moose

    Joined:
    Jan 26, 2006
    Messages:
    2,178
    Location:
    tundra
    Is anyone else getting CTDs? It might be because I patched the game wrong.

    Just wondering.
     
  14. Soduka

    Soduka Chieftain

    Joined:
    Sep 2, 2007
    Messages:
    289
    :scan: We are the borg. Resistance is futile. You will be assimilated. :scan:


    :assimilate:


    Sorry. I absolutely had to.
     
  15. Mesix

    Mesix Sweet Alex

    Joined:
    Mar 17, 2006
    Messages:
    4,242
    Location:
    Eggiweggs!
    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.
     
  16. Kalimakhus

    Kalimakhus Chieftain

    Joined:
    May 8, 2007
    Messages:
    1,249
    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.
     
  17. Roamty

    Roamty BTS

    Joined:
    Nov 30, 2005
    Messages:
    521
    Location:
    South Park
    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.
     
  18. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,400
    Location:
    Ohio
  19. Chuggi

    Chuggi Espada

    Joined:
    Jan 2, 2007
    Messages:
    2,369
    Location:
    Australia
    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).
     
  20. MatzeHH

    MatzeHH Chieftain

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    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
     

Share This Page