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

    BlackEmperor Chieftain

    Joined:
    Jan 7, 2017
    Messages:
    65
    Gender:
    Male
    Hi,
    so I just wanted to know if there is some sort of tutorial for adding a new resource to the game? In particular, I'd like to know how to add icons correctly. I tried taking a look at another mod that adds a new resource, but there seem to be lots of files that I don't really know how to deal with (xlp, blp, stuff like that) just using Modbuddy.
    I do have experience with non-graphical mods that only use xml/sql stuff, so I'm able to get the resource to work in-game, it's just really the graphical aspect that I have no idea on how to tackle.
    If there is now particular tutorial on how to add resources, perhaps you can link me to another one that comes very close to it when it comes to adding icons? That would be thoroughly appreciated. There are many tutorials around here and I can't tell if, for example, adding an icon for a civ works essentially the same as adding an icon for a resource (the latter has several variants for example, like a normal one and an in-text variant...).
     
  2. 100games100days

    100games100days Warlord

    Joined:
    Mar 5, 2003
    Messages:
    199
    Location:
    Australia
    Is there a way to get game activity sent to a spreadsheet?
    For example city build orders, technology order and all that with an associated turn time.
    Would absolutely love this for recording benchmarks in games instead of doing it manually.
    Thanks in advance!
     
  3. Bluur

    Bluur Chieftain

    Joined:
    Dec 2, 2019
    Messages:
    28
    Gender:
    Male
    I am trying to see what sort of changes I can make to barbarian AI. However, I can't find barbarian warriors anywhere in the table and all I see are raiders, horseman, and horse archers. where are the barbarian warriors defined?
     
  4. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,941
    Location:
    Illinois, USA
    They just make use of the regular warrior unit so far as I am aware. Just as they do the Scout, and other units that are "basic" and don't require any resource. The Barbarian Raider specifically replaces the normal Galley in table <UnitReplaces>. The Barbarian Horseman and Horse Archer are not registered in table <UnitReplaces>, but the Barbarians cannot have Horse resources so they cannot (theoretically at least) acquire regular horsemen.

    All three of Barbarian Horseman, Barbarian Horse Archer, and Barbarian Raider are tied to the TraitType="TRAIT_BARBARIAN" in table <Units>.
     
  5. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,787
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Warriors and other Barb melee units are defined in the BarbarianTribes & BarbarianAttackForces tables not as specific units, but as classes (i.e. CLASS_MELEE is set in the MeleeTag columns). You might look at Shadow's Revenge of the Barbarians mod for ideas on what is possible.
     
  6. Tigranes

    Tigranes Armenian

    Joined:
    Sep 11, 2008
    Messages:
    9,598
    Why did no one modded religions into corporations after 4 years?
     
  7. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,787
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Sounds like you just volunteered! Best of luck! ;)
     
    Infixo likes this.
  8. Tigranes

    Tigranes Armenian

    Joined:
    Sep 11, 2008
    Messages:
    9,598
    No, no, it didn't sound like that at all. It only sounded that I volunteered a cool idea, and probably discussion, beta-testing, bug finding, critique, playing and expressing appreciation down the road -- so, yeah, the luck will be needed, thank you ;). To each its own, modders need supporters, you know :cooool:
     
  9. Bluur

    Bluur Chieftain

    Joined:
    Dec 2, 2019
    Messages:
    28
    Gender:
    Male
    What is a leaders "Flavor"? I have been digging around in files and found that each leader has a number of flavors such as "FLAVOR_OFFENSE". Does anyone know the effect these have?

    EDIT: Also, how are barbarian camps placed on the map
     
    Last edited: Jul 23, 2020
  10. flyingbicycles

    flyingbicycles Chieftain

    Joined:
    Jul 23, 2020
    Messages:
    1
    This is my first post (yay) I have a question about specialist yields in Civ 6. I want to add a building which increases specialist yields in the city by one. I tried adding in the xml piece that defines citizen yields into the building definition, but it does nothing, probably because it is a district property. How can I go about modifying citizen yields in this manner? I have programming experience so I am open to scripting, but I don't want to if I don't have to.
     
    Last edited: Jul 23, 2020
  11. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,941
    Location:
    Illinois, USA
    This is Civ5 code, not Civ6 code.

    FLAVOR_ does not exist anywhere in the game's XML files except for the names of Emergency Text-Tags, and then it is a "Flavor" of Emergency.

    In both Civ5 and Civ6 Barbarian Camps are auto-generated onto the map by the game engine. This process follows certain rules, however, like in Civ5 the map plot had to be at least X tiles from any player capital, the plot had to be currently in the fog of war for all players, and there could not already be "too many" barbarian camps in the same region of the map. Civ6 follows pretty much the same rules regarding Barbarian Camp placement.

    FLAVOR_X in Civ5 determines how likely a leader is to do "X" or be "X" on a scale of 1 - 10 so a leader with a high setting for FLAVOR_OFFENSE is more likely to build units that are seen as being good for offense by the AI system as well as to construct wonders or buildings that are considered to be good for making Offense. A leader with a high setting on the scale for FLAVOR_USE_NUKE is more likely to use nukes if they have them, for example. But Flavors do not force a leader to do anything in particular -- they just make that leader more likely to follow a given path.
     
    Last edited: Jul 23, 2020
  12. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,690
    Gender:
    Male
    Location:
    Warsaw
  13. byInferno

    byInferno Chieftain

    Joined:
    Jul 24, 2020
    Messages:
    1
    Hey.
    Can someone help me with using "REQUIREMENT_REQUIREMENTSET_IS_MET"? I know it does, but I don't know how to use because I never used it before. I have a modifier and I want to attach 2 different requirement sets to it. The first one checks the district itself (it needs to be an encampment) and the second requirement checks the plot it is placed on (needs to be desert).

    As far as I know, 2 different requirement sets can't pack together with the same modifier or am I misunderstanding?
     
  14. Bluur

    Bluur Chieftain

    Joined:
    Dec 2, 2019
    Messages:
    28
    Gender:
    Male
    @LeeS & @Infixo

    I was looking in the wrong folder... How embarrassing!
     
  15. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,787
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Look over here.
     
  16. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,941
    Location:
    Illinois, USA
    I don't see why you would need two different RequirementSets. You should really only need two RequirementIds assigned to a single RequirementSetId in table RequirementSetRequirements.


    In table RequirementSets you want a RequirementSetType of "REQUIREMENTSET_TEST_ALL". This means that each individual requirement added to the set of requirements must be met. Theoretically you can add an unlimited number of Requirements to a single RequirementSetId, in which case a designation of "REQUIREMENTSET_TEST_ALL" means that each and every one of them must be met.
     
  17. robal1991

    robal1991 Warlord

    Joined:
    May 2, 2011
    Messages:
    113
    Location:
    Poland
    How can I use a scenario texture/icon in standard game? Currently it is not displayed, because the scenario assets are not being loaded. How can I force the game engine to load also scenario assets?
     
  18. Jeppetto

    Jeppetto Prince

    Joined:
    Dec 23, 2018
    Messages:
    436
    Gender:
    Male
    Dumb question but do I need to create table SQL-style into database prior to using it in XML?
    I can see the Gameplay Data file that creates tables such as Types from Base Game. But nowhere in Ethiopia's folder can I find that they would define SecretSocieties table prior to adding rows into it, as If the parser just deduced its creation, columns and their types.

    Like I can't think of a way it would deduce primary keys and foreign keys, which are quite prevalent due to civ's preference of as many tables with as little columns, as possible, but the lack of Schema files in DLC folders confuses me.
     
    Last edited: Jul 25, 2020
  19. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,787
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Only the base game and expansions contain the schema files for setting up tables. The SS table is set up in "..\Expansion1\Data\Expansion1_Schema.sql" and "..\Expansion2\Data\Expansion2_Schema.sql" depending on which ruleset you're using.
     
    Jeppetto likes this.
  20. Arstahd

    Arstahd Chieftain

    Joined:
    Apr 20, 2006
    Messages:
    80
    I have a mod that changes all purple Policy Cards into green ones and ran into a problem when trying to update the icons displayed in the civipedia. I'd like to change all policy icons with an Index of 3 (purple) to be 2 (green) instead. The issue is that I can't seem to reference the Index column with my Update command. The game just ignores it. I can use the same command to reference the Atlas without issue.

    These lines work:
    Code:
    UPDATE IconDefinitions SET 'Index'=2 WHERE Atlas='ICON_ATLAS_POLICIES';
    DELETE FROM IconDefinitions WHERE Atlas='ICON_ATLAS_POLICIES';
    
    These do not:
    Code:
    UPDATE IconDefinitions SET 'Index'=2 WHERE Atlas='ICON_ATLAS_POLICIES' AND 'Index'=3;
    DELETE FROM IconDefinitions WHERE Atlas='ICON_ATLAS_POLICIES' AND 'Index'=3;
    DELETE FROM IconDefinitions WHERE 'Index'=3;
    

    Any ideas on how I can get this to work? I considered Updating each individual card, but they are a bit of a pain to hunt down since they appear in multiple files. I'd much rather have a blanket solution that covers all cases and won't need updating.
     

Share This Page