whoward69
DLL Minion
DLL containing various "mod components" to enhance/extend my Pick'N'Mix mods. Download here, install notes here.
EDIT: List last updated for V16 of the DLL - for full details of each feature see posts #2 and #3
NOTE: Most of these options must be enabled by another mod that also provides the UI for them and/or additional Lua coding. The following Pick'N'Mix mods use features of the DLL
In keeping with my "buffet table" approach to modding, each component can be enabled/disabled (via an XML based database table in CustomModOptions.xml) or the associated code excluded from the build (via #defines in CustomMods.h)
Full source code changes included - suggest you start at CustomMods.h (source code also available from GitHub)
If you use this code as the basis for your own changes, please ensure you read the modder notes in CvDllContext.cpp and change the GUID in CustomMods.h
EDIT: List last updated for V16 of the DLL - for full details of each feature see posts #2 and #3
- Global - Enable Magellan: Adds a notification when someone circumnavigates the globe (does not itself enable the circumnavigate option)
- Global - Local Generals: Great Generals and Admirals gained from combat experience spawn in the war-zone and not in a distant city
- Global - Passable Forts: Ships may enter coastal forts/citadels
- Global - Passable Forts Any: Ships may enter any forts/citadels
- Global - City Forest Bonus: Give initial production boost for cities founded on forests, as if the forest had been chopped down by a worker
- Global - CS Gift Ships: City States will gift ships
- Global - CS Upgrades: Units in allied militaristic City States can upgrade
- Global - CS Raze Rarely: City States will only raze captured cities if they are very unhappy
- Global - No Conquered Spaceships: Removes assembled spaceship parts from conquered capitals
- Global - Allies Block Blockades: Adjacent allied ships block blockades by enemy ships 2 or more tiles away
- Global - Short Embarked Blockades: Embarked combat units only blockade adjacent tiles
- Global - Grateful Settlers: Other player's settlers captured from Barbarians will sometimes remain as settlers
- Global - Subs Under Ice Immunity: Subs under ice are immune to all attacks except from other subs
- Global - Promotion Classes: Permits units to have promotion trees different from their assigned CombatClass
- Global - Alpine Passes: Mountain plots return their terrain as TERRAIN_MOUNTAIN and any land unit may enter a mountain that has a road/rail route
- Global - City State Gifts: City States give different gifts depending on their type (cultural, religious, maritime, etc)
- Global - Quick Routes: Route To will only build roads, or upgrade road to rail, for human players
- Global - Paratroops Movement: Paratroops can move/attack after the drop, if the drop is not at max range
- Global - Paratroops AA Damage: Paratroops take AA damage from hostile units
- Global - Nukes Melt Ice: Nukes will melt ice
- Buildings - Pro-Rata Purchase: Purchase of buildings in cities allows for any current production
- Traits - Crosses Ice: Permits land units to cross ice
- Promotions - Variable Recon: Permits variable recon ranges by creating extra recon range promotions (like extra sight range)
- Promotions - Cross Mountains: Permits land units to cross mountains (like the Carthage trait)
- Promotions - Cross Oceans: Permits coastal units to cross oceans
- Promotions - Cross Ice: Permits land units to cross ice
- Promotions - Half Move: Adds a HalfMove feature to the UnitPromotions_Terrains and UnitPromotions_Features tables
- Promotions - Deep Water Embarkation: Permits Deep Water (Ocean) embarkation for hovering units
- UI - City Production: Permit the focus (gold, science, etc) of puppet cities to be set (but not what is being built or how specialists are allocated)
- UI - City Expansion: Permit human players to choose they own city tiles due to cultural expansion
- Units - Local Workers: Restricts worker suggestions to local tiles
- Units - Hovering Land Only Heal: Hovering unit can only heal over land
- Units - Hovering Coastal Attacks: Permits hovering units to attack coastal shipping
- Religion - No Preferences: Removes religion preference
- Religion - Randomise: Randomises religion choice (if preferred religion unavailable) - use with Religion - No Preferences for totally random religions
- Religion - Conversion Modifiers: Adds ConversionModifier and GlobalConversionModifier (in the same vein as espionage modifiers) to buildings
- Events - New Era: Sent when the team/player enters a new era - GameEvents.TeamSetEra.Add(function(eTeam, eEra) end)
- Events - Diplo Events: Sent during Game.DoFromUIDiploEvent - GameEvents.UiDiploEvent.Add(function(eEvent, eAIPlayer, iArg1, iArg2) end)
- Events - Goody Tech: Sent if a Goody Hut is giving a tech - GameEvents.GoodyHutCanResearch.Add(function(ePlayer, eTech) return true end) and GameEvents.GoodyHutTechResearched.Add(function(ePlayer, eTech) end)
- Events - Natural WOnder Discovery: Event sent when the team discovers a new Natural Wonder - GameEvents.NaturalWonderDiscovered.Add(function(iTeam, iFeature, iX, iY, bFirst) end)
- Events - Minors: Events sent on status change with City States - GameEvents.MinorFriendsChanged.Add(function(iMinor, iMajor, bIsFriend, iOldFriendship, iNewFriendship) end) and GameEvents.MinorAlliesChanged.Add(function(iMinor, iMajor, bIsAlly, iOldFriendship, iNewFriendship) end)
- Events - Found Religion: Events sent when a player is about to found a religion - 6 events (see below)
- Events - Acquire Beliefs: Events sent when choosing beliefs - GameEvents.PlayerCanHaveBelief.Add(function(iPlayer, iBelief) return true end) and GameEvents.ReligionCanHaveBelief.Add(function(iReligion, iBelief) return true end)
- Events - Paradrops: Events sent to ascertain if a unit can start a paradrop from this tile - 3 events (see below)
- Events - Can Move Into: Event sent to ascertain if a unit can move into a given plot - GameEvents.CanMoveInto.Add(function(iPlayer, iUnit, iPlotX, iPlotY, bAttack, bDeclareWar) return true end)
- Events - Nuclear Detonation: Event sent when a nuke is fired - GameEvents.NuclearDetonation.Add(function(iPlayer, iX, iY, bWar, bBystanders) end)
- Events - War And Peace: Events sent about war and peace - 4 events (see below)
- Events - City: Events sent after a city produces/buys something - 5 events (see below)
- Events - Unit Upgrades: Events sent as units are promoted/upgraded - 5 events (see below)
- Events - Rebase: Events sent to ascertain if a unit can rebase to a specific plot (either a city or a carrier) - 4 events (see below)
- Events - RED: Events generated by the RED (by Gedemon) dll mod code - 7 events (see below)
- API - Espionage API: Adds various Lua methods to the Player object for controlling spies
- API - Religion: Enables the Religion API
- API - Plot Based Damage: Enabes the Plot Based Damage API (replaces fixed damage from mountains)
- API - Extensions: Enables the Extensions API
- API - Lua Extensions: Enables the LUA Extensions API
- Config - AI In XML: Push various hard-coded values controlling the AI out into XML
- BugFix - Free Food Building: Fixes the NumCitiesFreeFoodBuilding (policy finisher) bug where the civilization has a UB for the Aquaduct
- BugFix - Naval Free Units: Fixes the bug where the naval Civilization_FreeUnits start on land
- BugFix - Naval Nearest Water: Fixes the bug where the naval units jump to the nearest city and not the nearest available water plot
- BugFix - Barb Camp Terrains: Fixes the bug where Barb Camps ignore the ValidTerrains and ValidFeatures tables
- BugFix - Remove Ghost Routes: Fixes the bug where you can't remove roads in no-mans-land originally built by a now dead player
- BugFix - Units Awake In Danger: Fixes healing units ignoring enemy units and sleeping units under direct fire remaining asleep - thanks to hulkster for highlighting the latter issue
- BugFix - Workers Visible Danger: Fixes workers stopping what they are doing at any hint of danger to only when they can see an enemy unit
- BugFix - Interceptor Strength: Fixes the bug in calculating AA interception strength which takes terrain into account
- BugFix - Unit Power Calculation: Fixes the very dodgy maths in the calculation of a unit's power
- BugFix - Unit Power Bonus Vs Domain Only: Fixes the Anti-Air non-domain bonuses issue, requires BUGFIX_UNIT_POWER_CALC to be enabled
- BugFix - Unit Power Naval Consistency: Fixes the naval imbalance in a unit's power calculation, requires BUGFIX_UNIT_POWER_CALC to be enabled
- BugFix - Hovering Pathfinder: Fixes a bug in the pathfinder code for hovering units at the coast
- BugFix - Embarking Pathfinder: Fixes a bug in the pathfinder code for embarking
- BugFix - Range 3 Targetting: Fixes the Range-3 targetting bug - code by DaveMcW
NOTE: Most of these options must be enabled by another mod that also provides the UI for them and/or additional Lua coding. The following Pick'N'Mix mods use features of the DLL
- Global - City State Airbases
- Global - City States Gifts
- Global - Enable Magellan
- Global - Espionage Mapping
- Global - Espionage Race
- Goody Huts - Tech Refund
- Improvement - Airbases
- Improvement - Tunnel
- Religion - Natural Wonder Epiphany
- Promotions - Heli AirRecon
- Promotions - Jet Long Range Recon
- Promotions - Terrain Crossing
- Units - Paratroop Enhancements
- Unique Unit - Longboat
- Unique Building - Cistern
- Unique Building - Turkish Baths
- UI - City Expansion
- UI - City Production
- UI - Diary
In keeping with my "buffet table" approach to modding, each component can be enabled/disabled (via an XML based database table in CustomModOptions.xml) or the associated code excluded from the build (via #defines in CustomMods.h)
Full source code changes included - suggest you start at CustomMods.h (source code also available from GitHub)
If you use this code as the basis for your own changes, please ensure you read the modder notes in CvDllContext.cpp and change the GUID in CustomMods.h