AW Arcaeca
Deus Vult
1. Is it possible to add a new civilopedia section, preferably without having to edit the civiliopedia.lua file?
2. Is there an event-hook - seeing as how I haven't been able to find one - which fires when a city is captured? I'm aware of GameEvents.CityCaptureComplete, but I need it fire the same turn the city is captured, not when resistance ends, which, IINM is what that event hook listens for.
3. Is it possible, without DLL, to make a city literally impossible for an enemy to take over? There's always simply giving the city a dummy building with an extraordinarily high <Defense> and/or <CityHitPoints> (if that's what it's called, I don't exactly remember) value, but even that will eventually give out to superior military might. I suppose, if a game event such as described in #2 can be found, one could make some lua that would instantly return the city to its original owner...?
4. Possible to detect if a city is next to a lake with lua? I can imagine using the <Traits> FreeBuilding column to give a dummy to all cities conditional that they meet the geographic constraint of being by a lake (which would theoretically work since FreeBuilding at least checks for geographic constraints - it doesn't give Carthage harbors in landlocked cities - and I could use the column from the floating gardens), but frankly I'm sure there's a less involved way with lua, probably involving PlotIterators to sweep through all tiles adjacent to a city and seeing if at least one is water.
5. Does City.GetGarrisonedUnit work with a civilian unit? I've got a civ in progress with a civilian UU which will have a unique effect on cities as long as it's stationed in one, but I can't figure out whether to use this method or a workaround. Perhaps something like "if (pUnit:GetPlot() == pCity:GetPlot()) then"?
6. A game event, or really any method, that fires when a civilian unit is captured: Does such a think exist? I'm really in the dark for this one; I can't find or even imagine any method of this ilk existing and I can't think of any workaround.
If I can think of any more questions in the near future, hopefully I'll remember to just add them to this thread.
TIA,
AW
2. Is there an event-hook - seeing as how I haven't been able to find one - which fires when a city is captured? I'm aware of GameEvents.CityCaptureComplete, but I need it fire the same turn the city is captured, not when resistance ends, which, IINM is what that event hook listens for.
3. Is it possible, without DLL, to make a city literally impossible for an enemy to take over? There's always simply giving the city a dummy building with an extraordinarily high <Defense> and/or <CityHitPoints> (if that's what it's called, I don't exactly remember) value, but even that will eventually give out to superior military might. I suppose, if a game event such as described in #2 can be found, one could make some lua that would instantly return the city to its original owner...?
4. Possible to detect if a city is next to a lake with lua? I can imagine using the <Traits> FreeBuilding column to give a dummy to all cities conditional that they meet the geographic constraint of being by a lake (which would theoretically work since FreeBuilding at least checks for geographic constraints - it doesn't give Carthage harbors in landlocked cities - and I could use the column from the floating gardens), but frankly I'm sure there's a less involved way with lua, probably involving PlotIterators to sweep through all tiles adjacent to a city and seeing if at least one is water.
5. Does City.GetGarrisonedUnit work with a civilian unit? I've got a civ in progress with a civilian UU which will have a unique effect on cities as long as it's stationed in one, but I can't figure out whether to use this method or a workaround. Perhaps something like "if (pUnit:GetPlot() == pCity:GetPlot()) then"?
6. A game event, or really any method, that fires when a civilian unit is captured: Does such a think exist? I'm really in the dark for this one; I can't find or even imagine any method of this ilk existing and I can't think of any workaround.
If I can think of any more questions in the near future, hopefully I'll remember to just add them to this thread.
TIA,
AW