junsumoney
Chieftain
- Joined
- Mar 6, 2014
- Messages
- 18
In order to make your mod compatible with EUI, it seems there is only a need for:
-- instruct users to remove CityView.lua, CityView.xml, CityView_small.xml and UnitPanel.lua files from your mod
-- remove lines 2744 to 2776 from your CityView.lua, and add the following code to the end of NewCorruptionRule.lua:
Please note I have not tested any of this (time...) so it actually may not work as isCode:GameEvents.CitySoldBuilding.Add( function( playerID, cityID, buildingTypeID ) local player = Players[ playerID ] local city = player and player:GetCityByID( cityID ) if city then if buildingTypeID == GameInfoTypes.BUILDING_CITY_HALL_LV0 or buildingTypeID == GameInfoTypes.BUILDING_CITY_HALL_LV1 or buildingTypeID == GameInfoTypes.BUILDING_CITY_HALL_LV2 or buildingTypeID == GameInfoTypes.BUILDING_CITY_HALL_LV3 or buildingTypeID == GameInfoTypes.BUILDING_CITY_HALL_LV4 then print("City Hall sold! Set Puppet!") -- city:SetNumRealBuilding(GameInfoTypes.BUILDING_CONSTABLE,0) city:SetNumRealBuilding(GameInfoTypes.BUILDING_CONSTABLE_I,0) -- city:SetNumRealBuilding(GameInfoTypes.BUILDING_POLICE_STATION,0) city:SetNumRealBuilding(GameInfoTypes.BUILDING_POLICE_STATION_I,0) city:SetNumRealBuilding(GameInfoTypes.BUILDING_POLICE_STATION_II,0) -- city:SetNumRealBuilding(GameInfoTypes.BUILDING_BARRACKS,0) -- city:SetNumRealBuilding(GameInfoTypes.BUILDING_ARMORY,0) -- city:SetNumRealBuilding(GameInfoTypes.BUILDING_ARSENAL,0) -- city:SetNumRealBuilding(GameInfoTypes.BUILDING_MILITARY_BASE,0) city:SetPuppet(true) city:SetProductionAutomated(true) -- if not player:HasPolicy(GameInfoTypes.POLICY_TREATY_ORGANIZATION) then city:ChangeResistanceTurns(city:GetPopulation()*0.5) -- end --selling anti-corruption will disable its function elseif buildingTypeID == GameInfoTypes.BUILDING_CONSTABLE then city:SetNumRealBuilding(GameInfoTypes.BUILDING_CONSTABLE_I,0) elseif buildingTypeID == GameInfoTypes.BUILDING_POLICE_STATION then city:SetNumRealBuilding(GameInfoTypes.BUILDING_POLICE_STATION_I,0) city:SetNumRealBuilding(GameInfoTypes.BUILDING_POLICE_STATION_II,0) end end end)
Cheers
Is there a difference between EUI and EUI for Community Patch? Because I tried what you did in your post and everything works except all the yield resource icons are food.
When I look at a tile, all the gold, hammer, faith, culture is replaced with icon of food, so it looks like it's all food when the tile actually gives gold, hammer, etc.