UltimatePotato
Chieftain
Turns out it is possible to do after all 
[make_dummies.lua]
[dummies.xml]
[dummyclass.xml]
This is a little script I managed to put together that gives +1
per unemployed citizen. The principle is, if you have 1 unemployed citizen, it spawns one building with +1 tourism. If you have 7 unemployed citizens, it spawns one building with +1 tourism, one building with +2 and one with +4. If you have 20 unemployed citizens it spawns one building with +4, and one with +16, and so on. It currently goes up to a maximum of +255
per city. Completely unnecessary, I know, but 9 unique buildings form a nice square that looks better in the civilopedia. It can easily be modified to do whatever you want.
Unfortunately the following must be done for any building to add tourism:
[replace unique]
This operation must be done, or the buildings will not produce tourism. The tourism dummy will be invisible, except in your civilization's unique building civilopedia table. The non-tourism dummy will always be invisible though (BUILDING_DUMMY_UNEMPLOYED adds +1
, so unemployed citizens effectively consume half as much food).
So there you have it. I hope you find this helpful

[make_dummies.lua]
Spoiler :
Code:
local sCitizen = GameInfo.Specialists.SPECIALIST_CITIZEN.ID;
local bDummy = GameInfoTypes.BUILDING_DUMMY_UNEMPLOYED;
local bDummy1 = GameInfoTypes.BUILDING_DUMMY_TOURISM_1;
local bDummy2 = GameInfoTypes.BUILDING_DUMMY_TOURISM_2;
local bDummy4 = GameInfoTypes.BUILDING_DUMMY_TOURISM_4;
local bDummy8 = GameInfoTypes.BUILDING_DUMMY_TOURISM_8;
local bDummy16 = GameInfoTypes.BUILDING_DUMMY_TOURISM_16;
local bDummy32 = GameInfoTypes.BUILDING_DUMMY_TOURISM_32;
local bDummy64 = GameInfoTypes.BUILDING_DUMMY_TOURISM_64;
local bDummy128 = GameInfoTypes.BUILDING_DUMMY_TOURISM_128;
function toBits(num)
-- returns a table of bits, least significant first.
t={} -- will contain the bits
while num>0 do
local rest=math.fmod(num,2)
t[#t+1]=rest
num=(num-rest)/2
end
return t
end
--Define DummyFromUnemployed function
function DummyFromUnemployed(iPlayer, pPlayer)
local pPlayer = Players[iPlayer];
if (pPlayer:IsAlive()) then
if (pPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_YOURCIV) then --or whatever your trigger is
for pCity in pPlayer:Cities() do
--local cCitizen = pCity:GetSpecialistCount(sCitizen);
local num = pCity:GetSpecialistCount(sCitizen);
toBits(num)
pCity:SetNumRealBuilding(bDummy, num);
pCity:SetNumRealBuilding(bDummy1, t[1]);
pCity:SetNumRealBuilding(bDummy2, t[2]);
pCity:SetNumRealBuilding(bDummy4, t[3]);
pCity:SetNumRealBuilding(bDummy8, t[4]);
pCity:SetNumRealBuilding(bDummy16, t[5]);
pCity:SetNumRealBuilding(bDummy32, t[6]);
pCity:SetNumRealBuilding(bDummy64, t[7]);
pCity:SetNumRealBuilding(bDummy128, t[8]);
end
end
end
end
function DummyFromUnemployedTurnStart(iPlayer, pPlayer)
--print ("Turn Trigger")
local pPlayer = Players[iPlayer]
local bIsTurnStart = true
DummyFromUnemployed(iPlayer, pPlayer)
end
function DummyFromUnemployedDirty()
local iPlayer = Game.GetActivePlayer()
local pPlayer = Players[iPlayer]
if pPlayer:IsTurnActive() then
--print ("Swap Trigger")
local bIsTurnStart = false
DummyFromUnemployed(iPlayer, pPlayer)
end
end
GameEvents.PlayerDoTurn.Add(DummyFromUnemployedTurnStart)
Events.SerialEventCityInfoDirty.Add(DummyFromUnemployedDirty)
Spoiler :
Code:
<GameData>
<Buildings>
<Row>
<Type>BUILDING_DUMMY_TOURISM_1</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_1</BuildingClass>
<TechEnhancedTourism>1</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_1</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT1</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_1</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_1</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_2</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_2</BuildingClass>
<TechEnhancedTourism>2</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_2</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT2</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_2</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_2</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_4</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_4</BuildingClass>
<TechEnhancedTourism>4</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_4</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT4</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_4</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_4</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_8</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_8</BuildingClass>
<TechEnhancedTourism>8</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_8</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT8</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_8</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_8</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_16</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_16</BuildingClass>
<TechEnhancedTourism>16</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_16</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT16</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_16</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_16</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_32</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_32</BuildingClass>
<TechEnhancedTourism>32</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_32</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT32</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_32</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_32</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_64</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_64</BuildingClass>
<TechEnhancedTourism>64</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_64</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT64</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_64</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_64</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
<Row>
<Type>BUILDING_DUMMY_TOURISM_128</Type>
<BuildingClass>BUILDINGCLASS_DUMMY_TOURISM_128</BuildingClass>
<TechEnhancedTourism>128</TechEnhancedTourism>
<!--These four make it invisible -1, -1, -1 and NULL respectively-->
<GreatWorkCount>-1</GreatWorkCount>
<FaithCost>-1</FaithCost>
<Cost>-1</Cost>
<PrereqTech>NULL</PrereqTech>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_128</Description>
<Civilopedia>BUILDINGCLASS_DUMMY_TOURISM_TEXT128</Civilopedia>
<Strategy>TXT_KEY_BUILDING_DUMMY_TOURISM_STRATEGY_128</Strategy>
<Help>TXT_KEY_BUILDING_DUMMY_TOURISM_HELP_128</Help>
<MinAreaSize>-1</MinAreaSize>
<NeverCapture>true</NeverCapture>
<HurryCostModifier>0</HurryCostModifier>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
</Buildings>
</GameData>
Spoiler :
Code:
<GameData>
<BuildingClasses>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_1</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_1</Description>
<NoLimit>true</NoLimit> --I know the nolimit isn't necessary but I keep it in anyway
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_2</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_2</Description>
<NoLimit>true</NoLimit>
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_4</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_4</Description>
<NoLimit>true</NoLimit>
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_8</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_8</Description>
<NoLimit>true</NoLimit>
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_16</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_16</Description>
<NoLimit>true</NoLimit>
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_32</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_32</Description>
<NoLimit>true</NoLimit>
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_64</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_64</Description>
<NoLimit>true</NoLimit>
</Row>
<Row>
<Type>BUILDINGCLASS_DUMMY_TOURISM_128</Type>
<Description>TXT_KEY_BUILDING_DUMMY_TOURISM_128</Description>
<NoLimit>true</NoLimit>
</Row>
</BuildingClasses>
</GameData>
This is a little script I managed to put together that gives +1


Unfortunately the following must be done for any building to add tourism:
[replace unique]
Spoiler :
Code:
<Civilization_BuildingClassOverrides>
<Row><!--Override a building with itself. It will make the dummies visible, but it's the only way to make tourism work-->
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_1</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_1</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_2</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_2</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_4</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_4</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_8</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_8</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_16</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_16</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_32</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_32</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_64</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_64</BuildingType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
<BuildingClassType>BUILDINGCLASS_DUMMY_TOURISM_128</BuildingClassType>
<BuildingType>BUILDING_DUMMY_TOURISM_128</BuildingType>
</Row>
</Civilization_BuildingClassOverrides>

This operation must be done, or the buildings will not produce tourism. The tourism dummy will be invisible, except in your civilization's unique building civilopedia table. The non-tourism dummy will always be invisible though (BUILDING_DUMMY_UNEMPLOYED adds +1

So there you have it. I hope you find this helpful
