Mod Nukes... to destroy cities?

Aneurism

Prince
Joined
Nov 3, 2003
Messages
377
Location
Canada
I would like ICBMs to have the same affect as razing a city, leaving nothing but ruins. Is this possible?
 
Yes, it will require python. But it won't be hard to do. I'll see what I can wip up. :D

That would be really cool! Thanks! :D
 
Ok, I have wiped somthing up. Sorry it took so long.
Now inorder do this you need the CvEventManager.py file (or a custem event manager) and find the onNukeExplosion function. This function looks like:
Code:
	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList

		CvUtil.pyPrint('Nuke detonated at %d, %d'
			%(pPlot.getX(), pPlot.getY()))
Now you need to change the code to look like this:
Code:
	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList
		## Begin Change ##
		if pPlot.isCity():
			CyInterface().addMessage(pPlot.getPlotCity().getOwner(), False, 25, "%s has been destroyed by %s's Nuke!" %(pPlot.getPlotCity().getName(), gc.getPlayer(pNukeUnit.getOwner()).getName()), '', 2, "", 7, pPlot.getX(), pPlot.getY(), False, False)	## A message to the city's owner
			pPlot.getPlotCity().kill()		## Kill the city
		## End Change ##

		CvUtil.pyPrint('Nuke detonated at %d, %d'
			%(pPlot.getX(), pPlot.getY()))
Hope this helps. :thumbsup:
 
Thanks Zebra that is AWESOME!! :D :D :goodjob: :cool:
 
INGSOC (Intercontinental Nukes are Going Simply to Obliterate the City)

IT'S DOUBLE-PLUS GOOD! :D

I have wanted something like this for a long time--simple, easy to use, easy to change. I presume you could even add an extra python check to see if the city is a certain size. That way, you could have it obliterate the city only if it's below a specific population. :thumbsup:
 
Code:
    def onNukeExplosion(self, argsList):
        'Nuke Explosion'
        pPlot, pNukeUnit = argsList
        ## Begin Change ##
        if pPlot.isCity():
            if pPlot.getPlotCity().getPopulation() <= 5:
                 CyInterface().addMessage(pPlot.getPlotCity().getOwner(), False, 25, "%s has been destroyed by %s's Nuke!" %(pPlot.getPlotCity().getName(), gc.getPlayer(pNukeUnit.getOwner()).getName()), '', 2, "", 7, pPlot.getX(), pPlot.getY(), False, False)    ## A message to the city's owner
                 pPlot.getPlotCity().kill()        ## Kill the city
            else:
                pPlot.getPlotCity().setPopulation(pPlot.getPlotCity().getPopulation() - 5)  ## Can't remember if cities have a change pop function
        ## End Change ##

        CvUtil.pyPrint('Nuke detonated at %d, %d'
            %(pPlot.getX(), pPlot.getY()))
This would cause all cities with 5 or less population to be destroyed. And any other city would lose 5 pop.
 
wow thats neat, kinda overpowered though. I mean definitely a reason to rush nukes, and then Attack everyone, but once someone else has it... I think nuking would be a abd idea.
 
perhaps counter this by making nukes a national unit: limit 3 or something because you could actually kill off the WHOLE world in one turn if you had enough nukes :p
 
Or a better idea, MAD, and serious diplomatic penalties for using nukes, as in the real world.

Someone made MAD possible, I have no idea what the mod was called though.
 
If you used this, I imagine you'd want "require complete kills" on by default, as that makes more sense in a MAD-type situation. That way it would not be overpowered.
 
I'd say make it so 1 nuke hurts troops and destroys improvents(same as now) next nuke does the same, and might kill off weaker ones, 3rd one is death to all units, 4th one removes 5 population(kills city if theres only 5) 5th one kills city. Each nuke drains culture border.

This means inorder to eliminate the world you need 4 to 5 nukes for each City, the average civ has usually 20 cities, that means to wipe out a single civ you would need atleast 90 Nukes for each civ.. Still possible to build up a few hundred nukes and launch them at once, but if you do it before your cities are done makign improvements, you'll hurt your own empire by switching everythign to nuke production. Your Army wont grow, and your enemies will. You'll have more nukes, but using nukes on large scale means the world will hate you, And if you wait for your attack til after your cities are done improving and you have a stead ystream of military troops coming out so you switch some to Nukes, then your enemy will have the SDI and the bomb shelters planes, ect lowering your chance of success of nuking the world. So you need to build atleast 3x as many and have half of that as Tactical. This means your going to have to have about 270 for each civ you attack. So this would severly limit the ability of Nuking the world out.
 
I've made the changes to make nukes more destructive in C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Assets\Python\CvEventManager.py but it still work let me nuke raze cities under pop 5. Anyone got this change to work?
 
Works for me. Upload the changed file and I'll have a look at it.

I'll get that fancier (and IMNVHO better idea) nuke system working tomorrow. :D
 
I like meatwad's idea, but I think it should only be 4 nukes for total city immolation.

BTW, how does the second script change zebra made influenced by SDI or shelters? Does it over-ride shelter settings?
 
Top Bottom