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

    CCWB Chieftain

    Joined:
    Sep 25, 2015
    Messages:
    23
    Units in "DOMAIN_AIR" can stack unlimited.
    So is there any way to make units in other Domains (such as in "DOMAIN_HOVER") stack unlimited?
    I found that if change a unit's Domain from "DOMAIN_AIR" into "DOMAIN_HOVER" (I want to make a unit like an artificial satellite), it's stacking limits is same to the land units'. I want to make them become different. :crazyeye:
     
  2. qqqbbb

    qqqbbb Prince

    Joined:
    Sep 25, 2010
    Messages:
    530
    It's already done. GLOBAL_STACKING_RULES.
     
  3. CCWB

    CCWB Chieftain

    Joined:
    Sep 25, 2015
    Messages:
    23
    It's base on tiles, not for Domains! :nono:
    I need the "Hover" units to be stacked unlimited but not to break the stacking rules of land & sea units.
     
  4. Tianshu Cong

    Tianshu Cong Chieftain

    Joined:
    May 20, 2016
    Messages:
    9
    Location:
    Melbourne
    Sorry for bothering you again.
    I found that in dll version 84, the units which have the promotion <HPHealedIfDestoryEnemy/> will not be healed after destroying an enemy.
    (It may due to the command : <HealIfDestoryExcludesBarbarians>true</HealIfDestoryExcludesBarbarians>)
    Thanks for your time and looking forward to your reply.

    Regards,
    Tianshu Cong
     
  5. bane_

    bane_ Howardianism High-Priest

    Joined:
    Nov 27, 2013
    Messages:
    1,559
    Does DOMAIN_HOVER exist?
     
  6. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,178
    Location:
    Illinois, USA
    Yes indeed. I think it was only used in the Steampunk scenario, though, for UNIT_AIRSHIP and UNIT_SKY_FORTRESS. I've never played around with how this makes the units act.
     
  7. whoward69

    whoward69 DLL Minion

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

    • AI - No Zero Value Trade Items - stops the AI adding zero-value items (eg horses late-game) to trade offers
    • AI - Smart V3 - all Smart AI V3 features. Unlike the previous merge, this is "all or nothing"
    • UI - Diary - minor update to include multiple trade deals with the same civ on a single line (de-clutters all those one horse/iron for two gold deals)
    • UI - Unit List Enhancements - adds a column to indicate which units can be upgraded and for how much. If DLL -VMC is enabled, units can be upgraded by clicking the cost indicator
     
  8. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    Not true. They are limited to BASE_CITY_AIR_STACKING(6) units in a city (plus AirModifier(4) with an Airport) and by the capacity of Carriers (base 2 plus promotions)

    Not easily (see below)

    DOMAIN_HOVER is a hack - it basically doesn't exist. If a unit with that domain is over land, the game core is fooled into thinking it's a DOMAIN_LAND type unit, if it's over water, the game core is tricked into thinking it's a DOMAIN_SEA type unit.
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    They were produced from a combination of Notepad++ macros and global search-and-replace operations, so no
    Search CvLua*.h for LUAAPIEXTN. The first parameter is the method name, the second the return type, any others are the parameters to the method
    ChangeVisibilityCount is fixed

    SetHasTech, CalculateImprovementYieldChange, ChangeJONSCulturePerTurnFromReligion, ChangeFaithPerTurnFromReligion and GetOrderFromQueue could be fixed (and I'll add them to the list of things to do)

    The others can't, as doing so would break the game core .lua files
     
  10. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    Fixed in v86
     
  11. Lynnes

    Lynnes King

    Joined:
    Aug 23, 2015
    Messages:
    886
    Oh wow, I didn't expect an update so soon, and it's a very good one!

    Does the integration of Smart AI v3 mean that the AI can purchase units (with the purchasableOnly-flag) now?
     
  12. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    If the source code linked from here does, then yes.

    I just did the merge, didn't really pay that much attention to what's in there :mischief:
     
  13. Lynnes

    Lynnes King

    Joined:
    Aug 23, 2015
    Messages:
    886
    I see! I couldn't find a hint about purchasing units in the thread you just linked, that's why a asked.

    @qqqbbb:

    How did you verify this behavior in the previous versions and could you do that again with v85 please? :D
     
  14. Tomahawk.nsk

    Tomahawk.nsk Chieftain

    Joined:
    Nov 25, 2015
    Messages:
    85
    Location:
    Novosibirsk, Siberia
    Thanks for the update, whoward69 ;)
     
  15. qqqbbb

    qqqbbb Prince

    Joined:
    Sep 25, 2010
    Messages:
    530
    William, there is a bug with SetFeatureType method. When you use it to place a feature (that does not affect yields) on a hill, the yields will be as if the plot was not a hill. So if you place such a feature on grassland hill, the yields will be +2 food, +0 production. Can this be fixed?
    And I have a little request: do not allow units to pillage improvements that have negative PillageGold value.

    AI still does not buy units. How I tested it:
    1. SQL code:
    Code:
    UPDATE Units SET PurchaseOnly = 1;
    UPDATE CustomModOptions SET Value = 1 WHERE Name IS 'AI_SMART_V3';
    2. Use lua or IGE to give an AI player money to buy units.
    3. Declare war on the AI player and surround its city with your units.
     
  16. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    Sounds like an event to me ;)
     
  17. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    Sounds more like a misunderstanding than a bug. Yield changes are cumulative, not exclusive. So a feature on a hill by a river gets the yields specified in Feature_YieldChanges AND Feature_RiverYieldChanges AND Feature_HillsYieldChanges, not just one of them (if it was only one, which would get picked - the river or hill yields?)
     
  18. Arlokk

    Arlokk Chieftain

    Joined:
    Aug 12, 2013
    Messages:
    29
    Location:
    Russian Federation
    Hi for all and specially for Whoward69.

    I have a question: The DLL-component include a "Unified Yelds"? I read all table of DLL-features in
    http://www.picknmixmods.com/ and no see any links.
    If it includes in DLL component - This sound GR-R-R-RRRRREAT! If not - thats really sad. :(
     
  19. nametaken

    nametaken Chieftain

    Joined:
    Jun 27, 2015
    Messages:
    54
    Just one question about Smart AI 3. Does Smart AI 3 incorporate all the features of the first Smart AI mod or do we need to have both mods activated to get all the Smart AI features?
     
  20. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,538
    Location:
    Near Portsmouth, UK
    Unified Yields were originally developed in DLL - VMC, so yes, they are included.

    Best place to start is DB\API\UnifiedYields.xml
     

Share This Page