Civ5 SDK More than 22 civs (LUA)

No, more likely you can only do this with DLL changes.
 
You may be able to add over 22 civs if you have a dll that does so and you add them during game start using lua. You cannot add them directly to the map in worldbuilder

I want do this but i don't know where I should starting.
Can you help me if you know using lua settings?
Edit:
I tried Civ4 map but it allows only 31 civs and the other civs doesn't appear.
 
I use this code to found some Danish cities on a worldbuilder map. Mind you, I have Denmark as one of the civs existing on the map. There is likely more code needed to add a civilization not already included on the map... I am not certain how to do that, however, you may want to search the forums for some coding that brings in another player after the game loads.

Code:
--found Denmark Cities

function  FoundDenmark()

	if Game.GetElapsedGameTurns() == 0 then

	-- Set up Denmark Player

		for iPlayer=0, GameDefines.MAX_MAJOR_CIVS-1 do 

		local pDenmark = Players[iPlayer]

			if (GameInfo.Civilizations.CIVILIZATION_DENMARK.ID == pDenmark:GetCivilizationType()) then
	
			pDenmark:Found(95, 10)
			pDenmark:Found(88, 12)
			pDenmark:Found(98, 7)
			--print (pDenmark:GetName() ,"...is founding cities");

			end
		end
	end
end

Events.SequenceGameInitComplete.Add(FoundDenmark)
 
This code was found on this thread:
HTML:
 http://forums.civfanatics.com/showthread.php?t=547479


Code:
 local iNewPlayer = g_nextAvailablePlayerIndex
	g_nextAvailablePlayerID = g_nextAvailablePlayerIndex + 1
	local newCivInfo = GameInfo.Civilizations[newCivID]
	local oldPlayer = Players[iOldPlayer]
	local iTeam = iNewPlayer


	--Get the proper leader for the new civ
	local newLeaderID
	for row in GameInfo.Civilization_Leaders() do
		if newCivInfo.Type == row.CivilizationType then
			newLeaderID = GameInfoTypes[row.LeaderheadType]
			break
		end
	end
	if not newLeaderID then
		error("PlayerCivSwap: No leader for new civ type")
	end


	--Add new player here?
	print("AddPlayer")
	PreGame.SetTeam(iNewPlayer, iTeam)
	Game.AddPlayer(iNewPlayer, newLeaderID, newCivID)

	--Setup the new player in PreGame
	PreGame.SetLeaderName(iNewPlayer, GameInfo.Leaders[newLeaderID].Description)					
	PreGame.SetCivilizationDescription(iNewPlayer, newCivInfo.Description)
	PreGame.SetCivilizationShortDescription(iNewPlayer, newCivInfo.ShortDescription)
	PreGame.SetCivilizationAdjective(iNewPlayer, newCivInfo.Adjective)
	PreGame.SetPassword(iNewPlayer, "")
	PreGame.SetCivilization(iNewPlayer, newCivID)
	PreGame.SetLeaderType(iNewPlayer, newLeaderID)
	PreGame.SetHandicap(iNewPlayer, oldPlayer:GetHandicapType())
	PreGame.SetSlotStatus(iNewPlayer, SlotStatus.SS_COMPUTER)
	PreGame.SetSlotClaim(iNewPlayer, SlotClaim.SLOTCLAIM_ASSIGNED)

	print("GetSlotStatus = ", PreGame.GetSlotStatus(iNewPlayer))

	local newPlayer = Players[iNewPlayer]
	newPlayer:SetStartingPlot(oldPlayer:GetStartingPlot())
	

	print("New player team is / should be= ", newPlayer:GetTeam(), iTeam)
	print("Starting plot, old/new = ", oldPlayer:GetStartingPlot(), newPlayer:GetStartingPlot())

	local oldCapital = oldPlayer:GetCapitalCity()
	local newCity = newPlayer:InitCity(oldCapital:GetX()+3, oldCapital:GetY())

No idea if it works not how to implement it...
 
I use this code to found some Danish cities on a worldbuilder map. Mind you, I have Denmark as one of the civs existing on the map. There is likely more code needed to add a civilization not already included on the map... I am not certain how to do that, however, you may want to search the forums for some coding that brings in another player after the game loads.

Code:
--found Denmark Cities

function  FoundDenmark()

	if Game.GetElapsedGameTurns() == 0 then

	-- Set up Denmark Player

		for iPlayer=0, GameDefines.MAX_MAJOR_CIVS-1 do 

		local pDenmark = Players[iPlayer]

			if (GameInfo.Civilizations.CIVILIZATION_DENMARK.ID == pDenmark:GetCivilizationType()) then
	
			pDenmark:Found(95, 10)
			pDenmark:Found(88, 12)
			pDenmark:Found(98, 7)
			--print (pDenmark:GetName() ,"...is founding cities");

			end
		end
	end
end

Events.SequenceGameInitComplete.Add(FoundDenmark)

Thanks for this but where i can add this? I tried adding this function but WorldBuilder can't generating the map.
 
Not knowledgable enough about how to do this... sorry. It would probably take a week of work for me to figure it out if I even could. Maybe searching google or for mods that do this might help you. Otherwise, one can only hope one of the lua gods intervenes from above :).

Thanks man, you are helped me.
 
Top Bottom