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

Multiple Unit per Tile 2016-11-07

Small mod to enable multiple units in a tile

  1. Bate1999

    Bate1999 Chieftain

    Joined:
    Dec 22, 2010
    Messages:
    68
    This is a nice mod but does anyone know how to make the AI stack their units too? Because right now anytime 2 or more of their units end a turn in the same tile the AI units are forcibly pushed to an empty tile. This does not happen to me just the AI and I do not know why.
     
  2. rschissler

    rschissler Chieftain

    Joined:
    Dec 18, 2003
    Messages:
    784
    Location:
    So. Cal, USA
    Apparently, unless there is more code released by Firaxis, the AI can't be programed to know how to use this. Since unit movement has been so clumsy, I've recently started using this mod, allowing a stack of 2. I'd probably like to raise it to stack 3, but since the AI doesn't know how to stack any units, I think 2 is a good compromise so that it isn't too unfair.
     
  3. joebasstard

    joebasstard Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    91
    Location:
    Atlanta
  4. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,922
    Location:
    Seyda Neen, Vvardenfell
    check post #31 for an updated version
     
  5. KevSkegRed

    KevSkegRed Chieftain

    Joined:
    Jun 21, 2015
    Messages:
    56
    Location:
    Skegness, Lincolnshire, England
    You can fix it easily mate. Open the C::\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UICiv6Common.lua file and copy from line 725 to the end, then add it to the end of the file with the same name in the mod. Then move it into the :\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI folder (overwriting the original). It will work.

    If you haven't got a lua editor there is a free one called Lua Edit 2010 that works perfectly and is the one I use.
     
  6. assuredgrp

    assuredgrp Chieftain

    Joined:
    Oct 31, 2008
    Messages:
    42
    Location:
    Lake In The Hills, IL
    Can't seem to get this mod to work - even lost ability to swap locations of units. Mods in use are All Roads Lead to Rome, Better Trade Screen, Combat and Stacking Overhaul (likely source of conflict), DLC for Aztec Poland and Vikings, Ethiopia, Moar Units, More Lenses, Production Queue and RED Modpack. I updated the lua file as instructed. Please advise... If Combat and Stacking is the conflict, can I somehow strip it from a saved file? Hate to lose game in progress. Thanks much.
     
  7. assuredgrp

    assuredgrp Chieftain

    Joined:
    Oct 31, 2008
    Messages:
    42
    Location:
    Lake In The Hills, IL
    For those with an interest, I seemed to have answered my own question. I moved the conflicting Combat and Stacking Overhaul Mod out of the mods folder and reloaded my game, and your mod functioned. That other mod is listed, but cannot be found to load and therefore does not conflict any longer.
     
  8. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,922
    Location:
    Seyda Neen, Vvardenfell
    Remove the Civ6Common.lua file from this mod and it's compatible with pretty much anything ( it's the file that removes the "swap units" functionality )

    Of course Combat and Stacking Overhaul will still conflict, since it does something similar but it's way more complex
     
  9. chrisgatt7

    chrisgatt7 Chieftain

    Joined:
    Mar 26, 2013
    Messages:
    271
    How come combat stacking and overhaul the AI stacks but in yours they do not?
     
  10. assuredgrp

    assuredgrp Chieftain

    Joined:
    Oct 31, 2008
    Messages:
    42
    Location:
    Lake In The Hills, IL
    FYI - this mod is not working properly with the Summer Patch. The deal screen with other Civ's does not work properly when this mod is loaded. Can you please update for the Summer Patch as I love this mod?
     
  11. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,922
    Location:
    Seyda Neen, Vvardenfell
    try only using the MultiUnit.sql file
     
  12. assuredgrp

    assuredgrp Chieftain

    Joined:
    Oct 31, 2008
    Messages:
    42
    Location:
    Lake In The Hills, IL
    Thank you for your response, but how would I do that, empty the Mods subdirectory of everything except that file?
     
  13. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,922
    Location:
    Seyda Neen, Vvardenfell
    keep that and the .modinfo file
     
  14. rschissler

    rschissler Chieftain

    Joined:
    Dec 18, 2003
    Messages:
    784
    Location:
    So. Cal, USA
    When I did that, I wasn't able to have multiple units of the same type on the same tile.
     
  15. rschissler

    rschissler Chieftain

    Joined:
    Dec 18, 2003
    Messages:
    784
    Location:
    So. Cal, USA
    Another bug, but not related to the summer patch, stacked naval units don't show the icons properly.
     
  16. xau99

    xau99 Chieftain

    Joined:
    Apr 19, 2002
    Messages:
    66
    Gender:
    Male
    I compared the multiunit common.lua file against the updated and found a small change. I added that change to the the mulitunit .lua file and this seems to have resolved the deal screen. Add return labelX, labelY; as shown below.
    "


    -- ===========================================================================
    -- A helper function to size a GridButton to its string contents
    -- ARG 1: gridButton (table) - expects a control of type GridButton to be resized
    -- ARG 4: minX (number) - the minimum width of the button
    -- ARG 5: minY (number) - the minimum height of the button
    -- ARG 2: OPTIONAL padding (number) - the amount of padding which should be inserted around the text string
    -- ARG 3: OPTIONAL sizeOption (string) - expects V or H - to specifiy if the button should only be sized vertically or horizontally
    -- ===========================================================================
    function AutoSizeGridButton(gridButton:table,minX: number, minY: number, padding:number, sizeOption:string)
    if (sizeOption == nil) then
    sizeOption = "1";
    end
    if (padding == nil) then
    padding = 0;
    end
    local labelControl = gridButton:GetTextControl();
    local labelX = labelControl:GetSizeX() + padding*2;
    local labelY = labelControl:GetSizeY() + padding*2;
    if (minX ~= nil) then
    labelX = math.max(minX, labelX);
    end
    if (minY ~= nil) then
    labelY = math.max(minY, labelY);
    end
    if(sizeOption == "V" or sizeOption == "1") then
    gridButton:SetSizeY(labelY);
    end
    if(sizeOption == "H" or sizeOption == "1") then
    gridButton:SetSizeX(labelX);
    end
    return labelX, labelY;
    end
     
    rschissler likes this.
  17. jbxx

    jbxx Chieftain

    Joined:
    Aug 26, 2016
    Messages:
    67
    Location:
    Emgland
    Solved the problem - many thanks!
    I think it was about line 488.
     
  18. rschissler

    rschissler Chieftain

    Joined:
    Dec 18, 2003
    Messages:
    784
    Location:
    So. Cal, USA
    Yeah, that does fix the trade screen, thanks! Does anyone have any idea how to fix the naval unit icon bug?
     
  19. Bate1999

    Bate1999 Chieftain

    Joined:
    Dec 22, 2010
    Messages:
    68
    Are the AI players able to stack their units yet using this mod?
     
  20. Enchanteur

    Enchanteur Chieftain

    Joined:
    Jun 4, 2017
    Messages:
    142
    Gender:
    Male
    This mod is really the most important one with cqui.
    I really hope you will end to make something working both player and AI.
     

Share This Page