Two LUA question about Decisions

zwei833

Emperor
Joined
Feb 26, 2011
Messages
1,240
1, Is it possible to make reward of a decision be "turn all occupied and puppet cities into your own cities"?

2, Is it possible to make reward of a decision be "A XXX(national wonder, with one great work slot) built in the capital"(I know this is pretty easy), and then "a certain great work is already inside XXX's great work slot"? (I need the certaion great work inside, not a random great work).


Thanks!


P.S. I don't know wheather should I post the question in the forum or not, it seem that there is no particular Events & Decisions coding forum...
 
1, Is it possible to make reward of a decision be "turn all occupied and puppet cities into your own cities"?

2, Is it possible to make reward of a decision be "A XXX(national wonder, with one great work slot) built in the capital"(I know this is pretty easy), and then "a certain great work is already inside XXX's great work slot"? (I need the certaion great work inside, not a random great work).


Thanks!


P.S. I don't know wheather should I post the question in the forum or not, it seem that there is no particular Events & Decisions coding forum...

1. Yes. Using City:SetNeverLost() meaning that they are your own cities and was never lost in the first place means no courthouses needed. You then detect these cities using the LUA snippet of City:IsPuppet() and City:IsOccupied()

2. Look into Venice's Decisions on St. Basilica.
 
Is this NW buildable by itself, or just available from the decision? If it's only from the decision, you could simply add the great work to the FreeGreatWorks column in its definition in the Buildings table, like with the Parthenon.
 
You will also need the files from KyteMs' Dynamic Culture Overview mod because otherwise the game does not deal properly with added National Wonders that have great works slots.
 
Thank you all!

You will also need the files from KyteMs' Dynamic Culture Overview mod because otherwise the game does not deal properly with added National Wonders that have great works slots.
But... It works well...
 
1. Yes. Using City:SetNeverLost() meaning that they are your own cities and was never lost in the first place means no courthouses needed. You then detect these cities using the LUA snippet of City:IsPuppet() and City:IsOccupied()
.

Is this function code correct?
Code:
	Decisions_GermanBRG.DoFunc = (
	function(pPlayer)
		pPlayer:ChangeNumResourceTotal(iMagistrate, -2)
		for City:IsPuppet() and City:IsOccupied() in pPlayer:Cities() do
			 City:SetNeverLost()
		end
		save(pPlayer, "Decisions_GermanBRG", true)
	end
	)
 
Back
Top Bottom