UB conquest

Discussion in 'Civ5 - Creation & Customization' started by Arlokk, Jun 27, 2016.

  1. Arlokk

    Arlokk Chieftain

    Joined:
    Aug 12, 2013
    Messages:
    29
    Location:
    Russian Federation
    There is STEAM mod
    https://steamcommunity.com/sharedfiles/filedetails/?id=369840407

    but it have a problems - player can conquest only 1 UB of other civ`s and this UB is buggy - their buildingclass not working. For example lf you conquer arabia and build bazaar, you can't build next building 'bank'.

    So, i try other way - create a special buldingclass for all UB and separate them, for example:
    New Bazaar only give gold from oasis and extra-luxury and give to city free-building market.
    But this is not ideal.

    Maybe people from civfanatics have idea, how solve this (Conquest UB) in other ways?

    P.S. Sorry for my bad english language.
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    7,241
    Location:
    Illinois, USA
    As I understand how CUB works, it creates a series of copycat versions of the game's civilization-unique buildings, and adds them to the database each within their own building-class?

    • This will never work for making the copy-cat version of the civilization-unique building satisfy the condition of any entry in the table <Building_ClassesNeededInCity> where the original civilization-unique building belongs to a class of building specified within a row for <BuildingClassType>. Adding the copy-cat version of the buildings' Building-Classes to table <Building_ClassesNeededInCity> as in something like this:
      Code:
      <Building_ClassesNeededInCity>
      	<Delete BuildingType="BUILDING_HEROIC_EPIC" />
      	<Delete BuildingType="BUILDING_ARMORY" />
      	<Row>
      		<BuildingType>BUILDING_ARMORY</BuildingType>
      		<BuildingClassType>BUILDINGCLASS_BARRACKS</BuildingClassType>
      	</Row>
      	<Row>
      		<BuildingType>BUILDING_ARMORY</BuildingType>
      		<BuildingClassType>BUILDINGCLASS_CUB_KREPOST</BuildingClassType>
      	</Row>
      	<Row>
      		<BuildingType>BUILDING_ARMORY</BuildingType>
      		<BuildingClassType>BUILDINGCLASS_CUB_IKANDA</BuildingClassType>
      	</Row>
      	<Row>
      		<BuildingType>BUILDING_HEROIC_EPIC</BuildingType>
      		<BuildingClassType>BUILDINGCLASS_BARRACKS</BuildingClassType>
      	</Row>
      	<Row>
      		<BuildingType>BUILDING_HEROIC_EPIC</BuildingType>
      		<BuildingClassType>BUILDINGCLASS_CUB_KREPOST</BuildingClassType>
      	</Row>
      	<Row>
      		<BuildingType>BUILDING_HEROIC_EPIC</BuildingType>
      		<BuildingClassType>BUILDINGCLASS_CUB_IKANDA</BuildingClassType>
      	</Row>
      </Building_ClassesNeededInCity>
      Simply will not work because <Building_ClassesNeededInCity> works as an "ANDS" table, and this sort of thing would make the Armory require a city to have one building in a city from each of the Building-Classes BUILDINGCLASS_BARRACKS, BUILDINGCLASS_CUB_KREPOST, and BUILDINGCLASS_CUB_IKANDA
    • Similar issues will pertain to National Wonders and table <Building_PrereqBuildingClasses>
    • The only effective way I see to deal with these issues is by eliminating all data in these two tables and handling everything these two tables normally do via lua and CityCanConstruct events. This also means that the SQL of the CUB mod needs to be perfect in its triggers to eliminate any occurance of new buildings added to the game's database which are also writing to either of table <Building_ClassesNeededInCity> or <Building_PrereqBuildingClasses> -- by this I mean the triggers must intercept and eliminate new <Rows> in these two tables. The inherent flaw in this approach (which may very well be insurrmountable) is how to track and manage the data all these buildings would otherwise have with the two tables because you need to the data available to you from these two tables in order to create the needed lua to handle the functions these two tables normally fill -- and you cannot build the lua from these tables until after all SQL and XML changes to the game's database are made and 'set', at which point you are no longer able to delete the contents of <Building_ClassesNeededInCity> and <Building_PrereqBuildingClasses>. So maybe this idea is no idea after all.
    • Adding the copy-cat buildings as additional versions of Markets (for example) within the BUILDINGCLASS_MARKET does not work because the game is coded at the dll level and UI-panel lua-level in so many places to only want a city to have the correct Building from within a Building-Class as specified within tables <BuildingClasses> (for the default Building) and <Civilization_BuildingClassOverrides> (for the proper unique-version of a Building for a particular civilization). The game does not want to give, nor see, any other Building from within that class within a city belonging to Civilization_X. And in many many cases for effects made by buildings, the game refuses to implement such effects for any building which is not correct within its class for Civilization_X. And within a particular Building-Class, there can only be one Building at a time within the game's database that is set as being 'correct' for Civilization_X.
     
  3. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,557
    Location:
    Near Portsmouth, UK
    Before deleting the data (either initially or via triggers), copy the data into parallel tables. These parallel tables can then be used by a data-driven Lua handler.
     
  4. Arlokk

    Arlokk Chieftain

    Joined:
    Aug 12, 2013
    Messages:
    29
    Location:
    Russian Federation
    Spoiler :
    http://dropmefiles.com/6GdWS


    There is test mod. Test UB for conquest - Arabian Bazaar (not look at stats, it only blanc UB for testing purposes). All work properly, but it is a ton of buildings in city screen (bcoz all UB separate from
    "normal buildings") in future. Just only XML edit.
     

Share This Page