Resource icon

Extra Human-Player Units at Game Start 1.05

I just tested on a few different map sizes/settings and it worked as intended.
You are changing the values at the top of the lua file, and have the mod activated correct. I am sorry if silly questions, but I am not sure why it wouldn't work for you.
Could you post your lua log file (from C:\Users\you computer\Documents\my games\Sid Meier's Civilization VI\Logs) To post here, you will need to rename to lua.txt.
 
Is there any way to make this apply to Hotseat players? I started a game with another person and only player 1 got the bonus, not player 2.

It was because of the event I was using to call the function

If you want to play hotseat, open the ScoutSpawn.lua and at the bottom, just below function Initialize() add:

Events.LocalPlayerChanged.Add( OnPlayerTurnActivated );

I will post an update if you'd rather just re-download.
 
I just tested on a few different map sizes/settings and it worked as intended.
You are changing the values at the top of the lua file, and have the mod activated correct. I am sorry if silly questions, but I am not sure why it wouldn't work for you.
Could you post your lua log file (from C:\Users\you computer\Documents\my games\Sid Meier's Civilization VI\Logs) To post here, you will need to rename to lua.txt.

That's so weird, I did exactly that. I change the numbers at the very top. Here is a copy and paste of the top section with the changes I made:

local numSettlers = 5 --------------------------------------------set number of extra starting settlers for player
local numScouts = 5 --------------------------------------------set number of extra starting scouts
local numBuilders = 5 ---------------------------------------------set number of extra starting builders
local TechOne = GameInfo.Technologies["TECH_POTTERY"]; ------------set technology
local TechTwo = GameInfo.Technologies["TECH_ANIMAL_HUSBANDRY"]; ---set technology
local TechThree = GameInfo.Technologies["TECH_MINING"]; -----------set technology to start with less techs, local TechThree;
local PlayerGold = 999 --------------------------------------------set gold
local iScout = GameInfo.Units["UNIT_SCOUT"].Index -----------------set unit
local iSettler = GameInfo.Units["UNIT_SETTLER"].Index -------------set unit
local iBuilder = GameInfo.Units["UNIT_BUILDER"].Index -------------set unit

I wanted 5 of each unit, and 999 units of gold. Even when I make this change and re-start the game it stays with the original 5 x scouts, 3 x builders, and 1 x settler. Gold stays at 100.
 
I just tested on a few different map sizes/settings and it worked as intended.
You are changing the values at the top of the lua file, and have the mod activated correct. I am sorry if silly questions, but I am not sure why it wouldn't work for you.
Could you post your lua log file (from C:\Users\you computer\Documents\my games\Sid Meier's Civilization VI\Logs) To post here, you will need to rename to lua.txt.

OMG... so the software I downloaded from the Windows store wasn't saving the changes even though it appeared that I had. I downloaded different software that actually saved it and made all the difference lol. I knew it would be something stupid. Thanks :)
 
Are lines of code similar to the one that add's gold to add faith and culture? Is there someplace where the different api calls are documented?
 
Did you try adding a swordsman (the generic version of Legion)? With Mynex's code I added spearman and since I was playing as Gorgo they come in as Hoplite's. Not sure if the same will work with this code.
 
Are lines of code similar to the one that add's gold to add faith and culture? Is there someplace where the different api calls are documented?

I am not sure if they are documented anywhere yet, but you can find them in the ltp files in the debug folder, and tuner files in ui folder. Only issue is currently they only work in gamescripts, which right now will only load in new game start, not saves.
 
Did you try adding a swordsman (the generic version of Legion)? With Mynex's code I added spearman and since I was playing as Gorgo they come in as Hoplite's. Not sure if the same will work with this code.

I'v only focused on the mechanics and haven't tried a lot of different units. The code for creation is the same, so I would imagine same results.
 
Spoiler :
OMG... so the software I downloaded from the Windows store wasn't saving the changes even though it appeared that I had. I downloaded different software that actually saved it and made all the difference lol. I knew it would be something stupid. Thanks :)
Spoiler :

6b94d5be9a89d16f188de2fa37d2e10d.png



Well the good news is that you got it sorted out. :crazyeye:
 
Love this as it stops the need to edit the actual game code but, I've downloaded the latest version and it had missionaries in the builder line so when I started my game I got 2 missionaries instead of builders. I've edited it in mine. Just thought I'd let you know. Thanks very much for the mod though.
 
Love this as it stops the need to edit the actual game code but, I've downloaded the latest version and it had missionaries in the builder line so when I started my game I got 2 missionaries instead of builders. I've edited it in mine. Just thought I'd let you know. Thanks very much for the mod though.
Oh sorry, I was using this script to test another one involving religious units when I found the starting era problem. I guess I forgot to change unit back to builder. Shouldn't try to fix one thing while working on another I guess:crazyeye:
 
Top Bottom