Update GEF_Data.xml

My friend and I play the mod a lot. These are our attempt at some changes we'd like to see.

I'm new to modding. I'm sorry for... um. Everything. In advance.

Change suggestions as I've tried to implement them:

Reliquary is a bit too strong, we think, and could stand to be dropped to 250 faith per GP. I can't remember if we added that to this file or not/

Religious Idols is rarely worth taking compared to other, similar pantheons; even if your starting area has a lot of gold or silver, the surrounding tiles never seem to have any. Additionally, it doesn't make sense that only these two materials would be used in making such idols. We suggest expanding the effects to include Copper, Marble, Gold, Silver, Pearls, and Gems.

One With Nature isn't even worth taking as Spain (or Bouddica, in beta). We suggest upping the yield to two.

Additionally, we think that One With Nature could add a science yield to forest and a food + production yield to mountains. This would make settling near mountains additionally desirable, and make the situations where One With Nature is useful more common. We're not sure on the numbers for this, so we used 1.

Swords to Ploughshares is extremely limited in value. Selecting it as a belief is already an opportunity cost; it forces you to additionally suffer an opportunity cost for going to war. Another mod sets this to add hammers to barracks / armory, but I think it would be interesting if this added military experience to food buildings.

Harvest Festival is a simple pantheon belief we found in another mod; it adds faith to wheat and granaries. I think it would be additionally interesting if it added a faith to farms, to add a parallel to religious settlements. This one might contain a number of errors... even though the idea comes from another mod, I wrote the code here myself, as the mod I found it in used Harvest Festival to replace Fertility Rites. 

I'm also using ideas we found in another religious mod, most notably adding three beliefs. One is a founder belief that gives faith on capturing a city. The next is a belief that gives population when the religion spreads to a foreign city. The last gives lump sums of culture on spreading. I have LUA files for these, but I'm not entirely sure how to include them here. Another modder, Machiavellii, wrote these and I modified them so that their numbers make sense in Communitas.

-- Crusades
-- Author: Machiavelli
-- DateCreated: 8/14/2012 6:59:10 PM
--------------------------------------------------------------
function Crusades(hexPos, playerID, cityID, newPlayerID)
	local player = Players[newPlayerID];
	local eReligion = player:GetReligionCreatedByPlayer();
	local plot = Map.GetPlot(ToGridFromHex(hexPos.x, hexPos.y));
	local city = plot:GetPlotCity();
	
	if(eReligion < 1) then
		return;
	end

	-- Does the new religion have the belief
	local hasBelief = false;

	for i,v in ipairs(Game.GetBeliefsInReligion(eReligion)) do
		local belief = GameInfo.Beliefs[v];

		if (belief ~= nil and belief.ID == GameInfoTypes["BELIEF_CRUSADES"]) then
			hasBelief = true;
		end
	end

	-- Only run this if the player's founder belief is crusades, the city has a religion, and the city is of a different religion
	if (hasBelief and plot:IsCity() and 0 < city:GetReligiousMajority() and eReligion ~= city:GetReligiousMajority()) then
		-- Convert half the heathens
		city:ConvertPercentFollowers(eReligion, city:GetReligiousMajority(), 25);

		-- Give bonus Faith
		local bonusFaith = 250;
		local adjustedBonusFaith = (bonusFaith * GameInfo.GameSpeeds[Game:GetGameSpeedType()].FaithPercent) / 100; -- Adjust the size of the bonus based on the game speed
		player:ChangeFaith(adjustedBonusFaith);

		-- Send a notification to the player
		local text = Locale.ConvertTextKey("TXT_KEY_CRUSADE_NOTIFICATION_BODY", tostring(adjustedBonusFaith), city:GetName());
		local header = Locale.ConvertTextKey("TXT_KEY_CRUSADE_NOTIFICATION_HEADING");
		player:AddNotification(NotificationTypes.NOTIFICATION_GENERIC, text, header);
	end
end
Events.SerialEventCityCaptured.Add(Crusades);

#########################

-- Religious Migration
-- Author: Machiavelli
-- DateCreated: 8/12/2012 9:34:24 PM
--------------------------------------------------------------
function ReligiousMigration(iOwner, iX, iY, eOldReligion, eNewReligion, bFirstConversion)
	local plot = Map.GetPlot(iX, iY);
	local city = plot:GetPlotCity();

	-- Does the new religion of the city have the belief
	local hasBelief = false;
	for i,v in ipairs(Game.GetBeliefsInReligion(eNewReligion)) do
		local belief = GameInfo.Beliefs[v];

		if (belief ~= nil and belief.ID == GameInfoTypes["BELIEF_RELIGIOUS_MIGRATION"]) then
			hasBelief = true;
		end
	end

	-- Don't continue if the religion doesn't have the belief
	if(not hasBelief) then
		return;
	end

	-- Find the founding player
	local founder = nil;
	for indexPlayer = 0, GameDefines.MAX_MAJOR_CIVS-1 do
		local player = Players[indexPlayer];

		-- If this player is the founder
		if(eNewReligion == player:GetReligionCreatedByPlayer()) then
			founder = player;
		end
	end

	-- Only give bonus if it is a foreign city converting for the first time
	if(founder ~= nil and founder:IsAlive() and founder:GetCapitalCity() ~= nil and
		founder:GetID() ~= iOwner and bFirstConversion) then
		-- Give population
		founder:GetCapitalCity():ChangePopulation(1, true);
	end

end
LuaEvents.CityAdoptsReligionEvent.Add(ReligiousMigration);

--[[
function ReligiousMigration(iOwner, eReligion, iX, iY)
	local plot = Map.GetPlot(iX, iY);
	-- Error check, if this isn't a city don't continue
	if(not plot:IsCity() or plot:GetPlotCity():GetReligiousMajority() < 1) then
		return;
	end
	
	local city = plot:GetPlotCity();

	-- Does the majority religion of the city have the belief
	local hasBelief = false;
	for i,v in ipairs(Game.GetBeliefsInReligion(city:GetReligiousMajority())) do
		local belief = GameInfo.Beliefs[v];

		if (belief ~= nil and belief.ID == GameInfoTypes["BELIEF_RELIGIOUS_MIGRATION"]) then
			hasBelief = true;
		end
	end

	-- Don't continue if the religion doesn't have the belief
	if(not hasBelief) then
		return;
	end

	-- Find the founding player
	local founder = nil;

	for indexPlayer = 0, GameDefines.MAX_MAJOR_CIVS-1 do
		local player = Players[indexPlayer];

		-- If this player is the founder
		if(eReligion == player:GetReligionCreatedByPlayer()) then
			founder = player;
		end
	end

	-- If we found the player who founded the religion, they are alive and the city hasn't given a bonus before
	if(founder ~= nil and founder:IsAlive() and not city:IsHasBuilding(GameInfoTypes["BUILDING_RELIGIOUS_MIGRATION"])) then --GameInfo.Building["BUILDING_RELIGIOUS_REFORMATION"].ID
		-- Always mark the city
		city:SetNumRealBuilding(GameInfoTypes["BUILDING_RELIGIOUS_MIGRATION"], 1);

		-- If the city is foreign, give the bonus Culture
		if(founder:GetID() ~= iOwner and founder:GetCapitalCity() ~= nil) then
			founder:GetCapitalCity():ChangePopulation(1, true);
		end
	end
end
GameEvents.CityConvertsReligion.Add(ReligiousMigration);
--]]

#########################

-- Religious Reformation
-- Author: Machiavelli
-- DateCreated: 8/12/2012 9:34:24 PM
--------------------------------------------------------------
function ReligiousReformation(iOwner, iX, iY, eOldReligion, eNewReligion, bFirstConversion)
	-- Does the new religion of the city have the belief
	local hasBelief = false;
	for i,v in ipairs(Game.GetBeliefsInReligion(eNewReligion)) do
		local belief = GameInfo.Beliefs[v];

		if (belief ~= nil and belief.ID == GameInfoTypes["BELIEF_RELIGIOUS_REFORMATION"]) then
			hasBelief = true;
		end
	end

	-- Don't continue if the religion doesn't have the belief
	if(not hasBelief) then
		return;
	end

	-- Find the founding player
	local founder = nil;
	for indexPlayer = 0, GameDefines.MAX_MAJOR_CIVS-1 do
		local player = Players[indexPlayer];

		-- If this player is the founder
		if(eNewReligion == player:GetReligionCreatedByPlayer()) then
			founder = player;
		end
	end

	-- Only give bonus if it is the first time the city has converted
	if(founder ~= nil and founder:IsAlive() and bFirstConversion) then
		local bonusCulture = 250;
		-- Adjust the size of the bonus based on the game speed
		local adjustedBonusCulture = (bonusCulture * GameInfo.GameSpeeds[Game:GetGameSpeedType()].CulturePercent) / 100;
		-- Give the culture
		founder:SetJONSCulture(founder:GetJONSCulture() + adjustedBonusCulture);
	end
end
LuaEvents.CityAdoptsReligionEvent.Add(ReligiousReformation);
--[[
function ReligiousReformation(iOwner, eReligion, iX, iY)
	local plot = Map.GetPlot(iX, iY);
	-- Error check, if this isn't a city don't continue
	if(not plot:IsCity() or plot:GetPlotCity():GetReligiousMajority() < 1) then
		return;
	end
	
	local city = plot:GetPlotCity();

	-- Does the majority religion of the city have the belief
	local hasBelief = false;
	for i,v in ipairs(Game.GetBeliefsInReligion(city:GetReligiousMajority())) do
		local belief = GameInfo.Beliefs[v];

		if (belief ~= nil and belief.ID == GameInfoTypes["BELIEF_RELIGIOUS_REFORMATION"]) then
			hasBelief = true;
		end
	end

	-- Don't continue if the religion doesn't have the belief
	if(not hasBelief) then
		return;
	end

	-- Find the founding player
	local founder = nil;

	for indexPlayer = 0, GameDefines.MAX_MAJOR_CIVS-1 do
		local player = Players[indexPlayer];

		-- If this player is the founder
		if(eReligion == player:GetReligionCreatedByPlayer()) then
			founder = player;
		end
	end

	-- If we found the player who founded the religion, they are alive and the city hasn't given a bonus before
	if(founder ~= nil and founder:IsAlive() and not city:IsHasBuilding(GameInfoTypes["BUILDING_RELIGIOUS_REFORMATION"])) then --GameInfo.Building["BUILDING_RELIGIOUS_REFORMATION"].ID
		-- Always mark the city
		city:SetNumRealBuilding(GameInfoTypes["BUILDING_RELIGIOUS_REFORMATION"], 1);

		local bonusCulture = 50;
		-- Adjust the size of the bonus based on the game speed
		local adjustedBonusCulture = (bonusCulture * GameInfo.GameSpeeds[Game:GetGameSpeedType()].CulturePercent) / 100;
		-- Give the culture
		founder:SetJONSCulture(founder:GetJONSCulture() + adjustedBonusCulture);
	end
end
GameEvents.CityConvertsReligion.Add(ReligiousReformation);
--]]