AW Arcaeca
Deus Vult
The title makes it sound like some kind of ongoing project
It's not, really
Basically, since I aim to make my mods compatible with G&K, I try to use as few dummy buildings as possible, since they can't be turned invisible anywhere near as easily as in BNW. Therefore, I'm trying to figure out some lua trickery to reduce (but not eliminate) the need for dummy buildings:
Primarily right now I'm working with a script where dummy buildings handled within it can be replaced by Boolean variables. (full explanation here) How exactly is that broken down?
nil - near as I can figure out, this means the dummy building doesn't exist at all?
true - this probably means it exists within a city meeting specified conditions?
false - and this means it doesn't?
Anyone have any insight on that?
If anyone also has the time and patience with me to help me turn several dummy buildings into as many Booleans as possible, drop me a line via PM.
Another workaround I'm thinking of:
How is this:
Really any different from this?
So straight lua should work for adding base yields? What else from the building table are we aware of that can be modified sort of similarly? <Building_YieldChangesPerPop>, maybe? Stuff like that?
Input is welcome; less dummy builds is more!
TIA,
AW
It's not, really
Basically, since I aim to make my mods compatible with G&K, I try to use as few dummy buildings as possible, since they can't be turned invisible anywhere near as easily as in BNW. Therefore, I'm trying to figure out some lua trickery to reduce (but not eliminate) the need for dummy buildings:
Primarily right now I'm working with a script where dummy buildings handled within it can be replaced by Boolean variables. (full explanation here) How exactly is that broken down?
nil - near as I can figure out, this means the dummy building doesn't exist at all?
true - this probably means it exists within a city meeting specified conditions?
false - and this means it doesn't?
Anyone have any insight on that?
If anyone also has the time and patience with me to help me turn several dummy buildings into as many Booleans as possible, drop me a line via PM.
Another workaround I'm thinking of:
How is this:
Spoiler :
Code:
GameEvents.PlayerDoTurn.Add(
function(iPlayer)
pPlayer = Players[iPlayer]
if (foo) then
for pCity in pPlayer:Cities() do
pCity:ChangeProduction(2)
end
end
end
end)
Spoiler :
Code:
-----[ Lua Part ]-----
GameEvents.PlayerDoTurn.Add(
function(iPlayer)
pPlayer = Players[iPlayer]
if (foo) then
for pCity in pPlayer:Cities() do
pCity:SetNumRealBuilding(GameInfoTypes.BUILDING_XTRA_YIELD, 1)
end
end
end
end)
-----[ XML Part ]-----
<GameData>
<Buildings>
<!-- We'll just assume that
BUILDING_XTRA_YIELD already
exists and we can skip defining it
-->
</Buildings>
<Building_YieldChanges>
<Row>
<BuildingType>BUILDING_XTRA_YIELD</BuildingType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
</Building_YieldChanges>
</GameData>
Input is welcome; less dummy builds is more!
TIA,
AW