Gem 1.14 (Civup 2.6) Beta 2 Bugs

ruskyandrei

Warlord
Joined
Dec 11, 2009
Messages
144
Found a couple of bugs in my last game with the latest GEM beta:

1) Oligarchy doesn't seem to offer the 0.2 xp per turn stated in the tooltip. I had a 0 xp warrior in a city for over 20 turns and he was still at 0 xp.

2) Building the Machu Pichu wonder should give a mountain tile a large yield (5 food, 5 commerce, 5 science and 5 faith i think), but after building one I did not get any mountain tile with any yield.
Note: The building itself (the MachuPichu mountain grahpics) was placed on a mountain outside my borders for some reason. Not sure if this matters.

3) Not sure what is happening, or even if this is a vanilla bug but sometimes Military Caste doesn't seem to work.
In some cities, taking the garrison out seems to have no effect on my happiness and culture while in others it works as expected.
 
re:
1 - the XP doesn't show up on the unit, but it will/does get the XP; see what happens for you much later than the 20th turn
2 - I'd have to check, I've built it tons of times, but, embarrassingly, haven't made sure whether the yields come into effect. Did you try buying the tile the building is on?
3 - Can't explain the culture (sometimes these things aren't adjusted straight away in the infobar), but happiness might be because you're already at city max
 
1) Ok, I'll check that out some more
2) Yup, I did buy the tile after, still just a regular mountain with no yield.
3) That could be the case, thanks :D
 
3. Not sure if we're speaking of the right policy.
I seemed to see that the honor policy re garrisons no longer helped once a barracks was built.
Removing a garrison from a barracks city did not improve culture or happines.
 
4: I've got strange bug.

Always when I load save game, my all cities lost "Walls". :sad:
Now I see, AI also lost "Walls" after load game..


up: "Castle" also disappear after load game ;/
 
@legoras, do you have the most recent official patch?

It's possible there's a conflict between the beta's method of fixing the walls HP bonus disappearing with a save-reload bug and the method used by Firaxis in their patch and this is causing a problem. Thal created a save game function to save a list of defensive buildings, then destroy them, refresh the city HP to a correct level and rebuild them on reloading. It's possible it needs a turn to update which would be a further bug. I didn't test it that thoroughly pre-patch.
 
K. I would guess that's it then. I'll see if I can dig up the walls saving code in civup and see if disabling it fixes it.
 
Castle also disappear after load game. But these, 'free' from wonders not. ;/
 
It would be any defensive buildings. So it's not surprising it hits castles too. Arsenals and military bases will be also. Let you know if I find what needs disabled later. I was watching basketball all day yesterday. .;)

Update: It's in the MT_Utils.lua in CivUp.

Spoiler :
Code:
------------------------------------------------------------------
-- Game.CivupSaveGame(fileName)
-- Game.CivupLoadGame()
-- Fixes a bug causing defense buildings to not update city max health upon game load.
--
MapModData.Civup.DefenseBuildingsReal = MapModData.Civup.DefenseBuildingsReal or {}
MapModData.Civup.DefenseBuildingsFree = MapModData.Civup.DefenseBuildingsFree or {}

function Game.CivupSaveGame(fileName)
	for playerID, player in pairs(Players) do
		for city in player:Cities() do
			local cityID = City_GetID(city)
			if not MapModData.Civup.DefenseBuildingsReal[cityID] then MapModData.Civup.DefenseBuildingsReal[cityID] = {} end
			for buildingInfo in GameInfo.Buildings("ExtraCityHitPoints <> 0") do
				local numBuilding = city:GetNumRealBuilding(buildingInfo.ID)
				if MapModData.Civup.DefenseBuildingsReal[cityID][buildingInfo.ID] ~= numBuilding then
					MapModData.Civup.DefenseBuildingsReal[cityID][buildingInfo.ID] = numBuilding
					SaveValue(numBuilding, "MapModData.Civup.DefenseBuildingsReal[%s][%s]", cityID, buildingInfo.ID)
					--log:Info("Save %s %s", city:GetName(), buildingInfo.Type)
				end
				city:SetNumRealBuilding(buildingInfo.ID, 0)
				
				-- city:SetNumFreeBuilding core function not pushed to lua?!
				--MapModData.Civup.DefenseBuildingsFree[cityID][buildingInfo.ID] = city:GetNumFreeBuilding(buildingInfo.ID)
				--SaveValue(MapModData.Civup.DefenseBuildingsFree[cityID][buildingInfo.ID], "MapModData.Civup.DefenseBuildingsFree[%s][%s]", cityID, buildingInfo.ID)
				--city:SetNumFreeBuilding(buildingInfo.ID, 0)
			end			
		end
	end

	UI.SaveGame(fileName)

	for playerID, player in pairs(Players) do
		for city in player:Cities() do
			local cityID = City_GetID(city)
			for buildingInfo in GameInfo.Buildings("ExtraCityHitPoints <> 0") do
				city:SetNumRealBuilding(buildingInfo.ID, MapModData.Civup.DefenseBuildingsReal[cityID][buildingInfo.ID])
				--city:SetNumFreeBuilding(buildingInfo.ID, MapModData.Civup.DefenseBuildingsFree[cityID][buildingInfo.ID])
			end			
		end
	end
end

function Game.CivupLoadGame()
	for playerID, player in pairs(Players) do
		for city in player:Cities() do
			local cityID = City_GetID(city)
			if not MapModData.Civup.DefenseBuildingsReal[cityID] then MapModData.Civup.DefenseBuildingsReal[cityID] = {} end
			for buildingInfo in GameInfo.Buildings("ExtraCityHitPoints <> 0") do
				local numBuilding = LoadValue("MapModData.Civup.DefenseBuildingsReal[%s][%s]", cityID, buildingInfo.ID) or 0
				MapModData.Civup.DefenseBuildingsReal[cityID][buildingInfo.ID] = numBuilding
				city:SetNumRealBuilding(buildingInfo.ID, numBuilding)
				--city:SetNumFreeBuilding(buildingInfo.ID, LoadValue("MapModData.Civup.DefenseBuildingsFree[%s][%s]", cityID, buildingInfo.ID) or 0)
			end
		end
	end
end

I'll try disabling that section and see if that has any effect, or causes other problems in the meantime. Guess would be that it's conflicting somehow with the official patch fix for the same problem and can now be removed.
 
Back
Top Bottom