Are these civ-specific wonders too powerful?

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
As part of my Runestone mod, I plan to include two "wonder" stones linked to the civs that actually raised them. Are these combinations of stats unbalanced, in your opinion?

Both wonders

  • Unlocked at Engineering (the basic Runestone is unlocked at Writing)
  • +1 Engineer specialist slot (same as the basic type)
  • Maximum start era: Medieval (same as the basic type)
  • Local aource of Stone required (same as the basic type)
  • +4 Tourism after Flight is discovered (the basic Runestone gets +2)
  • Acts as a free Runestone in the city where it is raised
  • Each requires a Policy branch that matches its history

The Jelling Stone (Denmark only; requires Piety)

This wonder commemorates a king accepting and spreading a new faith in his empire, so..

  • +4 Culture/+4 Faith (versus the standard Runestone's +2/+1)
  • Doubles religious pressure where it is raised (not limited to Holy Cities; this was the one way I could make a wonder improve religious spread directly)

The Rök Stone (Sweden only; requires Honor, though I may change that to Tradition)

This wonder tells an encrypted story which includes genealogies, myths, and military history. I couldn't work the coded-message aspect in, but...

  • +10% to Culture and Faith for the city where it stands (making it a global bonus felt excessive)
  • +20% to Great People generation for that city only

If any of you want to suggest changes or additions, please post them here.
 
Code:
local tFaithModifierBuildings = { [GameInfoTypes.BUILDING_ROK_STONE] = .1 }

function AddExtraPercentageCityFaithFromBuildings(iPlayer)
	local pPlayer = Players[iPlayer]
	for BuildingID,PercentCityFaithModifier in pairs(tFaithModifierBuildings) do
		if pPlayer:CountNumBuildings(BuildingID) > 0 then
			for pCity in pPlayer:Cities() do
				if pCity:IsHasBuilding(BuildingID) then
					pPlayer:ChangeFaith(math.ceil(pCity:GetFaithPerTurn() * PercentCityFaithModifier))
				end
			end
		end
	end
end
GameEvents.PlayerDoTurn.Add(AddExtraPercentageCityFaithFromBuildings)
  • You will have to change the "Building-Name" I used from BUILDING_ROK_STONE to whatever is correct for your wonder
  • With this system you can add more buildings to the list simply by adding more info into lua-table tFaithModifierBuildings. The rest of the code remains the same.
  • Only players who have one of the buildings listed in the lua-table tFaithModifierBuildings will be processed for which city has such a building, etc.
  • The Faith is added directly to the Empire's score, and will not show in the city view. This could be made to happen with dummy buildings or the like without severe modifications of the code, but might actually be more PITA than value.
  • This code does not handle any restrictions on who can construct such a wonder or building, it only looks at whether the player or city already has such a wonder or building.
 
To make the Rök stone more distinct from the Jelling Stones, I've decided to scrap its percentage boost to Faith; it'll still have a flat +4 to Faith, but the percentage boosts will go to Culture and Great People generation (all that inspiring history in the loooong inscription, LOL). A few coding questions, though, before I go on...

  1. I've seen buildings and Wonders that boost Science by a percentage. What are the relevant XML tables/columns. and can any be linked to discovering a tech? (I was thinking of a Science boost kicking in after Archeology.)
  2. Is there a function or Lua script to place a free Archeologist unit in the same city as the Rök Stone, once Archeology is discovered?

With all the research that this particular runestone has inspired in real life, giving it a Science buff linked to a late-game tech makes sense (I am juggling numbers to avoid making the thing too powerful}. Please help if you can!
 
To make the Rök stone more distinct from the Jelling Stones, I've decided to scrap its percentage boost to Faith; it'll still have a flat +4 to Faith, but the percentage boosts will go to Culture and Great People generation (all that inspiring history in the loooong inscription, LOL). A few coding questions, though, before I go on...

  1. I've seen buildings and Wonders that boost Science by a percentage. What are the relevant XML tables/columns. and can any be linked to discovering a tech? (I was thinking of a Science boost kicking in after Archeology.)
  2. Is there a function or Lua script to place a free Archeologist unit in the same city as the Rök Stone, once Archeology is discovered?

With all the research that this particular runestone has inspired in real life, giving it a Science buff linked to a late-game tech makes sense (I am juggling numbers to avoid making the thing too powerful}. Please help if you can!

  1. Science Percentage Boosting:
    • For effect local to a city once the wonder is completed (+33% in the city wherre the wonder is constructed):
      Code:
      <Building_YieldModifiers>
      	<Row>
      		<BuildingType>BUILDING_ROK_STONE</BuildingType>
      		<YieldType>YIELD_SCIENCE</YieldType>
      		<Yield>33</Yield>
      	</Row>
      </Building_YieldModifiers>
    • For effects that are Global to all cities once the Wonder is completed (+33% in all cities):
      Code:
      <Building_GlobalYieldModifiers>
      	<Row>
      		<BuildingType>BUILDING_ROK_STONE</BuildingType>
      		<YieldType>YIELD_SCIENCE</YieldType>
      		<Yield>33</Yield>
      	</Row>
      </Building_GlobalYieldModifiers>
    • Neither of the two tables can be directly-linked to discovering a technology, so you would need a dummy building that is given via lua to the city that created the Wonder when the wonder-owner discovers "Tech-X". You would use the appropriate table with the dummy building instead of with the Wonder. The dummy building should be structured so that it survives city-capture in all cases (I would think) because otherwise there would be a need for even more complicated lua-code to handle cases of civ-X captured the city with the Wonder, and they aren't allowed to construct the Wonder so remove the dummy building. Then the original owner re-captures the city where the Wonder was constructed, so....etc., etc., oh my....
  2. You would need an Lua Script, and you would use the same event-hook as would be used for #1 so far as the Tech-discovery goes.
Lua Event-Hooks:
Code:
local iWonderBuilding = GameInfoTypes.BUILDING_ROK_STONE (or whatever)
local iWonderDummy = GameInfoTypes.BUILDING_ROK_STONE_DUMMY (or whatever)
local iArchaeologistUnit = GameInfoTypes.UNIT_ARCHAEOLOGIST
local iNumberArchaeologistsToGive = 1
local iWonderDummyTech = GameInfoTypes.TECH_ARCHAEOLOGY
local iWonderArchaeologistTech = GameInfoTypes.TECH_ARCHAEOLOGY

function WonderTechResearched(iTeam, iTech, iChange)
	if (iTech == iWonderDummyTech) or (iTech == iWonderArchaeologistTech) then
		for iPlayer = 0, GameDefines.MAX_MAJOR_CIVS - 1, 1 do
			if (Players[iPlayer] ~= nil) then
				if (Players[iPlayer]:GetTeam() == iTeam) then
					local pPlayer = Players[iPlayer]
					if pPlayer:CountNumBuildings(iWonderBuilding) > 0 then
						for pCity in pPlayer:Cities() do
							if pCity:IsHasBuilding(iWonderBuilding) then
								if (iTech == iWonderDummyTech) then
									pCity:SetNumRealBuilding(iWonderDummy, 1)
								end
								if (iTech == iWonderArchaeologistTech) then
									local iNumUnitsGiven = 0
									while iNumUnitsGiven < iNumberArchaeologistsToGive do
										pNewUnit = pPlayer:InitUnit(iArchaeologistUnit, pCity:GetX(), pCity:GetY())
										pNewUnit:JumpToNearestValidPlot()
										iNumUnitsGiven = iNumUnitsGiven + 1
									end
								end
								return
							end
						end
					end
				end
			end
 		end
	end
end
GameEvents.TeamTechResearched.Add(WonderTechResearched)
Even though both the tech variables are currently pointing to TECH_ARCHAEOLOGY, this will be OK, you will get both effects when Archaeology is discovered. As written, though, the code allows you to adjust which tech gives the Archaeologist(s) and which the Dummy Building without the one setting interfering with the other. Note that you can also select how many archaeologists to give when the tech for the Archaeologist(s) is discovered.
 
Back
Top Bottom