Thalassicus / cep-bnw

Civ V Communitas Expansion Pack
32 stars 22 forks source link

CityView.lua bug with CEP14.1 and CSDv14(Mac) #182

Closed WilsontheRed closed 10 years ago

WilsontheRed commented 10 years ago

The screenshots show what happened in my latest game but this is the fourth game it's happened to me (variety of leaders). All occurred using 14.1 of the Communitas pack and CSD v17. I've only noticed it after settling my fourth city. Simply put info from one city will show up in the city view of another. The info includes buildings and wonders built in the city, current production, and city yields. Producing or purchasing within the city works normally; I can purchase a monument in Rostov even though it's city view shows (incorrectly) that it already exists in the city.

The views below were generated by cycling through the cities from the city view: Rostov to Moscow to Rostov to Novgorod. The buildings shown in each city view represent what actually exists in Novgorod. You can see that the Spearman Rostov is building displays properly only after switching back from Moscow's view. The build text itself appears to correctly display what each city is currently building. I also could not expand the City Focus display.

The error is not consistent; I could have Moscow's wonders show up in another cities screen if I play around with it. I have the saved game file if that would help.

![Uploading Screen Shot 2014-02-08 at 3.59.21 PM.png . . .]() screen shot 2014-02-08 at 4 02 42 pm screen shot 2014-02-08 at 3 59 05 pm screen shot 2014-02-08 at 4 00 12 pm

WilsontheRed commented 10 years ago

Doesn't appear the Moscow image showed up in the first post:

screen shot 2014-02-08 at 3 59 21 pm

GrantSP commented 10 years ago

hmm...

I would say at first glance this is more of a 'refresh' issue with the display as opposed to a gameplay issue.

If you enter each city from the world map they show the correct information?

If the yields displayed, and units/buildings built are actually in the correct places then I don't think this is an issue of the mod, rather a lag in updating the screen with the game engine/your system.

I could be wrong. :smiley:

If you said you set the production queue in one city and it set it for another instead, then that is something of a mod issue.

Having said that, we will look in to it as it might just be something with the CityView.lua that needs attention.

WilsontheRed commented 10 years ago

Once the problem appears (again, seems to be around the fourth city settled) the city view does not display correctly from any method I try (entering city from world map, from "Choose Production", nor from cycling through from another screen). I have no way to correctly view the yields or buildings already existing and worse (since I can at least deduce what buildings exist based on what I can purchase) I can't adjust the city focus. I'll try another game with CSD disabled and let you know if that makes a difference.

On Feb 8, 2014, at 4:33 PM, GrantSP wrote:

hmm...

I would say at first glance this is more of a 'refresh' issue with the display as opposed to a gameplay issue.

If you enter each city from the world map they show the correct information?

If the yields displayed, and units/buildings built are actually in the correct places then I don't think this is an issue of the mod, rather a lag in updating the screen with the game engine/your system.

I could be wrong.

If you said you set the production queue in one city and it set it for another instead, then that is something of a mod issue.

Having said that, we will look in to it as it might just be something with the CityView.lua that needs attention.

— Reply to this email directly or view it on GitHub.

GrantSP commented 10 years ago

Please, and any other details you can provide. Check your logs also for any errors that may have slipped in.

stackpoint commented 10 years ago

This might be a YieldLibrary caching problem. I'll take a look too.

WilsontheRed commented 10 years ago

I'll keep playing around but after disabling CSD the issue did not come up; the City View screens worked as expected. I followed the CSD installation write up stickied in the Communitas civfanatics sub forum but I do play on an Mac; perhaps there's something funky going on with that combination.

On Feb 8, 2014, at 6:27 PM, GrantSP wrote:

Please, and any other details you can provide. Check your logs also for any errors that may have slipped in.

— Reply to this email directly or view it on GitHub.

stackpoint commented 10 years ago

Macs cannot use CSD with the DLL active. Could that be the problem?

WilsontheRed commented 10 years ago

Entirely possible; had a heck of a time tracking down info regarding which version to use and believe I ended up using the DLL version after failing to find anything to help me decide. I'll try again with the non-DLL version (assuming that is compatible with Communitas) and see how it goes.

On Feb 8, 2014, at 8:01 PM, stackpointer wrote:

Macs cannot use CSD with the DLL active. Could that be the problem?

— Reply to this email directly or view it on GitHub.

WilsontheRed commented 10 years ago

Ok, did a bit more experimenting on this.

The Communitas suite v3.14.1 and CSD-no DLL v14 mods both appear to work fine when I enable them individually. When I attempt to use both together I can't enter the City View via Choose Production on turn 1. I can enter the City View by clicking on the city but cannot choose production (I can select a Research tech). The Lua.log shows multiple errors involving CAT\Tools\TooltipWriter\

I appreciate any help you can give toward a solution but if this ends up being a Mac-centric issue I can certainly understand if it's put on the back burner. Let me know if there's anything else I can try that might help.

On Feb 8, 2014, at 4:33 PM, GrantSP wrote:

hmm...

I would say at first glance this is more of a 'refresh' issue with the display as opposed to a gameplay issue.

If you enter each city from the world map they show the correct information?

If the yields displayed, and units/buildings built are actually in the correct places then I don't think this is an issue of the mod, rather a lag in updating the screen with the game engine/your system.

I could be wrong.

If you said you set the production queue in one city and it set it for another instead, then that is something of a mod issue.

Having said that, we will look in to it as it might just be something with the CityView.lua that needs attention.

— Reply to this email directly or view it on GitHub.

stackpoint commented 10 years ago

Could you attach your lua log? And make sure logging is enabled?

WilsontheRed commented 10 years ago

I attached the log in my email but I guess the posts can't handle attachments. I hope a straight cut and paste of the log within the post is ok:

[220152.446] Initializing Lua 5.1.4
[220202.944] InstalledPanel: Refreshing Mods
[220202.944] InstalledPanel: GetModBrowserListings()
[220202.948] InstalledPanel: Refreshing Mods
[220202.948] InstalledPanel: GetModBrowserListings()
[220212.891] InstalledPanel: Refreshing Mods
[220212.891] InstalledPanel: GetModBrowserListings()
[220220.726] InstalledPanel: Refreshing Mods
[220220.726] InstalledPanel: GetModBrowserListings()
[220269.438] CivilopediaScreen: SetSelectedCategory(12)
[220269.438] CivilopediaScreen: CivilopediaCategory[CategoryTerrain].DisplayList
[220269.448] CivilopediaScreen: SetSelectedCategory(1)
[220269.448] CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua A
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua B
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua C
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua D
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua E
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua F
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua G
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua H
[220269.619] UnitFlagManager: INFO   Turn 0   Loading UnitFlagManager_addin.lua I
[220271.177] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion2\Tutorial\Lua\TutorialInclude_Expansion2.lua
[220271.177] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[220271.397] CityView: CEP CityView.lua
[220272.545] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarPlunderTradeRoutePopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\NetworkKickedPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\CityPlotManagementPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCommandPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivEnterTerritoryPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\LiberateMinorPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ReturnCivilianPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\AnnexCityPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\BarbarianRansomPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmGiftPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCityTaskPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmPolicyBranchPopup.lua
[220272.545] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua
[220273.478] EconomicGeneralInfo: Total Units - 2
[220273.478] EconomicGeneralInfo: Maint Free Units - 0
[220273.478] EconomicGeneralInfo: Paid Units - 2
[220273.496] EconomicGeneralInfo: Total Units - 2
[220273.496] EconomicGeneralInfo: Maint Free Units - 0
[220273.496] EconomicGeneralInfo: Paid Units - 2
[220274.018] ChoosePantheonPopup: 60
[220274.018] ChoosePantheonPopup: 963
[220274.018] ChoosePantheonPopup: 1023
[220274.449] ChooseIdeologyPopup: 60
[220274.449] ChooseIdeologyPopup: 963
[220274.449] ChooseIdeologyPopup: 1023
[220275.241] MT_Initialize: MT_Initialize.lua
[220275.529] StoryPopup:  28 ms loading Story_Events.lua
[220275.529] StoryPopup:   0 ms loading StoryPopup.lua
[220275.540] TW_Init: Initializing TW_Init.lua
[220275.866] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\TW_Init.lua:305: attempt to index field '?' (a nil value)
stack traceback:
    \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\TW_Init.lua:305: in function 'GetDefaultBuildingStatText'
    \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\TW_Init.lua:664: in main chunk
    =[C]: ?
[220275.866] Runtime Error: Error loading \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\TW_Init.lua.
[220276.110] CEA_Events: CEA_Events.lua
[220276.199] CEA_Promotions: CEA_Promotions.lua
[220276.288] CEB_Events: CEB_Events.lua
[220277.383] AdvisorInfoPopup: Closing Advisor Info
[220277.383] Demographics: Dequeuing demographics
[220277.383] Demographics: Dequeuing demographics
[220278.925] LoadScreen: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_CAN_MOVE_AFTER_ATTACKING!
[220278.927] CEAI_Events: CheckPlayerStartBonuses
[220278.964] CEAI_Events: CheckPlayerStartBonuses Done
[220278.964] CET_Events: UpdatePlotYields Start
[220278.971] CET_Events: UpdatePlotYields Done
[220287.079] UnitFlagManager: WARN   Turn 0   Flag not found for OnNewUnitRefresh: Player[3] Unit[49157]
[220287.101] UnitFlagManager: WARN   Turn 0   Flag not found for OnNewUnitRefresh: Player[6] Unit[49157]
[220301.871] ProductionPopup: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_IGNORE_TERRAIN_COST_NOUPGRADE!
[220301.871] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\InfoTooltipInclude.lua:166: attempt to index local 'section' (a nil value)
[220303.794] ProductionPopup: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_IGNORE_TERRAIN_COST_NOUPGRADE!
[220303.794] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\InfoTooltipInclude.lua:166: attempt to index local 'section' (a nil value)
[220305.882] CityView: WARN   Turn 0   GetHelpTextForBuilding: stat data is nil for BUILDING_PALACE!
[220309.895] ProductionPopup: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_IGNORE_TERRAIN_COST_NOUPGRADE!
[220309.895] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\InfoTooltipInclude.lua:166: attempt to index local 'section' (a nil value)
[220316.261] ProductionPopup: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_IGNORE_TERRAIN_COST_NOUPGRADE!
[220316.261] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\InfoTooltipInclude.lua:166: attempt to index local 'section' (a nil value)
[220350.049] CityView: WARN   Turn 0   GetHelpTextForBuilding: stat data is nil for BUILDING_PALACE!
[220355.210] TechPopup: WARN   Turn 0   GetHelpTextForBuilding: stat data is nil for BUILDING_TEMPLE_ARTEMIS!
[220355.216] TechPopup: WARN   Turn 0   GetHelpTextForBuilding: stat data is nil for BUILDING_HEROIC_EPIC!
[220365.635] TechPopup: stealingTechTargetPlayerID: -1
[220365.635] TechPopup: iValue: 0
[220367.667] ProductionPopup: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_IGNORE_TERRAIN_COST_NOUPGRADE!
[220367.667] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\InfoTooltipInclude.lua:166: attempt to index local 'section' (a nil value)
[220368.904] ProductionPopup: WARN   Turn 0   GetHelpTextForPromotion: stat data is nil for PROMOTION_IGNORE_TERRAIN_COST_NOUPGRADE!
[220368.904] Runtime Error: \Users\andrewbeck\Documents\Aspyr\Sid Meier's Civilization 5\MODS\CAT\Tools\TooltipWriter\InfoTooltipInclude.lua:166: attempt to index local 'section' (a nil value)
ghost commented 10 years ago

I can confirm this with the non dll version on my mac

stackpoint commented 10 years ago

Can you attach the version of CSD without the DLL? I can't find a link to download that's not on the steam workshop. You can rename the zip/civ5mod extension to jpg to attach it to github.

WilsontheRed commented 10 years ago

city_state_diplomacy_mod__csd___for_brave_new_world___no_dll__v_14

stackpoint commented 10 years ago

Okay, so the non-DLL version of v14 does not introduce CSD's custom specialist changes (SPECIALIST_CIVIL_SERVANT) and so the CityView.lua compatibility checks among other things actually break compatibility with the older version. We'll probably have to add a third state (0/1/2) to the USING_CSD variable since this (v14noDLL) is the only version of CSD that's compatible with macs.

stackpoint commented 10 years ago

This issue should be fixed here:https://github.com/Thalassicus/cep-bnw/commit/ae9e484d956ab2b7c7c7f0e345a0323a51e8a3f2