Sid Meier's Civilization VI

Sid Meier's Civilization VI

Better Report Screen (UI)
Boodeux 15 Nov, 2019 @ 5:46pm
Unit screen malfunction
I love the screen but I've noticed that occasionally (as my unit count increases) I suddenly can't see half of my units. The current screen shows about 51 land combat units, 15 or so naval units (which is probably half of my total), and no air, religious, settlers or workers or great people. It just went "poof" and everything else seems to be working OK.

Has anyone else experienced this?
< >
Showing 1-11 of 11 comments
infixo  [developer] 19 Nov, 2019 @ 4:13am 
This behavior usually means a Lua error, usually related to a specific modifier. However, this error may not appear in lua.log. Anyway, first post the log files, if there is nothing there, then post the save game.
ChrisMartin 30 Nov, 2019 @ 3:15am 
Could this be related to my findings back in October? Posted in your "Report issues here" thread.
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/1312585482/3247565033770097645/#c1694969361102406385

Edit: Found savefiles and logs from a clean test back in October: https://www.dropbox.com/s/swcwbj3vcdxbr7d/Logs-191028-Clean%20logs%20of%20MOCC.7z?dl=0
Last edited by ChrisMartin; 30 Nov, 2019 @ 3:24am
BLÀde 4 Dec, 2019 @ 12:27am 
that's not the only problem with the unit screen. when you upgrade something the old unit still remains on the screen (unlike urs it updates straight away) the new units don't usually show up until a turn sometimes two later. also now and than i have clicked on a unit see caravel and it selects a musket instead. the unit screen needs serious work

no other mods that change the UI in use.
ChrisMartin 4 Dec, 2019 @ 1:24am 
With this mod, I can upgrade a unit directly from the screen. Example from Warrior to Swordsman. I sort the list my icon, Press the Upgrade arrow, and the unit is instantly moved on the screen and grouped with other Swordsman. When I go back to map, the unit I just upgraded is a Swordsman.
No issues with upgrading unit with this mod.
infixo  [developer] 7 Dec, 2019 @ 3:45am 
@ChrisMartin Thank you for providing savegames with this issue.

Explanation
The issue is caused by JNR_GOV_MOCC_SPEC_OPS_ATTACK which introduces flanking bonus. This modifier needs an argument called Percent, at least that is what already exists in the game (there are 4 modifiers that use this effect). However, JNR put Amount here and BRS cannot find Percent and breaks.

Solution
In JNR's mod, file UC_GP_UnitAbilities.sql, Line 63
VALUES ('JNR_GOV_MOCC_SPEC_OPS_ATTACK', 'Amount', 150),
should be
VALUES ('JNR_GOV_MOCC_SPEC_OPS_ATTACK', 'Percent', 150),
ChrisMartin 7 Dec, 2019 @ 1:17pm 
Heil to the King, baby!!
Thank you most kindly, sir! Should I put forward this to JNR?
infixo  [developer] 11 Dec, 2019 @ 7:38am 
Yes. I think it also should help his mod, because this modifier could not be working as intended.
for anyone else having the problem of not having all units shown in the unit report and with one of the following errors in the Lua.log:
Runtime Error: D:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1312585482\ReportScreen.lua:1900: operator - is not supported for number - nil Runtime Error: D:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1312585482\ReportScreen.lua:3945: operator .. is not supported for nil .. string

change line 1900 in the ReportScreen.lua:
-- CHANGE! -- orig: -- instance.CollapseAnim:SetBeginVal(0, -(groupHeight - instance["CollapsePadding"])); if groupHeight and instance["CollapsePadding"] then instance.CollapseAnim:SetBeginVal(0, -(groupHeight - instance["CollapsePadding"])); else if groupHeight then instance.CollapseAnim:SetBeginVal(0, -(groupHeight)); elseif instance["CollapsePadding"] then instance.CollapseAnim:SetBeginVal(0, -(0-instance["CollapsePadding"])); else instance.CollapseAnim:SetBeginVal(0, -1); end end -- CHANGE
and line 3945:
-- CHANGE! -- orig: -- AddExtraPromoText( tMod.EffectType.." [COLOR_Red]"..tMod.Arguments.AbilityType.."[ENDCOLOR]") if tMod.EffectType and tMod.Arguments.AbilityType then AddExtraPromoText( tMod.EffectType.." [COLOR_Red]"..tMod.Arguments.AbilityType.."[ENDCOLOR]") else if tMod.EffectType then AddExtraPromoText( tMod.EffectType.." [COLOR_Red]ERROR[ENDCOLOR]") elseif tMod.Arguments.AbilityType then AddExtraPromoText( "ERROR [COLOR_Red]"..tMod.Arguments.AbilityType.."[ENDCOLOR]") else AddExtraPromoText( "ERROR") end end -- CHANGE!
infixo  [developer] 18 May, 2023 @ 10:57am 
@amethystkristall77
Re: line 3945
This line means that there is a modifier with effect EFFECT_GRANT_ABILITY and wrongly defined Arguments. You may be running a mod with an incorrect Ability modifier. Otherwise you would not have such an error. BRS is also good for spotting such problems, and such patching as you propose ofc removes the signs of the but does not remove its cause.
infixo  [developer] 18 May, 2023 @ 10:59am 
Same with 1900. This part of code is from Firaxis and it is used to control collapsing. It it is not working, then you have some incorrectly defined stuff in your game.
Amroth 15 Sep, 2024 @ 2:25am 
I have this problem with the resources tab :/ I'm almost certain it's a conflict with another mod, but I have no idea which it could be.
< >
Showing 1-11 of 11 comments
Per page: 1530 50