[MOD] GreenMod (replant forest and other changes)

Discussion in 'Civ4 - Modpacks' started by Master Lexx, Nov 28, 2005.

  1. Master Lexx

    Master Lexx Warlord

    Joined:
    Nov 28, 2005
    Messages:
    187
  2. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083
    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
     
  3. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    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.
     
  4. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083
    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
     
  5. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    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.
     
  6. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083
    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
     
  7. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    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.

    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.
     
  8. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083
    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
     
  9. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    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.
     
  10. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083
    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
     
  11. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    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.
     
  12. Master Lexx

    Master Lexx Warlord

    Joined:
    Nov 28, 2005
    Messages:
    187
    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.
     
  13. Killamike718

    Killamike718 Proud Maya User

    Joined:
    Dec 24, 2005
    Messages:
    377
    Location:
    Staten Island, New York City
    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
     
  14. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083
    @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! ;)
     
  15. FK2006

    FK2006 Warlord

    Joined:
    Mar 9, 2006
    Messages:
    168
    :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...
     
  16. Killamike718

    Killamike718 Proud Maya User

    Joined:
    Dec 24, 2005
    Messages:
    377
    Location:
    Staten Island, New York City
    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"
     
  17. Gnomercy

    Gnomercy Chieftain

    Joined:
    Nov 4, 2005
    Messages:
    48
    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 ?
     
  18. shivute

    shivute Prince

    Joined:
    Mar 25, 2006
    Messages:
    310
    Location:
    Scotland
    download a free version of winrar and use it.
     
  19. Triarchy

    Triarchy Chieftain

    Joined:
    Apr 15, 2006
    Messages:
    4
    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.
     
  20. War_Lord

    War_Lord Chieftain

    Joined:
    Apr 17, 2006
    Messages:
    7
    Location:
    Murray, KY, USA
    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!
     

Share This Page