Is there "SetWinner" function in Lua?

3335d

CCtP Player
Joined
Jun 15, 2012
Messages
642
I wanted to create a mod where the victory conditions change with era, and I also wanted to add another VC. Is it possible to assign victory to a given player through Lua based on the desired conditions?
 
Yes. I granted an existing victory type though:

Game.SetWinner(player:GetTeam(), GameInfo.Victories["VICTORY_CULTURAL"].ID);
 
You can also add new victory type.
 
I've a design for this too.

Spoiler :
UA: Khan, Tsar and Shahanshah
Unlocks a unique victory conditions for the Golden Horde, (called the Tributary Victory) which requires you to own a third of all cities and the capital of three different Civilizations before the Industrial era. On the condition that those cities are puppeted, on top of the unique vitory condition the Golden Horde recieves +1 :c5moves: Movement for all mounted units and :c5puppet: puppeted cities produce 5% more :c5gold: Gold (max 35%) than usual.

UU: Mingghan (Knight Replacement)
Unique ranged Knight replacment for the Golden Horde, the has a fighting :c5strength: Strength of of 17. Has the Generals I and Accuracy I promotions.

UB: Yam (Stable Replacement)
Unique Stable replacement for the Golden Horde, on top of it's normal bonuses the Yam makes all Pastures within a city produce +1 :c5food: Food. Raises the :c5strength: Combat Strength of a city and cities that have a yam bult inside of them gain a :c5trade: City Connection with another city that has a Yam. More costly to build and to buy out.
 
Top Bottom