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

Quick Modding Questions Thread

Discussion in 'Mod Creation Help' started by Leyrann, Oct 28, 2018.

  1. Leyrann

    Leyrann Warlord

    Joined:
    Jan 11, 2015
    Messages:
    3,970
    Gender:
    Male
    Location:
    Netherlands
    So, very quick question, in the GameSpeeds.xml file (in /Gameplay) there is a CostMultiplier in <GameSpeeds> and a DefaultCostMultiplier in <GameSpeed_Scalings>. What do these different variables change? And, most importantly for me, does one of them change production costs and production costs only?

    Also, I would like to propose a thread in this subforum specifically for this kind of small questions.
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    Moderator Action: Edited to be the quick question thread

    and unsure, but IIRC it's a global multipier.
     
  3. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,910
    Location:
    Illinois, USA
    CostMultiplier is global. It takes the place of all the individual columns for Multiplier Percentages based on Game Speed that we had in Civ5.

    Not sure about the Scalings (<GameSpeed_Scalings> and <GameSpeed_Durations>). I think they were added in one of the patches or for R&F, but I don't know really what they do different than the CostMultiplier in table GameSpeeds.
     
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    @Deliverator, @sukritact or other specialists of the graphic engine, how can I remove an entry from an Artdef file ?

    I'm trying to remove the Granary and Monuments from the map as AFAIK there is no way to change their size without rebuilding the models, and while I've managed to free their positions in cities for other buildings by setting a custom Landmarks.artdef, the models are still shown:
    Spoiler :
    Clipboard-8.jpg


    So I suppose I need to use a custom Buildings.artdef too, but how can I tell the engine that I want the entries removed or to not draw those buildings ?

    Alternative: is there an easy way to resize them (and reset the ground surface they use on the plot) ?
     
  5. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,101
    Location:
    London, UK
    I have used the m_ReplaceMergedCollectionElements flag to remove stuff from Artdefs before. If you have an entry in a Collection with a given name e.g. "Granary" you could potentially set
    m_ReplaceMergedCollectionElements = true but then have an empty collection instead of pointing to the .xlp entries. I've used this method to remove all water from the map for example.

    I've done pretty much nothing with Buildings yet so I really don't know the .artdef structure there.
     
    Gedemon likes this.
  6. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    Thanks, that did it !

    Wasn't working in Buildings.artdef (maybe hardcoded ?) but was able to remove it using that in Landmarks.Artdef

    Lost the Palace in the process, I may have commented out too much, but the cities are a lot more to my liking now :D


    edit : well, in fact I've broken every districts except the city base set. ok, let's start from scratch...

    edit 2 : victory !
    Spoiler :
    Clipboard-2.jpg
     
    Last edited: Nov 12, 2018
  7. Kebnoa

    Kebnoa Chieftain

    Joined:
    Mar 31, 2016
    Messages:
    33
    Location:
    Barcelona, Spain
    Can you load a mod dynamically? That is, update the mod files/lua scripts and have the running Civ game pick up the changes?
     
  8. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,910
    Location:
    Illinois, USA
    only for User Interfaces.

    Database stuff (SQL/XML) and GameplayScripts require a return to the game's main menu and a reload of the save
     
    Kebnoa likes this.
  9. Kebnoa

    Kebnoa Chieftain

    Joined:
    Mar 31, 2016
    Messages:
    33
    Location:
    Barcelona, Spain
    That is unfortunate as it really slows down my progress as I stumble my way through my scripting efforts. Thanks though!
     
  10. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    and the .artdef files using the console.

    for gameplayscript, I launch a game in the smallest map size, and use F5 (quicksave) / F6 (quickload) a lot after saving the gameplay script I'm testing.

    some changes (modifying the .modinfo for example) requires to quit the game to desktop and launch it again.
     
    raen and Kebnoa like this.
  11. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,101
    Location:
    London, UK
    You can reload .artdefs using the console?! How do I do that?
     
  12. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    1,539
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    "artdef reload XX" command where XX = Units, etc. if I remember Gedemon's advice correctly.
     
    raen and Deliverator like this.
  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    Damn I feel bad, I thought that was common knowledge, I'll post a small tutorial on the console ASAP
     
    Laurana Kanan and raen like this.
  14. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
  15. EvilMark

    EvilMark Chieftain

    Joined:
    May 9, 2018
    Messages:
    8
    Gender:
    Male
    Since Steam has Civ6 on a big sale right now I finally got it and am tweaking some things to my liking. For Game Speed I found some SQL code I was able to use to reduce the cost of units and buildings, speeding up their production without altering research or civics. This gave me exactly what I wanted in Marathon mode, however districts still take 100+ turns to build.

    So my question is, is there a similar line of SQL code I could use reduce the cost of districts?
     
  16. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    That line would be a bit complex, as there are multiple values controlling the production cost in the Districts table and the <Cost> value is the same for most Districts:
    <Cost>
    <CostProgressionModel>
    <CostProgressionParam1>
     
  17. EvilMark

    EvilMark Chieftain

    Joined:
    May 9, 2018
    Messages:
    8
    Gender:
    Male
    For now at least I only want to change the base cost, cost progression can remain as normal. What I'm currently using for units and buildings is:

    UPDATE Units SET Cost = Cost * 0.17;
    UPDATE Buildings SET Cost = Cost * 0.17;

    Would that be as simple as:

    UPDATE Districts SET Cost = Cost * 0.17;

    Or is there more to it? Is 'Districts' even the correct argument?
     
  18. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    yes.
     
  19. EvilMark

    EvilMark Chieftain

    Joined:
    May 9, 2018
    Messages:
    8
    Gender:
    Male
    Awesome, thank you!
     
  20. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,165
    Location:
    France
    Anyone knows if we can update IconDefinitions using SQL ?

    Or is this one XML only ?
     

Share This Page