The Mine Warfare Mod

yes i must agree on that.After posting i did some thought and realized spies would be useless as like you say,all countries would have same option and would make spies useless

Hoping the wife amuses herself today so i can test the rest of them out,have not built a naval mine yet though i can lol


i can't help thinking this would be real fun in some other mods i play,tried adding it to one lastnight but a modder i am not :P
 
Hi OrionVeteran!,

Thanks for this mod!, :goodjob: we're looking forward to merge it with the FF B5 mod.:cool:

I was going to tell you about a great merchant blown up in the arabian capital... but I guess that has been taken care of in the fix. :D

However I had two observations:
1. By the time the naval mine sweeper is available it is the strongest ship, more than a Ship of the Line, perhaps two mine sweepers would be required. I didn't cheked but I'm almos sure this does also apply to the land mine sweeper.

2. Even before I built my first mine I started getting messages saying my mines destroyed an enemy vessel.

And a suggestion, you know, when a new resource becomes available there is a small circle pointing in the direction where the new resource is located, if you click it, it takes you to that place on the map. Could we have a feature like this for when a mine blows up?

Once again thanks for this mod. :beer:
 
Hi OrionVeteran!, Thanks for this mod!, :goodjob: we're looking forward to merge it with the FF B5 mod.:cool:

Glad you like it! It seems to be very popular already. :)

I was going to tell you about a great merchant blown up in the arabian capital... but I guess that has been taken care of in the fix. :D

The fix resolved that issue.

However I had two observations:
1. By the time the naval mine sweeper is available it is the strongest ship, more than a Ship of the Line, perhaps two mine sweepers would be required. I didn't cheked but I'm almos sure this does also apply to the land mine sweeper.

Yea. That disturbed me to. To resolve this issue, I'm thinking about adding 2 new units for land and sea called the Mine Hunter.

The Mine Hunter will actively detect and neutralise individual mines, while the Mine Sweeper can neutralise Mine Fields and the more powerful nuclear mines. Separating the capabilities will allow the Mine Hunter to have more moderate strength and have an upgrade at industrialism to the Mine Sweeper.


2. Even before I built my first mine I started getting messages saying my mines destroyed an enemy vessel.

The fix should have resolved that issue.

And a suggestion, you know, when a new resource becomes available there is a small circle pointing in the direction where the new resource is located, if you click it, it takes you to that place on the map. Could we have a feature like this for when a mine blows up?

I believe that feature is in the dll or the exe. However, I think I may have an idea for a solution to your request. If it works, I'll put it in ver 1.1.


Orion Veteran :cool:
 
anyone manage to merge this into other mods,i spent one evening trying but as im not a modder i got lost a few hours into it :(
 
@OrionVeteran

The above poster would like to merge this into LoR, which is no different from a merging standpoint the RevDCM. I was unable to help them, which seem kind of a waste, since I know you release your mods in WoC format; but no one seems to know how to use WoC. I don't, and there are no tutorials on it (say if I wanted to merge this with RevDCM, I'd have to de WoCify it first so that I'd know what I'm doing). Could you give generalized instructions, using this mod as a base, on how to merge a WoC ready mod comp into RevDCM?
 
@OrionVeteran

The above poster would like to merge this into LoR, which is no different from a merging standpoint the RevDCM. I was unable to help them, which seem kind of a waste, since I know you release your mods in WoC format; but no one seems to know how to use WoC. I don't, and there are no tutorials on it (say if I wanted to merge this with RevDCM, I'd have to de WoCify it first so that I'd know what I'm doing). Could you give generalized instructions, using this mod as a base, on how to merge a WoC ready mod comp into RevDCM?

Instructions for Installation of WoC version of the Mine Warfare Mod:

1. Download Mine Warfare Mod

2. Create the folder: ...\Mods\RevolutionDCM\Assets\Modules\Combat Categories

3. Paste the MLF_CIV4ModularLoadingControls.xml and CIV4ModularLoadingControlsSchema.xml into the Combat Categories folder.

4. Make sure the MLF_CIV4ModularLoadingControls.xml file has this:

Code:
<?xml version="1.0"?>
<!-- Sid Meier's Civilization 4 Beyond the Sword -->
<!-- Modified by the World of Civilization Team -->
<!-- Master Load File -->
<!-- -->
<Civ4ModularLoadControls xmlns="x-schema:CIV4ModularLoadingControlsSchema.xml">
	<DefaultConfiguration>Module_Combat_Categories_1</DefaultConfiguration>
	<ConfigurationInfos>
		<ConfigurationInfo>
			<Type>Module_Combat_Categories_1</Type>
			<Description>Combat Categories Group 1</Description>
			<Modules>
				<Module>
					<Directory>Mine Warfare</Directory>
					<bLoad>1</bLoad>
				</Module>							
			</Modules>
		</ConfigurationInfo>
	</ConfigurationInfos>
</Civ4ModularLoadControls>

5. Paste the Mine Warfare folder from the download into the Combat Categories folder. You should now have this folder and the proper files copied into their respective folders:

Mods\RevolutionDCM\Assets\Modules\Combat Categories\Mine Warfare\Art\Interface\Buttons\Builds, Categories, Units

6. Replace the 7 schema files in the Mine Warfare folder, with the respective schema files from RevolutionDCM.
Code:
Mods\RevolutionDCM\Assets\XML\Audio\AudioDefinesSchema.xml
Mods\RevolutionDCM\Assets\XML\Audio\AudioScriptSchema.xml
Mods\RevolutionDCM\Assets\XML\Art\CIV4ArtDefinesSchema.xml
Mods\RevolutionDCM\Assets\XML\BasicInfos\CIV4BasicInfoSchema.xml
Mods\RevolutionDCM\Assets\XML\Buildings\CIV4BuildingsSchema.xml
Mods\RevolutionDCM\Assets\XML\Technologies\CIV4TechnologiesSchema.xml
Mods\RevolutionDCM\Assets\XML\Units\CIV4UnitInfosSchema.xml
7. Create the folder: ...\Mods\RevolutionDCM\Assets\Python\Orions Mods\Mine Warfare

8. Paste the 3 python files in the MineWarfare folder:

Mods\RevolutionDCM\Assets\Python\Orions Mods\MineWarfare

MineWarfare.py
MineWarfareEvents.py
MineWarfareGameUtils.py

9. Go to the folder: ...\Mods\RevolutionDCM\Assets\Config

10. Copy the MineWarfare.XML file in config folder

11. Open the init.xml file in the Config folder and add the following Red lines:

\Mods\RevolutionDCM\Assets\Config

Code:
	<load mod="EventSigns"/>
	<load mod="Strategy Overlay"/>
	<load mod="StatusDump"/>
	<load mod="MovieMod"/>
[COLOR="Red"]<!-- Orion's Mods -->
	<load mod="MineWarfare"/>[/COLOR]

12. Save the init.xml file.

13. Merge the Mine Warfare updates to the CvMainInterface.py located in the Mods\RevolutionDCM\Assets\Python\Screens folder.

Spoiler :

Code:
# Mine Warfare Mod
					pUnit = g_pSelectedUnit
					iUnitType = pUnit.getUnitType()
					iUnitOwner = pUnit.getOwner( )
					pUnitOwner = gc.getPlayer(pUnit.getOwner( ))
					iPlotX = pUnit.getX()
					iPlotY = pUnit.getY()
					pPlot = CyMap().plot(iPlotX, iPlotY)					
					iUnitNavalMine = gc.getInfoTypeForString("UNIT_NAVAL_MINE")	
					iUnitNavalMineField = gc.getInfoTypeForString("UNIT_NAVAL_MINE_FIELD")	
					iUnitNuclearNavalMine = gc.getInfoTypeForString("UNIT_NUCLEAR_NAVAL_MINE")					
					iUnitLandMine = gc.getInfoTypeForString("UNIT_LAND_MINE")	
					iUnitLandMineField = gc.getInfoTypeForString("UNIT_LAND_MINE_FIELD")	
					iUnitNuclearLandMine = gc.getInfoTypeForString("UNIT_NUCLEAR_LAND_MINE")					
					iUnitNavalMineSweeper = gc.getInfoTypeForString("UNIT_NAVAL_MINE_SWEEPER")
					iUnitLandMineSweeper = gc.getInfoTypeForString("UNIT_LAND_MINE_SWEEPER")
					
					
					MineList = [
						iUnitNavalMine,
						iUnitNavalMineField,
						iUnitNuclearNavalMine,
						iUnitLandMine,
						iUnitLandMineField,
						iUnitNuclearLandMine,
					]
					
					SweeperList = [
						iUnitNavalMineSweeper,
						iUnitLandMineSweeper
					]
					
					NuclearMineList = [
						iUnitNuclearNavalMine,
						iUnitNuclearLandMine
					]
					
					if pUnitOwner.isTurnActive( ):						
						# ##### Arming Switch for ALL unarmed Mines - Button ######
						# Is this a Mine?						
						if (iUnitType in MineList):
							# Is this Mine unarmed?  
							if not MineWarfare.isMineImmobile(pUnit):
								# Can't arm a mine in a city			
								if not pPlot.isCity():
									screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_ARMING_SWITCH").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 776, 776, False )
									screen.show( "BottomButtonContainer" )
									iCount = iCount + 1
									return					
						
						# ##### Naval Mine Sweeper Unit Button ######						
						if (iUnitType in SweeperList):		
							if not pPlot.isCity():
								if MineWarfare.hasEnemyMine(pPlot, iUnitOwner):
									if pPlot.getPlotType() == PlotTypes.PLOT_OCEAN:
										screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_GREEN_RADAR_SCREEN").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 777, 777, False )
									else:
										screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_RED_RADAR_SCREEN").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 778, 778, False )
									
									screen.show( "BottomButtonContainer" )
									iCount = iCount + 1
									return
						
						if (iUnitType in NuclearMineList):
							# Is this Mine armed? 
							if MineWarfare.isMineImmobile(pUnit):
								# ##### Nuclear Mine Detonation Button ######
								if not pPlot.isCity():
									screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_MUSHROOM_CLOUD").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 779, 779, False )
									screen.show( "BottomButtonContainer" )
									iCount = iCount + 1
									return
												
# End Mine Warfare Mod

and

Code:
# Mine Warfare Mod
		# Arming of Naval or Land Mines
		if (inputClass.getNotifyCode() == 11 and inputClass.getData1() == 776 and inputClass.getData2() == 776):
			self.pPushedButtonUnit = g_pSelectedUnit
			iX = self.pPushedButtonUnit.getX()
			iY = self.pPushedButtonUnit.getY()
			pPlot = CyMap().plot(iX, iY)
			iOwner = g_pSelectedUnit.getOwner()
			iUnitID = g_pSelectedUnit.getID()			
			pPlayer = gc.getPlayer(iOwner)
			pUnit = pPlayer.getUnit(iUnitID)
			if not MineWarfare.isMineImmobile(pUnit):
				# Arming of Naval or Land Mine
				MineWarfare.doActivateMine(pUnit)
				CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT, True)
		
		# Eliminates Mines from plot
		if (inputClass.getNotifyCode() == 11 and inputClass.getData1() == 777 and inputClass.getData2() == 777):
			self.pPushedButtonUnit = g_pSelectedUnit
			iX = self.pPushedButtonUnit.getX()
			iY = self.pPushedButtonUnit.getY()
			pPlot = CyMap().plot(iX, iY)
			iOwner = g_pSelectedUnit.getOwner()
			iUnitID = g_pSelectedUnit.getID()			
			pPlayer = gc.getPlayer(iOwner)
			pUnit = pPlayer.getUnit(iUnitID)
			# Remove Mine from plot
			MineWarfare.doMineSweep(pUnit, pPlot)
			CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT, True)
			
		# Eliminates Mines from plot
		if (inputClass.getNotifyCode() == 11 and inputClass.getData1() == 778 and inputClass.getData2() == 778):
			self.pPushedButtonUnit = g_pSelectedUnit
			iX = self.pPushedButtonUnit.getX()
			iY = self.pPushedButtonUnit.getY()
			pPlot = CyMap().plot(iX, iY)
			iOwner = g_pSelectedUnit.getOwner()
			iUnitID = g_pSelectedUnit.getID()			
			pPlayer = gc.getPlayer(iOwner)
			pUnit = pPlayer.getUnit(iUnitID)
			# Remove Mine from plot
			MineWarfare.doMineSweep(pUnit, pPlot)
			CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT, True)			

		# Eliminates all Units from a plot	
		if (inputClass.getNotifyCode() == 11 and inputClass.getData1() == 779 and inputClass.getData2() == 779):
			self.pPushedButtonUnit = g_pSelectedUnit
			iX = self.pPushedButtonUnit.getX()
			iY = self.pPushedButtonUnit.getY()
			pPlot = CyMap().plot(iX, iY)
			iOwner = g_pSelectedUnit.getOwner()
			iUnitID = g_pSelectedUnit.getID()			
			pPlayer = gc.getPlayer(iOwner)
			pUnit = pPlayer.getUnit(iUnitID)
			# Remove all units from the plot
			MineWarfare.doDestroyAllUnits(pPlot)
			# Kill the mine
			pUnit.kill(0, -1)
			CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT, True)				
# End Mine Warfare Mod


14. Enjoy Mine Warfare.
 
AWESOME!!!

i see mine warfare as a new tech and i see the units listed in the sevopedia so now for the testing but it seems i can play Revolutions DCM at least :P


many thanks OrionVeteran,that was as easy as it looked :P
 
BAH

last step seems to have foiled me

*BugConfig - failure parsing C:\Program Files (x86)\Firaxis\Sid Meier's Civilization 4\Beyond the Sword\Mods\RevolutionDCM\Assets\Config\Mine Warfare.xml at line 13


*edit

seems i have the units but no arming buttons
 
I am thinking it has something to do with this py file CvMainInterface in the Screens folder,that ones not been migrated anywhere following the above instructions


*EDIT*

yes that's the issue,sort of moved it to the rev screens folder and replaced the old,i have mine buttons now,they do explode when walked on but i have many different errors about loading :(
 
I am thinking it has something to do with this py file CvMainInterface in the Screens folder,that ones not been migrated anywhere following the above instructions


*EDIT*

yes that's the issue,sort of moved it to the rev screens folder and replaced the old,i have mine buttons now,they do explode when walked on but i have many different errors about loading :(

Missed a step. Sorry about that. See step 13 above. You must merge the python, not replace the file or you will get multiple errors.

Orion Veteran :cool:
 
well,that got the buttons and the mines seem to work,i still get that error

*BugConfig - failure parsing C:\Program Files (x86)\Firaxis\Sid Meier's Civilization 4\Beyond the Sword\Mods\RevolutionDCM\Assets\Config\Mine Warfare.xml at line 13

plus there's an error when the mines arrive

Error in unitBuilt event handler <bound method BuildUnitName, onUnitBuilt of <unitNameEventManager,BuildUnitName object at 0x0EC70CF0

same error on building the 1st city also but its

Error in cityBuilt event handler <bound method BuildUnitName, onCityBuilt of <unitNameEventManager,BuildUnitName object at 0x0EBD5F30
 
well,that got the buttons and the mines seem to work,i still get that error

*BugConfig - failure parsing C:\Program Files (x86)\Firaxis\Sid Meier's Civilization 4\Beyond the Sword\Mods\RevolutionDCM\Assets\Config\Mine Warfare.xml at line 13

plus there's an error when the mines arrive

Error in unitBuilt event handler <bound method BuildUnitName, onUnitBuilt of <unitNameEventManager,BuildUnitName object at 0x0EC70CF0

same error on building the 1st city also but its

Error in cityBuilt event handler <bound method BuildUnitName, onCityBuilt of <unitNameEventManager,BuildUnitName object at 0x0EBD5F30

Check step 5. I think the path should have Mine Warfare with a space and not MineWarfare, which doesn't have a space. The Python subfolder does not have a space, but the mod folder does. Confusing I know.

I should have made all of the references without any spaces, as it would have made it easier to troubleshoot.
 
no i have the space already and thanks btw for your time,i'm slowly learning a few things at least :P
 
no i have the space already and thanks btw for your time,i'm slowly learning a few things at least :P

I think your MineWarfare.xml file is corrupt. I suggest you create a new file and retype the same lines from the old file. Do not paste in the data. This way, you will have a completely new file. Let me know if that works. If not, I have another idea.
 
no sorry,that didn't seem to solve anything either, i notice i seem to be missing all those buttons up top to the left also, and the button you use to check on the revolution status is also gone from the far right

i was going to uninstall everything and start anew actually as i now can't really play,a modder i am not

*shrugs*

*ADDED LATER*

i was thinking today,the only part of this whole process that was hard was

13. Merge the Mine Warfare updates to the CvMainInterface.py located in the Mods\RevolutionDCM\Assets\Python\Screens folder.


i have no idea when it shows two similar lines but with slight differences,which to use,i ended up using cmd and copy file a to file b.........


the rest of the process was pretty basic really except for this

8. Paste the 3 python files in the MineWarfare folder:

Mods\RevolutionDCM\Assets\Python\Orions Mods\MineWarfare

11. Open the init.xml file in the Config folder and add the following Red lines:

\Mods\RevolutionDCM\Assets\Config

Code:

<load mod="EventSigns"/>
<load mod="Strategy Overlay"/>
<load mod="StatusDump"/>
<load mod="MovieMod"/>
<!-- Orion's Mods -->
<load mod="MineWarfare"/>

you have Orion's mod one time and orions mod the 2nd,i removed the ' to make em the same assuming that was a typo

Step 7
Mods\RevolutionDCM\Assets\XML\Units\CIV4UnitInfosSchema.xml
there is
CIV4UnitSchema
or
CIV4UnitInfos
there is no CIV4UnitInfosSchema

The following file was never used anywhere,probably cause i'm clueless :P

Mine Warfare Configuration Settings (.ini)
 
no sorry,that didn't seem to solve anything either, i notice i seem to be missing all those buttons up top to the left also, and the button you use to check on the revolution status is also gone from the far right

That indicates something wrong with the CvMainInterface.py file.
 
yes probably because i have no idea how to merge them properly,no big deal,wife has plans for me this weekend anyway :P
 
Quick update

started over, did step 13 using only the files u posted under 13(hadn't noticed those earlier:P) THEN i added import MineWarfare to the beginning of the file and i have all the buttons i should have,still get the error

*BugConfig - failure parsing C:\Program Files (x86)\Firaxis\Sid Meier's Civilization 4\Beyond the Sword\Mods\RevolutionDCM\Assets\Config\Mine Warfare.xml at line 13

that only happens on 1st loading of a game,if you return to main menu and start again,the error doesn't come,i assume cause its not trying to load the file again

seems to be playing fine but i'm sure i will get deep into a nice game and poof desktop appears :P
 
OrionVeteran, a question. The xml file known as python references or something similar, is it any different between vanilla and your mod?
 
Back
Top Bottom