1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Could you help me pick modifiers that would allow me to make these things work?

Discussion in 'Mod Creation Help' started by Narvana, Nov 10, 2017.

  1. Narvana

    Narvana Chieftain

    Joined:
    Nov 20, 2016
    Messages:
    41
    Gender:
    Female
    I was trying different things to create some fun civs for myself but lots of things doesn't work (especially connected to units or military...)

    * Can I increase by %amount exp gained by all units of specific civ?

    * Can I somehow get flat +5 to attack to all units of specific civ? [you know, without any kind of requirement]

    * Can I somehow get flat +1 to movement to all units of specific civ?

    * Can I get more yields from specific tiles for my civ? (I was trying to copy "Mother Russia" trait but requriements part doesn't seem to work - I could only do this with tundra tiles)

    Please, help!
     
  2. luei333

    luei333 Chieftain

    Joined:
    May 25, 2014
    Messages:
    137
    Short answer, yes. All of those are very easy Modifiers. I made a reply in one of your other threads, you can use the processes I kind of detailed there to get it to work.

    Long answer, yes, and I'll help you get started:

    1) What effect do you know of increases XP gain by units by a percentage? Any building in the Encampment district, yeah? Open the base game's Buildings.xml, search for 'BARRACKS' or any of the other buildings until you get to either the Modifiers table, or the BuildingModifiers table, which should be below it. If you are in the BuildingModifiers table, then search for the Modifier associated with said building. That Modifier likely just attaches a Modifier to all units built in the city (of the right type maybe but ignore the requirements), so go to the ModifierArguments table to find the name of THAT modifier, then back to the Modifiers table. You should be able to find the modifier it uses, BUT that one likely only applies it to that one unit. So, open the Modifiers.xml file, and search for Modifiers with a similar name, or the same Effect but the Collection of something like COLLECTION_PLAYER_UNITS. Refer to the other thread from this point, probably.
    OR, I just remembered Survey, a Policy which does a similar thing to what you want. Open Policies.xml, find its Modifiers entry, and you'll likely have the ModifierType you need! I just remembered after typing all that above, but sometimes you won't get so lucky!

    2) Pretty much same as above. Discipline, first thing I found in Policies. Look it up in Policies.xml, and that's very likely the ModifierType you need. Or, maybe it's not! If the ModifierType specifically references Barbarians, then you're gonna have to dive into Modifiers.xml, find the ModifierType you're looking at, take its effect, and make a new DynamicModifier with the proper Collection.

    3) I answered this in the other thread, even more thoroughly.

    4) Yes, but this time what you really need to dive into are the Requirements tables! I forget where I got them, but I think somewhere on this forum someone got a list of every entry in all 4 Requirements tables, so that helps when looking up Requirements for me. Lucky for you, it sounds like you don't really need to do that! Here's what you do: open Civilizations.xml. Search for russia, find its entry in the CivilizationTraits table, there should be, what, 3? Ignore the ones for the Cossack and Lavra, and search again for the trait one. You'll find an entry in the TraitModifiers table, that will give you the Modifiers you need to look up (there will be at least 2!). For each, search them again, you'll find their entries in the Modifiers table, and you'll see the requirements associated with them. Search for those requirements, you'll find entries in the RequirementSetRequirements table, search for those and you'll find an entry in the Requirements and RequirementArguments tables for each of them. Almost there! Make copies of all of those tables in your mod, link them the same way, but with your own names for each thing (else it will cause a crash when you try to load it into the game). You should have at least one entry in the following tables: CivilizationTraits, TraitModifiers, Modifiers, ModifierArguments, RequirementSets, RequirementSetRequirements, Requirements, and RequirementArguments. In the RequirementArguments entries, you can just change what is likely TERRAIN_TUNDRA and/or TERRAIN_TUNDRA_HILLS to any other terrain type (and possibly hills). Make the appropriate number of copies of things you need for each of your effects, etc., and voila! Should work if you did it right.

    There you go! I helped! If you want to post some code here when you've done some of that, I can look it over for you.
     
    Narvana likes this.
  3. Narvana

    Narvana Chieftain

    Joined:
    Nov 20, 2016
    Messages:
    41
    Gender:
    Female
    Wow, that's amazing! I wish I had you back then when I was still figuring that out! You really put your heart into this instruction, let's hope it will help many beginners!
     
  4. luei333

    luei333 Chieftain

    Joined:
    May 25, 2014
    Messages:
    137
    Danke! Just remember when making Dynamic Modifiers that the Effect still needs to apply to the same type of things. Like, letting a City or Tile or Player heal every turn will at best do nothing, and at worst cause a crash of some sort. Just be aware of what it's affecting, especially when the original collection is COLLECTION_OWNER.

    I've been considering putting together some sort of newbie guide to getting started, but there's still plenty I have to figure out myself before that happens. Best of luck!
     

Share This Page