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

DLL - Various Mod Components

Discussion in 'Civ5 - Mod Components' started by whoward69, Nov 4, 2012.

  1. Artisanix

    Artisanix Warlord

    Joined:
    Oct 6, 2013
    Messages:
    104
    Thank you very much.
    I was also able to add 6th ring of workable tiles to a city thanks to your comments in the code.
    You made it so easy there :]
     
  2. Zaerath

    Zaerath Chieftain

    Joined:
    Mar 14, 2021
    Messages:
    2
    Gender:
    Female
    hello! does this DLL contain the mods by itself or only the "framework" for them? are some mods built-in into this DLL or do they all need to be downloaded from picknmix site?
    thank you!
     
  3. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,532
    Location:
    Near Portsmouth, UK
    Some minor bugfixes are built in, but most of the time you will need the associated mod that either a) enables the feature or b) uses some of the events/lua extensions or c) both a) and b)
     
  4. Serp

    Serp King

    Joined:
    Apr 1, 2015
    Messages:
    649
    Hi whoward,

    are you interested in an "Pre_Save" Event or similar? I would need such an event that is triggered shortly before the game is saved (by autosave,quicksave, normal save and so on).
    Why do I need such an event? For example for mods like your Scouting XP mod. Saving data in ModDB or with SaveUtilis or any other tool in real time is very laggy.
    But saving the stuff simply shortly before a savegame would be the ultimate solution.

    Do you think such an event exists/is possible to add?
    I only found various places where "gDLL->AutoSave(..) or gDLL->QuickSave(...) or gDLL->SaveGame(...)" is called, but I think these functions itself are inaccessable? And pushing a custom event in fornt of every line like this would be quite hacky I guess... not the best solution.
     
    Last edited: Mar 26, 2021
  5. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,532
    Location:
    Near Portsmouth, UK
    Myself, Pazyryk and ls612 delved deeply into this for his Éa Fantasy Mod and game to the conclusion that you cannot trap every possible exit from the game via C++/Lua, which is why he ended up using a heavily modded version of SaveUtils IIRC.

    It would be far easier IMHO to make another Cv class and hang it off one of the existing ones (eg CvTeam or CvPlayer) and have it serialise/deserialise as it's owning object does - but "easier" is a relative term, it's still a mass of work
     
    Serp likes this.
  6. Serp

    Serp King

    Joined:
    Apr 1, 2015
    Messages:
    649
    thank you :) for everyone else who is interested, I made a new thread for this and already found the solution from Pazyryk (to add such an event into DLL)
    https://forums.civfanatics.com/threads/solved-efficient-use-of-saveutilis.668750/#post-16061112
     
  7. Serp

    Serp King

    Joined:
    Apr 1, 2015
    Messages:
    649
    In case you care:
    Found the problem why workers do not continue to eg. build a farm after clearing the forest. The problem is in CvUnitMission.cpp function "CanStartMission":
    Code:
    #if defined(MOD_BUGFIX_MINOR)
       // Bail early if the unit has no moves left
       if (hUnit->maxMoves() > 0 && hUnit->getMoves() <= 0)
       {
           return false;
       }
    #endif
    
    Don't know though, why this "no moves left check" applies to workes that are removing a feature.
     
  8. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,532
    Location:
    Near Portsmouth, UK
    V96 of DLL - VMC is now on my web site and source is on GitHub

    Fixes the minor bug where FreeSocialPoliciesPerEra always reports as 1 even if set to 2 or more
    Adds two new columns to the Improvements table - NegatesTerrainDamage and NegatesFeatureDamage which can be used to switch off terrain/feature damage from plots, eg for a tunnel in a mountain or an igloo on ice.
     
    Last edited: Apr 20, 2021
    Troller0001 likes this.
  9. BlauWave

    BlauWave Chieftain

    Joined:
    Sunday
    Messages:
    4
    Gender:
    Male
    Hi everyone, I would like to ask for your help with previous versions of the DLL: long story short I tried to compile v.66 and v.88 but unfortunately had no luck with that. I followed separate thread's instructions (installed VS2008 > 2008-SP1 > VS2010 > ... >VS2019), some of the links didn't work so I used this link (here) to get the missing parts. Still somehow VS2019 doesn't see "v90 set of tools" from VS2008. I'm kinda stuck at this point, did anyone have the same problem before? Also I would be really grateful if a kind person who already has working set of packages could compile the aforementioned versions and link them to me. Thanks!
     
  10. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,532
    Location:
    Near Portsmouth, UK
    The differences between v89 (see under Versions on my web site page) and v88 are minimal. I'd be surprised if V66 will even compile on VS-2015/2019. Why do you need two such out-of-date versions?
     
  11. BlauWave

    BlauWave Chieftain

    Joined:
    Sunday
    Messages:
    4
    Gender:
    Male
    There's mod called 'Superpower Complete Edition' I found in Steam Workshop - I really like it a lot but it has a bug when entering new era and bots upgrading their cavalry to landships leading to game crash. I tried upgraded version of the mod ('Clash of Civilizations') with various versions of DLL I discovered on your web page - although some of them are stable, the mod misses important features (like unit upgrades and splash damage) which makes it quite different. Both mods have recommended versions of the DLL and I wanted to try these out to see any improvements at the situation.
     
  12. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,532
    Location:
    Near Portsmouth, UK
    See below
     
    Last edited: May 10, 2021 at 9:44 AM
  13. BlauWave

    BlauWave Chieftain

    Joined:
    Sunday
    Messages:
    4
    Gender:
    Male
    Awesome, thanks a lot for your help! Will try it later today, hope it will work.
     
  14. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,532
    Location:
    Near Portsmouth, UK
    From the magic of the Wayback Machine!
     

    Attached Files:

  15. BlauWave

    BlauWave Chieftain

    Joined:
    Sunday
    Messages:
    4
    Gender:
    Male
    Oh that's just amazing, many thanks from me man! Really appreciate it, can't wait to try! And sorry for the trouble too
     

Share This Page