DLL - Various Mod Components

Hi there,
I recently found your DLL Composition and while I managed to get CivIV Diplomacy working with 43 Civs, I fail to include the "YnAEMP DLL Leader fix for BNW".

Is there any way to play with your DLL composition without having to play with 22 blank Leaders?

EDIT: I managed to combine them by copying the "override" folder from the "YnAEMP DLL Leader fix for BNW (v 2)" mod into your mod folder and then adding the following lines to your modinfo:

Code:
    <File md5="43F56A16939C6CF473B0BDE83E164923" import="1">Override/DiploTrade.xml</File>
    <File md5="7FE7682AD400ABCC7DB1A728B634207D" import="1">Override/DiscussionDialog.lua</File>
    <File md5="AE30ACE9EC879335B1313A30C96E9FE2" import="1">Override/DiscussionDialog.xml</File>
    <File md5="9EF472FCF4D70B240F1BC6EB0BBD0D7A" import="1">Override/LeaderHeadRoot.lua</File>
    <File md5="56170A3A9DCEB6E77B9B97927D7DA7EF" import="1">Override/LeaderHeadRoot.xml</File>
    <File md5="0B79CAD0E7D373ADF1E80CD5A6581C07" import="1">Override/TradeLogic.lua</File>

Seems to do the job, hope there won't be any conflicts.
 
Yield value in UnitPromotions_YieldFromKills. Is it % of killed unit's CS that killer gets?

And a couple of bugs I noticed:
AI does not purchase units that have PurchaseOnly flag. This one is fixed in CP.
GameEvents.CityTrained does not fire when AI purchases units.
 
Yield value in UnitPromotions_YieldFromKills. Is it % of killed unit's CS that killer gets?

RTFM ;)

Code:
	<Table name="UnitPromotions_YieldFromKills">
		[B][COLOR="Red"]<!-- Refer to Beliefs/Traits.FaithFromKills, Policies/Traits.CultureFromKills, Units.GoldenAgeValueFromKills and Unit_YieldFromKills, 
Yield is percentage of combat str of killed unit -->[/COLOR][/B]
		<Column name="PromotionType" type="text" reference="UnitPromotions(Type)"/>
		<Column name="YieldType" type="text" reference="Yields(Type)"/>
		<Column name="Yield" type="integer"/>
	</Table>
 
AI does not purchase units that have PurchaseOnly flag.
It won't, because the AI doesn't purchase anything, it only hurries things currently in production (and due to the PurchaseOnly flag, the AI will never have it in production)

GameEvents.CityTrained does not fire when AI purchases units.
Purchased or hurried? With or without CSD? If the latter, have you enabled the EVENTS_CITY option?
 
It sits in the realm of "a smarter AI" - a direction I have decided not to go in.

If/When Smart AI v3 is stable, I'll look at what can be borrowed from that.
 
Whaaaaat. :cry::cry:
Does VMC has that absurdity fixed? Oh my, if it doesn't, here comes more Lua scripts to help the AI...

+1

Noooo!
I've never noticed this, but this is a real shame, since I'm also using a mod that adds more units that can only be purchased! :o

Isn't SmartAI stable already? I thought it was..
However I really hope that inconsistency can be fixed via PNM!
 
As suggested by bane_, variable range/effect of GG/GA auras, coming in v83

attachment.php


attachment.php


Spoiler :

Code:
<GameData>
	<CustomModOptions>
		<Update>
			<Where Name="PROMOTIONS_AURA_CHANGE"/>
			<Set Value="1"/>
		</Update>
	</CustomModOptions>
	
	<Defines>
		<Replace Name="GREAT_GENERAL_MAX_RANGE">
			<!-- Default 2, only needed if increasing the range of GG/GAs, needs to be GREAT_GENERAL_RANGE + max(AuraEffectChange) -->
			<Value>2</Value>
		</Replace>
	</Defines>

	<UnitPromotions>
		<Row>
			<Type>PROMOTION_COLONEL</Type>
			<Description>TXT_KEY_PROMOTION_COLONEL</Description>
			<Help>TXT_KEY_PROMOTION_COLONEL_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PortraitIndex>59</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_COLONEL</PediaEntry>
			<CannotBeChosen>true</CannotBeChosen>
			<AuraRangeChange>-1</AuraRangeChange>
			<AuraEffectChange>-10</AuraEffectChange>
		</Row>
	</UnitPromotions>

	<Language_en_US>
		<Row Tag="TXT_KEY_PROMOTION_COLONEL">
			<Text>Colonel</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_COLONEL_HELP">
			<Text>Colonels have a reduced aura range and effectiveness compared to Great Generals (or Admirals).</Text>
		</Row>
	</Language_en_US>
</GameData>

UI changes in EnemyUnitPanel.lua (4 occurrences)
Code:
		-- Great General bonus
		local bNear, iModifier = pMyUnit:IsNearGreatGeneral()
		if (bNear) then
			iModifier = iModifier + pMyPlayer:GetGreatGeneralCombatBonus();
--		if (pMyUnit:IsNearGreatGeneral()) then
--			iModifier = pMyPlayer:GetGreatGeneralCombatBonus();
			iModifier = iModifier + pMyPlayer:GetTraitGreatGeneralExtraBonus();
 

Attachments

  • ColonelEffect.jpg
    ColonelEffect.jpg
    129.3 KB · Views: 651
  • ColonelRange.jpg
    ColonelRange.jpg
    113.2 KB · Views: 670
Purchased or hurried? With or without CSD? If the latter, have you enabled the EVENTS_CITY option?
I tested it with vanilla dll on diety. I declared war on AI player and surrounded his capital city with my units. Every turn a unit spawned in the city but GameEvents.CityTrained did not fire. It looked a lot like AI was purchasing units but when I tested it again on lower difficulty level no units spawned in the city. So AI just gets free units on diety if his city is surrounded with enemy units.
 
I want to creat a Improvement with "NoFeature" (can't be bulit on a tile with Feature), but the Table of "Improvements" only has "RequiresFeature".
Could you add this in your future version of DLL? ;)
 
I want to creat a Improvement with "NoFeature" (can't be bulit on a tile with Feature), but the Table of "Improvements" only has "RequiresFeature".
Could you add this in your future version of DLL? ;)

From v30:
Code:
    <!--   GameEvents.PlayerCanBuild.Add(function(iPlayer, iUnit, iX, iY, iBuild) return true end) -->
    [B]<!--   GameEvents.PlotCanImprove.Add(function(iX, iY, iImprovement) return true end) -->[/B]
    <!--   GameEvents.PlayerBuilding.Add(function(iPlayer, iUnit, iX, iY, iBuild, bStarting) end) (v46) -->
    <!--   GameEvents.PlayerBuilt.Add(function(iPlayer, iUnit, iX, iY, iBuild) end) (v46) -->
    <!-- See also: "Improvement - Pontoon Bridge" -->
    <Row Class="3" Name="EVENTS_PLOT" Value="0"/>
 
@qqqbbb - SerialEventUnitCreated has nothing to do with the game core DLL, it is triggered by the UI dll, and we have no detailed knowledge (ie no source code for) that.

@CCWB - as bane_ suggests, use the PlotCanImprove event - if the desired improvement return "pPlot:GetImprovementType() ~= -1"
 
Hope this attribute can be written in DLL and used by xmls. :mischief:

There is a generic, extensible, multi-use-case solution available with Lua, so a specific, single-use-case xml option is NOT going to happen. Firaxis are the kings of "single use modding", it's something I try to avoid!
 
V83 on my web-site and GitHub

  • TRAITS_GG_FROM_BARBARIANS and PROMOTIONS_GG_FROM_BARBARIANS: Permits units to earn GG/GA points from killing barbarians - see "Global - Commander Points From Barbarians"
  • PROMOTIONS_AURA_CHANGE: Permits variable great general and admiral aura ranges - see "Promotions - Colonels", "Global - Commander Influence Borders" and post #1711 above
  • Additions to GameEvents.TileRevealed and GameEvents.NaturalWonderDiscovered of the unit (if any) revealing the tile - see "Global - XP For Scouting" (another bane_ suggestion)
  • Bug fixes for upgrading units that can/will hover - should now work for any upgrade over any terrain
  • Bug fix for land unit with the Cross Ice promotion that insisted on embarking into the ice-floe as opposed to walking out onto it!
  • New Player API methods for altering research overflow - SetOverflowResearch(iResearch) and ChangeOverflowResearch(iResearch)
  • New Player API methods for changing influence/tourism on players - ChangeInfluenceOnAllPlayers(iBaseInfluence, bApplyModifiers, bModifyForGameSpeed) and ChangeInfluenceOnPlayer(iPlayer, iBaseInfluence, bApplyModifiers, bModifyForGameSpeed)

There are also some internal changes in prep for v84 ...
 
Very good update, thanks for fixing the hover upgrades! :)

Now I'm curious about the upcoming features of v84! Do you mind sharing the secret plans?


edit:

The iScoutingXpDivisor is still set to 2:

Code:
-- How many scouting XPs in a real XP
-- local iScoutingXpDivisor = 6
local iScoutingXpDivisor = 2 -- FOR TESTING ONLY
 
The iScoutingXpDivisor is still set to 2

It's only really an example (see the comment at the top of the same file), but I'd already spotted it and was using it to test something I'd broken in my automated site uploader - which I've now fixed so v2 is up with the divisor set to 6

:)
 
Back
Top Bottom