[BTS] M.A.D Nukes Mod
Compatibility and SDK update by MacsBug
Kudos to TheLopez on his great mod: http://forums.civfanatics.com/showthread.php?t=168858
Download
Version: 0.06b (BETA)
Compatibility: BTS v3.02
MP Compatibility: Unknown
Download: http://forums.civfanatics.com/downloads.php?do=file&id=6792
Version: 0.07b (BETA)
Compatibility: BTS v3.13
MP Compatibility: Unknown
Download: http://forums.civfanatics.com/downloads.php?do=file&id=7483
Installation Instructions
1) Unzip MAD Nukes Mod.zip into <bts_install_folder>\Mods\
Change log:
Known bugs:
Planned features:
Credits and Thanks:
- TheLopez for initial idea and coding for Warlords
- doronron for allowing me to bounce ideas off him and implementation suggestions
Compatibility and SDK update by MacsBug
Kudos to TheLopez on his great mod: http://forums.civfanatics.com/showthread.php?t=168858
Download
Version: 0.06b (BETA)
Compatibility: BTS v3.02
MP Compatibility: Unknown
Download: http://forums.civfanatics.com/downloads.php?do=file&id=6792
Version: 0.07b (BETA)
Compatibility: BTS v3.13
MP Compatibility: Unknown
Download: http://forums.civfanatics.com/downloads.php?do=file&id=7483
Installation Instructions
1) Unzip MAD Nukes Mod.zip into <bts_install_folder>\Mods\
Change log:
Spoiler :
---v0.07b---
-Updated to BTS v3.13
---v0.06b---
CvPlayer.cpp
-Modified void CvPlayer::handleMADNukeExplosion(PlayerTypes ePlayer, int iRange, int iX, int iY) to fix a possible stack overflow error
CvUnitAI.cpp
-Modified CvPlayer* CvUnitAI::AI_MADGetBestPlayer() to correctly skip any players the AI may not declare war on (ex: Vassal states)
-Modified CvPlayer* CvUnitAI::AI_MADGetBestCity(CvPlayer *pCity) to correctly skip cities it may not nuke.
CvUnit.h/CvUnit.cpp
-Added the protected function bool canMADNukeAt(CvPlot* pPlot)
-Modified CvUnit::nuke to use canMADNukeAt
-Modified CvUnit::doTurn to invalidate the mad target plot appropriately
-Modified canStartMADTargetMissionAt(int iX, int iY) to appropriately return false for invalid targets
CvMADNukesManager.py
-Fixed a minor bug that occurred when attempting to display an outgoing nuke pre-targeting a non-city plot
Bug Fixes:
-Pre-targeting a nuke (both AI and Player) now requires that the player be able to declare war on the target. This, unfortunately, prevents Vassal states from pre-targeting nukes.
-iAirRange is now checked prior to pre-targeting a nuke
-Pre-targeted nukes should now never fail to launch properly when triggered by an enemy launch
---v0.05b---
-Bugfix: All variables should now be saved/loaded properly
-Bugfix: The “LAUNCH!” command should now work properly in multi-player
-Feature Addition: Runtime modification of the Enable MAD Nukes Mod flag should now work properly.
-Feature Addition: Threat counts by civilization now displayed in the NUCLEAR THREAT SUMMARY section of the INCOMING WARHEADS screen
-Feature Addition: Threat counts by civilization by city (selected cities only) now displayed in the NUCLEAR THREAT SUMMARY section of the INCOMING WARHEADS screen
-Feature Addition: Nukes should now be able to properly pre-target any plot
-Feature Addition: Nukes should now be able to properly pre-target from any plot
-Note: This version is not compatible with previous version’s saved game files
-Note: Specific list of SDK and Python changes are not be included in this change log, as the list is too extensive. Any future SDK and Python changes will note changes made from this version’s source files.
---v0.04b---
CvPlot.h/CvPlot.cpp
-Modified void CvPlot::read() to comply with variable changes (see below)
-Modified void CvPlot::write() to comply with variable changes (see below)
-Modified void CvPlot::reset() to comply with variable changes (see below)
-Added the function int CvPlot::getNumMADIncomingWarheads()
-Added the function int CvPlot::getNumMADOutgoingWarheads()
-Added the function CvUnit* CvPlot::getMADIncomingWarhead(int iIndex)
-Added the function CvUnit* CvPlot::getMADOutgoingWarhead(int iIndex)
-Added the function void CvPlot::addMADIncoming(int iUnitID, PlayerTypes ePlayer)
-Added the function void CvPlot::addMADOutgoing(int iUnitID, PlayerTypes ePlayer)
-Added the function void CvPlot::removeMADIncoming(int iUnitID, PlayerTypes ePlayer)
-Added the function void CvPlot::removeMADOutgoing(int iUnitID, PlayerTypes ePlayer)
-Added the protected variable m_aMADNukesOutgoing
-Added the protected variable m_aMADNukesIncoming
-Removed the function void CvPlot::changeMADIncoming(int iValue)
-Removed the function void CvPlot::changeMADOutgoing(int iValue)
-Removed the protected variable m_iMADIncoming
-Removed the protected variable m_iMADOutgoing
CyPlot.h/CyPlot.cpp
-Added the function int CyPlot::getNumMADIncomingWarheads()
-Added the function int CyPlot::getNumMADOutgoingWarheads()
-Added the function CyUnit* CyPlot::getMADIncomingWarhead(int iIndex)
-Added the function CyUnit* CyPlot::getMADOutgoingWarhead(int iIndex)
CyPlotInterface1.cpp
-Exposed the function int CyPlot::getNumMADIncomingWarheads() to Python
-Exposed the function int CyPlot::getNumMADOutgoingWarheads() to Python
-Exposed the function CyUnit* CyPlot::getMADIncomingWarhead(int iIndex) to Python
-Exposed the function CyUnit* CyPlot::getMADOutgoingWarhead(int iIndex) to Python
CvUnit.cpp
-Modified changeMADTargetPlot to comply with CvPlot changes
-Minor bug fix in CvUnit::kill that would occasionally fail to remove a MAD unit from the owner's MAD unit list.
CvPlayer.cpp
-Minor conformity change
CvMADNukesManager.py
-Modified updateMinimap to display incoming warhead locations
Game play changes:
The “OUTGOING WARHEADS” section of the “MAD WARHEAD MANAGER” will now display the locations of the warheads targeting the selected cities.
Note: This version is not compatible with previous version’s saved game files
---v0.03b---
CvMADNukesManager.py
-(BUGFIX) modified drawOutgoingWarheadsContent to use getMADUnit to retrieve its initial list of units. All pre-targeted nukes should now be properly displayed in the OUTGOING WARHEADS section.
CvPlayer.h
-Minor conformance change
CyPlayer.h/CyPlayer.cpp
-Added the function CyUnit* CyPlayer::getMADUnit(int iIndex)
-Added the function int CyPlayer::getNumMADUnits()
-Added the function int CyPlayer::getMADOutgoingAt(PlayerTypes ePlayer)
CyPlayerInterface1.cpp
-Exposed the function CyUnit* CyPlayer::getMADUnit(int iIndex) to Python
-Exposed the function int CyPlayer::getNumMADUnits() to Python
-Exposed the function int CyPlayer::getMADOutgoingAt(PlayerTypes ePlayer) to Python
---v0.02b---
CvMADNukesManager.py
-Added a “LAUNCH!” button next to the “INCOMING WARHEADS” button
-Added code to launch all selected nuclear missiles when “LAUNCH!” is selected
-Corrected a minor bug that checked for UNIT_ICBM rather than checking isMADNuke to generate a list of valid MAD nukes
CvUnit.h/CvUnit.cpp
-Added the function bool CvUnit::launchMADNuke()
CyUnit.h/CyUnit.cpp
-Added the function bool CyUnit::launchMADNuke()
CyUnitInterface1.cpp
-Exposed the function bool CyUnit::launchMADNuke() to Python
Game play changes:
Pressing “MAD NUKES MANAGER” window has an additional button, “LAUNCH!” If this window is currently displaying the OUTGOING WARHEADS window and a number of warheads are selected, pressing this button will cause all selected warheads to launch.
---v0.01b---
- First release
-Updated to BTS v3.13
---v0.06b---
CvPlayer.cpp
-Modified void CvPlayer::handleMADNukeExplosion(PlayerTypes ePlayer, int iRange, int iX, int iY) to fix a possible stack overflow error
CvUnitAI.cpp
-Modified CvPlayer* CvUnitAI::AI_MADGetBestPlayer() to correctly skip any players the AI may not declare war on (ex: Vassal states)
-Modified CvPlayer* CvUnitAI::AI_MADGetBestCity(CvPlayer *pCity) to correctly skip cities it may not nuke.
CvUnit.h/CvUnit.cpp
-Added the protected function bool canMADNukeAt(CvPlot* pPlot)
-Modified CvUnit::nuke to use canMADNukeAt
-Modified CvUnit::doTurn to invalidate the mad target plot appropriately
-Modified canStartMADTargetMissionAt(int iX, int iY) to appropriately return false for invalid targets
CvMADNukesManager.py
-Fixed a minor bug that occurred when attempting to display an outgoing nuke pre-targeting a non-city plot
Bug Fixes:
-Pre-targeting a nuke (both AI and Player) now requires that the player be able to declare war on the target. This, unfortunately, prevents Vassal states from pre-targeting nukes.
-iAirRange is now checked prior to pre-targeting a nuke
-Pre-targeted nukes should now never fail to launch properly when triggered by an enemy launch
---v0.05b---
-Bugfix: All variables should now be saved/loaded properly
-Bugfix: The “LAUNCH!” command should now work properly in multi-player
-Feature Addition: Runtime modification of the Enable MAD Nukes Mod flag should now work properly.
-Feature Addition: Threat counts by civilization now displayed in the NUCLEAR THREAT SUMMARY section of the INCOMING WARHEADS screen
-Feature Addition: Threat counts by civilization by city (selected cities only) now displayed in the NUCLEAR THREAT SUMMARY section of the INCOMING WARHEADS screen
-Feature Addition: Nukes should now be able to properly pre-target any plot
-Feature Addition: Nukes should now be able to properly pre-target from any plot
-Note: This version is not compatible with previous version’s saved game files
-Note: Specific list of SDK and Python changes are not be included in this change log, as the list is too extensive. Any future SDK and Python changes will note changes made from this version’s source files.
---v0.04b---
CvPlot.h/CvPlot.cpp
-Modified void CvPlot::read() to comply with variable changes (see below)
-Modified void CvPlot::write() to comply with variable changes (see below)
-Modified void CvPlot::reset() to comply with variable changes (see below)
-Added the function int CvPlot::getNumMADIncomingWarheads()
-Added the function int CvPlot::getNumMADOutgoingWarheads()
-Added the function CvUnit* CvPlot::getMADIncomingWarhead(int iIndex)
-Added the function CvUnit* CvPlot::getMADOutgoingWarhead(int iIndex)
-Added the function void CvPlot::addMADIncoming(int iUnitID, PlayerTypes ePlayer)
-Added the function void CvPlot::addMADOutgoing(int iUnitID, PlayerTypes ePlayer)
-Added the function void CvPlot::removeMADIncoming(int iUnitID, PlayerTypes ePlayer)
-Added the function void CvPlot::removeMADOutgoing(int iUnitID, PlayerTypes ePlayer)
-Added the protected variable m_aMADNukesOutgoing
-Added the protected variable m_aMADNukesIncoming
-Removed the function void CvPlot::changeMADIncoming(int iValue)
-Removed the function void CvPlot::changeMADOutgoing(int iValue)
-Removed the protected variable m_iMADIncoming
-Removed the protected variable m_iMADOutgoing
CyPlot.h/CyPlot.cpp
-Added the function int CyPlot::getNumMADIncomingWarheads()
-Added the function int CyPlot::getNumMADOutgoingWarheads()
-Added the function CyUnit* CyPlot::getMADIncomingWarhead(int iIndex)
-Added the function CyUnit* CyPlot::getMADOutgoingWarhead(int iIndex)
CyPlotInterface1.cpp
-Exposed the function int CyPlot::getNumMADIncomingWarheads() to Python
-Exposed the function int CyPlot::getNumMADOutgoingWarheads() to Python
-Exposed the function CyUnit* CyPlot::getMADIncomingWarhead(int iIndex) to Python
-Exposed the function CyUnit* CyPlot::getMADOutgoingWarhead(int iIndex) to Python
CvUnit.cpp
-Modified changeMADTargetPlot to comply with CvPlot changes
-Minor bug fix in CvUnit::kill that would occasionally fail to remove a MAD unit from the owner's MAD unit list.
CvPlayer.cpp
-Minor conformity change
CvMADNukesManager.py
-Modified updateMinimap to display incoming warhead locations
Game play changes:
The “OUTGOING WARHEADS” section of the “MAD WARHEAD MANAGER” will now display the locations of the warheads targeting the selected cities.
Note: This version is not compatible with previous version’s saved game files
---v0.03b---
CvMADNukesManager.py
-(BUGFIX) modified drawOutgoingWarheadsContent to use getMADUnit to retrieve its initial list of units. All pre-targeted nukes should now be properly displayed in the OUTGOING WARHEADS section.
CvPlayer.h
-Minor conformance change
CyPlayer.h/CyPlayer.cpp
-Added the function CyUnit* CyPlayer::getMADUnit(int iIndex)
-Added the function int CyPlayer::getNumMADUnits()
-Added the function int CyPlayer::getMADOutgoingAt(PlayerTypes ePlayer)
CyPlayerInterface1.cpp
-Exposed the function CyUnit* CyPlayer::getMADUnit(int iIndex) to Python
-Exposed the function int CyPlayer::getNumMADUnits() to Python
-Exposed the function int CyPlayer::getMADOutgoingAt(PlayerTypes ePlayer) to Python
---v0.02b---
CvMADNukesManager.py
-Added a “LAUNCH!” button next to the “INCOMING WARHEADS” button
-Added code to launch all selected nuclear missiles when “LAUNCH!” is selected
-Corrected a minor bug that checked for UNIT_ICBM rather than checking isMADNuke to generate a list of valid MAD nukes
CvUnit.h/CvUnit.cpp
-Added the function bool CvUnit::launchMADNuke()
CyUnit.h/CyUnit.cpp
-Added the function bool CyUnit::launchMADNuke()
CyUnitInterface1.cpp
-Exposed the function bool CyUnit::launchMADNuke() to Python
Game play changes:
Pressing “MAD NUKES MANAGER” window has an additional button, “LAUNCH!” If this window is currently displaying the OUTGOING WARHEADS window and a number of warheads are selected, pressing this button will cause all selected warheads to launch.
---v0.01b---
- First release
Known bugs:
Spoiler :
- Vassal states and other diplomatic conditions preventing war ignored for the purposes of launching a MAD nuke [FIXED - v0.06b]
- iAirRange ignored for MAD nukes except when Safe Nukes Mode is set to "1" [FIXED - v0.06b]
- Pre-targeted nukes sometimes fail to launch properly when triggered by an enemy launch [FIXED - v0.06b]
- "LAUNCH!" command not multiplayer compatable (kudos Jeckel) [FIXED - v0.05b]
- Saved games do not load properly [FIXED - v0.05b]
- Some ICBMs fail to appear on the MAD WARHEAD MANAGER after pre-targeting the unit (kudos doronron) [FIXED - v0.03b]
- iAirRange ignored for MAD nukes except when Safe Nukes Mode is set to "1" [FIXED - v0.06b]
- Pre-targeted nukes sometimes fail to launch properly when triggered by an enemy launch [FIXED - v0.06b]
- "LAUNCH!" command not multiplayer compatable (kudos Jeckel) [FIXED - v0.05b]
- Saved games do not load properly [FIXED - v0.05b]
- Some ICBMs fail to appear on the MAD WARHEAD MANAGER after pre-targeting the unit (kudos doronron) [FIXED - v0.03b]
Planned features:
Spoiler :
- Add an espionage check prior to displaying the locations of the warheads targeting the selected cities in the INCOMING WARHEADS screen. (scraped)
Credits and Thanks:
- TheLopez for initial idea and coding for Warlords
- doronron for allowing me to bounce ideas off him and implementation suggestions