"Combat and Stacking Overhaul" not compatible

hellagrant

Chieftain
Joined
Mar 28, 2010
Messages
57
Anyone know a way to get "Combat and Stacking Overhaul" working with CEG?

Combat and Stacking Overhaul
http://forums.civfanatics.com/showthread.php?t=506623

I noticed that these two don't work together. When ran together, the production screen does not come up(it is not the previous problem with that YieldLibrary file that had the line "YieldMod" or something like that).

Combat and Stacking Overhaul is great because it allows limited stacking and has some other really great features.

I am running all up to date BNW and CEG.
 
I took a quick look at the mod and there doesn't seem like any of lua files would directly conflict. What kind of errors (logs) do you get?
 
I took a quick look at the mod and there doesn't seem like any of lua files would directly conflict. What kind of errors (logs) do you get?

I will try to search for how to find error logs, but if you have a good link please share. Is there a program I have to download or is it saved into the PC as a file?

I should have mentioned this earlier:
This mod is required to run the Combat Overhaul Mod

R.E.D. DLL for Brave New World
http://forums.civfanatics.com/showthread.php?t=502988
 
Thanks for the link.

Could this be the error? This is from LUA log. It is the very last line(at the bottom). I exited the game as soon as I try to hit "Productions" after setting up a city.

[222013.821] Runtime Error: C:\Users\Peequi\Documents\My Games\Sid Meier's Civilization 5\MODS\Communitas AI and Tools (v 3)\Interface\ProductionPopup.lua:387: attempt to perform arithmetic on local 'eraPriority' (a nil value)


I am guessing the 387 means "Line 387" from "ProductionPopup.lua".
It reads :

return eraPriority + 2000;
 
That's really strange since eraPriority is defined locally within the function and should never be nil. Are you using any other mods? What version of CEP are you playing?
 
Are you using 3.4.2 beta? How are you sure it's not the YieldLibrary problem? Would it be possible for you to upload the actual log file? (rename lua.log to lua.txt and attach)

This is a strange thing in general since those other mods don't modify production at all...
 
I believe I am using CEG 3 beta. When I select the mod in the game(to get more info on the mod) it says "Version: 3 - Beta"

Good question, but I am sure it is not the yieldlibrary file because CEG runs fine with other mods, except the Combat and Stacking Overhaul. I am pretty familiar with the yieldlibrary problem from a while ago. I attached the file but here is the section that I think USE to be a problem. But it looks fine. Although I don't know anything about modding, you are correct, it is kind of strange.

query = string.format("BuildingClassType = '%s' AND YieldType = '%s'", buildingInfo.BuildingClass, yieldType)
for row in GameInfo.Policy_BuildingClassYieldModifiers(query) do
if player:HasPolicy(GameInfo.Policies[row.PolicyType].ID) then
--log:Trace("%30s %20s %5s", buildingInfo.BuildingClass, yieldType, row.YieldMod)
yield = yield + row.YieldMod
end
end

query = string.format("BuildingClassType = '%s' AND YieldType = '%s'", buildingInfo.BuildingClass, yieldType)
for row in GameInfo.Building_BuildingClassYieldModifiers(query) do
if player:HasBuilding(GameInfo.Buildings[row.BuildingType].ID) then
yield = yield + row.Yield
end
end
 

Attachments

Okay, so you're right that it's not a yield library problem since you aren't having problems without the mod enabled.

Are you using 3.4.2 beta? Would it be possible for you to upload the actual log file? (rename lua.log to lua.txt and attach)
 
LOL sorry man, I honestly don't know which version I am using. But it should be the newest CEG because I just downloaded it today.

having problems uploading the file.....
 

Attachments

Try using replacing the following function GetUnitSortPriority at line 373 in ProductionPopup.lua:
Spoiler :
Code:
	function GetUnitSortPriority(unitInfo)
		local eraPriority = 0;
		if(unitInfo.PrereqTech ~= nil) then
			if(erasByTech[unitInfo.PrereqTech] ~= nil) then
				eraPriority = erasByTech[unitInfo.PrereqTech];
			end
		end
	
		if(unitInfo.CivilianAttackPriority ~= nil) then
			if(unitInfo.Domain == "DOMAIN_LAND") then
				return eraPriority;
			else
				return eraPriority + 1000;
			end
		else
			if(unitInfo.Domain == "DOMAIN_LAND") then
				return eraPriority + 2000;
			else
				return eraPriority + 3000;
			end
		end	
	end
 
I made the changes, the Production screen works now, it brings up all the options for units, buildings, wonders etc.

But there are a few units that are available too early. It is Classical Age but I can recruit Marines and the paratrooper unit(forgot the name).

Any ideas?

Maybe it has to do with this, this is from the new LUA Log file:

[224910.151] UnitFlagManager: Setting selected: false 0 8192
[224912.897] UnitFlagManager: Setting selected: false 0 8192
 
Marines and paratroopers should've been depreciated in the latest build of CEP. Could you attach another lua.log and are there any other units appearing early?

The UnitFlagManager log refers to the following:

Code:
        if( g_PrintDebug ) then print( "Setting selected: " .. tostring( self.m_IsSelected ) .. " " .. tostring( self.m_PlayerID ) .. " " .. tostring( self.m_UnitID ) ); end
 
Units appearing too early are:

Marine
Anti-Tank Gun
Airborne

Here is the new LUA Log.

Also by depreciated, do you mean removed? or just adjusted
 

Attachments

All three of those units should have been removed from the game. I have a possible solution for you to try in a second.
 
Thank you. I am turning in for tonight, I will try tomorrow or whenever I get a chance. But I appreciate all the help!
 
Replace line 22 in your "Communitas AI and Tools (v 3).modinfo" file with the following:

Code:
  <References>
    <Mod id="b42e2fd3-b0eb-46ce-a516-e72e1c635cf3" minversion="0" maxversion="999" />
    <Mod id="4b658069-2986-462a-9b47-f66b7418f83d" minversion="0" maxversion="999" />
    <Mod id="2896c6d4-0273-4527-813b-b9ab58f0b95e" minversion="0" maxversion="999" />
  </References>
 
Hey, this might not be a mod compatibility problem.

You are getting the same error as another user here: http://forums.civfanatics.com/showthread.php?t=508891

Let me repeat some of the advice I have been giving in that thread:

Have you been using the ingame load button? There seems to be errors that occur when you load from ingame as there were with GEM in the past.

Can you download the latest version of CEP (v3.4.2) and make sure that you don't have any old versions of CEP in your MODS folder? Can you also delete your cache and moduserdata folders too? Also starting a new test game without any non-CEP mods active would help as well.

EDIT: Please ignore the above. The error messages for both are completely different. I'm not sure what I was thinking.
 
Back
Top Bottom