Great General points accumulating, but GG's never spawn?

Somohexual

Chieftain
Joined
Apr 12, 2012
Messages
50
I've been playing Polynesia for around 400 turns and have yet to see a Great General spawn, even though the progress bar is being filled. Great Admirals, Scientists, Engineers, Artists, Musicians, and Prophets have spawned so I don't know what could be causing this. D:

Mod list:
- CBP set
- JFD's Custom Civs
- MC Custom Civs (only like 2)
- Promotions - Expansion Pack
- Quick Turns
- Really Advanced Setup
- Reforestation
- Scouts Ignore Borders
- Slower Science Longer Eras
- Wonder Race
- InfoAddict
- Historical Religions
- Faster Plot Expansion
- Extra Victory Conditions
- Civ IV Leader Traits
- Barbarians Evolved
- Events and Decisions

 
Don't know about the CP/CBP system, but with the stock-Firaxis dll Great Generals are only spawned from the experience accumulation if the player's Great General unit has the PROMOTION_GREAT_GENERAL as an inherent promotion applied to the unit. If the mods you are running give Polynesia a Unique Replacement for the Great General, and this Unique Replacement is not given this specific promotion you will get exactly what you are seeing. It is not good enough for a Great General replacement to be given a promotion that has the <GreatGeneral>true</GreatGeneral> ability -- it must specifically have the PROMOTION_GREAT_GENERAL promotion.

It is also possible that one of the mods you are running has re-assigned all Great General units to use some other "better" or "alternate" promotion than the PROMOTION_GREAT_GENERAL promotion -- in such a case the end result will be the same. You won't get Great Generals spawning from combat experience. Check your mods to see if this was an intentional feature of one mod or another -- one of your mods may be wanting to force you to get Great Generals from some other mechanic than the "unit XP" method.

There may also be a bug in one of your mods that is causing the PROMOTION_GREAT_GENERAL promotion to be entirely deleted from the game's database, in which case your Great Generals won't spawn because no unit is being assigned this promotion in such a condition.
 
Don't know about the CP/CBP system, but with the stock-Firaxis dll Great Generals are only spawned from the experience accumulation if the player's Great General unit has the PROMOTION_GREAT_GENERAL as an inherent promotion applied to the unit. If the mods you are running give Polynesia a Unique Replacement for the Great General, and this Unique Replacement is not given this specific promotion you will get exactly what you are seeing. It is not good enough for a Great General replacement to be given a promotion that has the <GreatGeneral>true</GreatGeneral> ability -- it must specifically have the PROMOTION_GREAT_GENERAL promotion.

It is also possible that one of the mods you are running has re-assigned all Great General units to use some other "better" or "alternate" promotion than the PROMOTION_GREAT_GENERAL promotion -- in such a case the end result will be the same. You won't get Great Generals spawning from combat experience. Check your mods to see if this was an intentional feature of one mod or another -- one of your mods may be wanting to force you to get Great Generals from some other mechanic than the "unit XP" method.

My Polynesia hasnt been altered, so it must be a promotion replacement or a bug problem.

There may also be a bug in one of your mods that is causing the PROMOTION_GREAT_GENERAL promotion to be entirely deleted from the game's database, in which case your Great Generals won't spawn because no unit is being assigned this promotion in such a condition.

How exactly would I fix this? I'm searching through all my mods now looking for any changes to GG's.
 
I would enable logging if you do not have it enabled (whoward69's enable error logging tutorial), and look 1st in the Database.log file for anything mentioning PROMOTION_GREAT_GENERAL after you reload the savegame.

Also, are you playing as Byzantines?

I assumed you were playing as Polynesia because of the Maori Warriors mentioned in your units list. But you also have Dromons -- which should be restricted to Byzantium.

If there's nothing in the Database.log file that gives a clue, then you would need to do a search through all the mods you are using looking for PROMOTION_GREAT_GENERAL. The AgentRansack software is a pretty good tool for this sort of thing. When I do this sort of search I just let AgentRansack search through all contents within the game's MODS folder. I tell it to look first through files that are "*.xml", and if nothing turns up from that I tell it to look through files that are "*.sql" This will at least give a clue as to which file and therefore which mod is creating the issue.

Or else you need to get an SQL database-viewer program and inspect the contents of table Unit_FreePromotions as it is in the C:\Users\[Your Name Here]\Documents\My Games\Sid Meier's Civilization 5\cache/Civ5DebugDatabase.db file. The Civ5DebugDatabase.db is the SQL database to which all mod changes in XML and SQL are sent. The only problem with database viewers is they don't tell you which mod or which files within it are making changes to a specific game-table or element therein. But it will confirm if the Great General unit is still being given the correct promotion.

Also, have you checked the CP/CBP sub-fora to see if this is a known bug that Gazebo is aware has crept into the CP/CBP system ? It might be that the bug crept into a recent update to CP, and you are the first to notice it.
 
I found this in Tomatekh's custom civ "The Timurids", which is one of the AI civs in my game.

<Unit_UniqueNames>
<Delete UnitType="UNIT_GREAT_GENERAL" UniqueName="TXT_KEY_GREAT_PERSON_TIMUR"/>
</Unit_UniqueNames>

The Timurids don't even have a UU replacement for the GG, so I don't understand why that would even be there.
 
I found this in Tomatekh's custom civ "The Timurids", which is one of the AI civs in my game.

Code:
<Unit_UniqueNames>
	<Delete UnitType="UNIT_GREAT_GENERAL" UniqueName="TXT_KEY_GREAT_PERSON_TIMUR"/>
</Unit_UniqueNames>

The Timurids don't even have a UU replacement for the GG, so I don't understand why that would even be there.
He is deleting the specific unit-name "Timur" from the list of available great general names (I assume because "Timur" is the leader of his civ). This merely removes the name "Timur" from the list of possible Great General names and has no effect on your issue.
 
I would enable logging if you do not have it enabled (whoward69's enable error logging tutorial), and look 1st in the Database.log file for anything mentioning PROMOTION_GREAT_GENERAL after you reload the savegame.

The only specific reference to a GG I could find was about DJSHenninger's Bulgaria, but that civ isn't in my current game. I doubt I knew what to look for, so I'll upload the log.
 

Attachments

  • Database.zip
    11.5 KB · Views: 38
That program is amazing, thanks for letting me know about it! :D I did make a post about the problem on Gazebo's GitHub, but no one has responded so far.

I searched through my mods and this is all that came up.

JFD's Carthage:
Spoiler :
----------------------------------------------------------------------------------------------------------------------------
-- SHOPHET
----------------------------------------------------------------------------------------------------------------------------
-- JFD_CarthageHannibal_Shophet
local unitPromotionGreatAdmiralID = GameInfoTypes["PROMOTION_GREAT_ADMIRAL"]
local unitPromotionGreatGeneralID = GameInfoTypes["PROMOTION_GREAT_GENERAL"]
local unitPromotionShophetID = GameInfoTypes["PROMOTION_JFD_SHOPHET"]
local unitPromotionShophetAdmiralID = GameInfoTypes["PROMOTION_JFD_SHOPHET_ADMIRAL"]
local unitPromotionShophetGeneralID = GameInfoTypes["PROMOTION_JFD_SHOPHET_GENERAL"]
local unitAdmiralID = GameInfoTypes["UNIT_GREAT_ADMIRAL"]
local unitShophetID = GameInfoTypes["UNIT_JFD_SHOPHET"]
function JFD_CarthageHannibal_Shophet(playerID, unitID, unitX, unitY)
local player = Players[playerID]
local plot = Map.GetPlot(unitX, unitY)
local unit = player:GetUnitByID(unitID)
if (unit and plot and unit:IsHasPromotion(unitPromotionShophetGeneralID)) then
if plot:IsWater() then
local newShophet = player:InitUnit(unitAdmiralID, unitX, unitY)
unit:SetEmbarked(false)
newShophet:Convert(unit, false)
newShophet:SetHasPromotion(unitPromotionShophetGeneralID, false)
newShophet:SetHasPromotion(unitPromotionGreatGeneralID, false)
newShophet:SetHasPromotion(unitPromotionShophetID, false)
newShophet:SetHasPromotion(unitPromotionShophetAdmiralID, true)
end
elseif (unit and plot and unit:IsHasPromotion(unitPromotionShophetAdmiralID)) then
if (not plot:IsWater()) then
local newShophet = player:InitUnit(unitShophetID, unitX, unitY)
newShophet:Convert(unit, false)
newShophet:SetHasPromotion(unitPromotionShophetAdmiralID, false)
newShophet:SetHasPromotion(unitPromotionGreatAdmiralID, false)
newShophet:SetHasPromotion(unitPromotionShophetGeneralID, true)
newShophet:SetHasPromotion(unitPromotionShophetID, true)
end
end
end
GameEvents.UnitSetXY.Add(JFD_CarthageHannibal_Shophet)


Bulgaria Custom Civ:
Spoiler :
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_KAVHAN</UnitType>
<PromotionType>PROMOTION_GREAT_GENERAL</PromotionType>

<Row>
<Class>UNITCLASS_GREAT_GENERAL</Class>
<Type>UNIT_KAVHAN</Type>
<Cost>-1</Cost>
<Moves>2</Moves>
<CivilianAttackPriority>CIVILIAN_ATTACK_PRIORITY_HIGH</CivilianAttackPriority>
<Special>SPECIALUNIT_PEOPLE</Special>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_GENERAL</DefaultUnitAI>
<Description>Kavhan</Description>

Bohemia Custom Civ:

Spoiler :
--------------------------------
-- Unit_FreePromotions
--------------------------------
INSERT INTO Unit_FreePromotions
(UnitType, PromotionType)
VALUES ('UNIT_JFD_TABOR', 'PROMOTION_GREAT_GENERAL'),
('UNIT_JFD_TABOR', 'PROMOTION_JFD_TABOR_DEFENSE');

CBP:

Spoiler :
<Replace>
<Type>PROMOTION_GREAT_GENERAL</Type>
<Description>TXT_KEY_PROMOTION_GREAT_GENERAL</Description>
<Help>TXT_KEY_PROMOTION_GREAT_GENERAL_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<GreatGeneral>true</GreatGeneral>
<PortraitIndex>59</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_GREAT_GENERAL</PediaEntry>
</Replace>
 
The only one that looks like it might be the root of the problem is the "CBP" one. But even that one shouldn't cause the issue I would not think. All it is doing is replacing the original definition of PROMOTION_GREAT_GENERAL with an exactly-identical one. Theoretically this should have a net effect that is the same as not even having this code in the CBP mod:
Code:
<Replace>
	<Type>PROMOTION_GREAT_GENERAL</Type>
	<Description>TXT_KEY_PROMOTION_GREAT_GENERAL</Description>
	<Help>TXT_KEY_PROMOTION_GREAT_GENERAL_HELP</Help>
	<Sound>AS2D_IF_LEVELUP</Sound>
	<GreatGeneral>true</GreatGeneral>
	<PortraitIndex>59</PortraitIndex>
	<IconAtlas>ABILITY_ATLAS</IconAtlas>
	<PediaType>PEDIA_ATTRIBUTES</PediaType>
	<PediaEntry>TXT_KEY_PEDIA_PROMOTION_GREAT_GENERAL</PediaEntry>
</Replace>
I am leaning toward there being a bug somewhere in an lua file or in the dll associated with CP/CBP. I don't use them myself so am not sure how and how much CP re-jiggers which lua files do what, or if there might be a bug in the CP dll.

Stymied as to where else to look.

So, download the attached zip and extract the LUA test (v 1) from within it. It is a mod called LUA test which has lua code I hope will implement a temporary fix that will allow you to 'rescue' your current game so far as this great general issue is concerned. I have used bits and pieces of this code before, I am just not 100% sure the 'frankensteining' of it all into one unified bit of code does not have errors.

The mod will:
  1. Not "affect" saved games so far as being able to add it to a reload of a saved game goes. It will be OK to do so, and is designed for this very purpose.
  2. Every turn as part of turn processing it will look at your Great General progress meter and if the meter is higher than the current number of points needed for a great general it will spawn a great general in or next to your capital city. It will then adjust your accumulated points in the great general progress meter.
  3. It will only create one Great General unit per turn, so in your current situation it will take a few turns to catch up with your current number of points in the Great General Progress Meter
  4. It will grab and create the correct type of Great General unit based on the civ you are playing. So in the case of the Mongrels you would get the Khan instead of the standard Great General unit.
  5. It is not coded to do anything for Great Admirals.
 

Attachments

  • LUA test (v 1).zip
    1.4 KB · Views: 71
I am leaning toward there being a bug somewhere in an lua file or in the dll associated with CP/CBP. I don't use them myself so am not sure how and how much CP re-jiggers which lua files do what, or if there might be a bug in the CP dll.

Stymied as to where else to look.

So, download the attached zip and extract the LUA test (v 1) from within it. It is a mod called LUA test which has lua code I hope will implement a temporary fix that will allow you to 'rescue' your current game so far as this great general issue is concerned. I have used bits and pieces of this code before, I am just not 100% sure the 'frankensteining' of it all into one unified bit of code does not have errors.

The mod will:
  1. Not "affect" saved games so far as being able to add it to a reload of a saved game goes. It will be OK to do so, and is designed for this very purpose.
  2. Every turn as part of turn processing it will look at your Great General progress meter and if the meter is higher than the current number of points needed for a great general it will spawn a great general in or next to your capital city. It will then adjust your accumulated points in the great general progress meter.
  3. It will only create one Great General unit per turn, so in your current situation it will take a few turns to catch up with your current number of points in the Great General Progress Meter
  4. It will grab and create the correct type of Great General unit based on the civ you are playing. So in the case of the Mongrels you would get the Khan instead of the standard Great General unit.
  5. It is not coded to do anything for Great Admirals.

It worked! :D

Thanks so much for helping me to the point of actually going out of your way and watching this thread all day. You've been more reliable/helpful than any sort of professional customer service I've ever experienced, you're awesome. People like you make gaming communities like this great. <3
 
I was looking through the database log-file that you posted and found this in an error message:
Code:
The Kavhan replaces the Great General....blah blah blah
Do you happen to remember whose mod and what mod it is that has this unit as a replacement for the Great General. This may be a red herring but I would like to take a look at this mod to see if there is anything going on within it that could be causing the problem.

I won't have a chance to look at it until this afternoon....but still.
It worked! :D

Thanks so much for helping me to the point of actually going out of your way and watching this thread all day. You've been more reliable/helpful than any sort of professional customer service I've ever experienced, you're awesome. People like you make gaming communities like this great. <3
:D
 
I was looking through the database log-file that you posted and found this in an error message:
Code:
The Kavhan replaces the Great General....blah blah blah
Do you happen to remember whose mod and what mod it is that has this unit as a replacement for the Great General. This may be a red herring but I would like to take a look at this mod to see if there is anything going on within it that could be causing the problem.

I won't have a chance to look at it until this afternoon....but still.

DJSHenninger's Bulgaria, I'd attach the mod file but it's apparently too big. x.x

Here's the Steam Workshop link: https://steamcommunity.com/sharedfiles/filedetails/?id=270475439
 
See Posts 5 and 6 of this thread. I suspect the discussion that came up, and the additional information whoward69 provided, are pointing to the root of the problem. The 80-million-dollar question, though, is which mod(s) is(are) making (a) change(s) to the game's UnitPromotions system to such a degree that the unintended effect you encountered is introduced as a result.
 
Top Bottom