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

Real Natural Disasters (released)

Discussion in 'Civ6 - Unreleased Mods' started by Infixo, Apr 4, 2017.

  1. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
    @Thibaulthc
    - the resources are displayed in the pop up window, you can see it any time you want (Lenses, recent disaster); also the idea is not to know exactly when a resource will go away, but rather to be aware that some of them will go away sooner or later
    - the stronger the disaster is, the higher probability that a permanent resource will spawn :) you can harvest them later with builders; if you increase the power, it might result in more permanent resources... maybe it should be scaled down?. I still want rather temp resources to spawn
    - on bigger maps the disasters are scattered on the entire map, so you'll never get too many of them
    - the disaster sites (inc. volcano crater) do not appear on mountains by design, because mountains are not workable. So, you'd never get benefits from the resource. The resource is placed on the closest possible tile to the actual site.
     
  2. Thibaulthc

    Thibaulthc Chieftain

    Joined:
    Sep 29, 2009
    Messages:
    294
    Gender:
    Male
    Location:
    Brussels
    indeed, I had set disasters , that's why I had more peranent resources
    But I just tried I second game with everything on standard (map , speed, disasters ,..) and I still had too many -IMO- resources, temporary and permanent ones, and disasters
    What I would make: ONLY temp resources, but lasting sometimes longer (like between 2 and 30? turns) but never permanent, excepted for the craters , but I would nerf them (+4science +2 culture +2 faith is really big); or just less resources; but right now there are too many I think

    Are you sure Mountains are not workable? In my souvenirs, it's like desert tiles: not workable until there are some yields on it? Or maybe was it that way in civ V :/ ?

    I didnt see the info about resources in the Lense, my bad, I'll have a better look next tie :)
     
  3. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
    Resources are placed in the following order:
    - disaster site
    - standard ones
    - permanent
    - temporary
    You get a lot of them because there are many empty tiles. Ones you start building cities, improvements, wonders, there won't be many places to actually put them.

    Even if a resource is permanent, you can remove it with harvest. Its an option for you to decide.

    Craters are quite strong because you can't remove them. Till end of game, this tile will not be usable for anything else. I agree that they are strong at the beginning but again - you need to have in your borders. Anyway, I might nerf them and add yields with game progress.

    Mountains are not workable in vanilla game. You need a mod to enable them.
     
  4. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    I tried it out. till turn 150 everything is working fine. I would give your mod 5 stars. thank you for doing it.:king::king::king::king::king:

    Further impressions and test reports follow soon:rockon:
     
  5. Leyrann

    Leyrann Warlord

    Joined:
    Jan 11, 2015
    Messages:
    3,936
    Gender:
    Male
    Location:
    Netherlands
    I wasn't too much a fan of the idea of just adding disasters, but adding in possible positives happening did it for me, I'm going to play with this mod.
     
  6. Leyrann

    Leyrann Warlord

    Joined:
    Jan 11, 2015
    Messages:
    3,936
    Gender:
    Male
    Location:
    Netherlands
    I noticed that this mod adds some other new lenses, not related to disasters?
     
  7. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
  8. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,726
    Location:
    Illinois, USA
    I would like to request a small change to the code within file RealNaturalDisasters.lua

    Currently this chunk of code will register any building a city has as a possible target for "damage":
    Spoiler :
    Code:
    -- 5 - check for buildings
    local pCityBuildings = pCity:GetBuildings();
    for building in GameInfo.Buildings() do
    	if pCityBuildings:HasBuilding(building.Index) and
    		pCityBuildings:GetBuildingLocation(building.Index) == iPlot then
    		-- found building, register it
    		dprint("  ...found a building (id,name)", building.Index, GameInfo.Buildings[building.Index]);
    		tEffect = Effect_Record:new(iPlot, iMagnitude, eOwnerID, sOwnerCiv, sOwnerCity, sLocalOwner);
    		tEffect:AssignObject(EffectClasses.EFFECT_BUILDING, pCity, sLocalOwner, building.Index);
    		table.insert(self.Effects, tEffect);
    	end -- found building
    end -- buildings loop
    However, since this looks at all buildings a city has, this can create problems for other mods, especially those using dummy buildings. The dummy buildings system I have developed here LeeS' Dummy Buildings Utilities adds a new column (IsDummy) to table Buildings specifically to help simplify some of the issues inherent in identifying dummy buildings within lua code. I also have future plans for another mod that would be adding a column called IsSpecialBuilding. I would suggest something along these lines:
    • A function to check whether a building should be considered immune from the damage effects, such as:
      Spoiler :
      Code:
      function BuildingIsNotDamageImmune(pCity, iBuildingIndex)
      	--returns boolean "false" when the building should be considered immune
      	local tBuildingData = GameInfo.Buildings[iBuildingIndex]
      	if (tBuildingData.IsDummy ~= nil) and (tBuildingData.IsDummy == true) then
      		return false
      	end
      	if (tBuildingData.IsSpecialBuilding ~= nil) and (tBuildingData.IsSpecialBuilding == true) then
      		return false
      	end
      	if (tBuildingData.MustPurchase == true) then
      		if (tBuildingData.PurchaseYield ~= "YIELD_GOLD") and (tBuildingData.PurchaseYield ~= "YIELD_FAITH") then
      			return false
      		end
      	end
      	local sCityBuildItem = pCity:GetBuildQueue():CurrentlyBuilding()
      	if GameInfo.Buildings[sCityBuildItem] ~= nil then
      		for row in GameInfo.BuildingPrereqs() do
      			if (row.Building == sCityBuildItem) and (row.PrereqBuilding == tBuildingData.BuildingType) then
      				return false
      			end
      		end
      	end
      	--this would be the default "return value" and would mean the building can be considered damagable
      	return true
      end
      • The code as shown would also keep the disaster mod from pillaging a prereq building wherein the city is in the process of constructing the dependant building. This additional suggestion occured to me because I'm not sure if the game will de-que any building a city is currently constructing if it's prerequisite building is suddenly pillaged or detroyed.
      • I believe setting MustPurchase == true but not setting a PurchaseYield is the other most common way of defining a dummy building, although I do not use that method.
    • Alteration of the previously shown code chunk to something as like:
      Spoiler :
      Code:
      -- 5 - check for buildings
      local pCityBuildings = pCity:GetBuildings();
      for building in GameInfo.Buildings() do
      	if pCityBuildings:HasBuilding(building.Index) and BuildingIsNotDamageImmune(pCity, building.Index) and
      		pCityBuildings:GetBuildingLocation(building.Index) == iPlot then
      		-- found building, register it
      		dprint("  ...found a building (id,name)", building.Index, GameInfo.Buildings[building.Index]);
      		tEffect = Effect_Record:new(iPlot, iMagnitude, eOwnerID, sOwnerCiv, sOwnerCity, sLocalOwner);
      		tEffect:AssignObject(EffectClasses.EFFECT_BUILDING, pCity, sLocalOwner, building.Index);
      		table.insert(self.Effects, tEffect);
      	end -- found building
      end -- buildings loop
    • This would allow easy adaptation as circumstances arise to give compatibility to other mods as mod-compatibility issues re buildings arise and are identified as any such needed changes can be easily added to the function shown as BuildingIsNotDamageImmune in this request.
     
  9. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
    @LeeS That's a pretty good suggestion, I will certainly add such a check for dummy buildings (based on IsDummy and MustPurchase/PurchaseYields). I assume that the intention behind dummy building is that they are actually not there, so they can't be destroyed.
    I don't know about IsSpecial however. Do you intend it to be 'hidden' as well? Maybe we'll see once you release the mod. With the checking routine in place it will be easy to add more conditions.
    The last one - the prereq buildings - I'll test first how the game behaves in such situation. Maybe it's handling it properly.
    Thanks again!
     
  10. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,726
    Location:
    Illinois, USA
    Yeah, basically dummy buildings are meant to not be seen or built, and/or are intended as 'unlockers' (as I am using them generally) to allow an effect from a modifier or to allow construction of a 'real' building.

    IsSpecialBuilding we can deal with if you want after I release the mod(s) I have in mind for it. But in a nutshell I intend to use such buildings as a visible building a player will be able to see, but they will never actually construct such buildings. The buildings with IsSpecialBuilding would be placed into the city when a city is founded or conquered, for example. The building would then act as a marker for Dynamic Modifiers to apply "affectX" to this city. But a player might own one city which is getting "affectX" as a result of that city having "buildingX", and another of their cities might be getting "affectY" instead because it has "buildingY" rather than "buildingX". A third city owned by the same player might be getting both effects because that city has both "buildingX" and "buildingY".
     
    Manifold likes this.
  11. that_guy874

    that_guy874 Chieftain

    Joined:
    May 29, 2017
    Messages:
    1
    Where do I save the v2 folder?
    There is a MODS folder in the C drive in My Games but my steam folder is in the D drive so I am confused as to where to save it to.
     
  12. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
  13. phoenix-v

    phoenix-v Chieftain

    Joined:
    Jun 6, 2017
    Messages:
    3
    Thank's for mod, it amazing.

    But how I can to rebuild the Palace in the Capital, when it is destroyed whith disaster?
     
  14. phoenix-v

    phoenix-v Chieftain

    Joined:
    Jun 6, 2017
    Messages:
    3
    And I can't to rebuild the ancient walls in late eras. And I can't to rebuild the classical walls in the Industrial or New era, when it is destroyed.
     
  15. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,261
    Gender:
    Male
    Location:
    Warsaw
  16. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    Such a building for the implementation of dynamic events like epidemics would be great.
     
  17. phoenix-v

    phoenix-v Chieftain

    Joined:
    Jun 6, 2017
    Messages:
    3
    Two more problems. It is impossible to repair Pyramids and Petra. This is due to the fact that there are no more desert plains around my city, but this wonders can be built only on the desert plains. All you can't build — you can't rebuild :)
     
  18. Baleur

    Baleur Chieftain

    Joined:
    Jul 9, 2010
    Messages:
    522
    Location:
    Qingdao, China
    Love this. Thank you so much for breathing more life into the game.
    Could a potential sister-mod be considered for natural "non-distaster" events?
    Tree and jungle growth, global warming (as in civ4, loved gradually seeing the planet turn to desert after several nuclear wars), perhaps even permanent flooding to expand lakes by 1 hex in a random flat tile direction.

    Edit: Almost the best part of this mod, the enlarged minimap :p Though it does have a broken CQUI button for those of us not using that mod (but using Sukirats minor ui enhancements)
     
    Last edited: Jun 19, 2017
  19. Tequila_75

    Tequila_75 Chieftain

    Joined:
    Jun 9, 2017
    Messages:
    8
    Love this mod- any thoughts on adding hurricanes as a potential disaster?
     
  20. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    Try it out! It is great and gives the game the next shot!
     

Share This Page