1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Global Warming mod

Discussion in 'Civ4 - Mod Components' started by Minor Annoyance, Dec 16, 2008.

  1. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    Global Warming Mod version 1.11

    As seen (heard) on ModCast episode 27

    Included in PIG Mod, BUFFY Mod, Legends of Revolution

    In general this mod makes global warming less likely, less severe, and easier to counter. In the case of maps with heavy snow and tundra it might even be beneficial.

    Features
    - Source code is included. Changes marked with "GWmod" comment.
    - Upgraded to 3.19
    - Global Warming can hit ocean tiles and remove ice
    - Ice adds to global warming defence like forests/jungles
    - Terrain doesn't go directly to desert when hit. They go Snow>Tundra>Grassland>Plains>Desert.
    - Running environmentalism (or any civic modded to increase health) increases the value of features that add to global warming defence. In GlobalDefinesAlt.xml as TREEHUGGER_DEFENSE_BONUS
    - Recycling Centers negate buildings bad health effect on global warming as well as on the city.
    - Bad health from power and bonuses (resources) added to global warming calculation. (Public transportation building does not reduce global warming from oil's bad health)
    - Weight of power bad health set to 10. In GlobalDefinesAlt.xml as GLOBAL_WARMING_POWER_WEIGHT
    - Weight of bonus bad health set to 10. In GlobalDefinesAlt.xml as GLOBAL_WARMING_BONUS_WEIGHT
    - Option in custom game to have desert tiles that are adjacent to water without hills or peaks turn to coast tiles if hit with global warming.
    - Snow/tundra tiles with forests melt before the forest is destroyed.
    - Forests on grasslands become jungles with global warming
    - Different global warming defence values for different features. Values found in new xml field in CIV4FeatureInfos.xml
    - Separates the effects of nuclear weapons from global warming to have nuclear winter. Drops fallout and may freeze tiles. Plains and grasslands>tundra>snow.
    - Chance of GW adjusts better to maps with different ocean/landmass sizes.

    Possible future features:
    - GW defence factors that are adapted to the map configuration.
    - Chance of GW adjusted with game speed.
    - More variation in GWDefence value of forests based on improvements built on the tile, if it's being worked etc.
    -Deserts that flood will keep an Oil resource if it had one
    All future changes are dependent on if they are possible and if I know how to accomplish them.

    Thanks to xienwolf, Dresden, and EmperorFool for help decrypting and writing code I didn't understand.
     
  2. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    I've tested the mods features to make sure they work, but not how well they work in a game. So I could use some feedback as to how it has played out for anyone. Like how much/often did GW occurred, when did it start, how many nukes were used, what map did you use, did you keep your forests intact, did you intentionally avoid causing GW or did you wait until it started to try to keep it under control, how much did it affect the game, how much trouble did GW cause you, was it more trouble than you'd want to tolerate?
     
  3. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    *Won't occur in current version*
    To fix the forge giving 99 bad health, delete CIV4BuildingInfos.xml from the mods directory. It was there for testing but forgot to remove the file.
    Very dumb mistake [pissed]
     
  4. Dida

    Dida YHWH

    Joined:
    Sep 11, 2003
    Messages:
    3,425
    Good mod, global warming was one of the most annoying feature in civ4. Although I personally just removed it altogether.
     
  5. Mister Giggles

    Mister Giggles Chieftain

    Joined:
    Mar 19, 2008
    Messages:
    140
  6. Tholish

    Tholish Chieftain

    Joined:
    Jul 5, 2002
    Messages:
    1,344
    Location:
    Japan
    OK, I merged your modcomp into my Future mod and it works fine so far, though I don't have any data yet.

    I already used different values for some of the tags, and did not replace the global definitions file but cut and pasted your new tags into mine. I want to make more global warming occur though, because I want warming to be fierce so you have to research advanced tech to counter it or at least build new improvements to deal with it. But I like the concept of separate kinds of warming depending on the source. Will let you know of anything strange that occurs.
     
  7. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    Version 1.0

    New Features
    - May run faster than last version
    - Option in custom game to have desert tiles that are adjacent to water without hills or peaks turn to coast tiles if hit with global GW
    - Snow/tundra tiles with forests melt before the forest is destroyed.
    - Forests on grasslands become jungles with global warming
    - Different global warming defence values for different features
    - Separates the effects of nuclear weapons from global warming to have nuclear winter. Drops fallout and may freeze tiles. Plains and grasslands>tundra>snow.

    The different global warming defence values are set in a new XML field. in CIV4FeatureInfos.xml. The valuse are Ice: 1, Forest: 2, Jungle: 3. The GLOBAL_WARMING_FOREST value was reduced by half so the actual change from before are 0.5, 1, and 1.5. Running environmentalism multiplies that but the TREEHUGGER_DEFENSE_BONUS found in GlobalDefinesAlt.xml

    Nuclear winter does mostly the same calculation as global warming, including the defence value from forests etc. but GW only uses unhealth now and nuclear strikes are used by NW, and it uses NUCLEAR_WINTER_PROB found in GlobalDefinesAlt.xml. It will first do the random calculation to drop radiation (fallout feature) on the tiles, and if that succeeds it will run the same calculation again to determine if the dust also blocks out sunlight turning the tile into tundra. So early occurrences will be fixable but later it could cause permanent damage. (Unless of course global warming hits that tile too, but good luck trying to play for that.)
     
  8. Tholish

    Tholish Chieftain

    Joined:
    Jul 5, 2002
    Messages:
    1,344
    Location:
    Japan
    So you could use nuclear winter to counter global warming.
     
  9. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    No, not really. Nuclear winter makes tiles colder, not more fertile. So desert says desert. NW could turn plains into tundra and if that tile was hit again by GW it would become grassland. How often is it going to select the same tile at random twice, once for NW and then for GW? Even if it did select the same tile twice, it might be by the same effect, so you could end up with desert or snow tiles. Plus NW mostly dumps fallout and it would have to get pretty bad before you see regular occurrences of tundra. You're far more likely to get a world made mostly of plains, tundra, and desert, with fallout falling faster than you can remove it.
    Nuclear winter cancelling out global warming may have worked in Futurama, but not here.
    However you could use GW to melt an ice heavy map so you could do the opposite and use global warming to counter nuclear winter, if the map was mostly snow and tundra by the time it happened, but you'd still have lots of radiation falling.
     
  10. apenpaap

    apenpaap Tsar of all the Internets

    Joined:
    Apr 7, 2008
    Messages:
    1,468
    Location:
    Amsterdam
    This looks like a very cool mod. But could you make a version of it which allows for 34 civs?
     
  11. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    Done. The zip file now contains an alternate .dll file for 32 civs. Just replace the mods default .dll with it.
     
  12. mechaerik

    mechaerik Tuturuu!

    Joined:
    Oct 28, 2008
    Messages:
    7,064
    Location:
    Los Angeles
    There was never a nuclear winter in futurama. In the episode with the 7-leaf clover, Leela quite clearly states:
    Spoiler :
    [pimp]
     
  13. apenpaap

    apenpaap Tsar of all the Internets

    Joined:
    Apr 7, 2008
    Messages:
    1,468
    Location:
    Amsterdam
    I just installed Solver's unofficial patch, and your mod doesn't work anymore. Is there a version of the mod compatible with the unofficial patch?
     
  14. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
  15. apenpaap

    apenpaap Tsar of all the Internets

    Joined:
    Apr 7, 2008
    Messages:
    1,468
    Location:
    Amsterdam
    i downloaded Dresden's patch, but the Global Warming mod still crashes at the end of turn one. Is it compatible with the BUG and Blue Marble mods?
     
  16. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    Well I merged it with Bat and that includes Blue Marble and Bug and it works. Do you have anything in your custom assets folder or is file caching enabled?
     
  17. apenpaap

    apenpaap Tsar of all the Internets

    Joined:
    Apr 7, 2008
    Messages:
    1,468
    Location:
    Amsterdam
    I reinstalled, deleted everything in my customassets folder (I think it was just Blue Marble and BUG), and tried again, but it still doesn't work. Apparently, your mod just hates me.
     
  18. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    You know I once uninstalled the whole game, reinstalled and the cache survives. I didn't know what was happening or that there was a cache so I almost quit the whole game. I've heard holding shift while the game starts can clear it, or you could go to "C:\Documents and Settings\your_windows_login_here\Application Data\My Games\Sid Meier's Civilization 4\cache" and delete what's there.
    Is anyone else getting this problem? Is anyone else not getting this problem?
     
  19. apenpaap

    apenpaap Tsar of all the Internets

    Joined:
    Apr 7, 2008
    Messages:
    1,468
    Location:
    Amsterdam
    I tried both of that, but it still doesn't work. I've also looked in the vanilla civ 4 folder, to see if anything was wrong there, but I couldn't find anything.
     
  20. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario

Share This Page