[PYTHONCOM] MAD Nukes Mod

KET, thats a very good idea, I would like that too, what say ye Master THELOPEZ?
 
Bug Report 100% Reproducible

1) Target City With Nukes
2) Destroy City Either Normally Or With A Nuke
3) End Turn
4) Game will crash, no debug info in the logs to report

Assumption:
This was done using my mod after I did a merge and clean compile of the mod.
Old Nuke Targeting City was not altered so the turn ended with a nuke targeting a city that no longer existed.
Warlords SDK

Secondary Note:
I went into world Builder and gave all Civs a nuke and S.A.C.
Declared war on one

Went a few turns, I never got targeted.
Of course nukes in 3500bc is fun! wondering if that had anything to do with it.
 
Ket said:
Bug Report 100% Reproducible

1) Target City With Nukes
2) Destroy City Either Normally Or With A Nuke
3) End Turn
4) Game will crash, no debug info in the logs to report

Assumption:
This was done using my mod after I did a merge and clean compile of the mod.
Old Nuke Targeting City was not altered so the turn ended with a nuke targeting a city that no longer existed.
Warlords SDK

Secondary Note:
I went into world Builder and gave all Civs a nuke and S.A.C.
Declared war on one

Went a few turns, I never got targeted.
Of course nukes in 3500bc is fun! wondering if that had anything to do with it.

OK, the bug reported has been fixed and a new version has been posted.
 
You need to build the "Strategic Air Command" national wonder inorder to activate the ability to pretarget nukes.
 
All I see is .31w where did you hide the new one :)
 
Ket, I just replaced the v0.3.1 and v0.3.1w with new versions that actually fix the problem you reported.
 
K checking now
 
Well we still got a crash... Its partially fixed and i dont know exactly what threw it for a loop this time. But it crashed in a similar place kinda

Ok started a new game (this is on just the mod not a merge) went into world builder and give 3 civs plus myself SAC.

Then gave everyone a nuke gave myself 8 nukes

Placed modern armor next to each city

Set Targets to the other 3 players of 2 nukes each

Skipped 5 turns to see if I was targeted... No...
(Maybe cause they only had one nuke)

Declared War on the 3 players with nukes
Skipped 5 turns
I was never targeted. Ok... No problem...

Invaded player #1 Woot no crash everything went fine... Missile reset YAY!
End Turn
Still nothing incoming.... don't these guys know I'm nuts....

Nuke Player #2
Nuke Player #3
(now i have the ini settings at false, false, false, true) so nukes are not completly deadly...
End turn
Between turns I was nuked and MAD responded. I thought the game had hung but it just took a bit to resolve (the camera should prob move to the explosion if possible) ok im a glowing mess, there a glowing mess... lets end this dr. strangelove hell Re-target mad, why I have no idea ....

Invade player #2
He has no defenders as his nuke was his only defender...
CRASH

Sigh
Nothing exciting in the log.

Reload Save... CRASH WTF
Reload Previous save before the war to try to duplicate.
Except I give player 2 another nuke to see if I get targeted.

Declare War End Turn X5
Never targeted....
Ok lets try the ground war player #1 your up first
Tanks advance next to city...
end turn check targeting
What the hell are these guys smoking, I'm still not targeted?
Ok Player #1 your up on the price is right...
Took City 1 and kept it
Ok time for nuke exchange with the reset missle
End turn...
not targeted...
morons...
1 nuke @ player 2 and 3 each
end turn
Im nuked 3 times.....
MAD responds as it should
Ok I think I know what I did different the last time. I razed player #2's city lets try that shall we
He has 2 defenders this time I blitz in and kill them both raze city...
no crash...
Ok...
lets go into world builder and remove the defenders from player 3....
Ok walk in...raze city...
All good...
Ok so we have a non repro CTD...
I think I know why I was never targeted. They dont know where my city is...
Will try placing a scout down so they see me
Nope, target routines for the A.I. never fire I think....
Trying the invasion run again
This time no nukes launched wanted to check autoraze...
Fine no crash....
 
On more bug in CvUnit.cpp:

Code:
void CvUnit::doTurn()
{
...
iRandPlayer = (rand() % MAX_PLAYERS);
if(GET_PLAYER((PlayerTypes)iRandPlayer).isAlive() && GET_PLAYER((PlayerTypes)iRandPlayer).getID() != getOwnerINLINE())
{
	if(!atWar(getTeam(), GET_PLAYER((PlayerTypes)iRandPlayer).getTeam()) && isPotentialEnemy(GET_PLAYER((PlayerTypes)iRandPlayer).getTeam(), getTeam()))
	{
	iNumCities = GET_PLAYER((PlayerTypes)iRandPlayer).getNumCities();
	pCity = GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities);

If iRandPlayer is a dying civilization with 0 cities, iNumCities becomes 0 and the division in the next line throws an exception.

Maybe you should check some more divisions in the code.

Matze
 
Matze, does this error exist in Dale's MAD code as well? I ask this since that's where I got most of the MAD code for this mod.

EDIT: Wouldn't the code not be executed because isAlive would return false for a dying player?
 
TheLopez said:
Matze, does this error exist in Dale's MAD code as well? I ask this since that's where I got most of the MAD code for this mod.

I don't remember. I have to look.

EDIT: Wouldn't the code not be executed because isAlive would return false for a dying player?

I mean a player with no more cities but with some units left.

Matze
 
MatzeHH said:
I mean a player with no more cities but with some units left.

Matze

When will that ever happen? It was my understanding that once a player has no more cities then the player is killed off and all of their remaining units are killed off as well.
 
There is a game option you can set when starting a game called 'Require Complete Kills'. By checking that option players don't die until all their cities AND units are destroyed. I know I turn that option on in most games and imagine many others do aswell. If I remember right the option was added in patch 1.5 or 1.61. :)
 
Thanks Jeckel...
 
Is there an option to keep all the civ-aid-messages for inventions, city-building-suggestions,... cause they seem to be disabled, I know most of the time they are boring and irritating but they're pretty usefull in the late game when your civ is huge.
 
So what does this have to with the MAD Nukes Mod?
 
Hello,

First of all, I apologise for my mistakes in English. It's not my first language. :)

@TheLopez:

I've just downloaded the Mod, so I'm sorry if the following feature is already done in the Mod.

But, as I've read this thread and found no mention about this, then I may ask: would it be possible (or not too difficult) to include a diplomacy penalty, from the target civ (the civ that may receive the nukes), upon the aiming civ (the civ that preset the nukes)?

And congratulations for your great work, TheLopes! :goodjob:

Thanks!
 
Top Bottom