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

Future Worlds

Discussion in 'Civ5 - Modpacks' started by bouncymischa, Apr 21, 2015.

  1. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
    Why im always having this error
    [1136.514] Runtime Error: C:\Users\DK\Documents\My Games\Sid Meier's Civilization 5\MODS\Future Worlds (v 6) A2\Lua\CityNearbyMapDatasV4.lua:1105: attempt to index field '?' (a nil value)
    I thought the future era was fully compatible with enlightenment era (it was just working at first, it always crashed around renaissance era or enlightenment era).
    I was suspecting that error was the cause, but that error appeared even when i played the future era only. Tho, it aint crash the game.
     
    Last edited: May 8, 2017
  2. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,070
    I doubt that's gonna have anything to do with EE; it'll be an issue relating to LeeS' utility.
     
  3. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
    I know, that error was coming from the utility of FW.
    I mean, every time i turned on the EE and FW, the game ll crash in renaissance era or enlightenment era.
     
  4. Pippo809

    Pippo809 Chieftain

    Joined:
    May 15, 2017
    Messages:
    1
    Gender:
    Male
    Problem with mod, tech tree not showing any of the new tecnologies
    I've tried running this mode without anything else and to un-install and reinstall the game but I always have this error.
     

    Attached Files:

  5. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
    Whats your version?
    Mine is 1.0.3.279 (GnK and BNW)
     
  6. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
    BUG: There is no theme bonus from virtual idol wonder.
     
  7. 1760s

    1760s Chieftain

    Joined:
    Oct 5, 2016
    Messages:
    56
    Was there ever a good workaround figured out to use FW in conjunction with civs that have Worker UUs (Tomatekh's Harappa and Caral, ryanjames's Trypillia, etc.)? I know this came up in the CBR2, and I found recently that even up-to-date v6 didn't let these UUs build the new improvements.

    Other issue I wanted to mention: when playing with JFD's Cultural Diveristy, I found myself hoping for the Future Era splash screen to be different by culture. I went looking to see if there was good art that could be used for such a circumstance, and found a fair number of possibilities. I've dumped them in a spoiler on the off-chance you're interested in implementing such a thing. Admittedly, I'm not sure whether this would be better handled on your end or JFD's, but so it goes.

    Spoiler :

    Aboriginal: https://www.artstation.com/artwork/P29K1
    Central Europe: https://www.artstation.com/artwork/X1Q90
    Classical: https://www.artstation.com/artwork/BmmXA (was used in an older version of CulDiv)
    Great Plains: http://joanpiquellorens.deviantart.com/art/Flying-City-530921276
    Himalayan: https://www.artstation.com/artwork/agLEz
    Islamic: http://eddie-mendoza.deviantart.com/art/Neo-Arabia-420136526
    Katuje: https://www.artstation.com/artwork/5XqlE
    Mesopotamic: http://fstarno.deviantart.com/art/MATTE-PAINTING-Babel-Myth-80030248
    Oceanic: http://danielwachter.deviantart.com/art/Living-on-the-Ocean-335997375
    Oriental: http://jjcanvas.deviantart.com/art/Neo-Hong-Kong-Cityline-521195265
    or http://jjcanvas.deviantart.com/art/Neo-Hong-Kong-Sunset-497297100
    Oriental-Japan: http://jjcanvas.deviantart.com/art/Neo-Tokyo-Commission-309545088
    Pacific (PNW): http://merl1ncz.deviantart.com/art/Colony-revision-177141757
    Polar: https://mik2121.artstation.com/projects/6veEn
    Southern Europe: http://eddie-mendoza.deviantart.com/art/The-Ledge-487320415
    Steppe: https://www.artstation.com/artwork/rJwE
    Totalitarian: http://steve-burg.deviantart.com/art/Arcology-Daybreak-179184375
    Western Europe: http://aksu.deviantart.com/art/City-Towers-43139901

    generic ones that could conceivably be used for other cultures:
    http://eddie-mendoza.deviantart.com/art/Arrival-411560886
    http://eddie-mendoza.deviantart.com/art/Tower-12-411561585
    http://eddie-mendoza.deviantart.com/art/Hacker-City-452152934
    http://eddie-mendoza.deviantart.com/art/Misty-Dawn-411561898
    http://eddie-mendoza.deviantart.com/art/Neo-Noir-198626866
    http://kimmokaunela.deviantart.com/art/Castles-In-The-Sky-310173528
    http://tomwalks.deviantart.com/art/Space-Station-Blender-Gimp-376223010
    http://tryingtofly.deviantart.com/art/City-Route-393146494
    http://darkhikarii.deviantart.com/art/Garden-City-411201882
    http://bartzis.deviantart.com/art/Mega-Rail-Station-Orbital-03-639880029
    https://www.artstation.com/artwork/4EKBq
    https://www.artstation.com/artwork/qNJ9P
    http://antifan-real.deviantart.com/art/Speedpaint-Future-City-58452645
    http://firefly2347.deviantart.com/art/Sci-fi-city-77483121
    http://jadrienc.deviantart.com/art/Sci-fi-City-Downtown-343647806
     
  8. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,070
    It'd be easiest for this to be done on their end; but since that's pretty inviable, this would be a rudimentary fix...

    Code:
    CREATE TRIGGER C15_FW_WorkerFixYesItsMessyButWeCantDoMuchBetterTbh
    AFTER INSERT ON Unit_Builds
    WHEN (SELECT Class FROM Units WHERE Type = NEW.UnitType) IN ('UNITCLASS_WORKER' , 'UNITCLASS_JFD_WORKER', 'UNITCLASS_JFD_SLAVE') AND (SELECT COUNT(UnitType) FROM Unit_Builds WHERE UnitType = NEW.UnitType) = 1 AND NEW.BuildType NOT IN (/*List the FW Builds*/)
    BEGIN
    INSERT INTO Unit_Builds
    (UnitType, BuildType)
    SELECT NEW.UnitType, Type
    FROM Builds WHERE Type IN (/*List the FW Builds*/);
    END;
    
    Blatant flaws include the fact that units that don't replace the Worker but want to be able to build all improvements won't work. Now we simply wait for LeeS to explain to us all the other things I've done wrong... :p
     
    1760s likes this.
  9. bouncymischa

    bouncymischa Synthetic Genie

    Joined:
    Nov 28, 2012
    Messages:
    1,537
    Location:
    In a bottle
    Yeah, it's a bug I really should fix... by default, most improvements include Forest (along with Jungle and Marsh) in the BuildFeatures table... so you can start building them on those features and it'll get removed automatically. But since Forests can be on a terrain that Hydroponics Domes can't be built on, the game sees the Forest, says "It's okay to build!" and then when the Forest is gone realizes the mistake. XD

    I've taken the Hydroponics Dome out of the BuildFeatures table to avoid the issue, so once I get a new patch out it should fix the problem.

    That might be a bit complex to implement... I'll have to take a look at how the end techs work to see if there's something I can do with repeating techs. I'm not sure what kinds of effects would be good... production bonuses?

    The "Hub" line of buildings was intended to try and favor tall empires (thus, most of them have population-related yields), and the Central Command was intended to play into that by trying to give a bonus for having them in all cities. It's a question as to whether the yields from the Central Command is worth giving up having any of the Network Backbone line? :p

    Yeah, I've been trying to balance them, and it's tricky. One problem is that the Undersea Mining Platform comes a bit later in the tech tree. Plus, I do like the idea of one being a more generic widespread bonus with the other being more specific to resources. But given the general lack of sea resources in some cities... perhaps a smaller bonus per tile, with some additional bonuses on resources? One idea I'd considered was having the Aquaculture Lab actually cause sea resources to start spreading...

    I can't remember how I got the Brain Uploading facility to work, but its initial effect should only fire once. (Otherwise, you could just keep rebuilding it to convert your entire population?) I think the uploaded citizens should remain, even if the building is removed, but since their bonuses are pretty invisible that might be why it looks like you don't get any additional bonus. The facility has a 25% chance of uploading any new citizens that appear in the city - it was easier to implement a random 25% chance than to add a counter to track every 4th citizen. :p

    Glad you're enjoying the mod!

    I thought I fixed this? Maybe it got rolled back at some point... I'll take a look into it.

    I was suspecting there must be a way to account for Worker UUs with SQL, but I'm still such a noob with it I had no clue how to start. I'll have to give this a try!
     
  10. Jarula

    Jarula King

    Joined:
    Oct 22, 2016
    Messages:
    680
    Gender:
    Male
    Do you guys have a wiki for a working with Vox mod...
     
  11. HorseshoeHermit

    HorseshoeHermit 20% accurate as usual, Morty

    Joined:
    Apr 5, 2013
    Messages:
    1,274
    Location:
    Canada
    Consider the four repeating techs at the end of C-evo, perhaps?
     
  12. havox79

    havox79 Chieftain

    Joined:
    Oct 28, 2015
    Messages:
    58
    I solve this problem for me, that was a improvement who have a null value to "description" so a function in the script can't index this field.
    I look into the database (search in the forum if you don't know how to do) in the "improvements" table and found that CiD add a dummy improvement for machu pichu who do not have description. Maybe another mod for you do the same thing.
    So after, with my poors but existing programmer skills, I found that :
    In the line 88 of "CityNearbyMapDatasV4.lua" you have this query : ("SELECT ID, Description, Type FROM Improvements WHERE BarbarianCamp = 0 AND Goody = 0 AND PromptWhenComplete = 0 AND Type != 'IMPROVEMENT_CITY_RUINS'")
    that query select improvements and send them to the function who index the "description" field and make the error.

    So if you found a improvement with a description value to null you must add it in exception into the query like that :
    ("SELECT ID, Description, Type FROM Improvements WHERE BarbarianCamp = 0 AND Goody = 0 AND PromptWhenComplete = 0 AND Type != 'IMPROVEMENT_CITY_RUINS' AND Type !='NAME_OF_THE_IMPROVEMENT'")
    and to be sure in line 84 modify the other query :
    ("SELECT ID, Description, Type FROM Improvements WHERE DestroyedWhenPillaged = 0 AND PillageGold > 0 AND Type !='NAME_OF_THE_IMPROVEMENT'")

    I guess you can also found and modify the improvement to add it a description.

    But if you say you have this same error without another mod that's really weird because to the line 1105 you do not have another function and the only function index two fields Type and Description, to know that Type can't be null.
    I can not guarantee that will fix you crash to, I still have CTD after this fix every ~200 turns with Future Worlds (and a lot of other mods in same time) but not game breaking CTD, reloading 2/3 turns back 1 to 3 times and game continue, annoying but playable.
     
  13. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,070
    Fwiw if the issue here is to do with Description returning null, then you can either have the query be
    Code:
    ("SELECT ID, Description, Type FROM Improvements WHERE BarbarianCamp = 0 AND Goody = 0 AND PromptWhenComplete = 0 AND Type != 'IMPROVEMENT_CITY_RUINS' AND Description NOT NULL")
    to catch all Improvements that'll give this issue, or you can modify the Lua to only make use of the Description variable (for whatever it's used for) if it's not nil.
     
  14. havox79

    havox79 Chieftain

    Joined:
    Oct 28, 2015
    Messages:
    58
    Chrisy always here for help !
    Thanks for the advice, my SQL is very... nooby ?^^ You're query is better, no need to search into the database.
     
  15. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
    Yes, i have the reforest improvement mod which makes the worker able to grow forest. Its working like building improvement, but it ll be gone as soon as the worker finished it (the improvements replaced by forest tile).

    AND Description NOT NULL <-- AGREED :thumbsup:
     
  16. Andy0132

    Andy0132 Warlord

    Joined:
    Jan 16, 2015
    Messages:
    151
    Location:
    In the hell that is my head
    I seem to be having issues with FW, used in conjunction with JFDLC, as well as several other mods that add civs.

    LUA: https://pastebin.com/871VahHC

    Database: https://pastebin.com/7VNWWgVN

    Basically, after showing
    Spoiler :
    [947973.765] Runtime Error: C:\Users\Light\Documents\My Games\Sid Meier's Civilization 5\MODS\Future Worlds (v 6)\Lua/FutureLua.lua:235: attempt to call global 'GetCityMapDatas' (a nil value)
    a few times, the game crashes.

    I am running:
    Rise to Power V33
    With Claims over City-States disabled​
    ExCE V18
    Cultural Diversity V10
    Community Patch V88
    Barbarians: Unlimited Exp
    Future Worlds V6
    Infoaddict V22
    Leadership Reformation V4
    Longer Eras: Historic V8
    More Luxuries V155
    More Pantheons V122
    Events and Decisions V3
    YNAEMP V24

    as well as several mods that add new civilizations.

    EDIT:

    Applied the changes below:

    Still crashing, here's the new logs.

    LUA: https://pastebin.com/VQnu1mAC

    Database: https://pastebin.com/tGsVAaRJ
     
    Last edited: Aug 1, 2017
  17. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
  18. Andy0132

    Andy0132 Warlord

    Joined:
    Jan 16, 2015
    Messages:
    151
    Location:
    In the hell that is my head
    I just paste "AND Description NOT NULL" into both of them, like this, right? I've added the change to line 84 - I only had line 88 before. Sorry about that, I should've paid more attention to the instructions.

    Code:
    or Improvement in DB.Query("SELECT ID, Description, Type FROM Improvements WHERE DestroyedWhenPillaged = 0 AND PillageGold > 0 AND Description NOT NULL") do
        tPillageableImprovements[Improvement.ID] = { Type=Improvement.Type, Description=Locale.ConvertTextKey(Improvement.Description)}
    end
    --for Improvement in DB.Query("SELECT ID, Description, Type FROM Improvements WHERE BarbarianCamp = 0 AND Goody = 0 AND PromptWhenComplete = 0 AND Type != 'IMPROVEMENT_CITADEL' AND Type != 'IMPROVEMENT_CITY_RUINS' AND Type != 'IMPROVEMENT_FORT'") do
    for Improvement in DB.Query("SELECT ID, Description, Type FROM Improvements WHERE BarbarianCamp = 0 AND Goody = 0 AND PromptWhenComplete = 0 AND Type != 'IMPROVEMENT_CITY_RUINS' AND Description NOT NULL")") do
    Nothing else was modified.

    EDIT: I must've made the edit wrong, because it's still crashing. Here are the new logs.

    LUA: https://pastebin.com/TC5FPzER

    Database: https://pastebin.com/T6r5xqNJ

    EDIT: The crashes seem to be coming from the futurelua file.

    Code:
    [1085508.531] Runtime Error: C:\Users\Light\Documents\My Games\Sid Meier's Civilization 5\MODS\Future Worlds (v 6)\Lua/FutureLua.lua:235: attempt to call global 'GetCityMapDatas' (a nil value)
    EDIT: Here's the function where the file attempts to call getcitymapdatas.

    Code:
    function FWBuildingImprovementBonuses(iPlayer)
        local pPlayer = Players[iPlayer]
        local tMyWheatPlotsThisTurn = {}
        for pCity in pPlayer:Cities() do
            local tNearbyDatas = GetCityMapDatas(pCity)
            if pCity:IsHasBuilding(iBuildingGeneLab) then
                local iNumFarms = GetNumCityWorkingImprovementPlots(tNearbyDatas, iImprovementFarm)
                print("Num Farms: " .. iNumFarms)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_GENE_LAB_DUMMY"], iNumFarms)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_GENE_LAB_DUMMY"], 0)
            end
            --if pCity:IsHasBuilding(iBuildingCloneLab) then
            --    local iNumPastures = GetNumCityWorkingImprovementPlots(tNearbyDatas, iImprovementPasture)
            --    pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_CLONE_LAB_DUMMY"], iNumPastures)
            --else
            --    pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_CLONE_LAB_DUMMY"], 0)
            --end
            if pCity:IsHasBuilding(iBuildingSanctuary) then
                local iNumPreserves = GetNumCityWorkingImprovementPlots(tNearbyDatas, iImprovementPreserve)
                print("Num Preserves: " .. iNumPreserves)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_SANCTUARY_DUMMY"], iNumPreserves)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_SANCTUARY_DUMMY"], 0)
            end
            if pCity:IsHasBuilding(iBuildingNetworkBackbone) then
                local tCommArrayPlots = GetCityImprovementPlots(tNearbyDatas, iImprovementCommArray, "Plots")
                local iNumCommArrays = #tCommArrayPlots
                print("Num CommArrays: " .. iNumCommArrays)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_NETWORK_BACKBONE_DUMMY_3"], iNumCommArrays)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_NETWORK_BACKBONE_DUMMY_3"], 0)
            end
            if pCity:IsHasBuilding(iBuildingDroneHive) then
                local tGeneratorPlots = GetCityImprovementPlots(tNearbyDatas, iImprovementGenerator, "Plots")
                local iNumGenerators = #tGeneratorPlots
                print("Num Generators: " .. iNumGenerators)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_DRONE_HIVE_DUMMY_1"], iNumGenerators)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_DRONE_HIVE_DUMMY_1"], 0)
            end
            if pCity:IsHasBuilding(iBuildingSimulationServer) then
                local tCorePlots = GetCityImprovementPlots(tNearbyDatas, iImprovementCore, "Plots")
                local iNumCores = #tCorePlots
                print("Num Cores: " .. iNumCores)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_SIMULATION_SERVER_DUMMY_2"], iNumCores)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_DRONE_HIVE_DUMMY_2"], 0)
            end
            if pCity:IsHasBuilding(iBuildingDistributionHub) then
                local iNumIndustrialSites = GetNumCityWorkingImprovementPlots(tNearbyDatas, iImprovementIndustrialSite)
                --if (pPlayer:GetBuildingClassCount(iBuildingCentralCommandClass) > 0) then
                --    iNumIndustrialSites = iNumIndustrialSites * 2
                --end
                print("Num Industrial Sites: " .. iNumIndustrialSites)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_DISTRIBUTION_HUB_DUMMY"], iNumIndustrialSites)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_DISTRIBUTION_HUB_DUMMY"], 0)
            end
            if pCity:IsHasBuilding(iBuildingMetroplexHub) then
                local iNumArcologies = GetNumCityWorkingImprovementPlots(tNearbyDatas, iImprovementArcology)
                --if (pPlayer:GetBuildingClassCount(iBuildingCentralCommandClass) > 0) then
                --    iNumArcologies = iNumArcologies * 2
                --end
                print("Num Arcologies: " .. iNumArcologies)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_METROPLEX_HUB_DUMMY"], iNumArcologies)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_METROPLEX_HUB_DUMMY"], 0)
            end
            if pCity:IsHasBuilding(iBuildingVerticalFarm) then
                local iNumDomes = GetNumCityWorkingImprovementPlots(tNearbyDatas, iImprovementDome)
                print("Num Domes: " .. iNumDomes)
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_VERTICAL_FARM_DUMMY"], iNumDomes)
            else
                pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FW_VERTICAL_FARM_DUMMY"], 0)
            end
        end
    end
    
    EDIT: Started a new game with the same major mods, aside from changing up some civs. This time, it lasted until turn 237, 22 turns longer than the previous attempt. Here is the LUA and Database. The runtime error is the same as before.


    LUA: https://pastebin.com/20naAy1w

    Database: https://pastebin.com/aS9jhT6r
     
    Last edited: Aug 6, 2017
  19. TimurB

    TimurB Chieftain

    Joined:
    Apr 13, 2016
    Messages:
    76
    Gender:
    Male
    Location:
    Atlantis
    I have no idea. Anyone please...

    But im noticing you are still doing it wrong at line 88
    .....AND Description NOT NULL")") do
    It should be
    .....AND Description NOT NULL") do

    And, its nothing to do with futureLua.lua
    That thing is doing well. The "getcitymapdatas" is coming from CityNearbyMapDatasV4.lua line 960
     
  20. Siskin

    Siskin Chieftain

    Joined:
    Apr 10, 2017
    Messages:
    26
    @Andy0132, you could try using the compatibility patch.
    I found multiple compatibility issues between the 3 major eras mods so I made that patch.

    Unfortunately a side effect of having additional era mods is balancing. Research speeds, production requirements and the rate at which time passes all need to be fine tuned, however I do not have the time to do so.
    But I made it easy for anyone to tune them. If interested, details are here.

    Good luck
     

Share This Page