[MOD] GreenMod (replant forest and other changes)

Hello Master Lexx,

Your Cold fusion Wonder has the following command in the python code I don't understand:

Code:
def onBuildingBuilt(self, argsList):
...
#GreenMod: remove nuclear plant after fusion plant was built
		if iBuildingType == iFusionplant:
			pCity.setHasRealBuilding(20, False)

Does this mean that after you build the cold fusion, all the Nuclear Plants disapper from the cities? Or wht does that mean?

Many thanks
Houman
 
Houman said:
Hello Master Lexx,

Your Cold fusion Wonder has the following command in the python code I don't understand:

Code:
def onBuildingBuilt(self, argsList):
...
#GreenMod: remove nuclear plant after fusion plant was built
		if iBuildingType == iFusionplant:
			pCity.setHasRealBuilding(20, False)

Does this mean that after you build the cold fusion, all the Nuclear Plants disapper from the cities? Or wht does that mean?

Many thanks
Houman

Im not Master Lexx, but what this means is that if the iFusionplant building is built the 20th building in the building file will be removed from that city.
 
Hi Kael,

Thank you for response.

I see...but why? What is the purpose of that? Why should the 20th building vanish from the city? Shouldn't the Fusion Plant disable the chance of melting down the nuclear power plants instead like in CIV II ?

Thanks
Houman
 
Houman said:
Hi Kael,

Thank you for response.

I see...but why? What is the purpose of that? Why should the 20th building vanish from the city? Shouldn't the Fusion Plant disable the chance of melting down the nuclear power plants instead like in CIV II ?

Thanks
Houman

Its probably just an easier way to do it. Rather than leave both buildings and have to undo something the first building does its easier to just remove it and have the 2nd building act as the combination of the 2 effects.
 
1) So is the 20th Building ALWAYS the Nuclear plant?
2) And will only the Nuclear Plant in the city be removed or all the Nuclear Plants in the continent? I suppose not, since this is only checked if a building has been built. So it does only affect the current city? But then again, you have a Fusion Plant that provides clean energy for all cities on the continent. Whats about other cities that have a nuclear plant? Will they still have the meltdown risk or will they be removed as well?

Thanks for helping me to understand it,
Houman
 
Houman said:
1) So is the 20th Building ALWAYS the Nuclear plant?

Its whatever is the 20th building in the CIV4BuildingInfos.xml file. If you were to insert a new building at the begining of this function it would break it. Its better to use the following function:

Code:
def onBuildingBuilt(self, argsList):
...
#GreenMod: remove nuclear plant after fusion plant was built
		if iBuildingType == iFusionplant:
			pCity.setHasRealBuilding(gc.getInfoTypeForString('BUILDING_NUCLEAR_PLANT'), False)

Done this way the function will look through and find the correct entry number for the Nucelar Plant instead of having to make sure it is building number 20.

2) And will only the Nuclear Plant in the city be removed or all the Nuclear Plants in the continent? I suppose not, since this is only checked if a building has been built. So it does only affect the current city? But then again, you have a Fusion Plant that provides clean energy for all cities on the continent. Whats about other cities that have a nuclear plant? Will they still have the meltdown risk or will they be removed as well?

Thanks for helping me to understand it,
Houman

I don't know anything about the way nuclear and fusion plants work (they havent been of much interest in my fantasy mod :) ). But this code sample you showed would only remove building number 20 from that city.
 
Kael,

Thank you so much for clarifying it. :) I suppose the idea of Fusion Plant isn't yet fully doable at this point. I will remove it then again from the Mod.

But I am wondering because the THREEGORGESDAM should do the same thing. Providing clean energy to all cities on the continent. But how does it stop the polution by those cities with a coal plant? Maybe it is not done in Python but in XML itself....I have to find this out...

Thanks
Houman
 
Houman said:
Kael,

Thank you so much for clarifying it. :) I suppose the idea of Fusion Plant isn't yet fully doable at this point. I will remove it then again from the Mod.

But I am wondering because the THREEGORGESDAM should do the same thing. Providing clean energy to all cities on the continent. But how does it stop the polution by those cities with a coal plant? Maybe it is not done in Python but in XML itself....I have to find this out...

Thanks
Houman

Three Gorges Dam uses the bAreaCleanPower switch in the building information to do it. That switch is hard coded to make all power clean on that continent.
 
Kael said:
Three Gorges Dam uses the bAreaCleanPower switch in the building information to do it. That switch is hard coded to make all power clean on that continent.

You are right, I just checked it. Hmmm however this won't solve the issue of what will happen, if you have build a nuclear plant with a chance of meltdown 1/2000 each turn. If you have build the Dam, it should not only give clean power, but also set the risk of meltdown everywhere to 0%, because Fusionplants can't meltdown.

This seem to be not possible though, which is quite odd... :(

Houman
 
Houman said:
You are right, I just checked it. Hmmm however this won't solve the issue of what will happen, if you have build a nuclear plant with a chance of meltdown 1/2000 each turn. If you have build the Dam, it should not only give clean power, but also set the risk of meltdown everywhere to 0%, because Fusionplants can't meltdown.

Since this seem to be not possible to implement its quite odd... :(

Houman

Cycle through all the players cities and remove all of the nuclear plants and then block new builds.

If you want to be sneaky remove all the nuclear power plants and replace them with nuclear plants that dont have a chance to meltdown.
 
Heyho again. I simply removed the 20th building aka the usual nuclear power plant because it looks stupid if there is a nuclear and a fusion power plant and both look nearly the same, thats the only reason. My fusion plant gives clean power on continent, this means that all effects of neg health from coal power plants or the meltdown effect, both vanish in every city on the continent. There will be no bad health/ meltdown chance on the whole continent regardless what power buildings exist there! And Kael is right, it wasnt the best idea to use the fixed number 20, because it harder for people to incorporate my mod if they parsed new buildings between the original ones.
 
Hey everyone, I just wanted to inform the Civfanatics community that there is this site that is a large Mod directory for every game able to be modified and you guys might like it, im just posting this because you can add Mods [your mod(s)] and they have a huge community with many features. here is the link. PLEASE check it out. I really wanna get the Civ IV Mod count up because they have like 3 mods and there are sooooooo much good mods on this site. thanks everybody and heres the URL:
Moddb.com
 
@Master Lexx,
@Kael

If this is true, then I shouldn't be worried about meltdown anymore. Hopefully you are right. Otherwise I like Kaels idea very much, to cycle through all cities ans swap the old plant against a new one without meltdown issue. Let see, if someone reports any meltdown there after then I ll do it. ;)

BTW, a question pops up. After building the Fusion Plant, can the player still build the normal nuclear plant or not anymore? It is because in Realism Mod the ICBM Silos need at least 2 Nuclear Plants as preBuilding. It Nuclear Plants become obsolote thereafter, I need to redesign the Realism Mod.

Many thanks
Houman

P.S. @Killamike718, No offense dude, I usually love reading quotes in the signature, but something like this "God gave you a soul, Your parents, a body. Your country,a rifle. Keep all of them clean!" is dumbest thing I have ever heard! ;)
 
:rolleyes:
hello
i used your bonus for my mod (not ready yet) and i have some questions (you seems to be good ) sorry i don't speak english very well :

1 my game font doesn't appear correctly on the screen, everyones are mixed and sometimes i see the white numbers why?? what is the file to edit ( i mixed some python files)

2 is it really necessary to edit cvplotsystem xml ??

3 how could i do to upload a kind of 250mo mod??? i use internet in a shop...
 
Houman said:
@Killamike718, No offense dude, I usually love reading quotes in the signature, but something like this "God gave you a soul, Your parents, a body. Your country,a rifle. Keep all of them clean!" is dumbest thing I have ever heard! ;)

LOL, I saw it on someones Signature and found it to jhust click with me and really liked it which caused me to place it as my Signature. Its one of those things that your like "gotta Have it"
 
I have been trying to load this MOD Pack but am sure I am doing something wrong.

First, the file is a .rar extension. Do I need some special application to umcomress the MOD?

I have created a folder in the Mod directory and copied the download there but I am not getting any of the additional features? I am loading the mod under the advanced options.

Is there an .ini file I need to change or am I just missing something ?
 
Does anybody know if this will work with the new 1.61 patch? Id like to try it out, but I dont want to revert back to 1.52. Thanks.
 
It doesn't work with the new patch? Dang... guess I'm going to have to wait on the patch then, can't play without the GreenMod! lol

Excellent work Master Lexx!
 
Top Bottom