[CEP 3.5] Error in lua.log

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Tried CEP 3.5 and just noticed this in lua.log:

[2263.231] TechTree: ERROR GetUnitTip UNIT_BAZOOKA CombatClass=UNITCOMBAT_VANGUARD

Think it may be linked to moving the mouse over the tech tree.

\Skodkim
 
It looks like you are also getting errors during map generation and mod inialization. I'll see if I can replicate when I get to my computer.
 
@skodim

Just how did you get that error? Bazooka are not defined as Vanguard in this current mod.
In fact NO unit should be defined as Vanguard.

You are clearing your cache etc.? Not making any minor edits of your own?
 
Actually, the gattling -> bazooka line has been turned into the vanguard line in 3.5

Code:
UPDATE Units
SET CombatClass = 'UNITCOMBAT_VANGUARD'
WHERE Class IN (
	'UNITCLASS_GATLINGGUN'	,
	'UNITCLASS_MACHINE_GUN'	,
	'UNITCLASS_BAZOOKA'		
);

EDIT: And I'm getting the same errors too.

Code:
[9783.353] MT_Initialize: ERROR: Failed to load CER_End.sql
[9986.591] TechTree: ERROR  GetUnitTip UNIT_BAZOOKA CombatClass=UNITCOMBAT_VANGUARD
 

Attachments

I am making minor edits on my own (a modmod) but nothing at all to do with vanguard/bazooka.

Thanks for looking Stackpointer :-)

Regarding the map generation error, I got the "instant you've been defeated" bug the first time I tried to start a new game (while the second, which was with my own scenario map succeeded). I haven't investigated further but my modmod should't mess with anything like that. 99% sure I had cleared the cache,

\Skodkim
 
@stackpointer

Thanks for that. It appears I am still on a previous branch.

However, could you check something for me?

That block of code you pasted, in the version I am working on, should assign the Bazooka, Gatling & Machine Guns to Soldier yet only the Bazooka shows as UNITCOMBAT_SOLDIER.

The other two get reassigned somewhere to UNITCOMBAT_GUN.

Could you see what UNITCOMBAT those two units are in your current setup?
I have a feeling there are code crossovers happening somewhere.

So what you SHOULD have is BAZOOKA, GATLING & MACHINEGUN all as VANGUARD, according to that code.
However in the branch I have, which should not be that different in these files, only the BAZOOKA is reassigned.

Thanks.

PS. I just IMed Thal about something else and he said there should not be any VANGUARD. It should all be RECON instead.:crazyeye::confused:
 
Is there a fix for this? Any attempted use of a bazooka has made my game crash since 3.1.8 or so. I can't finish a game unless I win before they become relevant.
 
Is there a fix for this? Any attempted use of a bazooka has made my game crash since 3.1.8 or so. I can't finish a game unless I win before they become relevant.

Please see the following thread for a possible fix: http://forums.civfanatics.com/showthread.php?t=505793

@stackpointer

Thanks for that. It appears I am still on a previous branch.

However, could you check something for me?

That block of code you pasted, in the version I am working on, should assign the Bazooka, Gatling & Machine Guns to Soldier yet only the Bazooka shows as UNITCOMBAT_SOLDIER.

The other two get reassigned somewhere to UNITCOMBAT_GUN.

Could you see what UNITCOMBAT those two units are in your current setup?
I have a feeling there are code crossovers happening somewhere.

So what you SHOULD have is BAZOOKA, GATLING & MACHINEGUN all as VANGUARD, according to that code.
However in the branch I have, which should not be that different in these files, only the BAZOOKA is reassigned.

Thanks.

PS. I just IMed Thal about something else and he said there should not be any VANGUARD. It should all be RECON instead.:crazyeye::confused:

It looks like in the CEG file CEA_Land.xml:

Code:
	<Units>
		<Update>
			<Where Class="UNITCLASS_WARRIOR" />
			<Set GoodyHutUpgradeUnitClass="NULL" />
		</Update>
		<Update>
			<Where Class="UNITCLASS_PIKEMAN" />
			<Set GoodyHutUpgradeUnitClass="UNITCLASS_MUSKETMAN" />
		</Update>
		<Update>
			<Where Class="UNITCLASS_ARCHER" />
			<Set GoodyHutUpgradeUnitClass="NULL" />
		</Update>
		<Update>
			<Where Class="UNITCLASS_GUIDED_MISSILE" />
			<Set Range="6" />
		</Update>
		<Update>
			<Where Class="UNITCLASS_GATLINGGUN" />
			<Set CombatClass="UNITCOMBAT_GUN" />
		</Update>
		<Update>
			<Where Class="UNITCLASS_MACHINE_GUN" />
			<Set CombatClass="UNITCOMBAT_GUN" />
		</Update>
	</Units>

While in CEG file CEA__Start.sql:

Code:
UPDATE Units
SET CombatClass = 'UNITCOMBAT_VANGUARD'
WHERE Class IN (
	'UNITCLASS_GATLINGGUN'	,
	'UNITCLASS_MACHINE_GUN'	,
	'UNITCLASS_BAZOOKA'		
);

I've also found a couple flavor changes and a free promotion that were made to UNITCLASS_GATLINGGUN and UNITCLASS_MACHINE_GUN but not UNITCLASS_BAZOOKA.

Also are there supposed to be two CEAI_Units.sql flavor files? One in CEG and one in CAT? It looks like some of the flavors are multiplied?
 
I'm getting this message throughout the game.
What does it mean?
See my crash after Great Library for celts thread. The zip file is there.

[248133.296] Runtime Error: C:\Users\Steve\Documents\My Games\Sid Meier's Civilization 5\MODS\Communitas AI and Tools (v 3)\Tools\TooltipWriter\InfoTooltipInclude.lua:131: attempt to index local 'promoInfo' (a nil value)
 
@stackpointer

Thanks for that. I couldn't see it as hard as I tried. Fresh eyes I guess.

I just noticed a weird thing though.
Going back through the history of that file on GitHub I can see a number of changes to the assignment of UNITCOMBAT but I cannot see when the change to VANGUARD was made.

The latest versions going back at least a month or more make no mention, yet the download version clearly has it as VANGUARD. Weird.
I contacted Thal to let him know, I think he has more pressing matters on at the moment, so no word back yet.
 
@gdwitt

I believe, I am only learning this as I go, errors like that indicate the code is attempting to read a table and upon finding no value it returns 'nil'.

In the CAT_AlterTables.sql, as well as other places, Thal has set up a number of new tables within the database and he is using them to return values to his functions, such as the tooltips.

In this case line 131 is part of a chunk of code in InfoTooltipInclude.lua:
Code:
for row in GameInfo.Unit_FreePromotions{UnitType = unitInfo.Type} do
	local promoInfo = GameInfo.UnitPromotions[row.PromotionType]
	if promoInfo.Class ~= "PROMOTION_CLASS_ATTRIBUTE_NEGATIVE" then

Here looking into the Unit_FreePromotions table to compare with a value in another table modified by sql code, row Class in UnitPromotions, and finding no match in the Unit_FreePromotions table it returns a message of 'nil'.

Why that particular table is generated and not populated with values, I don't know. As I said, I am still learning.
Still, the more people with understanding in Lua code the easier a task Thal will have. Remember, all this code stuff is either of his own devising or heavily modified of somebody else's. And not everybody codes the same way. Therefore the chances of small bugs like this happening is pretty high.
It is a remarkable feat to have the mod in such a well maintained and working condition as it is, considering what is involved.

All of this is because of Thal's tireless work ethic and his skill as a coder.

Congrats to Thal.:goodjob:
 
@stackpointer

Thanks for that. I couldn't see it as hard as I tried. Fresh eyes I guess.

I just noticed a weird thing though.
Going back through the history of that file on GitHub I can see a number of changes to the assignment of UNITCOMBAT but I cannot see when the change to VANGUARD was made.

The latest versions going back at least a month or more make no mention, yet the download version clearly has it as VANGUARD. Weird.
I contacted Thal to let him know, I think he has more pressing matters on at the moment, so no word back yet.

If I had to make a guess then I'd assume that this sql is automatically generated using the excel spreadsheet. And the excel spreadsheets aren't handled (merged?) correctly by gibhub.
 
Unless Thal is employing some weird Texan voodoo magic, then no. It is not automatically generated from the spreadsheets. Just plain old copy/paste.
 
Back
Top Bottom