Resource icon

Errors in base code - Australia Summer Update

astog

Warlord
Joined
May 29, 2015
Messages
244
Location
Minneapolis
NOTE: These errors are still present in Australia Summer Patch. Make sure to correct them again.

I have encountered some errors in the base code, and thought to share them so other can also fix them. More importantly if you encounter an error, in the base code, please share them here. Also, if your modding these files, take care to fix them in your mod too.

Current Error Count: 4

Files with errors:
PlotToolTip.lua
Civilizations.xml
Improvements.xml
MinimapPanel.lua​

Spoiler Error List :

org = Original Code
cor = Corrected Code

Errors are in red

PlotToolTip.lua
line 702: (plotID vs plotId)
org: local constructionTypes = cityBuildQueue:GetConstructionsAtLocation(plotID);

cor: local constructionTypes = cityBuildQueue:GetConstructionsAtLocation(plotId);

Civilizations.xml
line 39: (Extra " in the end of the line)
org: <Row Type="CIVILIZATION_KANDY" Kind="KIND_CIVILIZATION"/>"

cor: <Row Type="CIVILIZATION_KANDY" Kind="KIND_CIVILIZATION"/>

Improvements.xml
line 152: (Extra > in the end of the line)
org: <Row ImprovementType="IMPROVEMENT_COLOSSAL_HEAD" TerrainType="TERRAIN_GRASS_HILLS"/>>

cor: <Row ImprovementType="IMPROVEMENT_COLOSSAL_HEAD" TerrainType="TERRAIN_GRASS_HILLS"/>

MinimapPanel.lua
line 193: (else is in the wrong line) (Maybe patched?)
org:
Code:
function ToggleContinentLens()

    if Controls.ContinentLensButton:IsChecked() then
        UILens.SetActive("Continent");                     else
        RefreshInterfaceMode();

        m_shouldCloseLensMenu = false;
        if UI.GetInterfaceMode() == InterfaceModeTypes.VIEW_MODAL_LENS then
            UI.SetInterfaceMode(InterfaceModeTypes.SELECTION);
        end
    end
end

cor:
Code:
function ToggleContinentLens()
    if Controls.ContinentLensButton:IsChecked() then
        UILens.SetActive("Continent");
        RefreshInterfaceMode();
    else
        m_shouldCloseLensMenu = false;
        if UI.GetInterfaceMode() == InterfaceModeTypes.VIEW_MODAL_LENS then
            UI.SetInterfaceMode(InterfaceModeTypes.SELECTION);
        end
    end
end

 
Last edited:
Took me a minute to find those errors in your text. So good job on seeing those.

UI bolded them below for anyone that struggled like me.

Spoiler Typo List :

org = Original Code
cor = Corrected Code

PlotToolTip.lua
line 694:
org: local constructionTypes = cityBuildQueue:GetConstructionsAtLocation(plotID);
cor: local constructionTypes = cityBuildQueue:GetConstructionsAtLocation(plotId);

Civilizations.xml
line 39:
org: <Row Type="CIVILIZATION_KANDY" Kind="KIND_CIVILIZATION"/>"
cor: <Row Type="CIVILIZATION_KANDY" Kind="KIND_CIVILIZATION"/>

Improvements.xml
line 151:
org: <Row ImprovementType="IMPROVEMENT_COLOSSAL_HEAD" TerrainType="TERRAIN_GRASS_HILLS"/>>
cor: <Row ImprovementType="IMPROVEMENT_COLOSSAL_HEAD" TerrainType="TERRAIN_GRASS_HILLS"/>

 
Took me a minute to find those errors in your text. So good job on seeing those.

UI bolded them below for anyone that struggled like me.

Spoiler Typo List :

org = Original Code
cor = Corrected Code

PlotToolTip.lua
line 694:
org: local constructionTypes = cityBuildQueue:GetConstructionsAtLocation(plotID);
cor: local constructionTypes = cityBuildQueue:GetConstructionsAtLocation(plotId);

Civilizations.xml
line 39:
org: <Row Type="CIVILIZATION_KANDY" Kind="KIND_CIVILIZATION"/>"
cor: <Row Type="CIVILIZATION_KANDY" Kind="KIND_CIVILIZATION"/>

Improvements.xml
line 151:
org: <Row ImprovementType="IMPROVEMENT_COLOSSAL_HEAD" TerrainType="TERRAIN_GRASS_HILLS"/>>
cor: <Row ImprovementType="IMPROVEMENT_COLOSSAL_HEAD" TerrainType="TERRAIN_GRASS_HILLS"/>

Haha, you are right. They are typos after all.
 
Added error in MinimapPanel.lua. This error causes the legend for the continent lens to not show up. Surprisingly, it was the Winter 2016 patch that introduced it since the Fall 2016 patch did not have this error
 
Last edited:
MinmapPanel.lua
In your spoiler text, you misspelled MinimapPanel.lua I am not trying to be pedantic, I copy/pasta into a search panel to find the file and came up with nothing, then had to check and realized it was misspelled in the spoiler text. Thanks for the work on the typos, this was very helpful.
 
In your spoiler text, you misspelled MinimapPanel.lua I am not trying to be pedantic, I copy/pasta into a search panel to find the file and came up with nothing, then had to check and realized it was misspelled in the spoiler text. Thanks for the work on the typos, this was very helpful.
Shoot, thanks for pointing that out.
 
I don't see how the last is an error given that data.UnitLevel+1 is being used to show the human player the next level # the unit is accumulating experience to reach.

A starting unit with no XP whatever is shown as 0/15 towards level 2 which is displaying to the player which is the next level the unit will attain. The unit without any XP yet is starting at Level 1 and has 0 of the 15 needed to proceed to level 2.
 
Oh, I've never thought about it from this point of view. It was more convenient to me to think that unit with 1 promotion has 1 lvl. But now I see what you mean. He is just lvl 2 with 1 promotion. I agree with that so it's not an error.
 
New patch. Again all errors.

PlotToolTip.lua
Now line 702 -> plotID instead plotId
Improvements.xml
Now line 152 -> >> instead >
Civilizations.xml
Still error in line 39
MinimapPanel.lua
Not patched.
 
New patch. Again all errors.

PlotToolTip.lua
Now line 702 -> plotID instead plotId
Improvements.xml
Now line 152 -> >> instead >
Civilizations.xml
Still error in line 39
MinimapPanel.lua
Not patched.
Was hoping they fixed them...
 
I just checked the errors after this update. Both LUA files were fixed but the XML files still had the extra punctuation.
 
CityPanelOverview.lua
the same event is added to lines 973 and 977
 
Last edited:
Back
Top Bottom