I want to nuke my own territory

jimbob27

Emperor
Joined
Mar 2, 2006
Messages
1,430
Location
London
Does anyone know what needs changing so this can be done?

It seems so lame that the enemy's stacks suddenly become nuke proof the moment they enter my territory. In the cold war they had all sorts of anti-air nukes and nuclear landmines that were supposed to be used in friendly territory. Its just unnessesary they've nerfed them so much.
 
I won a game of RoN that way... well... I didn't so much win it as I made everyone lose by destroying all life on earth. I considered it a victory however... :twitch:

DPII for President! :clap:

Indeed, it's a silly thing that you can't do it.
 
Aye.. I won games in civ like that. I was going for conquest, but then realised I'd timed things badly, and I wasn't going to be able to finish everyone off in time. I decided the best thing to do was to nuke the hell out of everyone else until I got a time victory. Global warming eventually stops when everywhere is desert!

I just had the most annoying thing happen in my most recent game.

I was going for a space race victory, and decided to build a load of nukes in my spare cities to keep my power levels up. All of my cities were defended with obsolete units, but I was close to the top of the power graph so I assumed I would be safe from attack. I assumed wrong because monty attacked and took 2 cities on the same turn.

The next turn, Genghis, Caesar, Louis and Bismark all saw monty's sucess, and decided they wanted a piece of me as well. They all entered my territory in the same area, and at one point pretty much every unit they had were all in the same 3x3 square. I had to watch them rampage through my entire civ until I was dead.

I was just sooooo frustrating. I felt like going into world builder and deleting 2 of my nukes, and all the units in the 3x3 square.... but that'd just feel so lame.
 
jimbob27 said:
Does anyone know what needs changing so this can be done?

It seems so lame that the enemy's stacks suddenly become nuke proof the moment they enter my territory. In the cold war they had all sorts of anti-air nukes and nuclear landmines that were supposed to be used in friendly territory. Its just unnessesary they've nerfed them so much.

This would be an SDK change. If you're up for it, in CvUnit.cpp, there is the canNukeAt() method....

Code:
bool CvUnit::canNukeAt(const CvPlot* pPlot, int iX, int iY) const
{
	CvPlot* pTargetPlot;
	int iI;

	if (!canNuke(pPlot))
	{
		return false;
	}

	pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);

	for (iI = 0; iI < MAX_TEAMS; iI++)
	{
		if (isNukeVictim(pTargetPlot, ((TeamTypes)iI)))
		{
			if (!atWar(((TeamTypes)iI), getTeam()))
			{
				return false;
			}
		}
	}

	return true;
}

isNukeVictim will return if true if a nuke would effect a team (defined by any team that owns a unit or plot within the nuke range). Thus, this whole method, which is used for determining if you can nuke a certain plot, would return false because it sees that you own the plot and you are not at war with yourself. To make the mod, you could probably change this function to read...


Code:
bool CvUnit::canNukeAt(const CvPlot* pPlot, int iX, int iY) const
{
	CvPlot* pTargetPlot;
	int iI;

	if (!canNuke(pPlot))
	{
		return false;
	}

	pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);

	for (iI = 0; iI < MAX_TEAMS; iI++)
	{
		[b]if (getTeam() != (TeamTypes) iI)
		{[/b]
			if (isNukeVictim(pTargetPlot, ((TeamTypes)iI)))
			{
				if (!atWar(((TeamTypes)iI), getTeam()))
				{
					return false;
				}
			}
		[b]}[/b]

	return true;
}

This way, it skips over your team. I'm not sure if you would need to change other parts, but this part would def. need to be changed.
 
Junuxx said:
Glad Civ's Montezuma isn't :D :p

You haven't seen how I play. I'm a thousand times worse than good old monty ;)

Cheers for the help Gerikes. I'll give it a go tonight.
 
Back
Top Bottom