CCTP Working Version Progress

GAMEBREAK: \CCTP\Technologies\Technology_PrereqTechs.sql circular dependence between TECH_PHILOSOPHY, TECH_DEMOCRACY, TECH_CODE_OF_LAWS. and TECH_GOVERNMENT. Trying to research any of these or any tech which depends on these will cause the game to be unable to resolve which to research first and the infinite loop crashes the game.

Quick fix for those who are hurt by this:
  • Apply the first hotfix given in post http://forums.civfanatics.com/showpost.php?p=13131589&postcount=455
  • Open \CCTP\Technologies\Technology_PrereqTechs.sql using any simple text editor (e.g. notepad++, wordpad, you don't need special software for this but because of how long the lines are using simple notepad may struggle to show the lines). Turn off word wrap / line wrap
  • go to line 393. This should read "SELECT 'TECH_DEMOCRACY', 'TECH_GOVERNMENT' UNION ALL"
  • put "--" at the start of the line. If using notepad++ this line should now appear greyed out as a commented line.
  • Open Community Call To Power V.4.04 (v 1).modinfo using any simple text editor (e.g. notepad++, wordpad, you don't need special software for this but because of how long the lines are using simple notepad may struggle to show the lines). Turn off word wrap / line wrap
  • go to line 2896. This should end with "CCTP/Technologies/Technology_PrereqTechs.sql</File>"
  • remove the checksum after the md5= tag and replace it with
  • - 4ba5d4b3b1285291b0e1c123e2561ab0 if you also used the previous hotfix
  • - 2f06e6ea059abe5e2a92bf6a8a3eebf6 if you did not use the previous hotfix (only possible if you start the game at classical era or later)
  • Save the changes. you will have to fully exit the game and open it again before it takes effect.
  • When you reopen the game make sure you re-enable the mod as modifying the files will turn off the mod by default as the game detects the change

hotfix seems to break games, I'm looking into why this would break it when the other hotfix worked. I'm hoping it's not related to this being a cross tech tree change

Note: this is compatible with my previous hotfix as no line numbers are changed, but note the two md5 numbers
Note 2: This part of the tech tree looks wrong: why is democracy needed for philosophy and why is government after democracy? Why is government not part of the tree towards taxes? Why is alphabet needed for democracy? Something illogical here. The hotfix will get the game running but doesn't balance anything
 
@rottijumbo: Thx for the advice, it worked :goodjob: . I doesnt know this mod before.

@Tritous: I am exited to know whats the solution is ;)

Edit: @Tritous this was the first thing i was trying, and this results in a none loading game for me. For you not?
 
Did you completely close the game and exit to windows (or whatever os you run)? You have to restart the game in order for it to identify the changed files and load them correctly

Next set of testing to see what I can do will be this evening, I have work to go to again. I'm now officially annoyed that the sql is not doing what I tell it to do, and fully motivated to beat it into submission [pissed] (my usual approach to software design)

edit: and now my testing is completely blocked because steam is down and wont even start in "offline mode"
 
the first hotfix has worked. The reason the second hotfix hasn't worked I do not know but I have suspicions, Unfortunately with steam down I'm blocked from testing anything.

It's not like I actually know sql or Civ V modding, I'm having to learn as I go along :P
 
Trying to figure out why I can't get the game to work now even when I roll back to the original files. something has gone wrong somewhere.

On the bright side I have some new findings to be fixed thanks to the game debugger. Don't need the game to work to be able to analyse it :p:

Log data

Spoiler :

database.log

[40502.430] near "(": syntax error
[40502.430] column IconFontTexture is not unique
[40502.430] While executing - 'insert into IconFontTextures('IconFontTexture', 'IconFontTextureFile') values (?, ?);'
[40502.430] In XMLSerializer while inserting row into table insert into IconFontTextures('IconFontTexture', 'IconFontTextureFile') with values (ICON_FONT_TEXTURE_ELECTRICITY, electricity-fonticon, ).
[40502.430] In XMLSerializer while updating table IconFontTextures from file CCTP/Resources/CCTPFontIconAtlas.xml.
[40502.430] column IconFontTexture is not unique
[40502.477] no such column: TechType
[40502.477] near "10": syntax error
[40502.508] 3 values for 4 columns
[40502.508] no such table: CustomModOptions
[40503.272] PRIMARY KEY must be unique
[40503.272] PRIMARY KEY must be unique
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/Global - Pro-rata Buildings Purchase (v 2)/GlobalProrataBuildingsPurchase.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/Global - Pro-rata Buildings Purchase (v 2)/GlobalProrataBuildingsPurchase.xml.
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/GlobalCityForestBonus/GlobalCityForestBonus.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/GlobalCityForestBonus/GlobalCityForestBonus.xml.
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/GlobalCityWorkingDistance/GlobalCityWorkingDistance.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/GlobalCityWorkingDistance/GlobalCityWorkingDistance.xml.
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/GlobalCSRazeRarely/GlobalCSRazeRarely.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/GlobalCSRazeRarely/GlobalCSRazeRarely.xml.
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/GlobalGratefulSettlers/GlobalGratefulSettlers.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/GlobalGratefulSettlers/GlobalGratefulSettlers.xml.
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/GlobalPassableForts/GlobalPassableForts.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/GlobalPassableForts/GlobalPassableForts.xml.
[40503.381] no such table: CustomModOptions
[40503.381] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.381] Database::XMLSerializer (DLL Support/Tunnel/ImprovementTunnel.xml): There was an error executing the update statement! See Database.log for details.
[40503.381] In XMLSerializer while updating table CustomModOptions from file DLL Support/Tunnel/ImprovementTunnel.xml.
[40503.600] no such table: CustomModOptions
[40503.600] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40503.600] Database::XMLSerializer (DLL Support/GlobalLocalGenerals/GlobalLocalGenerals.xml): There was an error executing the update statement! See Database.log for details.
[40503.600] In XMLSerializer while updating table CustomModOptions from file DLL Support/GlobalLocalGenerals/GlobalLocalGenerals.xml.
[40505.004] column Type is not unique
[40505.004] While executing - 'insert into Beliefs('Type', 'Description', 'ShortDescription', 'Pantheon') values (?, ?, ?, ?);'
[40505.004] In XMLSerializer while inserting row into table insert into Beliefs('Type', 'Description', 'ShortDescription', 'Pantheon') with values (BELIEF_GARUDA, TXT_KEY_BELIEF_GARUDA, TXT_KEY_BELIEF_GARUDA_SHORT, 1, ).
[40505.004] In XMLSerializer while updating table Beliefs from file CCTP/Religion/CCTP_Beliefs.xml.
[40505.004] column Type is not unique
[40505.519] no such table: CustomModOptions
[40505.519] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40505.519] Database::XMLSerializer (DLL Support/Trade - Marble Shipments (v 1)/TradeMarbleShipments.xml): There was an error executing the update statement! See Database.log for details.
[40505.519] In XMLSerializer while updating table CustomModOptions from file DLL Support/Trade - Marble Shipments (v 1)/TradeMarbleShipments.xml.
[40505.534] no such table: CustomModOptions
[40505.534] In Query - UPDATE CustomModOptions SET "Value" = ? WHERE "Name" = ?;
[40505.534] Database::XMLSerializer (DLL Support/Religion - Recurring Purchase Notify (v 1)/ReligionRecurringPurchaseNotify.xml): There was an error executing the update statement! See Database.log for details.
[40505.534] In XMLSerializer while updating table CustomModOptions from file DLL Support/Religion - Recurring Purchase Notify (v 1)/ReligionRecurringPurchaseNotify.xml.
[40505.768] columns Language, Tag are not unique
[40505.768] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[40505.768] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with values (TXT_KEY_RESOURCE_FLAX, Flax, ).
[40505.768] In XMLSerializer while updating table Language_en_US from file CCTP/Text/CCTP_Text_Resources.xml.
[40505.768] columns Language, Tag are not unique
[40511.384]


stopwatch.log

[40498.857] , ActivateModsAndDLCForEnabledMods - Get Enabled Mods, 0.000149
[40500.589] , SetActiveDLCandMods - Import Mod Files into filesystem, 0.218320
[40500.589] , Update Database - Database/Reforestation.sql, 0.000782
[40500.667] , Update Database - Localization/Reforest_en_US.xml, 0.068046
[40500.714] , Update Database - Localization/Reforest_de_DE.xml, 0.055932
[40500.792] , Update Database - Localization/Reforest_fr_FR.xml, 0.065069
[40500.839] , Update Database - PTT - Terrains.xml, 0.048425
[40500.839] , Update Database - XML/BuildingsLighthouseNearSea.xml, 0.000425
[40500.839] , Update Database - XML/GlobalEnableMagellanDLL.xml, 0.000350
[40500.901] , Update Database - XML/GlobalEnableMagellan.xml, 0.063775
[40500.963] , Update Database - XML/PromotionsExtraCargo.xml, 0.056695
[40500.963] , Update Database - XML/PromotionsNoInstaHeal.xml, 0.000385
[40501.026] , Update Database - XML/UIAntiquitiesSiteTooltips.xml, 0.064642
[40501.026] , Update Database - XML/UIAntiquitiesSiteTooltipsDLL.xml, 0.000462
[40501.073] , Update Database - XML/UIAutoMapPins.xml, 0.055657
[40501.135] , Update Database - XML/UICondensedPromotions.xml, 0.056720
[40501.197] , Update Database - XML/UIImprovedCityBanner.xml, 0.056641
[40501.244] , Update Database - FlagIcons.xml, 0.056294
[40501.307] , Update Database - XML/UIMapPins.xml, 0.065207
[40501.385] , Update Database - XML/MiniMapPanel.xml, 0.065005
[40501.431] , Update Database - XML/UIAntiquities.xml, 0.056858
[40501.494] , Update Database - XML/MiniMapPanel.xml, 0.056052
[40501.541] , Update Database - XML/UIBarbarians.xml, 0.056756
[40501.619] , Update Database - XML/MiniMapPanel.xml, 0.064987
[40501.665] , Update Database - XML/UILuxuries.xml, 0.056420
[40501.728] , Update Database - XML/MiniMapPanel.xml, 0.064966
[40501.790] , Update Database - XML/UIResources.xml, 0.056820
[40501.853] , Update Database - XML/UIOverlayRoadAndRail.xml, 0.056172
[40501.899] , Update Database - XML/UISummaryAntiquities.xml, 0.056997
[40501.977] , Update Database - XML/UISummaryBarbarians.xml, 0.064710
[40502.024] , Update Database - XML/UISummaryCityStates.xml, 0.056760
[40502.087] , Update Database - XML/UISummaryClock.xml, 0.056206
[40502.149] , Update Database - XML/UISummaryLuxuries.xml, 0.065040
[40502.211] , Update Database - XML/UISummarySpecialists.xml, 0.056760
[40502.274] , Update Database - XML/UIUnitListEnhancements.xml, 0.072723
[40502.352] , Update Database - XML/UIUpgradeTree.xml, 0.073349
[40502.352] , Update Database - SQL/UIUpgradeTree.sql, 0.000241
[40502.414] , Update Database - XML/UIWonderPlanner.xml, 0.064976
[40502.414] , Update Database - Barb - exp.xml, 0.000314
[40502.414] , Update Database - CCTP/Resources/Resources.sql, 0.001274
[40502.414] , Update Database - CCTP/Resources/Resource_YieldChanges.sql, 0.000435
[40502.414] , Update Database - CCTP/Resources/Resource_TerrainBooleans.sql, 0.000405
[40502.430] , Update Database - CCTP/Resources/ArtDefines_Resources.sql, 0.006182
[40502.430] , Update Database - CCTP/Resources/Improvement_ResourceType_Yields.sql, 0.000412
[40502.430] , Update Database - CCTP/Resources/Improvement_ResourceTypes.sql, 0.001154
[40502.430] , Update Database - CCTP/Resources/Resource_QuantityTypes.sql, 0.000164
[40502.430] , Update Database - CCTP/Resources/Resource_Flavors.sql, 0.000536
[40502.430] , Update Database - CCTP/Resources/Resource_FeatureTerrainBooleans.sql, 0.000251
[40502.430] , Update Database - CCTP/Resources/Resource_FeatureBooleans.sql, 0.000245
[40502.430] , Update Database - CCTP/Resources/CCTPFontIconAtlas.xml, 0.000879
[40502.445] , Update Database - CCTP/Resources/CCTP_Resources.xml, 0.009926
[40502.445] , Update Database - CCTP/Units/CavemanArt.sql, 0.001076
[40502.445] , Update Database - CCTP/IconAtlas/CCTP_IconAtlas.sql, 0.000381
[40502.461] , Update Database - CCTP/Technologies/Technologies.sql, 0.024144
[40502.461] , Update Database - DLL Support/Units - Steampunk Airships (v 9)/SQL/UnitsSteampunkAirships.sql, 0.000259
[40502.477] , Update Database - CCTP/Technologies/Technology_PrereqTechs.sql, 0.004899
[40502.477] , Update Database - CCTP/Technologies/CCTP_TechnologyUpdate.sql, 0.000429
[40502.477] , Update Database - CCTP/Technologies/Technology_Flavors.sql, 0.001366
[40502.492] , Update Database - CCTP/Technologies/TechIcons.xml, 0.020906
[40502.492] , Update Database - CCTP/Technologies/Eras.xml, 0.001067
[40502.492] , Update Database - CCTP/Art Defines/Units/UnitMemberInfos.sql, 0.000936
[40502.492] , Update Database - CCTP/Art Defines/Units/UnitInfoMemberInfos.sql, 0.000531
[40502.492] , Update Database - CCTP/Art Defines/Units/UnitInfos.sql, 0.000777
[40502.492] , Update Database - CCTP/Art Defines/Units/MemberCombatWeapons.sql, 0.001649
[40502.508] , Update Database - CCTP/Art Defines/Units/MemberCombats.sql, 0.001919
[40502.508] , Update Database - CCTP/Improvements/CCTP_Improvements.sql, 0.000306
[40502.508] , Update Database - CCTP/Tweaks/UpdateUnits.sql, 0.000371
[40502.508] , Update Database - CCTP/Promotions/PromotionsAllSiegeUnitsIndirectFire.sql, 0.001196
[40502.508] , Update Database - CCTP/Units/UnitClasses.sql, 0.003153
[40502.508] , Update Database - CCTP/Tweaks/CCTP_Various_Tweaks.sql, 0.000580
[40502.508] , Update Database - DLL Support/Units - Steampunk Airships (v 9)/SQL/UnitsSteampunkAirshipsDLL.sql, 0.000233
[40502.539] , Update Database - CCTP/Various/CCTP_Game Pace Rules.sql, 0.038894
[40502.555] , Update Database - CCTP/Various/CCTP_Features.xml, 0.002847
[40502.555] , Update Database - CCTP/Various/CCTP_GlobalDefines.xml, 0.003122
[40502.555] , Update Database - CCTP/Various/CCTP_HurryInfos.xml, 0.000334
[40502.555] , Update Database - CCTP/Various/CCTP_Terrains.xml, 0.001562
[40502.555] , Update Database - CCTP/Various/CCTP_Worlds.xml, 0.000540
[40502.555] , Update Database - CCTP/Buildings/CCTP_Building_TechAndPrereqs.xml, 0.000729
[40502.555] , Update Database - CCTP/Buildings/BuildingClasses.xml, 0.002195
[40502.570] , Update Database - CCTP/Buildings/BuildingIcons.xml, 0.013326
[40502.586] , Update Database - CCTP/Buildings/MonopolyBuildingIcons.xml, 0.007584
[40502.586] , Update Database - CCTP/Buildings/Projects.xml, 0.000837
[40502.586] , Update Database - CCTP/Buildings/Specialists.xml, 0.000643
[40502.664] , Update Database - CCTP/AI/CCTPLeaders.xml, 0.078524
[40502.664] , Update Database - CCTP/AI/CCTP_GlobalAIDefines.xml, 0.001977
[40502.664] , Update Database - CCTP/AI/CCTP_BetterAI.xml, 0.004591
[40502.773] , Update Database - CCTP/Text/CCTP_MonopolyText.xml, 0.108872
[40502.835] , Update Database - CCTP/Text/TechTreeText.xml, 0.064614
[40502.835] , Update Database - CCTP/Units/Builds.xml, 0.001646
[40502.835] , Update Database - CCTP/Units/UnitsThatIgnoreBorders.xml, 0.000747
[40502.835] , Update Database - CCTP/Units/Update_UnitArtDefines.xml, 0.001366
[40502.898] , Update Database - Shared/HERO/HeroesLogic.xml, 0.052858
[40502.898] , Update Database - Shared/SKI/ski.xml, 0.000575
[40502.898] , Update Database - Shared/Buildings - Lighthouse Near Sea (v 2)/XML/BuildingsLighthouseNearSea.xml, 0.000453
[40502.898] , Update Database - CCTP/Religion/CCTP_Beliefs.xml, 0.005721
[40502.898] , Update Database - CCTP/Tweaks/CiV_CCTPTweaks.xml, 0.000951
[40502.913] , Update Database - CCTP/Tweaks/CCTPReligious_Traits.xml, 0.005046
[40502.913] , Update Database - CCTP/Tweaks/CCTP_Venice_Tweak.xml, 0.000434
[40502.913] , Update Database - CCTP/Buildings/CCTP_BuildingClass.xml, 0.003250
[40502.976] , Update Database - CCTP/Buildings/CCTP_BuildingFlavor.xml, 0.071151
[40502.991] , Update Database - CCTP/Buildings/CCTP_BuildingNeeded.xml, 0.002531
[40503.007] , Update Database - CCTP/Policies/CCTP_Policies.xml, 0.013347
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingUpdates.xml, 0.017887
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingFeatureYieldChanges.xml, 0.001627
[40503.023] , Update Database - CCTP/Buildings/CCTP_DummyBuildings.xml, 0.004008
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingResourceQuantity.xml, 0.001174
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingLocalResources.xml, 0.000259
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingRiverPlotYieldChanges.xml, 0.000401
[40503.023] , Update Database - CCTP/Buildings/CCTP_SeaPlotYieldChanges.xml, 0.000519
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingLakePlotYieldChanges.xml, 0.000416
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingsSpecialistYieldChanges.xml, 0.002399
[40503.023] , Update Database - CCTP/Buildings/CCTP_BuildingResourceQuantityRequirement.xml, 0.001775
[40503.038] , Update Database - CCTP/Buildings/CCTP_BuildingResourcesYieldChanges.xml, 0.003045
[40503.038] , Update Database - CCTP/Buildings/CCTP_BuildingTerrainYieldChanges.xml, 0.000632
[40503.038] , Update Database - CCTP/Buildings/CCTP_BuildingTechEnhancedYieldChanges.xml, 0.000490
[40503.038] , Update Database - CCTP/Buildings/CCTP_BuildingYieldChanges.xml, 0.009845
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingYieldModifiers.xml, 0.001330
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingYieldChangesPerPop.xml, 0.001047
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingGlobalYieldModifier.xml, 0.000378
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingFreeUnits.xml, 0.001023
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingUnitCombatModifier.xml, 0.000313
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingUnitDomainProductionModifier.xml, 0.000333
[40503.054] , Update Database - CCTP/Buildings/CCTP_UnitCombatFreeExperiences.xml, 0.000376
[40503.054] , Update Database - CCTP/Buildings/CCTP_BuildingDomainFreeExperiences_.xml, 0.000480
[40503.069] , Update Database - CCTP/Buildings/CCTP_Buildings.xml, 0.022095
[40503.085] , Update Database - CCTP/Improvements/CCTP_Improvements.xml, 0.005625
[40503.085] , Update Database - CCTP/Promotions/CCTP_Promotions.xml, 0.003740
[40503.272] , Update Database - CCTP/GreatWork/TwentiethCentury.xml, 0.185053
[40503.272] , Update Database - CCTP/Buildings/CCTP_BuildingClassHappiness.xml, 0.000600
[40503.272] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasVarious.xml, 0.002313
[40503.272] , Update Database - CCTP/Various/autoincrement.sql, 0.002141
[40503.303] , Update Database - CCTP/Units/Units.xml, 0.036211
[40503.303] , Update Database - CCTP/Units/UnitsRailroadArtilleryArt.xml, 0.000665
[40503.303] , Update Database - CCTP/Buildings/CCTP_BuildingThemeBonus.xml, 0.001274
[40503.381] , Update Database - CCTP/Various/CCTP_Processes.xml, 0.064635
[40503.381] , Update Database - DLL Support/Global - Pro-rata Buildings Purchase (v 2)/GlobalProrataBuildingsPurchase.xml, 0.000498
[40503.381] , Update Database - DLL Support/GlobalCityForestBonus/GlobalCityForestBonus.xml, 0.000447
[40503.381] , Update Database - DLL Support/GlobalCityWorkingDistance/GlobalCityWorkingDistance.xml, 0.000489
[40503.381] , Update Database - DLL Support/GlobalCSRazeRarely/GlobalCSRazeRarely.xml, 0.000425
[40503.381] , Update Database - DLL Support/GlobalGratefulSettlers/GlobalGratefulSettlers.xml, 0.000426
[40503.381] , Update Database - DLL Support/GlobalPassableForts/GlobalPassableForts.xml, 0.000422
[40503.381] , Update Database - DLL Support/Tunnel/ImprovementTunnel.xml, 0.000446
[40503.381] , Update Database - DLL Support/Tunnel/ImprovementTunnelIcons.xml, 0.000717
[40503.381] , Update Database - CCTP/Buildings/CCTP_BuildingClassYieldChange.xml.xml, 0.001794
[40503.428] , Update Database - Shared/HERO/AdmiralsLogic.xml, 0.049923
[40503.522] , Update Database - CCTP/Text/CCTP_GameTextUS.xml, 0.082393
[40503.522] , Update Database - CCTP/Manpower/CCTP_Manpower_RQR.xml, 0.005014
[40503.522] , Update Database - CCTP/Buildings/MonopolyBuildings.xml, 0.007744
[40503.584] , Update Database - CCTP/Handycap/CCCT_Decimatus..xml, 0.059379
[40503.584] , Update Database - CCTP/Buildings/CCTP_BuildingLocalResourcesOrs.xml, 0.002026
[40503.584] , Update Database - Shared/Policies grant buildings/Policy_FreeBuildingClass.xml, 0.001428
[40503.584] , Update Database - CCTP/Buildings/CCTP_FreeBuildings.xml, 0.001206
[40503.600] , Update Database - DLL Support/GlobalLocalGenerals/GlobalLocalGenerals.xml, 0.000590
[40504.052] , Update Database - CCTP/Text/CCTP_Text_Buildings.xml, 0.461380
[40504.115] , Update Database - CCTP/Text/CCTP_Text_Improvements.xml, 0.063761
[40504.177] , Update Database - CCTP/Text/CCTP_Text_Policies.xml, 0.064717
[40504.239] , Update Database - CCTP/Text/CCTP_Text_Process.xml, 0.056474
[40504.302] , Update Database - CCTP/Text/CCTP_Text_Promotions.xml, 0.065535
[40504.380] , Update Database - CCTP/Text/CCTP_Text_Religion.xml, 0.073106
[40504.458] , Update Database - CCTP/Text/CCTP_Text_Resources.xml, 0.073507
[40504.629] , Update Database - CCTP/Text/CCTP_Text_Units.xml, 0.173789
[40504.676] , Update Database - CCTP/Text/CCTP_Text_Various.xml, 0.055960
[40504.848] , Update Database - CCTP/Text/CCTP_Text_Technologies.xml, 0.159022
[40504.926] , Update Database - CCTP/Text/CCTP_Text_Traits.xml, 0.078853
[40504.926] , Update Database - CCTP/Text/CCTP_Text_Civs.xml, 0.000361
[40504.973] , Update Database - CCTP/Buildings/CCTP_World_Wonders.xml, 0.050617
[40504.973] , Update Database - CCTP/Buildings/CCTP_Wonder_Classes.xml, 0.010023
[40505.004] , Update Database - CCTP/Policies/CCTP_Policy2.xml, 0.015671
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyBuildingClassHappiness.xml, 0.007574
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyCapitalYieldChanges.xml, 0.000576
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyCityYields.xml, 0.000407
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyFlavors.xml, 0.001295
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyImprovementCultureChanges.xml, 0.000398
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyImprovementYieldChanges.xml, 0.000991
[40505.004] , Update Database - CCTP/Policies/CCTP_PolicyPreRequest.xml, 0.000802
[40505.004] , Update Database - CCTP/Religion/CCTP_Beliefs.xml, 0.000720
[40505.004] , Update Database - CCTP/Religion/CCTP_Belief_ImprovementYieldChanges.xml, 0.000890
[40505.019] , Update Database - CCTP/Religion/CCTP_BeliefBuildingClassHappiness.xml, 0.003737
[40505.019] , Update Database - CCTP/Religion/CCTP_BeliefBuildingClassTourism.xml, 0.003794
[40505.019] , Update Database - CCTP/Religion/CCTP_BeliefPurchaseFaithBuildings.xml, 0.000430
[40505.019] , Update Database - CCTP/Religion/CCTP_BeliefResourceYieldChanges.xml, 0.001236
[40505.019] , Update Database - CCTP/Religion/CCTP_BeliefTerrainYieldChanges.xml, 0.000352
[40505.019] , Update Database - CCTP/Religion/CCTP_BeliefVarious.xml, 0.000879
[40505.019] , Update Database - CCTP/Buildings/CCTP_Dummy.xml, 0.001541
[40505.519] , Update Database - CCTP/Text/CCTP_Text_Wonder.xml, 0.502656
[40505.519] , Update Database - DLL Support/Trade - Marble Shipments (v 1)/TradeMarbleShipments.xml, 0.000631
[40505.519] , Update Database - DLL Support/Stealth Bombers Allowed on Carriers (v 1)/BombersOnCarriers.xml, 0.000760
[40505.534] , Update Database - DLL Support/Religion - Recurring Purchase Notify (v 1)/ReligionRecurringPurchaseNotify.xml, 0.000440
[40505.534] , Update Database - CCTP/Buildings/CCTP_Palace_Addons.xml, 0.005143
[40505.659] , Update Database - CCTP/Text/CCTP_Text_CapitalBuilding.xml, 0.134458
[40505.675] , Update Database - CCTP/Buildings/CCTP_BuildingPrereqBuildingClass.xml, 0.000987
[40505.753] , Update Database - CCTP/Text/CCTP_Text_NationalBuildings.xml, 0.089061
[40505.753] , Update Database - CCTP/Text/CCTP_Text_Special.xml, 0.000341
[40505.753] , Update Database - CCTP/Buildings/CCTP_BuildingNationalWonders.xml, 0.000832
[40505.753] , Update Database - CCTP/Buildings/MonopolyBuildingClasses.xml, 0.001591
[40505.768] , Update Database - CCTP/Buildings/CCTP_BuildingVarious.xml, 0.001461
[40505.768] , Update Database - CCTP/Buildings/CCTP_FaithBuildings.xml, 0.001964
[40505.768] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasResources.xml, 0.004945
[40505.768] , Update Database - CCTP/Text/CCTP_Text_Resources.xml, 0.001704
[40505.768] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasUnits.xml, 0.001948
[40505.768] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasBuildings.xml, 0.003194
[40505.800] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasWonders.xml, 0.018908
[40505.800] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasTechnologies.xml, 0.001671
[40505.800] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasUnits.xml, 0.001649
[40505.800] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasVarious.xml, 0.001840
[40505.862] , Update Database - DLL Support/Units - Steampunk Airships (v 9)/XML/UnitsSteampunkAirships.xml, 0.055189
[40505.862] , SetActiveDLCandMods - Perform OnModActivated Actions, 5.262670


Analysis

Spoiler :

issue in
[40502.430] , Update Database - CCTP/Resources/CCTPFontIconAtlas.xml, 0.000879
cause
[40502.430] column IconFontTexture is not unique

Issue in one of
[40502.477] , Update Database - CCTP/Technologies/Technology_PrereqTechs.sql, 0.004899
[40502.477] , Update Database - CCTP/Technologies/CCTP_TechnologyUpdate.sql, 0.000429
[40502.477] , Update Database - CCTP/Technologies/Technology_Flavors.sql, 0.001366
cause(s)
[40502.477] no such column: TechType
[40502.477] near "10": syntax error

Issue in one of
[40502.508] , Update Database - CCTP/Art Defines/Units/MemberCombats.sql, 0.001919
[40502.508] , Update Database - CCTP/Improvements/CCTP_Improvements.sql, 0.000306
[40502.508] , Update Database - CCTP/Tweaks/UpdateUnits.sql, 0.000371
[40502.508] , Update Database - CCTP/Promotions/PromotionsAllSiegeUnitsIndirectFire.sql, 0.001196
[40502.508] , Update Database - CCTP/Units/UnitClasses.sql, 0.003153
[40502.508] , Update Database - CCTP/Tweaks/CCTP_Various_Tweaks.sql, 0.000580
[40502.508] , Update Database - DLL Support/Units - Steampunk Airships (v 9)/SQL/UnitsSteampunkAirshipsDLL.sql, 0.000233
Cause(s)
[40502.508] 3 values for 4 columns
[40502.508] no such table: CustomModOptions

Issue in one of
[40503.272] , Update Database - CCTP/GreatWork/TwentiethCentury.xml, 0.185053
[40503.272] , Update Database - CCTP/Buildings/CCTP_BuildingClassHappiness.xml, 0.000600
[40503.272] , Update Database - CCTP/IconAtlas/CCTP_IconAtlasVarious.xml, 0.002313
[40503.272] , Update Database - CCTP/Various/autoincrement.sql, 0.002141
Cause(s)
[40503.272] PRIMARY KEY must be unique
[40503.272] PRIMARY KEY must be unique

Multiple issues in not being able to find the table CustomModOptions. Possible affected files (TBC if these are the cause or if the cause is the creater of the table):
Issues in:
[40503.381] , Update Database - CCTP/Various/CCTP_Processes.xml, 0.064635
[40503.381] , Update Database - DLL Support/Global - Pro-rata Buildings Purchase (v 2)/GlobalProrataBuildingsPurchase.xml, 0.000498
[40503.381] , Update Database - DLL Support/GlobalCityForestBonus/GlobalCityForestBonus.xml, 0.000447
[40503.381] , Update Database - DLL Support/GlobalCityWorkingDistance/GlobalCityWorkingDistance.xml, 0.000489
[40503.381] , Update Database - DLL Support/GlobalCSRazeRarely/GlobalCSRazeRarely.xml, 0.000425
[40503.381] , Update Database - DLL Support/GlobalGratefulSettlers/GlobalGratefulSettlers.xml, 0.000426
[40503.381] , Update Database - DLL Support/GlobalPassableForts/GlobalPassableForts.xml, 0.000422
[40503.381] , Update Database - DLL Support/Tunnel/ImprovementTunnel.xml, 0.000446
[40503.600] , Update Database - DLL Support/GlobalLocalGenerals/GlobalLocalGenerals.xml, 0.000590
[40505.004] , Update Database - CCTP/Religion/CCTP_Beliefs.xml, 0.000720
[40505.519] , Update Database - DLL Support/Trade - Marble Shipments (v 1)/TradeMarbleShipments.xml, 0.000631
[40505.534] , Update Database - DLL Support/Religion - Recurring Purchase Notify (v 1)/ReligionRecurringPurchaseNotify.xml, 0.000440

Issue in
[40505.768] , Update Database - CCTP/Text/CCTP_Text_Resources.xml, 0.001704
Cause
[40505.768] columns Language, Tag are not unique
[40505.768] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[40505.768] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with values (TXT_KEY_RESOURCE_FLAX, Flax, ).
[40505.768] In XMLSerializer while updating table Language_en_US from file CCTP/Text/CCTP_Text_Resources.xml.
[40505.768] columns Language, Tag are not unique

 
follow up, some of the issues tracked down:

\CCTP\Technologies\Technology_Flavors.sql
Line 75 - no comma between the flavour and the value (most likely the syntax error, no union between selects
Line 122 - no union between selects
Line 190 - no union between selects
line 394 - no union between selects
line 586 - no union between selects
line 1000 - no union between selects

[40502.430] near "(": syntax error
\CCTP\Resources\Resource_Flavors.sql line 68 - ; at end instead of ,

[40502.508] 3 values for 4 columns
\CCTP\Improvements\CCTP_Improvements.sql line 19 only has 3 columns instead of 4. The yield is missing

CCTP/Technologies/Technology_PrereqTechs.sql - Refers to column "TechType" in table technologies
CCTP/Technologies/CCTP_TechnologyUpdate.sql - Refers to column "TechType" in table technologies
CCTP/Technologies/Technology_Flavors.sql - Refers to column "TechType" in table technologies
BUT
CCTP/Technologies/Technologies.sql - creates table technologies with a field "Type"

Update: prereqtechs and flavours have a translation mapping from techtype to technologies(Type). The issue is technology update: where it refers to the technologies table it should use Type, where it refers to prereqs it should use TechType

general comment: whoever made these sql files knew nothing about making code readable! crazy mix of misaligned tabbing and space characters - not so debug friendly
 
Awesome work Tritous, You should really team up with Gilga and get this mod organized. You have done so much already and think Gilga could use some help :)
 
Tritous, can't you launch steam in Offline mode and start Civ5?

Steam can't be started in offline mode until you log in. you can't log in offline (or when steam's servers are offline). you can log in then go offline and stay in offline mode for as long as you don't shut down your PC, but not start your PC then start steam in offline mode. Sends me spare.

@Taa I'm working heavy hours at work, have to travel quite a lot so often am not around, and come home 95% dead. I can't commit to support a mod as I can't guarantee I have that level of energy. I game to try and unwind and calm down so I don't have much time on top of that.

What I've done has just been a minute here and there investigating a bug I see, paying attention, and this morning cross referenced a couple of files: 30 minutes work while drinking coffee and slowly waking up. I'm glad it helps, but I can't promise more than that in a structured way.

If we all did the same: noting down the bugs, seaching the xml for the matching entries, and noting it down we could do a massive amount collectively while doing very little individually.

edit
Ok, now I'm officially miffed at this issue with the tech tree. I've got half a dozen other files fixed and I can make it work, but I cannot split this tree at the cross-branch line. I spent half a day learning sql but all I learned is there is nothing wrong in the change I made...
 
Hey Tritous, are you certain that Steam is down? I had a nasty bug with Steam recently, where I couldn't log in, but it ended up being a client-side issue. The TCP stack apparently needed to be reset.
 
Hey Tritous, are you certain that Steam is down? I had a nasty bug with Steam recently, where I couldn't log in, but it ended up being a client-side issue. The TCP stack apparently needed to be reset.

Steams's servers were down for about a day (or at least the EU ones) for "scheduled maintenance". They didn't tell us their schedule, typical steam....

Well I'm close to giving up on the PreReqTechs. I have made some fixes for some of the other things I found so I would have a shorter debug log but the second I touch the prereqs it breaks. My suspicion is it's the graphical mapping but that makes no sense as the algorithm on the tech tree drawing is pretty generic. This may need someone who actually knows the CIV V engine better to analyse it or at least to pass some of the knowledge on.
 
[40502.430] , Update Database - CCTP/Resources/CCTPFontIconAtlas.xml, 0.000879
cause
[40502.430] column IconFontTexture is not unique

Last 4 entries (ICON_RES_ELECTRICITY, ICON_RES_OLIVES, ICON_RES_OLIVE_OIL, ICON_RES_PLATINUM) are duplicates and need to be removed. Lines 88 to 91 are duplicates and need to be removed (commented out for now)

CCTP/Resources/Resources.sql - commented out line 33 as it's an empty (and not closed) table

CCTP\Technologies\Technology_Flavors.sql - Lines 1053, 1054, 1006, 982-985, 456, 412, 418, 342, 334, 313, 158, 75 are missing a union and line 559 has a double union. Note: this may relate to the reports of people of not very good AI with techs. if there are breaks in the flavours that could do it!

I have corrected these and everything in post 467. this doesn't have the tech tree fixes as I can't get those to work.
Gilgamesch you may want to use these updated versions of the files. After your next release this weekend I'll have a try at putting all the files into a normalised indenting and spacing policy. The result will be smaller files (up to 40% smaller), possibly slightly faster loading, and it will be easier for me to use tools and searches to hunt down bugs.

The attached files should work for everyone else too, but backup first of course :P
Note: I've also set the affects saves to true in my modinfo, as it is true!
 

Attachments

Sorry for the late response, was very busy in rl.

Ok lot of news i have to read before i restart working.

Good news i still worked on CCPT and i hope that i will upload 404 V2 today.


For he loading problem, i figured out it was the prerequested technologies.
So i reorganized the early techtree and the loading time is back to normal.

Thanks fo all the reports and tipps, you rock:=)
 
@Tritous thanks for all the news, in the current update the log list is much lesser then in V1 :=)
 
general comment: whoever made these sql files knew nothing about making code readable! crazy mix of misaligned tabbing and space characters - not so debug friendly

:cry: Cant tell you how many times i banged :wallbash:...my head because of damn sql problems, and yes the files are old and not user friendly.
 
when you release this version I'll give them a tidy up and teach you a couple of surprisingly easy tricks to handle them. It's very very clear to me that the SQLs have been created by 2-3 people, with 2 different people modifying them over the years. When I'm done one of the easiest ways to open them will be with excel as tab delimited text. Then you will see everything in nice neat columns and can filter and search easily. tab aligned tables were thrown out in the 80s because they are inconsistent and almost impossible to machine read in a sensible way. I will put it to a simple tab delimited text layout as it should be.

I'm half tempted to learn some LUA and have a look again at the algorithm for the techtree piping. It looks like it may be O(n^2) and with quite a few passes. It would take me a long time but my instinct tells me there is a way to optimise the algorithm to take less processing time based on my first look through. I may also have a look around at other SQL modifications. I'm fairly sure that straight value insertion is faster than building a big select union as it avoids database duplication in parallel. just a different way of coding exactly the same thing that will run faster - and have smaller file sizes
 
when you release this version I'll give them a tidy up and teach you a couple of surprisingly easy tricks to handle them. It's very very clear to me that the SQLs have been created by 2-3 people, with 2 different people modifying them over the years. When I'm done one of the easiest ways to open them will be with excel as tab delimited text. Then you will see everything in nice neat columns and can filter and search easily. tab aligned tables were thrown out in the 80s because they are inconsistent and almost impossible to machine read in a sensible way. I will put it to a simple tab delimited text layout as it should be.

I'm half tempted to learn some LUA and have a look again at the algorithm for the techtree piping. It looks like it may be O(n^2) and with quite a few passes. It would take me a long time but my instinct tells me there is a way to optimise the algorithm to take less processing time based on my first look through. I may also have a look around at other SQL modifications. I'm fairly sure that straight value insertion is faster than building a big select union as it avoids database duplication in parallel. just a different way of coding exactly the same thing that will run faster - and have smaller file sizes

Great:D

Dumb question, did you ever used modbuddy.
I could send you a modbuddy version of CCTP so that you could get open it as a dev.;)

There are several files (mostly sql) that are done by different peoples over the years.
I tried to make them more userfriendly, but as the progress of growing goes biggger and bigger, i decided to focus on the important parts first.

For the techpipes.
The plan is to include at least 2 new eras to the game. (Stone Age and one for the latere eras)
Will need lua changes, and new pics for the menue.
Also this would make the techtree looks more optimal then now.

One other point/problem with the current techtree is, adding new features like for example the priest specialist, brakes the whole techtree.

Not to mention other usefull lua tools, that also are incompatible with the techtree.
 
I'm an oldschool programmer and I prefer to go directly into the code in a basic text editor rather than trust other tools, especially ones aimed at non experienced programmers. anything that generates code has to either be 1: so generic that it is massively inefficient and makes bulky code or 2: unreliable. There are many different tools to help search, analyse and organise code but there remains only 1 tool for producing optimised and intelligent code: and that's a human (although expert programmers may push the definition of human a little). Because I work directly from the code I can learn new languages in ~1 week for syntax and semantics, <1 month for optimisation and advanced techniques: ultimately all languages have 1 thing in common which is they are for controlling a machine. Understand the machine and the language is easy.

If we are going to rely on lua tools there is always going to be a penalty in code size, loading time, efficiency of the code and ultimately it stops us from thinking and understanding the code as well as we might do otherwise. getting hands on in the code is the only way to really beat it. Think like a machine, see the database structure in memory, and see the linking keys weaving through the tables and suddenly the whole thing is much simpler.

I will not be here in CW15 (7-11th April) as I am travelling on a business trip again. I may be able to do some optimisation of the SQL before then. The LUA will take a little more learning time as it's a C derivative bolton language which depends entirely on the CIV5 data structure. That I have no reference anywhere to the CIV5 datastructure is what is slowing me down the most as I do not know what data is used for what by the game engine. If you know of any references on the database, libraries or APIs then I should be able to do a lot more with my limited time. Besides, I always like learning a new programming language: keeps me in good practise
 
Ok one day later....

The last problem before i can upload V2 is, i to have to create prerequest techs for he last two eras.
Reselected all 380 technologies then and hope it will fit better with the game pathing.

Damn a nasty work iam happy when im done.

But the good news is the loading time is back t normal.

When there are no new problems i will upload V2 today.
 
Back
Top Bottom