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

    Daenvil Chieftain

    Joined:
    Nov 8, 2017
    Messages:
    4
    Location:
    Galiza
    Yes I did, it's not there. Thanks for the reply though.
     
  2. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,183
    Location:
    Portugal
    Some error in logs?
     
  3. Daenvil

    Daenvil Chieftain

    Joined:
    Nov 8, 2017
    Messages:
    4
    Location:
    Galiza
    No errors that I could find, no. I will check again tonight just in case.

    Edit: nope, no errors in the logs.

    Don't know if it's relevant, but when I select my leader (without GS), the color of the civ icon isn't working, it just takes the color of the last selected leader, so there is definitely some issue.

    Edit2: Ok, I don't know what I did but it is working perfectly now, no idea what the problem was.
     
    Last edited: Feb 23, 2019
  4. Magnússon

    Magnússon Chieftain

    Joined:
    Feb 19, 2019
    Messages:
    2
    Quick question as I explore what can and can not be done as modding: is it possible to draw on, duplicate, or make a minimap-like graph? Say I'd want to make a minimap that only draws landmasses vs ocean or something to that degree?
     
  5. Logicsol

    Logicsol Chieftain

    Joined:
    Oct 21, 2016
    Messages:
    21
    Gender:
    Male
    Anyone have any luck adding CO2 to other resources? I've tried:

    Code:
        <Resource_Consumption>
            <Update>
                <Where ResourceType="RESOURCE_HORSES"/>
                    <Set>
                        <CO2perkWh>2</CO2perkWh>
                    </Set>
            </Update>
            <Update>
                <Where ResourceType="RESOURCE_IRON"/>
                    <Set>
                        <CO2perkWh>4</CO2perkWh>
                    </Set>
            </Update>
            <Update>
                <Where ResourceType="RESOURCE_NITER"/>
                    <Set>
                        <CO2perkWh>6</CO2perkWh>
                    </Set>
            </Update>
            <Update>
                <Where ResourceType="RESOURCE_ALUMINUM"/>
                    <Set>
                        <CO2perkWh>10</CO2perkWh>
                    </Set>
        </Resource_Consumption>
    
    Which doesn't give me any errors, but I'm not seeing any C02 from units that consume those as resources.

    Do I need to add in a power provided line too maybe?

    Edit: that doesn't seem to do anything unfortunately.

    Edit 2: Got it to work using a full replace line. Added the power line too for good measure, haven't tested it with it out yet.
     
    Last edited: Feb 25, 2019
  6. Guide-on

    Guide-on Chieftain

    Joined:
    Nov 1, 2009
    Messages:
    49
    When you use modd buddy, it prompts you to load Visual Studio (VS). If you load Civ V or BE-RT to prompt is for VS 2010, which is no longer available. There are over 50 VS apps. Which one(s) do I need to load? I assume that the apps for Civ VI would work for BERT.
     
  7. racha

    racha Warlord

    Joined:
    Jul 27, 2013
    Messages:
    248
    Location:
    Surrounded by barbarians
    You need to download the Civ 6 SDK from the tools section of your steam library and use the version of ModBuddy from there. When you run it the first time it'll install whatever extra ~stuff~ you need.
     
  8. Makarya

    Makarya Chieftain

    Joined:
    Jul 25, 2018
    Messages:
    21
    I'm wondering if it's possible a new personnal type of modifier argument, something like LinearScaleFromDefaultHandicap as I have no idea how it is working. (Was thinking of ScaleFromEra). I
     
  9. The googles do nothing

    The googles do nothing Prince

    Joined:
    Feb 5, 2017
    Messages:
    426
    Gender:
    Male
    Location:
    Minneapolis, MN
    (Removed, see LeeS's answer)
     
    Last edited: Mar 2, 2019
  10. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,040
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    That shouldn't matter. Making it dependent on GS would only disable the mod if GS is not enabled. As long as GS is active and the correct table is written to, dependencies shouldn't matter.
     
    Infixo likes this.
  11. The googles do nothing

    The googles do nothing Prince

    Joined:
    Feb 5, 2017
    Messages:
    426
    Gender:
    Male
    Location:
    Minneapolis, MN
    I was trying to do updates on the Resource_Consumption table and the data would not changed when I ran CIV until I added the dependency.
     
  12. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,603
    Location:
    Illinois, USA
    @Siuwa I see where you got that now. Firaxis has done that in a handful of places. It's really odd-duck stuff for a database, which generally wants one argument per column per row. Firaxis however is writing the DLL which reads the data added to the database so they can add special-case-handling of the text entered into the database anywhere they choose.

    Petra's original setup was adding it's modifier to all player cities and then making an additional requirement that the city have the Petra Building, which was a real roundabout way of doing things.


    MODIFIER_PLAYER_ADJUST_PLOT_YIELD should ought to work so long as you then use requirements that the extra yield is only applied to Desert and Non-Floodplain tiles, as Firaxis did in the original Buildings.xml file.

    Since SQL won't like to see the comma character within an insert "VALUE" you will want to treat the three settings as a unified text string I would think:
    Code:
    INSERT INTO ModifierArguments (ModifierId, Name, Value)
    VALUES	('PETRA_YIELD_MODIFIER', 'YieldType', 'YIELD_FOOD,YIELD_GOLD,YIELD_PRODUCTION'),
    ('PETRA_YIELD_MODIFIER', 'Amount', 	'2,2,1');
    Don't be suprised if the database rejects this however, since Firaxis also writes the "parser" for Civ6 that translates XML code and inserts it into SQL language in the database.

    Bear in mind tho that PETRA_YIELD_MODIFIER has already been defined by the Base XML file, so all you would really need to do is alter the ModifierType in table Modifiers, and the requirements so that there is no requirement that the city also have the Petra Wonder.
     
  13. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,603
    Location:
    Illinois, USA
    When you alter the contents of a modinfo file you also re-assert mod loading order since when all else is equal mods actions are loaded in the order the mods were enabled. But because of this auto-enabling, auto-updating of mods subscribed on Steam Workshop, and of the odd way code is loaded re starting a new game vs reloading a saved game, relying on the order mods were enabled is unstable, as is relying on the apparent Load Order linking that only seems to apply when Refereneces and Dependancies are added.

    Testing reveals as I suspected it was a load order issue for the <Update> code in post # 105. The Update did not seem to take effect because when the Update was executed Gathering Storm had not yet added any info to the table.

    The Table Schema added by Gathering Storm is added under a LoadOrder setting of -100, which means that the game tables are defined at that early Load Order setting, but the new tables are empty. So if a mod loads before Gathering Storm fills the new game-tables, there is nothing for an Update statement to match to, and it seems as if the Update failed. No Database error is reported in Database.log because the syntax is correct, the table-names are valid, and the column-names are valid: Database.log does not get reports for Update statements which fail because the "Where" clause of the Update did not match to anything at the time the Update was executed.

    I executed the Update code @Logicsol posted with an action LoadOrder setting of +150 and everything executed properly for the Update.
     
    Last edited: Mar 1, 2019
  14. Proclo

    Proclo Warlord

    Joined:
    Jan 25, 2017
    Messages:
    157
    Gender:
    Male
    Location:
    Spain
    I want to give Spanish missionaries 1 building charge so they will be the only unit capable of building Missions. However I don't want them to be consumed after doing so and I don't want that missionaries from other civs has the build charge shown in their UI. Do you guys know how can I achive this?
     
  15. VCrakeV

    VCrakeV Prince

    Joined:
    Aug 22, 2014
    Messages:
    382
    Is it possible to mod/edit mods downloaded through Steam? They don't show up on the mods folder where you would download a mod from CivFanatics to. Are they located elsewhere?
     
  16. Proclo

    Proclo Warlord

    Joined:
    Jan 25, 2017
    Messages:
    157
    Gender:
    Male
    Location:
    Spain
    Very very posible indeed. C:\Program Files (x86)\Steam\steamapps\workshop\content . Then if I were looking for a specific mod I would go to its steam page and copy the long number in the final section of its URL. Then I would put that number in the search box of my file browser and et voilà, you have found your mod.
     
  17. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,040
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Additionally, if you plan on editing Steam mods understand that any changes you make will likely be overwritten when/if that mod is updated. It's a good idea to copy the Steam mod folder over to your regular Mods folder, rename it, then unsubscribe on Steam, then make your changes to the copied mod. You'll have to repeat this process if the mod is ever updated, but at least you'll have your changes saved and can update the newer version more easily.
     
    Infixo likes this.
  18. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,061
    Gender:
    Male
    Location:
    On Earth
    Nice method @Laurana Kanan .. to maintain some sort of persistent set of files even if a mod gets updated often or less-so. Although, here's mine...

    1) I copy/paste target files (XML/LUA, etc) for every "Modded originals".. mostly when updates roll-in. Those now have a "- Copy" suffix.
    2) From that set.. i alter whatever i need on another personal but renamed Copy.. with a prefix "_MY_......"
    3) Perform a direct Compare task to verify what's being changed -- on any subsequent changes authored via fresh updates.
    4) If anything must be corrected accordingly on _MY_ (previously recorded anyway) file, do it, save as the new version.
    5) Send that corrected custom (My) file straight into the mod location.
    6) Delete the original.. rename mine as the official "Modded+Corrected" with the proper name. Only the suffix is required to remove.
    7) Done.

    May look a bit cumbersome or complex at first.. but it's very rapid & reliable enough once you get the hang of it. ;)
     
  19. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,040
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    I'm kind of obsessive about keeping backups & records. :crazyeye:

    I like to keep copies of all my Steam mods in a backup folder whether I plan on editing them or not with the mod name, version # (where available), and date released. I also keep backups of all the ones I've edited that I've kept in the Steam folder or moved to the regular mods folder. I also have the pages of all mods bookmarked and a spreadsheet with all the mods I use with a list of changes I've made if they're not my own. Definitely a bit obsessive!!! :lol:
     
  20. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,447
    Gender:
    Male
    Location:
    Warsaw
    I copy some mods from Steam and also change their ID. That way I don’t need to unsubscribe.
     
    Laurana Kanan likes this.

Share This Page