Welcome to Dale's MOD Factory!
I'm going to be placing here code that can be used in an advanced fashion by modders to enhance their own mods. I have supplied both a compiled version of the mod (for v1.61 Civ4) as well as the source code.
NOTE: The source code items WILL require you to modify and compile a new SDK DLL file! Do not attempt this if you are unsure what you are doing!
Also note that I will not be providing support for how to compile or use the SDK. Those questions are for different threads in this forum.
--------------------------------------------------------------------------------------------------------
Ranged Field Bombardment:
SDK v1.61 Code: http://users.tpg.com.au/thesdale/civ...ombardCode.zip
SDK v1.61 Compiled: http://users.tpg.com.au/thesdale/civ...BombardSDK.zip
Code Version: 1.0
What it does:
Units that are given this ability lose the vanilla bombard ability of bombarding adjacent cities, and gain a ranged bombard ability on units, cities and improvements. The bomb range xml setting defines how far away the unit can bombard. Simple click the bombard icon and select the tile you wish to bombard. Allowed squares show in green when mousing over them, similar to the air bomb event.
How to Implement:
Note: Replace [ ] braces with < > in the code items below.
Step 1: Add the new code to the DLL and compile.
Step 2: Modify the #define value in CvDefines.h to true or false (true turns on the mod) and re-compile.
Step 3: Add the new interface to CIV4InterfaceModeInfos.xml
Step 4: Modify the MISSION_BOMBARD event in CIV4MissionInfos.xml
Step 5: Add the new xml flags to the schema in CIV4UnitSchema.xml
AND in the CvUnitInfo element:
Step 6: Modify your units by adding the following code in Civ4UnitInfos.xml
NOTE: The value of iDCMBombRange is the number of tiles the unit can bombard. EG: Artillery with a iDCMBombRange of 2 can bombard 2 tiles away.
I'm going to be placing here code that can be used in an advanced fashion by modders to enhance their own mods. I have supplied both a compiled version of the mod (for v1.61 Civ4) as well as the source code.
NOTE: The source code items WILL require you to modify and compile a new SDK DLL file! Do not attempt this if you are unsure what you are doing!
Also note that I will not be providing support for how to compile or use the SDK. Those questions are for different threads in this forum.
--------------------------------------------------------------------------------------------------------
Ranged Field Bombardment:
SDK v1.61 Code: http://users.tpg.com.au/thesdale/civ...ombardCode.zip
SDK v1.61 Compiled: http://users.tpg.com.au/thesdale/civ...BombardSDK.zip
Code Version: 1.0
What it does:
Units that are given this ability lose the vanilla bombard ability of bombarding adjacent cities, and gain a ranged bombard ability on units, cities and improvements. The bomb range xml setting defines how far away the unit can bombard. Simple click the bombard icon and select the tile you wish to bombard. Allowed squares show in green when mousing over them, similar to the air bomb event.
How to Implement:
Note: Replace [ ] braces with < > in the code items below.
Step 1: Add the new code to the DLL and compile.
Step 2: Modify the #define value in CvDefines.h to true or false (true turns on the mod) and re-compile.
Step 3: Add the new interface to CIV4InterfaceModeInfos.xml
Code:
[InterfaceModeInfo] [Type]INTERFACEMODE_BOMBARD[/Type] [Description]Ranged Field Bombard[/Description] [Help]Ranged Field Bombard[/Help] [CursorType]CURSOR_AIRBOMB[/CursorType] [Mission]MISSION_BOMBARD[/Mission] [HotKey]KB_B[/HotKey] [bAltDown]0[/bAltDown] [bShiftDown]0[/bShiftDown] [bCtrlDown]0[/bCtrlDown] [iHotKeyPriority]0[/iHotKeyPriority] [HotKeyAlt/] [bAltDownAlt]0[/bAltDownAlt] [bShiftDownAlt]0[/bShiftDownAlt] [bCtrlDownAlt]0[/bCtrlDownAlt] [iHotKeyPriorityAlt]0[/iHotKeyPriorityAlt] [bVisible]1[/bVisible] [bGotoPlot]0[/bGotoPlot] [bHighlightPlot]1[/bHighlightPlot] [bSelectType]0[/bSelectType] [bSelectAll]0[/bSelectAll] [Button],Art/Interface/Buttons/Actions/Bombard.dds,Art/Interface/Buttons/Actions_Builds_LeaderHeads_Specialists_Atlas.dds,2,1[/Button] [/InterfaceModeInfo]
Code:
[MissionInfo] [Type]MISSION_BOMBARD[/Type] [Description]TXT_KEY_MISSION_BOMBARD[/Description] [Help]TXT_KEY_MISSION_BOMBARD_HELP[/Help] [Waypoint]NONE[/Waypoint] [EntityEventType]ENTEVENT_BOMBARD[/EntityEventType] [iTime]16[/iTime] [bTarget]0[/bTarget] [bBuild]0[/bBuild] [bSound]1[/bSound] [Button],Art/Interface/Buttons/Actions/Bombard.dds,Art/Interface/Buttons/Actions_Builds_LeaderHeads_Specialists_Atlas.dds,2,1[/Button] [/MissionInfo]
Code:
[ElementType name="bDCMBombard" content="textOnly" dt:type="boolean"/] [ElementType name="iDCMBombRange" content="textOnly" dt:type="int"/]
Code:
[element type="bDCMBombard" minOccurs="0"/] [element type="iDCMBombRange" minOccurs="0"/]
Code:
[bDCMBombard]1[/bDCMBombard] [iDCMBombRange]1[/iDCMBombRange]
Comment