Is it possible to concrete my hoping function using Lua?

Lenin1870

Chieftain
Joined
Mar 16, 2013
Messages
50
Hello. I attempt to make a Civ 6 mod civilizations and leaders now. But I don't know my plan is really possible to realize. My intention is exactly following:

The Ability of Hachiman Hikigaya(leader) -
Receives the strength of all units +5 and the loyalty of all cities for each denouncing or denounced civilization, doubles all yields in the dark and decrease to one-half all yields in the golden age.

The Ability of Yukino Yukinoshita(leader) -
Increase 5 percent to science of every own city per civilization advanced in technologies. Increase 5 percent to culture of every own city per civilization advanced in social systems. In the golden age, the acquiring quantity of diplomatic favor doubles, and all kinds of score about Great Person double.

I'd really appreciate it if you could help me. Thanks.
 
REQUIREMENT_PLAYER_HAS_DARK_AGE
REQUIREMENT_PLAYER_HAS_GOLDEN_AGE

These two requirements should be able to create a Leader or Civilization Ability that is implemented when the player is either in a Dark Age or a Golden Age. So no lua would be needed -- just creation and attachment of a modifier for each condition.

The game already provides a baked-in Modifier-Type to attach a Yield Modifier to all of a player's cities, as well as a pair of requirement sets for a player being either in a Dark or Golden age. So all that is needed is to create two Modifiers (one for each condition) and attach these two Modifiers to a Trait:

Code:
<GameData>
	<Modifiers>
		<Replace>
			<ModifierId>DARK_AGE_INCREASED_YIELDS</ModifierId>
			<ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_MODIFIER</ModifierType>
			<SubjectRequirementSetId>PLAYER_HAS_DARK_AGE</SubjectRequirementSetId>
		</Replace>
		<Replace>
			<ModifierId>GOLDEN_AGE_DECREASED_YIELDS</ModifierId>
			<ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_MODIFIER</ModifierType>
			<SubjectRequirementSetId>PLAYER_HAS_GOLDEN_AGE</SubjectRequirementSetId>
		</Replace>
	</Modifiers>
	<ModifierArguments>
		<Replace>
			<ModifierId>DARK_AGE_INCREASED_YIELDS</ModifierId>
			<Name>Amount</Name>
			<Value>100,100,100,100,100,100</Value>
		</Replace>
		<Replace>
			<ModifierId>DARK_AGE_INCREASED_YIELDS</ModifierId>
			<Name>YieldType</Name>
			<Value>YIELD_FOOD,YIELD_GOLD,YIELD_PRODUCTION,YIELD_SCIENCE,YIELD_CULTURE,YIELD_FAITH</Value>
		</Replace>
		<Replace>
			<ModifierId>GOLDEN_AGE_DECREASED_YIELDS</ModifierId>
			<Name>Amount</Name>
			<Value>-50,-50,-50,-50,-50,-50</Value>
		</Replace>
		<Replace>
			<ModifierId>GOLDEN_AGE_DECREASED_YIELDS</ModifierId>
			<Name>YieldType</Name>
			<Value>YIELD_FOOD,YIELD_GOLD,YIELD_PRODUCTION,YIELD_SCIENCE,YIELD_CULTURE,YIELD_FAITH</Value>
		</Replace>
	</ModifierArguments>
	<Types>
		<Replace Type="TRAIT_AGE_YIELD_MODIFICATIONS" Kind="KIND_TRAIT"/>
	</Types>
	<Traits>
		<Row TraitType="TRAIT_AGE_YIELD_MODIFICATIONS" Name="Age Yield Modifier" Description="Dark Ages produce +100% Yields, Golden Ages produce -50% Yields"/>
	</Traits>
	<TraitModifiers>
		<Row TraitType="TRAIT_AGE_YIELD_MODIFICATIONS" ModifierId="DARK_AGE_INCREASED_YIELDS"/>
		<Row TraitType="TRAIT_AGE_YIELD_MODIFICATIONS" ModifierId="GOLDEN_AGE_DECREASED_YIELDS"/>
	</TraitModifiers>
</GameData>
The Trait can then be attached to a leader or a civilization via either table LeaderTraits or CivilizationTraits

I have not looked into the rest of what you are requesting partly because I am not fully able to understand what it is that you are after because of translation idiom issues I think. But lua can probably accomplish this but I have not thought about how much logic and code it would require:
Receives the strength of all units +5 and the loyalty of all cities for each denouncing or denounced civilization
 
REQUIREMENT_PLAYER_HAS_DARK_AGE
REQUIREMENT_PLAYER_HAS_GOLDEN_AGE

These two requirements should be able to create a Leader or Civilization Ability that is implemented when the player is either in a Dark Age or a Golden Age. So no lua would be needed -- just creation and attachment of a modifier for each condition.

The game already provides a baked-in Modifier-Type to attach a Yield Modifier to all of a player's cities, as well as a pair of requirement sets for a player being either in a Dark or Golden age. So all that is needed is to create two Modifiers (one for each condition) and attach these two Modifiers to a Trait:

Code:
<GameData>
    <Modifiers>
        <Replace>
            <ModifierId>DARK_AGE_INCREASED_YIELDS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_DARK_AGE</SubjectRequirementSetId>
        </Replace>
        <Replace>
            <ModifierId>GOLDEN_AGE_DECREASED_YIELDS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_GOLDEN_AGE</SubjectRequirementSetId>
        </Replace>
    </Modifiers>
    <ModifierArguments>
        <Replace>
            <ModifierId>DARK_AGE_INCREASED_YIELDS</ModifierId>
            <Name>Amount</Name>
            <Value>100,100,100,100,100,100</Value>
        </Replace>
        <Replace>
            <ModifierId>DARK_AGE_INCREASED_YIELDS</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FOOD,YIELD_GOLD,YIELD_PRODUCTION,YIELD_SCIENCE,YIELD_CULTURE,YIELD_FAITH</Value>
        </Replace>
        <Replace>
            <ModifierId>GOLDEN_AGE_DECREASED_YIELDS</ModifierId>
            <Name>Amount</Name>
            <Value>-50,-50,-50,-50,-50,-50</Value>
        </Replace>
        <Replace>
            <ModifierId>GOLDEN_AGE_DECREASED_YIELDS</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FOOD,YIELD_GOLD,YIELD_PRODUCTION,YIELD_SCIENCE,YIELD_CULTURE,YIELD_FAITH</Value>
        </Replace>
    </ModifierArguments>
    <Types>
        <Replace Type="TRAIT_AGE_YIELD_MODIFICATIONS" Kind="KIND_TRAIT"/>
    </Types>
    <Traits>
        <Row TraitType="TRAIT_AGE_YIELD_MODIFICATIONS" Name="Age Yield Modifier" Description="Dark Ages produce +100% Yields, Golden Ages produce -50% Yields"/>
    </Traits>
    <TraitModifiers>
        <Row TraitType="TRAIT_AGE_YIELD_MODIFICATIONS" ModifierId="DARK_AGE_INCREASED_YIELDS"/>
        <Row TraitType="TRAIT_AGE_YIELD_MODIFICATIONS" ModifierId="GOLDEN_AGE_DECREASED_YIELDS"/>
    </TraitModifiers>
</GameData>
The Trait can then be attached to a leader or a civilization via either table LeaderTraits or CivilizationTraits

I have not looked into the rest of what you are requesting partly because I am not fully able to understand what it is that you are after because of translation idiom issues I think. But lua can probably accomplish this but I have not thought about how much logic and code it would require:

Ah, the meaning of sentence is if Hikigaya Hachiman's civ denounces other civs or other civs denounce Hikigaya Hachiman's civ, +5 strength for all units and -1 loyalty for all cities of Hachiman's civ per denouncing. The translator miswrited content. Sorry.
 
Back
Top Bottom