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. Arlokk

    Arlokk Chieftain

    Joined:
    Aug 12, 2013
    Messages:
    29
    Location:
    Russian Federation
    A really quick answer, Whoward69. 0_o

    So "DLL-Varios mod component" is good start point (if it is include Unified Yields part) to make more diverce buldings, traits etc.?
    Becouse we can have only one DLL-mod at time, i want make base DLL your "DLL-Varios mod component". It have many desired options, that Sid&Co not included in game(why& - thats a questions).
     
  2. qqqbbb

    qqqbbb Prince

    Joined:
    Sep 25, 2010
    Messages:
    530
    What do you mean? Can't you do it by adding some code to CvUnit::pillage()?
     
  3. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    "AI - Smart V3" is a replacement for the previous "AI - Smart".

    You can't enable both as the code for "AI - Smart" has been replaced with that for "AI - Smart V3"
     
  4. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    That then hard-codes one specific option (which is what Firaxis would do, but then if you wanted different behaviour you'd be stuck again), while adding a new event, eg UnitCanPillage, means the behaviour is completely under the control of the modder
     
  5. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,124
    Location:
    Illinois, USA
    Not sure what the Second and Third Laws of William's Laws of CodingTM are, but I know his First Law of Coding is:
     
  6. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    The second is "Every Mod Is Optional" (ie under the control of the player) :D
     
  7. Lynnes

    Lynnes King

    Joined:
    Aug 23, 2015
    Messages:
    886

    Oh, too bad! :(
    Thanks for testing though!
     
  8. qqqbbb

    qqqbbb Prince

    Joined:
    Sep 25, 2010
    Messages:
    530
    You mean someone may want to use negative PillageGold value for something else? Disabling pillaging looks like most obvious choice for it. And when modders do something fancy they usually don't use vanilla table columns but add their own tables/columns.
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    No, I'm saying that there are many cases where you may want to be able to control if a unit can pillage (ie temporarily remove) or not.

    Take one possibility - a defensive improvement of a row of sharpened stakes designed to keep horsemen out. You may decide that these can only be pillaged by non-mounted units and tanks.

    In this case a cost of -1 won't work. So you now have to "do a Firaxis" and add another column to the table "CantBePillagedByHorseUnits". Or you just hook the event and test for the improvement and the unit requiring horses and if so return false.

    One event solves all use-cases.
     
  10. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    V86 uploaded to web-site and GitHub

    • Spying forgiveness - (part of STFU), if you forgive an AI for spying on you, they won't immediately ask you to forgive them for spying on you!
    • Co-op war lock - If player A agrees to a co-op war in X turns with B against C, and then immediately declares war on C, A can make peace with C before the X turn limit. When B shows up after X turns to start the war, A can agree and, despite having a peace treaty with C, will immediately declare war!
      The simple fix for this is to lock player A into war for at least X turns, if any co-op war agreements include A warring against C
    • Pillage events - UnitCanPillage and UnitPillageGold
    • HPHealedIfDestoryEnemy fixed - see post above
    • Plot validation - Attempting to set a plot value (type, terrain, feature, resource, improvement and route) to an invalid value will be ignored
    • Lua API fixes - fixes for the various bugs in the Lua API (see the spreadsheet)
     
  11. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    Improved city hurry is part of CSD not Smart AI
     
  12. qqqbbb

    qqqbbb Prince

    Joined:
    Sep 25, 2010
    Messages:
    530
    Thanks for update.
    Using UnitCanPillage is better for game performance than CanStartMission, right?
    While testing I noticed that UnitCanPillage and CanStartMission fire for units that don't have any movement points.
    Can you modify the code so that if UnitPillageGold returns negative value , that value is subtracted from player's gold?
     
  13. seamus2010

    seamus2010 Chieftain

    Joined:
    Jun 23, 2013
    Messages:
    66
    For the Global - No Followup From Cities mod, is there something I can do to have it apply to Feitoria, Chateau and Kasbah as well? It'd be great if that's possible, thanks!



    Also, is there supposed to be animation changes to the mod Global - City Bombard Range?
    When I used it, the changes to city bombard range work (that's actually the part I didn't want, I just wanted the animation changes), but the animations stay the same as vanilla. (arrows-rocks-missiles)
    Is there anything I can do to fix it?
     
  14. qqqbbb

    qqqbbb Prince

    Joined:
    Sep 25, 2010
    Messages:
    530
    The game ignores EntityEvent column from Builds table for custom improvements. It always uses ENTITY_EVENT_BUILD. Can this be fixed?
     
  15. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    Both of these are UI behaviour. We do not have the source code for the UI DLL.
     
  16. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    I'll add it to the list of things to do, as a (new) column to the improvements table
     
  17. CCWB

    CCWB Chieftain

    Joined:
    Sep 25, 2015
    Messages:
    23
    If I want to creat a new Civ or make the CSs training or using Units without strategic resources (Units don't cost any resources), what should I do? :crazyeye:
     
  18. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    Post the question in the general C&C forum ;)
     
  19. 0Artur0

    0Artur0 Chieftain

    Joined:
    Apr 14, 2009
    Messages:
    38
    What I don't understand about this problem is what "lost4468" and "d0minus" did to LeagueOverview.lua and LeagueOverview.xml to solve the issue. And one of them said:"...although author should actually add it on 4 future troubleshooting". Sadly, author does not even acknowledge the issue.
     
  20. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,518
    Location:
    Near Portsmouth, UK
    Not true ...

    First Law of Support: If you can't replicate it, you can't fix it.

    And as there are insufficient details being supplied for me to replicate it, it is impossible for me to fix it.
     

Share This Page