Éa III, Sword & Sorcery: Bugs/Crashes thread

Congrats on the release.

-Defensive Pact shows up as a greyed out diplomatic option requiring Chivalry, which dosen't exist.

-My summoned Blue Drakes started acting strangely. They embarked when I tried to move them on to water, didn't show a p/t while embarked and couldn't share a tile with my embarked Settler. When they died (on the water or deleted, flying fine or embarking weirdly) I couldn't summon replacements. Back when they were freely flying over the water their pathing was wonky when moving from ground to sea, as if they were expecting it to cost them all their move.

-I had a lake and some coastal fish, both immediately next to my city. the Fishing Boats I trained chose to improve the lake, and they probably shouldn't.

-Settlers are now buildable when unhappy. Not sure if that's intended or not, but the Slave Breeding Pen is still supposed to 'enable' it.
 

Attachments

OK, I'll get those all out in a hotfix.

The worst one though relates to summoning. It's not specific to that unit but would mess up all re-summoning.

Basically, I disabled out a whole function when I really should have disabled part of it. To fix, move the 2 red "comment" lines as indicated below in EaMain/UnitCombat.lua.

Bad code:
Spoiler :
Code:
[COLOR="Red"]--[[	don't do this![/COLOR]
local function OnCanSaveUnit(iPlayer, iUnit, bDelay)	--fires for combat and non-combat death (disband, settler settled, etc)
	--Uses and resets file locals set in OnCombatResult above; always fires after that function if this is a combat death
	--Note that file locals could be anything if this is not a combat death
	--Note: Fires twice for delayed death!
	print("OnCanSaveUnit ", iPlayer, iUnit, bDelay)

	local unit, player

	--cleanup for summoned unit (ok to fire twice)
	if fullCivs[iPlayer] then
		player = Players[iPlayer]
		unit = player:GetUnitByID(iUnit)
		
		local iSummoner = unit:GetSummonerIndex()
		if iSummoner ~= -1 then
			local eaSummoner = gPeople[iSummoner]
			if eaSummoner then			--nil if dead or this is an unbound summoned (-99)
				local summonedUnits = eaSummoner.summonedUnits
				if summonedUnits then
					summonedUnits[iUnit] = nil
				end
			end
			local unitTypeID = unit:GetUnitType()
			if gg_eaSpecial[unitTypeID] then
				if gg_eaSpecial[unitTypeID] == "Archdemon" then
					if gg_summonedArchdemon[iPlayer] == unitTypeID then
						gg_summonedArchdemon[iPlayer] = nil			--opens it up so they can summon another
					end
				elseif gg_eaSpecial[unitTypeID] == "Archangel" then
					if gg_calledArchangel[iPlayer] == unitTypeID then
						gg_calledArchangel[iPlayer] = nil
					end
				elseif gg_eaSpecial[unitTypeID] == "MajorSpirit" then
					if gg_calledMajorSpirit[iPlayer] == unitTypeID then
						gg_calledMajorSpirit[iPlayer] = nil
					end
				end
			end
		end
	end

	--for everything below, we only want first call for delayed death
	if not bDelay then return false end		-- too late now!

	if MapModData.bBypassOnCanSaveUnit then
		MapModData.bBypassOnCanSaveUnit = false
		g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
		return false
	end

	player = player or Players[iPlayer]	
	unit = unit or player:GetUnitByID(iUnit)
	local iPerson = unit:GetPersonIndex()

	if iPerson == -1 then	--not a GP
		g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
		return false
	end	

	if iPlayer ~= g_iDefendingPlayer or iUnit ~= g_iDefendingUnit then	--this was not a combat defender death

		if unit:GetUnitType() == UNIT_LICH and gWonders[EA_WONDER_ARCANE_TOWER][iPerson] then
			SaveLich(unit)
			return true
		end

		local deathType
		if iPlayer == g_iAttackingPlayer and iUnit == g_iAttackingUnit then
			print("An attacking GP was killed in combat")
			deathType = "Attack"
		else
			print("A GP was killed for unknown reason; disbanded?")
			deathType = "Unknown"
		end

		KillPerson(iPlayer, iPerson, nil, nil, deathType)	--unit must be nil here because dll will finish it off!
		g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
		return false
	end	
	
	print("This is a GP defender defeat; unitType = ", unit and GameInfo.Units[unit:GetUnitType()].Type or "nil")

	local attackingPlayer = Players[g_iAttackingPlayer]
	if attackingPlayer then
		local attackingUnit = attackingPlayer:GetUnitByID(g_iAttackingPlayer)
		if attackingUnit and attackingUnit:IsGreatPerson() then
			print("A GP was killed by an attacking unit in GP layer")

			if unit:GetUnitType() == UNIT_LICH and gWonders[EA_WONDER_ARCANE_TOWER][iPerson] then
				SaveLich(unit)
				return true
			end

			KillPerson(iPlayer, iPerson, nil, nil, "Killed by GP layer unit")
			g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
			return false
		end
	end

	g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1

	print("Trying to save GP")
	local currentPlot = unit:GetPlot()
	local sector = Map.Rand(6, "hello") + 1
	for testPlot in PlotAreaSpiralIterator(currentPlot, 15, sector, false, false, false) do
		if player:GetPlotDanger(testPlot) == 0 then								--is this plot out of danger?
			if unit:TurnsToReachTarget(testPlot, 1, 1, 1) < 100 then		--is this plot accessible?
				unit:SetXY(testPlot:GetX(), testPlot:GetY())
				unit:SetEmbarked(testPlot:IsWater())
				testPlot:AddFloatUpMessage("Great Person has escaped!", 1)		--TO DO: txt key
				print("Great Person has escaped!")
				return true
			end
		end
	end
	print("!!!! WARNING: Could not find safe accessible plot for GP to escape to; GP will die!")

	if unit:GetUnitType() == UNIT_LICH and gWonders[EA_WONDER_ARCANE_TOWER][iPerson] then
		SaveLich(unit)
		return true
	end

	KillPerson(iPlayer, iPerson, nil, nil, "Failed to save GP")
	return false

end
local function X_OnCanSaveUnit(iPlayer, iUnit, bDelay) return HandleError31(OnCanSaveUnit, iPlayer, iUnit, bDelay) end
GameEvents.CanSaveUnit.Add(X_OnCanSaveUnit)
[COLOR="Red"]]][/COLOR]
Change to this (make sure the return false is after "]]" at then end!):
Spoiler :
Code:
local function OnCanSaveUnit(iPlayer, iUnit, bDelay)	--fires for combat and non-combat death (disband, settler settled, etc)
	--Uses and resets file locals set in OnCombatResult above; always fires after that function if this is a combat death
	--Note that file locals could be anything if this is not a combat death
	--Note: Fires twice for delayed death!
	print("OnCanSaveUnit ", iPlayer, iUnit, bDelay)

	local unit, player

	--cleanup for summoned unit (ok to fire twice)
	if fullCivs[iPlayer] then
		player = Players[iPlayer]
		unit = player:GetUnitByID(iUnit)
		
		local iSummoner = unit:GetSummonerIndex()
		if iSummoner ~= -1 then
			local eaSummoner = gPeople[iSummoner]
			if eaSummoner then			--nil if dead or this is an unbound summoned (-99)
				local summonedUnits = eaSummoner.summonedUnits
				if summonedUnits then
					summonedUnits[iUnit] = nil
				end
			end
			local unitTypeID = unit:GetUnitType()
			if gg_eaSpecial[unitTypeID] then
				if gg_eaSpecial[unitTypeID] == "Archdemon" then
					if gg_summonedArchdemon[iPlayer] == unitTypeID then
						gg_summonedArchdemon[iPlayer] = nil			--opens it up so they can summon another
					end
				elseif gg_eaSpecial[unitTypeID] == "Archangel" then
					if gg_calledArchangel[iPlayer] == unitTypeID then
						gg_calledArchangel[iPlayer] = nil
					end
				elseif gg_eaSpecial[unitTypeID] == "MajorSpirit" then
					if gg_calledMajorSpirit[iPlayer] == unitTypeID then
						gg_calledMajorSpirit[iPlayer] = nil
					end
				end
			end
		end
	end

	[COLOR="Red"]--[[	don't do this![/COLOR]
	--for everything below, we only want first call for delayed death
	if not bDelay then return false end		-- too late now!

	if MapModData.bBypassOnCanSaveUnit then
		MapModData.bBypassOnCanSaveUnit = false
		g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
		return false
	end

	player = player or Players[iPlayer]	
	unit = unit or player:GetUnitByID(iUnit)
	local iPerson = unit:GetPersonIndex()

	if iPerson == -1 then	--not a GP
		g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
		return false
	end	

	if iPlayer ~= g_iDefendingPlayer or iUnit ~= g_iDefendingUnit then	--this was not a combat defender death

		if unit:GetUnitType() == UNIT_LICH and gWonders[EA_WONDER_ARCANE_TOWER][iPerson] then
			SaveLich(unit)
			return true
		end

		local deathType
		if iPlayer == g_iAttackingPlayer and iUnit == g_iAttackingUnit then
			print("An attacking GP was killed in combat")
			deathType = "Attack"
		else
			print("A GP was killed for unknown reason; disbanded?")
			deathType = "Unknown"
		end

		KillPerson(iPlayer, iPerson, nil, nil, deathType)	--unit must be nil here because dll will finish it off!
		g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
		return false
	end	
	
	print("This is a GP defender defeat; unitType = ", unit and GameInfo.Units[unit:GetUnitType()].Type or "nil")

	local attackingPlayer = Players[g_iAttackingPlayer]
	if attackingPlayer then
		local attackingUnit = attackingPlayer:GetUnitByID(g_iAttackingPlayer)
		if attackingUnit and attackingUnit:IsGreatPerson() then
			print("A GP was killed by an attacking unit in GP layer")

			if unit:GetUnitType() == UNIT_LICH and gWonders[EA_WONDER_ARCANE_TOWER][iPerson] then
				SaveLich(unit)
				return true
			end

			KillPerson(iPlayer, iPerson, nil, nil, "Killed by GP layer unit")
			g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1
			return false
		end
	end

	g_iDefendingPlayer, g_iDefendingUnit, g_iAttackingPlayer, g_iAttackingUnit = -1, -1, -1, -1

	print("Trying to save GP")
	local currentPlot = unit:GetPlot()
	local sector = Map.Rand(6, "hello") + 1
	for testPlot in PlotAreaSpiralIterator(currentPlot, 15, sector, false, false, false) do
		if player:GetPlotDanger(testPlot) == 0 then								--is this plot out of danger?
			if unit:TurnsToReachTarget(testPlot, 1, 1, 1) < 100 then		--is this plot accessible?
				unit:SetXY(testPlot:GetX(), testPlot:GetY())
				unit:SetEmbarked(testPlot:IsWater())
				testPlot:AddFloatUpMessage("Great Person has escaped!", 1)		--TO DO: txt key
				print("Great Person has escaped!")
				return true
			end
		end
	end
	print("!!!! WARNING: Could not find safe accessible plot for GP to escape to; GP will die!")

	if unit:GetUnitType() == UNIT_LICH and gWonders[EA_WONDER_ARCANE_TOWER][iPerson] then
		SaveLich(unit)
		return true
	end

	KillPerson(iPlayer, iPerson, nil, nil, "Failed to save GP")
	
	[COLOR="Red"]]][/COLOR]
	return false

end
local function X_OnCanSaveUnit(iPlayer, iUnit, bDelay) return HandleError31(OnCanSaveUnit, iPlayer, iUnit, bDelay) end
GameEvents.CanSaveUnit.Add(X_OnCanSaveUnit)
You'll have to reload from before the summoned unit died. (I'll try to hotfix it so that the problem can fix itself after the fact, but that's more complicated.)
 
@Llednar Twem, can you post a gamesave where you see that crazy tech cost? I changed something the coming hotfix that might fix this, but it's only a guess.

@Doopliss,

Fishing boats and similar just improve the closest thing they can, but random within a ring. It could be coded differently with some work but that is correct function now.

On settlers, were you at the Very Unhappy threshold? (-10 I think.) That's when normal players can't build settlers.

On embankment, can you be more specific on what the problem is? (p/t?) They should work like base helicopters, which do embark. (Maybe that's odd. We could change them to work like airship but I think that would be gamebreaking.)

The re-summoning problem will be fixed with upcoming hotfix. I'll also hide the Defensive Pact away for now (we can discuss what condition it should be attached to in another thread).
 
-I was not Very Unhappy, so false alarm on that one. Sorry.

-The Drakes embarked as if they were land units. Turned into modern era boats, dropped to 2 move and got one-shotted by the first barbarian that looked at them funny. p/t is me getting my game terminology jumbled up; I meant it didn't show a combat strength, as if it was a civilian unit. Couldn't stack with the embarked Settler either, though I'm not sure if that matters. I might just be conjecturing at this point, but it appeared that the Sailing tech embarkation overrode the flying "embarkation", before which they could move from land to sea and back without breaking a sweat. Much to my shame, I've never actually built a helicopter in Civ 5.
 
Hotfix a for v7. "Extract Here" inside your MODS folder. You should have to click "Yes to All" to overwrite files (if you don't, something went wrong!).

  • Fixed v7 bug preventing killed summoned units from being forgotten (so couldn't summon more)
  • Griffons and Drakes will no longer embark; they can fly over coastal waters but not deep ocean
  • Fixes massive negative research progress that happened for some reason (press end turn to clear up from saved game); I'm not sure why it happened, so watch out for any other fishiness like that
  • Help bullet points autogenerated for 4 building effects:
    1. Produces x Resource1
    2. Produces y Resource1 for each improved Resource2
    3. Requires nearby Resource1, Resource2 or Resource3
    4. +x Yield1, +y Yield2 for each Resource1, Resource2 or Resource3
  • Removed a whole bunch of superfluous building Help texts
  • Gave Winery some reasonable effects
  • Added Berries to list of Distillery resources (convert to Spirits) and for Marketplace +1g
  • Fixed INCENCE misspelling that made it not appear for some building effects

The 2nd item involved changing UnitCombat for existing units, and I'm not 100% sure that's safe to do for existing games. Someone please post if they have a Drake from pre-hotfix and can load (or not).
 

Attachments

I could load a pre-hotfix save, but it didn't fix the Drakes embarking (not that I planned on continuing that run anyway). They (well, red ones) seem to work peachy in new games.
 
I've had the exact same issue as darkedone02, but forgot to mention it before v7 got out. It's still showing up. Sometimes the same sort of thing happens with GPs, but shows stuff like Take Leadership when you already have a leader and the GP is not in the capital. All the greyed out buttons (even for non-GP units) say in red at mouseover: "You cannot do this in the same place as another Great Person from your civilization..."
 
I've built a Chariot and found that something odd... why is there so many "upgrade units" and a "hire merc" button when I've not researched that policy?

http://steamcommunity.com/sharedfiles/filedetails/?id=303367548

I've had the exact same issue as darkedone02, but forgot to mention it before v7 got out. It's still showing up. Sometimes the same sort of thing happens with GPs, but shows stuff like Take Leadership when you already have a leader and the GP is not in the capital. All the greyed out buttons (even for non-GP units) say in red at mouseover: "You cannot do this in the same place as another Great Person from your civilization..."
I've seen this occasionally, but haven't been able to figure out when/why it happens. In my experience, it doesn't allow you to do anything you couldn't do normally and goes away if you cycle units. Is that what you all find? (It's still a bug, but can be filed under "UI oddities" if that's the case...)
 
Playing as Sidhe - i cant choice Pantheistic civic.
Game ask me if i`m sure want it as it will make 1 turn if anarchy and no YES button.. only NO.
 
Playing as Sidhe - i cant choice Pantheistic civic.
Game ask me if i`m sure want it as it will make 1 turn if anarchy and no YES button.. only NO.
Have you opened Dominionism? These two are exclusive. (Pantheism is also exclusive with Theism, but you can't have that as Sidhe.) Anarchy doesn't work (yet) so there is no way to undo policy choices.
 
also - is territory mean to be retaken?

i build hunter and it take over elephant that was in city state territory.

second question : i tried to start game with 15 AI and got CTD (archipelag and highlands map without any additional options.)

upd
researching of tracking and accepting cruithni gave "memory error"
 

Attachments

For "stealing" plots with hunters or fishing/whaling boats, the rule is simple: You can do it if your city is within 3 plots and the current owner is not. Please post gamesave if you see any violation of this rule.

For CTD, is it repeatable?

"Memory error" happens sometimes. As far as I know, you can just click to close window and everything is OK.

I'll try to track down the error in your Lua.log. It looks like maybe UI is objecting to repeated colors used by civs in the game. This could be a problem since the mod has ~70 civs so reuses colors for some. More likely to be a problem with many players. Fix is possible but may take some deep dll work.
 
I've seen this occasionally, but haven't been able to figure out when/why it happens. In my experience, it doesn't allow you to do anything you couldn't do normally and goes away if you cycle units. Is that what you all find? (It's still a bug, but can be filed under "UI oddities" if that's the case...)

it went away after a while or the next turn... i've been using that chariot to wipe out alot of barbs around my base.
 
Explain this please:
Spoiler :

[91020.374] EaMain: Player Types by ID at game init:
[91020.374] EaMain: 0 : FullCiv
[91020.374] EaMain: 1 : FullCiv
[91020.374] EaMain: 2 : FullCiv
[91020.374] EaMain: 3 : FullCiv
[91020.374] EaMain: 4 : FullCiv
[91020.374] EaMain: 5 : FullCiv
[91020.374] EaMain: 6 : FullCiv
[91020.374] EaMain: 7 : FullCiv
[91020.374] EaMain: 8 : FullCiv
[91020.374] EaMain: 9 : FullCiv
[91020.374] EaMain: 10 : Fay
[91020.374] EaMain: 22 : God
[91020.374] EaMain: 23 : God
[91020.374] EaMain: 24 : God
[91020.374] EaMain: 25 : CityState
[91020.374] EaMain: 26 : CityState
[91020.374] EaMain: 27 : CityState
[91020.374] EaMain: 28 : God
[91020.374] EaMain: 29 : CityState
[91020.374] EaMain: 30 : CityState
[91020.374] EaMain: 31 : God
[91020.374] EaMain: 32 : CityState
[91020.374] EaMain: 33 : God
[91020.374] EaMain: 34 : God
[91020.374] EaMain: 35 : God
[91020.374] EaMain: 36 : CityState
[91020.374] EaMain: 37 : God
[91020.374] EaMain: 38 : God
[91020.374] EaMain: 39 : CityState
[91020.374] EaMain: 40 : CityState
[91020.374] EaMain: 41 : CityState
[91020.374] EaMain: 42 : God
[91020.374] EaMain: 43 : God
[91020.374] EaMain: 44 : CityState
[91020.374] EaMain: 45 : God
[91020.374] EaMain: 46 : CityState
[91020.374] EaMain: 47 : God
[91020.374] EaMain: 48 : God
[91020.374] EaMain: 49 : God
[91020.374] EaMain: 50 : God
[91020.374] EaMain: 51 : God
[91020.374] EaMain: 52 : CityState
[91020.374] EaMain: 53 : God
[91020.374] EaMain: 54 : God
[91020.374] EaMain: 55 : God
[91020.374] EaMain: 56 : CityState
[91020.374] EaMain: 57 : God
[91020.374] EaMain: 58 : CityState
[91020.374] EaMain: 59 : God
[91020.374] EaMain: 61 : God
[91020.374] EaMain: 62 : Animals
[91020.374] EaMain: 63 : Barbs

This from game with 10 civs and 15 city states.
What meant by Fay and God ?

then i choiced 15 civs with 25 city states got CTD...as i reported before and it repeateble.
For Pantheistic civic - i do take dominionism before Pantheistic so.. maybe conficting civil can be grayed out or something for better understanding??
 
1) The Pantheism policy bonus for terrain spread to forest/jungle/march tiles is back to the aggressive version it was a few versions ago. Intended? A few tiles were stolen from me, and one was a Deer resource from 5+ tiles away from the AI civ city while it was 3 tiles away from my city. (I was Sidhe but did not open that policy, the AI was Man and went Pantheist. Turned tables or what!? ;) Actually, two of my Man civ neighbors chose Pantheism which is perhaps weird, or not?

2) I'm still confused about Quicksilver. I can build the two Reactors that give a Gold and a Silver Luxury resource without building the Roasting Furnace in both cities with or without Cinnamon in their reach (after I have improved at least one Cinnamon somewhere). Building the Furnace does not give +2 Quicksilver resources as it says (only -4 health and a +1 bonus to science and gold from a Cinnamon/Quicksilver resource nearby), so is this building actually a remnant of early ideas and should be deleted from the mod or should it be required before the two Reactor buildings can be built as would be logical?
 
Back
Top Bottom