1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Errors in base code - Australia Summer Update

Some typos and errors in the base game code.

Tags:
  1. astog

    astog Warlord

    Joined:
    May 29, 2015
    Messages:
    238
    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: Jul 28, 2017
  2. Elucidus

    Elucidus King

    Joined:
    Mar 3, 2002
    Messages:
    983
    Location:
    USA
    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"/>

     
  3. astog

    astog Warlord

    Joined:
    May 29, 2015
    Messages:
    238
    Location:
    Minneapolis
    Haha, you are right. They are typos after all.
     
  4. astog

    astog Warlord

    Joined:
    May 29, 2015
    Messages:
    238
    Location:
    Minneapolis
    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: Dec 21, 2016
    v3HcM3SlyG and notque like this.
  5. KevSkegRed

    KevSkegRed Chieftain

    Joined:
    Jun 21, 2015
    Messages:
    56
    Location:
    Skegness, Lincolnshire, England
    Thanks mate, very useful :)
     
  6. v3HcM3SlyG

    v3HcM3SlyG Chieftain

    Joined:
    Nov 19, 2010
    Messages:
    8
    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.
     
  7. astog

    astog Warlord

    Joined:
    May 29, 2015
    Messages:
    238
    Location:
    Minneapolis
    Shoot, thanks for pointing that out.
     
  8. bolbas

    bolbas Chieftain

    Joined:
    Jan 10, 2017
    Messages:
    65
    del
     
    Last edited: Jan 10, 2017
  9. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,622
    Location:
    Illinois, USA
    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.
     
  10. bolbas

    bolbas Chieftain

    Joined:
    Jan 10, 2017
    Messages:
    65
    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.
     
  11. astog

    astog Warlord

    Joined:
    May 29, 2015
    Messages:
    238
    Location:
    Minneapolis
    The Australia summer update still has these errors. Make sure to fix them in your game.
     
  12. Zergus17

    Zergus17 Chieftain

    Joined:
    Jan 22, 2011
    Messages:
    18
    And new update still has these errors (maybe except civilizations.xml).
     
  13. Zergus17

    Zergus17 Chieftain

    Joined:
    Jan 22, 2011
    Messages:
    18
    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.
     
  14. astog

    astog Warlord

    Joined:
    May 29, 2015
    Messages:
    238
    Location:
    Minneapolis
    Was hoping they fixed them...
     
  15. ITcore

    ITcore Warlord

    Joined:
    Dec 25, 2016
    Messages:
    247
    Gender:
    Male
    I just checked the errors after this update. Both LUA files were fixed but the XML files still had the extra punctuation.
     
    kaspergm likes this.
  16. Zergus17

    Zergus17 Chieftain

    Joined:
    Jan 22, 2011
    Messages:
    18
    Last patch - only MinimapPanel.lua ok. Other files with errors.
     
  17. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,622
    Location:
    Illinois, USA
  18. bolbas

    bolbas Chieftain

    Joined:
    Jan 10, 2017
    Messages:
    65
    CityPanelOverview.lua
    the same event is added to lines 973 and 977
     
    Last edited: Nov 2, 2017

Share This Page