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,590
    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:
    650
    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,590
    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:
    650
    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:
    650
    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,590
    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:
    May 9, 2021
    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,590
    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:
    May 9, 2021
    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,590
    Location:
    Near Portsmouth, UK
    See below
     
    Last edited: May 10, 2021
  13. BlauWave

    BlauWave Chieftain

    Joined:
    May 9, 2021
    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,590
    Location:
    Near Portsmouth, UK
    From the magic of the Wayback Machine!
     

    Attached Files:

    Nomad or What likes this.
  15. BlauWave

    BlauWave Chieftain

    Joined:
    May 9, 2021
    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
     
  16. Rhobium

    Rhobium Chieftain

    Joined:
    Dec 28, 2015
    Messages:
    5
    @whoward69 would you consider a new mod to freeze the amount of science generated by bulbing a great scientist when they are born?

    My understanding is that bulbing produces the amount of science generated in the last 8 turns, meaning the best strategy is to save GSs born after a certain point until late in the game. I find this rather lame and unless I am mistaken it gives an unfair advantage over the AI, who don't employ this strategy. My suggestion is to calculate this value on birth of the GS instead, so there is no advantage to saving them up.

    I believe Acken's balance mod and nqmod/lekmod implement this change but I haven't been able to find any source code for it.
     
  17. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,590
    Location:
    Near Portsmouth, UK
    Just don't play that way then.
     
  18. Rhobium

    Rhobium Chieftain

    Joined:
    Dec 28, 2015
    Messages:
    5
    When I saw there were mods that addressed radaring, science overflow, co-op war premature peace etc I assumed such things were in scope, for single and multiplayer reasons. Guess that was my mistake, sorry I asked.
     
  19. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,590
    Location:
    Near Portsmouth, UK
    Science overflow is a bug fix for Firaxis' sloppy bug fix - it affects both human and AI players.
    Radaring, while on the surface appears to be a player exploit, is really a bug as it is impossible for a player not to stumble across this "feature" at some point. That is, there is no way to change your game play to completely avoid discovering a city hidden in the fog with a settler.
    Co-op war premature peace (assuming I'm thinking of the same thing as I have no mod by that name) fixes an annoyance where an AI team member will make peace when there's a human player on the same team. Again, not an exploit fix.

    Even changing the code as suggested the AI will not benefit from the change as the AI does not hoard Great Scientists to save later - they will bulb them immediately or plant them. Hoarding scientists is a player only "exploit" that can be "fixed" by changing how you personally play the game.
     
  20. Blokbaster

    Blokbaster Chieftain

    Joined:
    Apr 18, 2022
    Messages:
    1
    Gender:
    Male
    Location:
    Ukraine
    Hi all :thumbsup:!

    Perhaps tell me what the problem is, I tried everything :crazyeye:, but it didn’t work out to play with
    DLL - Various Mod Components (v 96)
    or DLL - Various Mod Components (v 88)
    or DLL - Various Mod Components (v 66)
    After the start of the game, everything is fine, I make 20-100 moves, I save the game and after this save is no longer loaded (((( :cry:
    (tried with "Advanced Air-Naval-Ground Units Megamod" and without, many-many times, reinstall`s tried to eat the keyboard but survived :eek:)

    I would be glad if you could help me, I really want to play the 5th civilization with mods :)

    In any case, thanks for the work and for sharing it :hug::goodjob:!

    If needed i can make more CvMiniDump.dmp (i have full latest BNW civ5 version: 1.0.3.279 :king:)
     

    Attached Files:

Share This Page