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

Others depend on policies in Theism or Anit-Theism (these trigger when anyone adopts the policy).
I see. Should read the manual more carefully. The confusing part then has been that AI civs have always gone deep in Theism once Azz.. has spread to their cities from my holy city. Apparently they highly value the +30% healing and combat bonuses. Also, receiving Founder effects for free because someone else is more devout (adopts the policies) is counter-intuitive. I've rarely went past the temple opening policy in Theism because I've gotten the best parts of the religion for free.
 
-I've never once randomed Sidhe in an all-random game. Could it be that you have the "50% Man, 25% Sidhe, 25% random" thing tied to player number, so the first half of the players (including, of course, Player 1) are always Man?

-I got a "not enough memory" bug when founding Agartha. It erased the fancy civ-founding picture, but had no other visible effect.
 

Attachments

v6, hotfix i.
wow, great updates! was away from civ, now back to testing.

1. would you please take a look at the scurvy thing once again? so far it seems that if the ship is already damaged, scurvy still takes hitpoints from full health, and thus the health can never go below (100%-scurvy_modifier).

2. the civ which gets free harbours in every city upon constructing three workboats also gets them in their landlocked cities. Is that intended?

2a. Also (maybe this should go into balance though), free harbours are nice, but it is very easy to get natural harbours if playing as a sea-oriented nation (with three sea resources for the workboats next to the capital), and free harbours become not so great anymore.

3. there is this thing with land and sea trade routes... imagine you discovered a tech which gives you a sea trade route, but not the tech giving a land trade route, and you've got a merchant. Now, you can't start a land trade route yet, but in the trade routes menu land trade routes are still visible in the "trade routes you can open" tab. So what a player might do is to see available trade routes, send a merchant to a foreign city and frown upon the fact that the "open trade route" button is inactive, because no land trade routes are available.

In principle, it is also like that in base civ, but there if you haven't researched animal husbandry yet, and you can't have land trade routes, you simply can't build caravans (while being able to build cargo ships). I don't know how this can be helped in Ea, and in fact, could never understand why the difference between the land and sea trade routes is so important in civ.

4. A very annoying thing happens when a ruler of a men nation changes, and then a third civ comes up with an offer to declare war (for instance) at king %kingname%, and this name tells you absolutely nothing. Would be so much better if these offers also included the nation name, not only the ruler, but I don't know if that's possible.
 
Think I found the issue with living terrain plots that spread having 0 strength afterwards. I changed the fromPlot:SetLivingTerrainData(fromStrength) to fromPlot:SetLivingTerrainStrength(fromStrength), that seems to have done the trick. Here's the full code for the function:

Code:
local function DoLivingTerrainSpread(fromPlot, toPlot, fromType, fromStrength)
	local toType, toPresent, toStrength, toTurnChopped = toPlot:GetLivingTerrainData()
	if toType == -1 or toStrength < 5 then	
		LivingTerrainGrowHere(toPlot:GetPlotIndex(), fromType)
		toPlot:SetLivingTerrainData(fromType, true, 1, -100)
		fromStrength = fromStrength - 1
		fromPlot:[COLOR="Blue"]SetLivingTerrainStrength[/COLOR](fromStrength)
		print("Living terrain has spread to an adjacent (non-living or not very strong) tile ", fromPlot:GetPlotIndex(), fromStrength, toPlot:GetPlotIndex())
	else
		--may have conflict between spread type and old (currently absent) type; don't want to kill a stronger terrain that was just chopped, so regrow it as own type
		if fromType == toType or fromStrength < toStrength + 5 then	--re-grow as own type
			LivingTerrainGrowHere(toPlot:GetPlotIndex(), toType)	
			toPlot:SetLivingTerrainData(toType, true, toStrength, toTurnChopped)
			print("Living terrain has re-awakened an adjacent tile: ", fromPlot:GetPlotIndex(), toPlot:GetPlotIndex())
		else	--type must be consistent with current feature or chops get very messy
			LivingTerrainGrowHere(toPlot:GetPlotIndex(), fromType)	
			toPlot:SetLivingTerrainData(fromType, true, toStrength + 1, toTurnChopped)
			fromStrength =  fromStrength - 1
			fromPlot:[COLOR="blue"]SetLivingTerrainStrength[/COLOR](fromStrength)
			print("Living terrain has awakened and converted an adjacent (currently absent) living tile ", fromPlot:GetPlotIndex(), toPlot:GetPlotIndex())
			print("Was, ", toType, true, toStrength, toTurnChopped)
			print("Is now: ", fromType, true, toStrength+1, toTurnChopped)
		end
	end
	return fromStrength
end
 
Fix above looks right, so I'll get it into v7.

Here's a couple more "manual hotfixes" if you all want them for v6. My code base has changed too much for v7 for me to easily make replacement files for v6 hotfixes.

Becoming Lich uses 100x too much mana. Fix by deleting red part below in EaMain/EaSpells.lua:
Code:
Finish[GameInfoTypes.EA_SPELL_BECOME_LICH] = function()
	local pts = g_unit:GetLevel() * 100
	g_eaPerson.unitTypeID = UNIT_LICH
	g_eaPerson.predestinedAgeOfDeath = nil
	g_unit = InitGPUnit(g_iPlayer, g_iPerson, g_x, g_y, g_unit, UNIT_LICH, -1)
	UseManaOrDivineFavor(g_iPlayer, g_iPerson, pts[COLOR="Red"] * 100[/COLOR])
	return true
end


Workers/slaves can't remove blight. Add lines in blue in CoreTables/Units.sql:
Code:
DELETE FROM Unit_Builds;
INSERT INTO Unit_Builds (UnitType, BuildType) VALUES
[COLOR="Blue"]('UNIT_WORKERS_MAN', 'BUILD_SCRUB_BLIGHT'),
('UNIT_SLAVES_MAN', 'BUILD_SCRUB_BLIGHT'),
('UNIT_WORKERS_SIDHE', 'BUILD_SCRUB_BLIGHT'),
('UNIT_SLAVES_SIDHE', 'BUILD_SCRUB_BLIGHT'),[/COLOR]

Bad code for build Pyramids (could randomly mess up some other action). In EaMain/EaAction.lua change this code:
Code:
--EA_WONDER_PYRAMID
SetAIValues[GameInfoTypes.EA_WONDER_PYRAMID] = function()
	gg_aiOptionValues.p = g_mod		--proxy
end

SetUI[GameInfoTypes.EA_WONDER_PYRAMID] = function()
	if g_bAllTestsPassed then
		MapModData.text = "Increases the apparent size of your civilization and military might by "..g_mod.."%"
	end
end
...to this:
Code:
--EA_ACTION_PYRAMID
SetAIValues[GameInfoTypes.EA_ACTION_PYRAMID] = function()
	gg_aiOptionValues.p = g_mod		--proxy
end

SetUI[GameInfoTypes.EA_ACTION_PYRAMID] = function()
	if g_bAllTestsPassed then
		MapModData.text = "Increases the apparent size of your civilization and military might by "..g_mod.."% (will affect other civilizations interactions with you and counts toward Domination Victory Condition)"
	end
end

Techs counting toward city defense. You could call this a balance issue but this base Civ5 effect is so grossly unbalanced for the mod (due to more techs but lower unit strength) that it prevents any AI aggression. Fix it by adding code below in CoreTables/GlobalDefines.sql (anywhere in Defines area):
Code:
UPDATE Defines SET Value = 0 WHERE Name = 'CITY_STRENGTH_TECH_BASE';
UPDATE Defines SET Value = 0 WHERE Name = 'CITY_STRENGTH_TECH_EXPONENT';
UPDATE Defines SET Value = 0 WHERE Name = 'CITY_STRENGTH_TECH_MULTIPLIER';

There's more fixes in v7 but these are the easy ones. I still haven't tracked down that d@#% Slave Army CTD yet.
 
The Culture bonuses to buildings from Folkart, Crafting, and The Arts are applied correctly (at least from The Arts), but are not added to the info of the relevant buildings in the city screen building list.

Secondly, the culture produced by an Artist doing Perform is not added to Culture Level calculations I strongly suspect? ..I just deleted the two Artists and the CL meter did not flinch..

The value of an Artist has gone down quite a bit because of this but maybe it is ok. Heher still can build the Epics and the +3 Culture building, and of course spreads borders. But hishers value decreases significantly the further the game progresses (for Sidhe at least), to the point that I will strongly consider pressing Delete as final action in future games.
 
I'll check the UI for culture buildings modified by policies. I don't know but the same problem might exist for other similar cases (Universities and Academic Tradition).

On Perform, just check that it increases culture per turn and "approaching CL" (which is the ceiling for your civ based on current culture generation and pop). CL itself won't budge, and even CL change per turn will only budge a little (could be microscopic if CL is far from approach CL).
 
-The Approaching Culture Level indicator is acting a bit weird. I can spend multiple turns without changing my population or culture income, and it'll still consistently go up. If it's sticky for some reason and the same variable is being used to determine culture growth, it would be slowing culture growth down where it's not supposed to.

-It'd be nice if the Volupsa's description text specified that it changes your culture cap instead of just current culture level. At first I thought it wasn't that good, and it definitely is.
 
-The Approaching Culture Level indicator is acting a bit weird. I can spend multiple turns without changing my population or culture income, and it'll still consistently go up.

Approaching CL is based on historical average of culture/pop. So, for example, if that number did this:

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ...

Then you would see a steady rise because your historical average is increasing with each turn at 4.
 
My bad, I did not investigate properly. The bonus is given as 'culture from policies' and thus not shown in the building info.

But, only now I notice that the Opera and the Theater buildings each give +25% culture in addition to the listed +1!!!!!!:eek: Don't know when you changed that but it would have been nice to know such a major change (or did I miss the announcement?)
On Perform, just check that it increases culture per turn and "approaching CL" (which is the ceiling for your civ based on current culture generation and pop). CL itself won't budge, and even CL change per turn will only budge a little (could be microscopic if CL is far from approach CL).
I deleted the Artists at about turn 300 so it would not have had that much effect at CL at that point so forget that.

But I still think Perform is not affecting policy gain, at least not noticeably. I got Artists as 1st and 3rd GPs and they were on Perform duty from turn X (X being the turns it takes to open two policies plus 25 for an Epic). I was at 10 policies at turn 200, and at 15 at turn 300 normal speed, all the time getting +0.05 CL change. The Perform is generating up to 10x more culture than I get from other sources at early game so this is not easy to understand. I have the feeling I'm at about 10 policies in other games without Artists too at 200 turns but could remember it completely wrong.

I kind of think I understand the new CL gain calculations but the details escape me. Should I start building a Monument as my first action because it would increase culture gain by a third (the Palace gives 2) during the very early game and it would then have a lasting positive impact for a very long time?
 
CTD1: at the end of turn unless I declare war to Sidhe (it could have something to do with a barbarian camp and its city state quest, if I declare war Sidhe is unable to wipe it due to zone of control).

CTD2: when I select the slave that worked wheat (it CTDs even in the previous turns).

Version 6i.
 

Attachments

@onedreamer,

I'm assuming the CTD2 was immediately after adopting Slave Armies - is that correct? Was CTD1 also a Slavery game?

Everyone should consider Slavery broken in v6. I'll fix it one way or the other for v7, even if it takes weeks to do so...

I've never had so much specific info about a crash but not been able to solve it. It only happens for human player with Slavery and never AI with Slavery. It's definitely generated by exe rather than dll, which would include the graphics engine (handles all UI stuff). It happens right after adopting Slave Armies and (I think) exactly when a civilian Slave unit becomes selected (either clicked or comes up in unit rotation). You'd think with that much specific information that I could find it, but I'm totally stumped.

It can't be the Slave unit graphic because it is the same as the Worker graphic. It could be another kind of art asset that is bad (e.g., an icon) that tries to display from the unit panel. But I've checked everything that could come up (Slave Maker promo although slave shouldn't get that, action icons, etc.) and they are almost all placeholder icons that are used in many other places without causing any problem.
 
I'm assuming the CTD2 was immediately after adopting Slave Armies - is that correct?

Oh man, I was wondering why this happened only from a certain point on. Yes, it's almost certainly slave armies.

Was CTD1 also a Slavery game?

It's the same game, but it's not the same problem. The CTD happens during the interturn. Like I said I think it's connected with a barbarian camp, temporary left defenseless, and being wiped by an elven scout. If I declare war to the elves the CTD doesn't happen, my theory is that the elven scout can't reach the barb camp anymore due to zone of control of my units.

Everyone should consider Slavery broken in v6.

gathered that much :D

It happens right after adopting Slave Armies and (I think) exactly when a civilian Slave unit becomes selected (either clicked or comes up in unit rotation). You'd think with that much specific information that I could find it, but I'm totally stumped.

Let's try to add more info
- Before slave armies policy is chosen, the same civilian slave units don't cause a crash
- the civilian slave unit in question was city-built, but a civilian slave created by a battle caused a crash all the same.
- a military slave unit doesn't cause crash.
- if it doesn't happen to the AI it's almost certainly a graphic bug.
- with the ingame editor mod, if I create a slave unit it will cause a crash, but a worker unit won't cause it.

The first consideration is the most important. The same unit, with same graphics, causes crash on selection after slave armies policy. Wild guess: maybe it is somehow assigned that civ-wide promotion to capture units as slaves even if this is not compatibile with the unit, causing a crash? Should cause it with the AI too though if this was the case, I think.

Unrelated to crash:
- when you win a battle with both the appropriate policies you and the right chances you create both a military and a civilian slave unit. Seems a bit too much IMHO.
- I created a civilian slave from killing a scorpion :D
 
- if it doesn't happen to the AI it's almost certainly a graphic bug.
Not in long autoplay sessions where 3 AI civs complete the branch. Also, all of the Minidumps I've analyzed (my own and tester's) indicate that source of CTD is not the dll but rather the exe, which is all the C++ we don't have access to including graphics engine. It's looks very much like the crash caused when I messed up the definition of a unit art asset a while back (was Blue Naga and it didn't CTD when they appeared but only when they fought).

PROMOTION_SLAVEMAKER is one (really the) obvious candidate. It's in the Policy_FreePromotions table for POLICY_SLAVE_ARMIES. However, this seems to lead me to a dead end:
  1. It uses IconAtlas = 'PROMOTION_ATLAS', PortraitIndex = 34, but so do many dozens of other promotions that aren't buggy
  2. Based on testing, these promotions are only given to units with the correct UnitCombat as listed in the UnitPromotions_UnitCombats table. Civilians don't even have a UnitCombat type. The four listed in that table are the four UnitCombats in the mod with a melee attack.
I've looked at actual DB content (not just my mod code) for this policy and this promotion, and nothing seems out of order. Specifically, icon entries weren't garbled in some way.

Nevertheless, it would be helpful to rule out (or rule in) PROMOTION_SLAVEMAKER once and for all. If someone wants to try that, delete (or comment out) the line in the Policy_FreePromotions table (find in CoreTables/Policies.sql). Then reload a game from before that policy was adopted. Then tell us what happens.


Unrelated to crash:
- when you win a battle with both the appropriate policies you and the right chances you create both a military and a civilian slave unit. Seems a bit too much IMHO.
- I created a civilian slave from killing a scorpion :D
Yeah, ...all the slavery stuff is from Éa II and hasn't been touched since before animals were added (before I was even modding dll at all). I'll get to both of these after the CTD is solved.
 
Patronage: instead of halving the influence decay it halts it.
 
Trying to re-upload crash1 because if I download and use the one in the post I crash on loading, must be corrupted.
 

Attachments

Patronage: instead of halving the influence decay it halts it.
Need more details. Did you share the same religion? Were any cities building the Patronage Process? Are you sure you were above the "anchor point" (it's +10 if you share race with the CS, and then there are a couple civ bonuses).

Looking at code it should be -50% with Patronage alone and -75% if you shared religion. Note that the UI only shows whole points (or that's what I remember - could be wrong) so you would only see decay for the later effect after 4 whole turns.
 
I had a LUA error, the first after a long long time (from Ea2). However the log doesn't say much... (see attachement). The error continues in the next turn.


Need more details.

- Did you share the same religion?

no religion

Were any cities building the Patronage Process?

no

Are you sure you were above the "anchor point" (it's +10 if you share race with the CS, and then there are a couple civ bonuses).

You should speak at present tence since it's not an occasional happening. I can provide a save if you need. I am sure I was above anchor point yeah, because at anchor point you don't lose influence, hence you can't see that it's dropping by 0.
I was allied with one city state when I posted. But it happens even with friendly city states.

Looking at code it should be -50% with Patronage alone and -75% if you shared religion. Note that the UI only shows whole points (or that's what I remember - could be wrong) so you would only see decay for the later effect after 4 whole turns.

nope, the (vanilla) UI shows up to second decimal. For example 1.12, 0.75, etc.
 

Attachments

Back
Top Bottom