+X vs +X%

Leuthesius

Chieftain
Joined
Apr 4, 2009
Messages
29
in an .xml, what do I need to do to change raw datapoints to a percentage?

My mod runs wayyyyyy too hot. Its savagely easy on even deity. Obviously I have it set too high, but I'd rather it be an amplification of what else I'm getting right in a game rather than being the focal point.

<Row BuildingType="BUILDING_LEUBUILDING" YieldType="YIELD_CULTURE" YieldChange="10"/>
<Row BuildingType="BUILDING_LEUBUILDING" YieldType="YIELD_GOLD" YieldChange="15"/>
<Row BuildingType="BUILDING_LEUBUILDING" YieldType="YIELD_PRODUCTION" YieldChange="30"/>
<Row BuildingType="BUILDING_LEUBUILDING" YieldType="YIELD_SCIENCE" YieldChange="15"/>
<Row BuildingType="BUILDING_LEUBUILDING" YieldType="YIELD_FAITH" YieldChange="20"/>
<Row BuildingType="BUILDING_LEUBUILDING" YieldType="YIELD_FOOD" YieldChange="10"/

How would I change these to percentages?

Starting production + 30% is a big nerf vs starting production + 30...
 
You have to do it through a BuildingModifier rather than through table Building_YieldChanges. Refer to how this is done for the Oxford University, Ruhr Valley, and Broadway wonders. Even though they are World Wonders they are still buildings.
 
They really.... didn't make that easy to comprehend. How hard would it have been to put it in as YIELD_CULTURE_PERCENT or something?
This is all of the info from buildings.xml for Broadway.
The only thing I see different is that there's a modifier for broadway add culture outside of <buildingyieldchanges>

<Row Type="BUILDING_BROADWAY" Kind="KIND_BUILDING"/>
<Row BuildingType="BUILDING_BROADWAY" Name="LOC_BUILDING_BROADWAY_NAME" Description="LOC_BUILDING_BROADWAY_DESCRIPTION" PrereqCivic="CIVIC_MASS_MEDIA" Cost="1620" AdvisorType="ADVISOR_CULTURE" MaxWorldInstances="1" IsWonder="true" RequiresPlacement="true" AdjacentDistrict="DISTRICT_THEATER" ObsoleteEra="ERA_INFORMATION" Quote="LOC_BUILDING_BROADWAY_QUOTE" QuoteAudio="Play_BROADWAY_QUOTE"/>
<Row BuildingType="BUILDING_BROADWAY" TerrainType="TERRAIN_GRASS"/>
<Row BuildingType="BUILDING_BROADWAY" TerrainType="TERRAIN_PLAINS"/>
<Row BuildingType="BUILDING_BROADWAY" TerrainType="TERRAIN_TUNDRA"/>
<Row BuildingType="BUILDING_BROADWAY" TerrainType="TERRAIN_SNOW"/>
<Row BuildingType="BUILDING_BROADWAY" TerrainType="TERRAIN_DESERT"/>
<Row BuildingType="BUILDING_BROADWAY" GreatPersonClassType="GREAT_PERSON_CLASS_WRITER" PointsPerTurn="3"/>
<Row BuildingType="BUILDING_BROADWAY" GreatWorkSlotType="GREATWORKSLOT_WRITING" NumSlots="1"/>
<Row BuildingType="BUILDING_BROADWAY" GreatWorkSlotType="GREATWORKSLOT_MUSIC" NumSlots="2"/>

<Row>
<ModifierId>BROADWAY_ADDCULTUREYIELD</ModifierId>
<ModifierType>MODIFIER_SINGLE_CITY_ADJUST_CITY_YIELD_MODIFIER</ModifierType>
</Row>

<Row>
<ModifierId>BUILDING_BROADWAY_RANDOMCIVICBOOST</ModifierId>
<ModifierType>MODIFIER_PLAYER_GRANT_RANDOM_CIVIC_BOOST_BY_ERA</ModifierType>
<RunOnce>true</RunOnce>
<Permanent>true</Permanent>
</Row>

<Row>
<ModifierId>BROADWAY_ADDCULTUREYIELD</ModifierId>
<Name>Amount</Name>
<Value>20</Value>
</Row>
<Row>
<ModifierId>BROADWAY_ADDCULTUREYIELD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_CULTURE</Value>
</Row>
<Row>
<ModifierId>BUILDING_BROADWAY_RANDOMCIVICBOOST</ModifierId>
<Name>StartEraType</Name>
<Value>ERA_ATOMIC</Value>
</Row>
<Row>
<ModifierId>BUILDING_BROADWAY_RANDOMCIVICBOOST</ModifierId>
<Name>EndEraType</Name>
<Value>ERA_ATOMIC</Value>
</Row>
<Row>
<ModifierId>BUILDING_BROADWAY_RANDOMCIVICBOOST</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<BuildingType>BUILDING_BROADWAY</BuildingType>
<ModifierId>BUILDING_BROADWAY_RANDOMCIVICBOOST</ModifierId>
</Row>
 
Code:
<BuildingModifiers>
	<!--Adjust City Yield-->
	<Row>
		<BuildingType>BUILDING_BROADWAY</BuildingType>
		<ModifierId>BROADWAY_ADDCULTUREYIELD</ModifierId>
	</Row>
</BuildingModifiers>
So you want to look through the code for everything related to "BROADWAY_ADDCULTUREYIELD" and use that as a template to creating the kinds of effects you are after. You can ignore anything that does not trace back to "BROADWAY_ADDCULTUREYIELD" for purposes of figuring out how to create this effect for your building.
 
So I think its working... But I can't be sure its working. I built a hanging gardens first to see if I could 'see' any bonus aside from what it says with "15% bonus growth."

I guess the percentage is more of a passive, unseen effect, then.
 
If you did it correctly, the tooltips in that city for each of your yields will say "+X% from modifiers" where X is the amount you put (unless of course there are OTHER things that count as modifiers as well).
 
Top Bottom