DLL - Various Mod Components

Hey whoward,

one of the recent changes to the CP where the code for hovering units was rewritten broke the compatibility for Terrain Crossing, Steampunk Airships and other mods that require these promotions.
Since it seems to a difficult thing to sort out and you are the one who knows best about the promotions and everything related, could you please have a look at the github thread and try to shed some light on the issue? This would be great!

You can find it right here.
 
what version is for civ V version 1.0.3.18 ?

If you had a legal version of the game it would have update to 1.0.3.279.

Do NOT use my mods with pirated software :mad:
 
Just for bane_ :)

attachment.php


coming in v77
Spoiler :

Code:
<GameData>
	<CustomModOptions>
		<Update>
			<Where Name="UNITS_MAX_HP"/>
			<Set Value="1"/>
		</Update>
	</CustomModOptions>
	
	<Units>
		<Update>
			<Where Type="UNIT_XCOM_SQUAD"/>
			[B][COLOR="Green"]<Set MaxHitPoints="125"/>[/COLOR][/B]
		</Update>

		<Update>
			<Where Type="UNIT_MECH"/>
			[B][COLOR="green"]<Set MaxHitPoints="150"/>[/COLOR][/B]
		</Update>
	</Units>

	<UnitPromotions>
		<Row>
			<Type>PROMOTION_EXTRA_HP_1</Type>
			<Description>TXT_KEY_PROMOTION_EXTRA_HP_1</Description>
			<Help>TXT_KEY_PROMOTION_EXTRA_HP_1_HELP</Help>
			[B][COLOR="green"]<MaxHitPointsChange>15</MaxHitPointsChange>[/COLOR][/B]
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PortraitIndex>26</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_EXTRA_HP_1</PediaEntry>
		</Row>
		<Row>
			<Type>PROMOTION_EXTRA_HP_2</Type>
			<Description>TXT_KEY_PROMOTION_EXTRA_HP_2</Description>
			<Help>TXT_KEY_PROMOTION_EXTRA_HP_2_HELP</Help>
			[B][COLOR="green"]<MaxHitPointsChange>25</MaxHitPointsChange>[/COLOR][/B]
			<PromotionPrereqOr1> PROMOTION_EXTRA_HP_1</PromotionPrereqOr1>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PortraitIndex>26</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_EXTRA_HP_2</PediaEntry>
		</Row>

		<Row>
			<Type>PROMOTION_BONUS_HP_1</Type>
			<Description>TXT_KEY_PROMOTION_BONUS_HP_1</Description>
			<Help>TXT_KEY_PROMOTION_BONUS_HP_1_HELP</Help>
			[B][COLOR="green"]<MaxHitPointsModifier>10</MaxHitPointsModifier>
[/COLOR][/B]			<Sound>AS2D_IF_LEVELUP</Sound>
			<PortraitIndex>26</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_BONUS_HP_1</PediaEntry>
		</Row>
		<Row>
			<Type>PROMOTION_BONUS_HP_2</Type>
			<Description>TXT_KEY_PROMOTION_BONUS_HP_2</Description>
			<Help>TXT_KEY_PROMOTION_BONUS_HP_2_HELP</Help>
			[B][COLOR="green"]<MaxHitPointsModifier>20</MaxHitPointsModifier>[/COLOR][/B]
			<PromotionPrereqOr1> PROMOTION_BONUS_HP_1</PromotionPrereqOr1>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PortraitIndex>26</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_BONUS_HP_2</PediaEntry>
		</Row>
	</UnitPromotions>

	<UnitPromotions_UnitCombats>
		<Row>
			<PromotionType>PROMOTION_EXTRA_HP_1</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_EXTRA_HP_2</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_BONUS_HP_1</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_BONUS_HP_2</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
		</Row>
	</UnitPromotions_UnitCombats>
	
	<Language_en_US>
		<Row Tag="TXT_KEY_PROMOTION_EXTRA_HP_1">
			<Text>Tough Nuts 1</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_EXTRA_HP_1_HELP">
			<Text>Units have 15 extra hit points.</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_EXTRA_HP_2">
			<Text>Tough Nuts 2</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_EXTRA_HP_2_HELP">
			<Text>Units have 25 extra hit points.</Text>
		</Row>

		<Row Tag="TXT_KEY_PROMOTION_BONUS_HP_1">
			<Text>Pain Immune 1</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_BONUS_HP_1_HELP">
			<Text>Units have 10% extra base hit points.</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_BONUS_HP_2">
			<Text>Pain Immune 2</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_BONUS_HP_2_HELP">
			<Text>Units have 20% extra base hit points.</Text>
		</Row>
	</Language_en_US>
<GameData>

Note: Modifiers are applied to base hit points, for example, a GDR unit with both Tough Nuts 1 and Pain Immune 1 promotions will gain ((150 * (100 + 10)/100) + 15) = 180 base hit points and not ((150 + 15) * (100 + 10)/100) = 181.5 (which rounds down to 181) base hit points.
 

Attachments

  • ToughNuts1.jpg
    ToughNuts1.jpg
    107.7 KB · Views: 93
  • ToughNuts2.jpg
    ToughNuts2.jpg
    82.4 KB · Views: 291
  • ToughNuts3.jpg
    ToughNuts3.jpg
    110.9 KB · Views: 151
@whoward69 I recently downloaded Religion - Fixed Prophets and updated DLL - Various Mod Components from v 74 to v 76 from your website and I can't pick a religion. Any clue?
 
If that's the only two mods installed, no - as I play with Fixed Prophets all the time.

If there are other mods installed, no - as you don't say what they are, and even if you did, there could be any number of unknown interactions.

Check the logs (especially lua.log) and see if there are any errors.
 
The new HitPoint-Modifiers are a great idea, I'll definitely use them, too! :)

I'm also playing with Fixed Prophets all the time and never had any issues.
 
V77 introduces a switch for the XP times 100 code. By default it's off (ie old behaviour), you'll need to turn it on with "Units - XP Times 100" (this was an oversight on my part - too keen to push it out the door!)
 
...and 1,084,732 new ideas for traits were unlocked.

And another 1,084,732 new ideas for policies and beliefs ...

Traits can be unlocked by policies and beliefs (which means you can effectively use any trait ability/bonus as a policy/belief ability/bonus)

For example, a Belief that doubles yields from Natural Wonders (a la the Spanish Seven Cities of Gold trait)

Spoiler XML :

Code:
<?xml version="1.0" encoding="utf-8"?>
<GameData>
	<CustomModOptions>
		<Update>
			<Where Name="TRAITS_OTHER_PREREQS"/>
			<Set Value="1"/>
		</Update>
	</CustomModOptions>
	
	<Traits>
		<Row>
			<Type>TRAIT_WONDER_OF_NATURAL_WONDERS</Type>
			<Description>TXT_KEY_TRAIT_WONDER_OF_NATURAL_WONDERS</Description>
			<ShortDescription>TXT_KEY_TRAIT_WONDER_OF_NATURAL_WONDERS_SHORT</ShortDescription>
			<NaturalWonderYieldModifier>100</NaturalWonderYieldModifier>
			<NaturalWonderHappinessModifier>100</NaturalWonderHappinessModifier>
			<!-- This is the magic bit.  All leaders start with this policy (see the SQL)
			     but it is only enabled when/if they adopt BELIEF_ONE_WITH_NATURE -->
			<PrereqBelief>BELIEF_ONE_WITH_NATURE</PrereqBelief>
		</Row>
	</Traits>
	
	<Belief_YieldChangeNaturalWonder>
		<Delete BeliefType="BELIEF_ONE_WITH_NATURE"/>
	</Belief_YieldChangeNaturalWonder>

	<Language_en_US>
		<Row Tag="TXT_KEY_TRAIT_WONDER_OF_NATURAL_WONDERS_SHORT">
			<Text>Wonder Of Natural Wonders</Text>
		</Row>
		<Row Tag="TXT_KEY_TRAIT_WONDER_OF_NATURAL_WONDERS">
			<Text>[ICON_CULTURE] Culture, [ICON_HAPPINESS_1] Happiness, and tile yields from Natural Wonders doubled.</Text>
		</Row>

		<Replace Tag="TXT_KEY_BELIEF_ONE_WITH_NATURE">
			<Text>[ICON_CULTURE] Culture, [ICON_HAPPINESS_1] Happiness, and tile yields from Natural Wonders doubled.</Text>
		</Replace>
	</Language_en_US>
</GameData>


Spoiler SQL :

Code:
-- Update all current leaders to have the new trait
INSERT INTO Leader_Traits(LeaderType, TraitType)
    SELECT Type, 'TRAIT_WONDER_OF_NATURAL_WONDERS' FROM Leaders;

-- Update any additional leaders to have the new trait  
CREATE TRIGGER NaturalWondersByBelief
AFTER INSERT ON Leaders
BEGIN
    INSERT INTO Leader_Traits(LeaderType, TraitType)
        VALUES(NEW.Type, 'TRAIT_WONDER_OF_NATURAL_WONDERS');
END;
 
Are you going to release a new PNM-mod for the bonus health promotions as well?
Since you've already posted the complete code for such a mod.. :)
 
The code as posted will be released by my "funky-Java-automated-web-site-updater" utility when I next run it (which will be when I've finished testing something else in v77)
 
Is it already possible to add new yields to improvements when finishing a research only for sepcific tiles?

I mean I made the improvement "Suburb".
Since there is nothing to force the improvement to be build next to a city*, I made it that way, that only next to a city it gives very good yields. If not next to a city, the additional yields are none.

But I want to start with e.g 3 yields for suburbs next to city, and increase this up to 6 with some researches. But at the moment this would mean, that a suburb not next to a city would get 3 yields.
I hope you can understand this description :D

*you could add this too :) :D and forcing an improvement to be build outside of territory
 
But the other request would be nice too :)

Which one? If you mean "improvements can only be constructed outside own lands" use a combination of "OutsideLands" in the database and the event
 
Which one? If you mean "improvements can only be constructed outside own lands" use a combination of "OutsideLands" in the database and the event
thx.

I meant increasing yields only for specific tiles. So assuming I want suburbs also to be build further away from cities, but only if it is next to a city (or on a mountain/next to river and so on), a research will increase the yields.
 
Have two improvements, one with the higher yields but un-buildable. Use the PlotBuilt event (or whatever it's called) and when a suburb is built next to a city, swap it for the one with the higher yield.

The problem with adding columns to the database tables is that they are totally specific - they do X and only X, if another modder wants to do Y you have to add another column. The beauty of events is that they are generic. I can implement them such that not only are X and Y both possible, but also A, B and C tomorrow and L, M, N and O the week after (which we haven't even thought of yet!)
 
Back
Top Bottom