1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Extra Human-Player Units at Game Start 1.05

Spawns extra Settler, Scout, and/or Builder units at start of game.

  1. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    gyogen2 submitted a new resource:

    Extra Player Units at Game Start - Spawns extra Settler, Scout, and/or Builder units at start of game.

    Read more about this resource...
     
    iamliberal and Clubber Lang like this.
  2. Mynex

    Mynex Chieftain

    Joined:
    Sep 30, 2010
    Messages:
    287
    You made that for me, and I'm much appreciative! I added it as an optional download to the one I made that gave extra units to all players over at Nexus.

    This version looks a lot more... involved... than the one you made for me. lol.

    Should I update that mine with this code?

    And again, not enough thanks for helping me in the first place! :D
     
  3. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    If you like, The only main difference is I added the options to make it easier for people to change.
    I did not know you had already uploaded or I wouldn't have posted.
     
  4. Mentos

    Mentos Prince

    Joined:
    Sep 29, 2010
    Messages:
    377
    Why this in a lua script? You can configure that easily according to Eras.xml, for example by sql file:
    Code:
    -- Starting with Builder in Ancient Era
    INSERT INTO MajorStartingUnits (Era, Unit, Quantity, NotStartTile) SELECT "ERA_ANCIENT", "UNIT_BUILDER", "1", "1";
     
  5. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    This is only for the human player, for those who want an extra start.
     
  6. JackWagon

    JackWagon Chieftain

    Joined:
    Nov 8, 2016
    Messages:
    9
    Does this affect the AI players?
     
  7. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
  8. Mentos

    Mentos Prince

    Joined:
    Sep 29, 2010
    Messages:
    377
    Oh okay, yeah, it's a pity there is only an AiOnly-parameter for the MajorStartingUnits table. I guess giving the player unnecessary advantages isn't in the agenda of Firaxis.
     
  9. gelodgreat

    gelodgreat Chieftain

    Joined:
    Oct 23, 2015
    Messages:
    423
    Gender:
    Male
    Location:
    Manila, Philippines
    does this affect the AI?
     
  10. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
     
  11. Mentos

    Mentos Prince

    Joined:
    Sep 29, 2010
    Messages:
    377
    Maybe rename the mod title to "Extra Human-Player Units...", before every other here asks again. :)
     
  12. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    Yeah, thanks will do. I meant player in the personal sense, but see how it's easily confused.
     
  13. Mynex

    Mynex Chieftain

    Joined:
    Sep 30, 2010
    Messages:
    287
    Yea, I looked at it, I see where it's much easier to adjust now.

    I only post on Nexus so I only have 1 place to update things as needed... Besides, the human only version wouldn't exist without you (no matter how many times I beat my head against the code :D )!
     
  14. Brackenspore

    Brackenspore Chieftain

    Joined:
    May 5, 2015
    Messages:
    599
    does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI?does this affect the AI? :sarcasm:
     
    Mglo likes this.
  15. gelodgreat

    gelodgreat Chieftain

    Joined:
    Oct 23, 2015
    Messages:
    423
    Gender:
    Male
    Location:
    Manila, Philippines
    how can i add more different units?
     
  16. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    add these lines in appropriate places:
    Code:
    local numYourUnit = 2 ----------------------------set number of extra starting Your Units
    
    local iYourUnit = GameInfo.Units["YOUR_UNIT"].Index
    
                   if numYourUnit > 0 then
                         for i = 1, numYourUnit do
                            for direction = 1, DirectionTypes.NUM_DIRECTION_TYPES - 1, 1 do
                                adjacentPlot = Map.GetAdjacentPlot(lastPlot:GetX(), lastPlot:GetY(), direction);
                                if (adjacentPlot ~= nil) and not (adjacentPlot:IsWater() or adjacentPlot:IsImpassable()) then
                                    break      
                                end
                            end
                            pUnit3 = playerUnits:Create(iYourUnit, lastPlot:GetX(), lastPlot:GetY())
                            lastPlot = Map.GetPlot(pUnit:GetX(), pUnit:GetY());
                        end
                   end
    Keeping the last block (if numYourUnit - end) above Events.PlayerTurnActivated.Remove(OnPlayerTurnActivated)
     
  17. Mentos

    Mentos Prince

    Joined:
    Sep 29, 2010
    Messages:
    377
    Spoiler :
     
    Mglo likes this.
  18. SIGIMUS

    SIGIMUS Chieftain

    Joined:
    Nov 21, 2016
    Messages:
    6
    Gender:
    Male
    I was playing around with this yesterday (before u put up the extra code for other units) and was able to plonk warriors in as a extra unit to the other 3 and it all worked fine.

    Been trying to add Legions (bc i can and i play romans a lot) and it just wont take it. Is the game hard coded not to take more modern units at the start? Or do other files need modifying to allow newer units?
     
  19. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    Haven't tried newer units, let me check and I'll get back to you.
     
  20. SIGIMUS

    SIGIMUS Chieftain

    Joined:
    Nov 21, 2016
    Messages:
    6
    Gender:
    Male
    Cool, just wanted to make sure its not just me lol
     

Share This Page