[PYTHONCOM] MAD Nukes Mod

TheLopez said:
NFIH, you can always change how the mod works through the configuration file...

OK, except that I don't see anything in that file that controls, for example, what percentage of units are killed. So I wouldn't know what to change. (I think it's 50% in the vanilla game but that's controlled by a modifier which isn't in your config, correct?)
 
When I nuke cities, most of them disappear and make ocean, but some take 2 or 3 nukes to destroy. Is there something wrong with this?
one city I nuked four or five times before I just grabbed 5 and nuked it all at once. that got rid of it :D
 
NFIH said:
OK, except that I don't see anything in that file that controls, for example, what percentage of units are killed. So I wouldn't know what to change. (I think it's 50% in the vanilla game but that's controlled by a modifier which isn't in your config, correct?)


You can edit this in GlobalDefines.XML. The lines to change are as follows (I changed all the values to 100 in this example):

<DefineName>NUKE_FALLOUT_PROB</DefineName>
<iDefineIntVal>90</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_UNIT_DAMAGE_BASE</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_UNIT_DAMAGE_RAND_1</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_UNIT_DAMAGE_RAND_2</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_NON_COMBAT_DEATH_THRESHOLD</DefineName
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_BUILDING_DESTRUCTION_PROB</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_POPULATION_DEATH_BASE</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_POPULATION_DEATH_RAND_1</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_POPULATION_DEATH_RAND_2</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
 
Thorn said:
You can edit this in GlobalDefines.XML. The lines to change are as follows (I changed all the values to 100 in this example):


<DefineName>NUKE_UNIT_DAMAGE_RAND_1</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_UNIT_DAMAGE_RAND_2</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_NON_COMBAT_DEATH_THRESHOLD</DefineName
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>
<DefineName>NUKE_BUILDING_DESTRUCTION_PROB</DefineName>
<iDefineIntVal>100</iDefineIntVal>
<DefineName>NUKE_POPULATION_DEATH_BASE</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<Define>

OK, but I'm trying to understand what all these variables mean in the first place before I change them. For example, what is "RAND 1" and "RAND 2"? What is "POPULATION DEATH BASE"?
 
I just wanted to ask, how far your integration of sevo's nuke everywhere has grown.
 
I wasn't planning on integrating it but it is a good idea...
 
Alright, this mod comp has been uploaded and ready for play. I have also provided a Warlords version of the mod.
 
I concur, Dom Pedro, it appears as though TheLopez has managed an outstanding effort yet AGAIN!!!! Is he a man, or is he a MACHINE ;)!

Aussie_Lurker.
 
The new version looks really great!
In dale's original version was a little bug, that could crash the game. I looked at your sources and saw that this part is unchanged.

CvCity.cpp in doturn() line 638 says:
Code:
pCity = GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities);

Sometimes, this operation returns a null-pointer and the following code will crash.
A simple patch could be:
Code:
pCity = GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities);
if (pCity)
{
...
}

Matze
 
Thanks MatzeHH, one of my testers reported that the game crashed for him but we couldn't reproduce it... I'll add your fix and rerelease.
 
Ok, I have uploaded the new version with the fix provided by MatzeHH.
 
Another one:

In CyInfoInterface1.cpp line 483-486:
Code:
		// < M.A.D. Nukes Start >
		.def("enablesMAD", &CvBuildingInfo::[b]getConstructSound[/b], "bool ()")
		.def("setEnablesMAD", &CvBuildingInfo::[b]getConstructSound[/b], "void (bool)")
		// < M.A.D. Nukes End   >

Here is a copy&paste error.

It doesn't lead to an error now, because these functions are not used in Python.

Matze
 
what was the previous effects of nukes?

Also, why turn the terrain to a water tile? why not a desert tile?
 
Sorry for disturbing, but I got one more bug:

You wrote the function CvGame::isNukeAnwhere(), but you don't make use of it.
Shouldn't there be a call of isNukeAnywhere() somewhere around CvGame::CanNuke()?

Matze
 
THELOPEZ, great Mod....but I would like my nuked cities to leave ruins, it does not seem to do that even though your config file says that its an option, im I just being dense or can it not turn it in to ruins?

Regards

Riker13 :crazyeye:
 
Riker13, you need to change the ruins option from true to false...

EDIT: you also need to change the "Nukes Alter Landscape" to false.
 
MatzeHH said:
Sorry for disturbing, but I got one more bug:

You wrote the function CvGame::isNukeAnwhere(), but you don't make use of it.
Shouldn't there be a call of isNukeAnywhere() somewhere around CvGame::CanNuke()?

Matze
How far is your progress with thi issue, TheLopez?
 
THELOPEZ, doh! so I am dense, thanks for that it works fine now ;)

Also, I know that DALE has made a ranged combat MOD was you also doing one as well, any news on this?

Regards

Riker13 :crazyeye:
 
TheLopez

Again thank you for the help with that one python fix. I would have never thought of the whitespace tab vs space problem.

About MAD

Its a wonderful MOD, ok its amazing and Nukes should be deadly that is for sure, especially ICBM's here is the question, could it be possible to make some changes so that it is possible to have Large Nukes that follow your destruction code, and smaller nukes that do not use the settings in the ini file but instead use the settings in civ4xml files?

That way we can have big bombs and smaller bombs.....
 
Top Bottom