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

Ethnic Diversity (R.E.D. Unofficial) v.29 beta 5b

Ethnic Diversity

  1. dorianm86

    dorianm86 Chieftain

    Joined:
    Mar 25, 2012
    Messages:
    8
    Location:
    Slovenia
    Great mod! :) Really adds some depth to the game experience.

    I have a question, though. I was wondering if you, Nutty, or anyone else who's got some knowledge about this, could post a brief explanation of what do we have to edit in the mod, to enable these unique unit graphics also on other mods (other new civs). EDIT: or on the contrary, what do we have to edit on other mods, to enable the graphics used in the Ethnic Diversity mod.

    For example, I've made a new civilization, Iran during the Safavid Dynasty. I'd like to see the Persian swordsman unique unit graphic from the Ethnic diversity mod to replace the regular swordsman graphic. And same goes for some other units (in some cases I might even get some Ottoman or Arabian graphics, everything to avoid European looks :D). What do I have to edit? The Ethnic Diversity mod or rather my Iranian civ's unit.xml and apply UnitArtInfo from the Ethnic Diversity mod?

    If there's already an explanation somewhere, please let me know, I didn't scroll the entire topic.

    I thought of trying messing with the Civ5ArtDefines_Units.xml and Civ5ArtDefines_UnitMembers.xml by myself, but I'd rather try for a quick explanation, than risk crashing everything.
     
  2. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Sure, that's an easy one. You'd just edit the newunits_*.sql files in the Units folder. For the swordsman, for instance, you'd duplicate the lines from newunits_swordsman.sql:
    Code:
    INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
    	VALUES ( 'CIVILIZATION_PERSIA', 'UNITCLASS_SWORDSMAN', 'UNIT_PERSIAN_SWORDSMAN' );
    and then change CIVILIZATION_PERSIA in the second entry to the civilization tag for your new civ (leave UNIT_PERSIAN_SWORDSMAN the same, however).

    So the full set of entries would look something like this:
    Spoiler :
    Code:
    -- Sassanid Swordsman - Persia
    INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'Moves', 'Immobile', 'Range', 'BaseSightRange', 'Class', 'Special', 'Capture', 'CombatClass', 'Domain', 'CivilianAttackPriority', 'DefaultUnitAI', 'Food', 'NoBadGoodies', 'RivalTerritory', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'Found', 'FoundAbroad', 'CultureBombRadius', 'GoldenAgeTurns', 'IgnoreBuildingDefense', 'PrereqResources', 'Mechanized', 'Suicide', 'CaptureWhileEmbarked', 'PrereqTech', 'ObsoleteTech', 'GoodyHutUpgradeUnitClass', 'HurryCostModifier', 'AdvancedStartCost', 'MinAreaSize', 'AirUnitCap', 'NukeDamageLevel', 'WorkRate', 'NumFreeTechs', 'RushBuilding', 'BaseHurry', 'HurryMultiplier', 'BaseGold', 'NumGoldPerEra', 'SpreadReligion', 'IsReligious', 'CombatLimit', 'RangeAttackOnlyInDomain', 'RangeAttackIgnoreLOS', 'RangedCombatLimit', 'XPValueAttack', 'XPValueDefense', 'SpecialCargo', 'DomainCargo', 'Conscription', 'ExtraMaintenanceCost', 'NoMaintenance', 'Unhappiness', 'UnitArtInfo', 'UnitArtInfoCulturalVariation', 'UnitArtInfoEraVariation', 'ProjectPrereq', 'SpaceshipProject', 'LeaderPromotion', 'LeaderExperience', 'DontShowYields', 'ShowInPedia', 'MoveRate', 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas')
    	SELECT	("UNIT_PERSIAN_SWORDSMAN"), ("TXT_KEY_UNIT_PERSIAN_SWORDSMAN"), "Civilopedia", "Strategy", "Help", "Requirements", "Combat", "RangedCombat", "Cost", "Moves", "Immobile", "Range", "BaseSightRange", "Class", "Special", "Capture", "CombatClass", "Domain", "CivilianAttackPriority", "DefaultUnitAI", "Food", "NoBadGoodies", "RivalTerritory", "MilitarySupport", "MilitaryProduction", "Pillage", "Found", "FoundAbroad", "CultureBombRadius", "GoldenAgeTurns", "IgnoreBuildingDefense", "PrereqResources", "Mechanized", "Suicide", "CaptureWhileEmbarked", "PrereqTech", "ObsoleteTech", "GoodyHutUpgradeUnitClass", "HurryCostModifier", "AdvancedStartCost", "MinAreaSize", "AirUnitCap", "NukeDamageLevel", "WorkRate", "NumFreeTechs", "RushBuilding", "BaseHurry", "HurryMultiplier", "BaseGold", "NumGoldPerEra", "SpreadReligion", "IsReligious", "CombatLimit", "RangeAttackOnlyInDomain", "RangeAttackIgnoreLOS", "RangedCombatLimit", "XPValueAttack", "XPValueDefense", "SpecialCargo", "DomainCargo", "Conscription", "ExtraMaintenanceCost", "NoMaintenance", "Unhappiness",
    			("ART_DEF_UNIT_PERSIAN_SWORDSMAN"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate", "UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
    	FROM "Units" WHERE (Type = "UNIT_SWORDSMAN");
    INSERT INTO "Language_en_US" ( 'Tag', 'Text' )
    	VALUES ( 'TXT_KEY_UNIT_PERSIAN_SWORDSMAN', 'Swordsman Sassanid' );
    INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
    	SELECT ("UNIT_PERSIAN_SWORDSMAN"), "UnitAIType"
    	FROM "Unit_AITypes" WHERE (UnitType = "UNIT_SWORDSMAN");
    INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
    	SELECT ("UNIT_PERSIAN_SWORDSMAN"), "UnitClassType"
    	FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_SWORDSMAN");
    INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
    	VALUES ( 'CIVILIZATION_PERSIA', 'UNITCLASS_SWORDSMAN', 'UNIT_PERSIAN_SWORDSMAN' );
    INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
    	VALUES ( 'CIVILIZATION_SAFAVID', 'UNITCLASS_SWORDSMAN', 'UNIT_PERSIAN_SWORDSMAN' );
    INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
    	SELECT ("UNIT_PERSIAN_SWORDSMAN"), "FlavorType", "Flavor"
    	FROM "Unit_Flavors" WHERE (UnitType = "UNIT_SWORDSMAN");
    INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
    	SELECT ("UNIT_PERSIAN_SWORDSMAN"), "PromotionType"
    	FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_SWORDSMAN");
    INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
    	SELECT ("UNIT_PERSIAN_SWORDSMAN"), "ResourceType", "Cost"
    	FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_SWORDSMAN"); 
    ---------------

    Note that you'll want to change (as I did above) the description of the unit (on the 7th line) to something that can cover both Civs, e.g., from "Swordsman Persia" to "Swordsman Sassanid" (so it's at least not referring directly to the name of another Civ), or maybe just a generic "Swordsman."

    ...Now, that gets ED working with your mod, but I don't know how you want to package it when you're ready for distribution. You could offer a separate hotfix to apply to Ethnic Diversity. I'd be happy to include those entries in the next release of this mod (since it won't hurt anything if people don't have the Civ in question installed).
     
  3. dorianm86

    dorianm86 Chieftain

    Joined:
    Mar 25, 2012
    Messages:
    8
    Location:
    Slovenia
    Thank you very much! :thumbsup:

    As for the distribution, when my mod will be polished and ready for release, yes, I was thinking a separate hotfix would be a good idea (or adding those entries into one of your next updates). Though I'll first add those entries and play at least one full game with my Safavid mod, to test and see if it's stable and everything displays correctly as it should.
     
  4. Somohexual

    Somohexual Chieftain

    Joined:
    Apr 12, 2012
    Messages:
    50
    I was able to download the mod fine but when I go to set up a game my Civs have one of their UU's or UB's replaced with the tooltip for Infantry, Swordsman, Tank, or Musketeer. It's usually the second one that breaks too; for example, China has Chu-Ko-Nu listed first followed by Paper Maker so Paper Maker is the one that breaks.

    Spoiler :


    Any clue what this problem could be? D:

    Thanks.

    EDIT:

    I noticed that some of my Civs aren't broken, here's a list of the ones that are...

    - Babylon, Inca, Songhai, Siam, Russia, Persia, Iroquois, India, Egypt, China, Aztec, Arabia
     
  5. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Don't worry, this is only a cosmetic issue! The Civs' UU's and UB's will continue to work as designed.

    This is a known issue, and it's mentioned in the readme. If you care to know why: We use the UU system in order to add the ethnic units. The Dawn of Man screen only has 2 slots, and it will always show the UU's first, followed by the UB's. Therefore, Civs with 2 UU's and no UB's look fine because the additional UU's provided here don't display. The Civs with one UU and one UB will show the UU in the first slot, and one of the ethnic units in the second slot instead of the UB.
     
  6. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,604
    Location:
    France
    Thanks for the link, I've missed that one.
     
  8. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    Yeah, I only found it myself yesterday. To be honest, I can't get it to work, and wanted to see how the more experienced modders managed with it. :lol:
     
  9. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    That is a cool one! Whoward69 has been quietly putting out a ton of really great mods in his UI series.

    But I think including it might be confusing for users. It'd certainly be cool from the standpoint of "Look, the mod is working, and see all the ethnic units that are being added?" However, almost all the Civs have more than 4 or 5 ethnic units, so it won't be exhaustive, but most importantly I'd rather not conflate the two concepts of unique versus ethnic units.

    Maybe if I changed the UI a bit to indicate the difference, but then I'd probably have to tease out in LUA which was vanilla (i.e., if there's a UB, pick that and the first UU, otherwise pick the first 2 UU's).

    Either way, I guess I could explore that technique to fix the cosmetic bug.

    EDIT: Or... hey, I could just make it easy on myself and always put UB's first. (Duh!)
    :stupid:
     
  10. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    Very good points, and I do agree - having all the ethnic units up there would be confusing, as you'd naturally think all Civs suddenly have 5 uniques.

    Small request though, if you do end up getting it working, could you send me a message on how you managed it? I can manage to get some of the lua working but for most of it, I think you have to replace the original Civ V files themselves.
     
  11. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Right. That's what the mod's thread says: as a mod, this only affects the Dawn of Man loading screen. For the "Game Setup," "Select Civilization," and Civilopedia, you'll need to copy the files in the assets\UI\FrontEnd\GameSetup folder from the mod to the assets\UI\FrontEnd\GameSetup folder in your CiV directory. I can confirm it works fine for me.

    As far as swapping the order to fix the cosmetic problem (originally it's 1.UU, 2.UB, 3.UI; I changed it to 1.UI, 2.UB, 3.UU), that technique works, but it has the same problem: as a mod, it only affects the loading screen. I'll probably include that solution with the next release of ED, anyway, and suggest that people may want to overwrite the UniqueBonuses.lua file with the modified one if the issue bothers them.

    I'll attach the revised file to the end of the first post if anyone wants to play around with it. There are 3 places where ordering changes occur, but it looks like the only ones that do anything if the file is used in a mod are in the function starting on line 110. Note this is the vanilla version, not whoward69's, but making similar changes to his works similarly. It will ensure that UIs and UBs don't get left out, but note the order is rather odd.

    If I get inspired, I may explore enhancing the loading screen using whoward69's version as a template.
     
  12. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    Thanks for the clarification. :goodjob:
     
  13. Herb0815

    Herb0815 Chieftain

    Joined:
    May 9, 2010
    Messages:
    51
    Is this mod compatible with Unofficial Patch & Vanilla Enhanced by THAL?
     
  14. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    Load it afterwards, and it is. You'll have to add some XML to get it to work with the new VEM units, though.
     
  15. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Just to be clear, "it" is this mod that needs to be activated after the Unofficial Patch.

    EDIT: Actually, it looks like Thal recently removed the civ5artdefines file from UOP that had caused the conflicts mentioned earlier in this thread. But to work as designed, VEM still needs to be first.

    ...

    As far as the new units, albie_123 appears to be talking about the Levy, Skirmisher, and Light Infantry. From what I can see, they just reuse vanilla art defines, so I don't see why they wouldn't work out of the box. I'll take a look.

    EDIT: No, they work just fine!
     
  16. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,604
    Location:
    France
    BTW Nutty, as dependencies/reference seems to be working ATM, you can set reference in the mod info to force loading in good order.

    For example in the .modinfo file, there's the following code :

    Code:
      <Dependencies />
      <References />
      <Blocks />
    In my local version of R.E.D. I'm using this instead :

    Code:
      <Dependencies>
      </Dependencies>
      <References>
        <Mod id="01127f62-3896-4897-b169-ecab445786cd" minversion="0" maxversion="9999"/>
        <Mod id="abaa043a-f851-4c61-bd18-52d480862cd0" minversion="0" maxversion="9999"/>
        <Mod id="d0bc4a46-8a69-46b5-917a-8de842f82ed9" minversion="0" maxversion="9999"/>
      </References>
      <Blocks>
        <Mod id="fb230d1a-dd7d-427b-8323-0e30aaf480c1" minversion="0" maxversion="9999"/>
        <Mod id="6833786c-56f5-4fc4-bdb1-287c15ec3f08" minversion="0" maxversion="9999"/>
        <Mod id="5f779307-3810-439c-9c9e-1c86be3c86cd" minversion="0" maxversion="9999"/>
      </Blocks>
    Where id are :
    01127f62-3896-4897-b169-ecab445786cd = Unofficial Patch and Vanilla Enhanced
    abaa043a-f851-4c61-bd18-52d480862cd0 = City State Diplomacy Mod
    d0bc4a46-8a69-46b5-917a-8de842f82ed9 = City states UU

    fb230d1a-dd7d-427b-8323-0e30aaf480c1 = Ethnic Diversity - Single Unit Graphics
    6833786c-56f5-4fc4-bdb1-287c15ec3f08 = Ethnic Diversity - R.E.D. Unofficial
    5f779307-3810-439c-9c9e-1c86be3c86cd = Ethnic Diversity

    This tell the game to load CiVUP, CSD, and CS UU before R.E.D., so the last artinfo files loaded are the ones from R.E.D containing define for all the mods units as you know.

    The Blocks section prevent my and your mod to be used at the same time.

    In your case, putting Ethnic Diversity id in the dependency tag in Single Graphic and R.E.D. Unofficial modinfo will force it to be activated with those, and in one of them put the other's id in the block tag (and R.E.D. id in both block tag).


    note : R.E.D. id is 8670da15-d435-44ea-9758-7438cb321411
     
  17. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    What do you mean? The VE armies and VE barbarians look fine for me with vanilla scaling, R.E.D., and S.U.G., and all the stats appear to work as designed. VEM definitely needs to be loaded first, though.

    But thanks to this...
    ...our lives can be made easier.

    (Thanks for the heads-up, Gedemon!)
     
  18. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    Oh, sorry! You're absolutely right. I forgot that the new units used old artdefines. :mischief:
     
  19. Eunomiac

    Eunomiac Chieftain

    Joined:
    Sep 27, 2007
    Messages:
    87
    Location:
    Toronto, Canada
    I'm trying to figure out how to properly install this mod, as some of the instructions left me a little confused! Please let me know if this is correct, or if I've missed something (I would like to use ED + Optional Units, with R.E.D. scaling):

    1. I wiped my cache, MODS and ModUserData folders, to start with a fresh install of everything.
    2. I've downloaded and unzipped both the main 14.5MB pack, as well as the 5MB Optional Units pack. My ..\MODS\ folder includes the following:
      • ..\Ethnic Diversity - Optional Units (v 12)\
      • ..\Ethnic Diversity - R.E.D. Unofficial (v 12)\
      • ..\Ethnic Diversity - Single Unit Graphics (v 12)\
      • ..\Ethnic Diversity (v 12)\
    3. I copied all XML files in ...Optional Units (v 12)\XML R.E.D. Unofficial\ to ...Optional Units (v 12)\XML\, renaming them accordingly (R.E.D. scaling of the optional units).
    4. I copied everything in ..\Ethnic Diversity - R.E.D. Unofficial (v 12)\copy to common\ to ..\Steam\steamapps\common\sid meier's civilization v\resource\Common\ (the propeller/archer optional fix &#8212; I assume the R.E.D. "copy to common" folder was the proper one, as opposed to (base) Ethnic Diversity (v 12)\copy to common\?)
    ... So that's where I'm at right now. Assuming that's correct, I have a question about which attachments (included under the headline "Bugfixes from v 12") I should use (listed here for easy reference):
    1. Ethnic Diversity - Optional Units v 12.01 bugfix.zip
    2. Ethnic Diversity v 12.03 bugfix.zip
    3. EDUniqueBonuses.zip
    4. Ethnic Diversity - Optional Units v 12.02 modinfo.zip
    5. Ethnic Diversity v 12.04 modinfos.zip
    I assume the first two, since they refer to the versions I'm running.

    The third is also in, being the fix described in the 4/15/2012 update for the Dawn of Man/unique units issue.

    But what about #4 and #5? They both appear to refer to future versions of Optional Units and Ethnic Diversity, respectively. Are they updates of the main files to those versions?

    Lastly, when I do load up all of my MODS, is this the correct order to activate them?
    1. Other (freshly-installed) mods: Unofficial Patch/VEM, CivWillard, InfoAddict, Smaller Landmarks
    2. Ethnic Diversity (v 12)
    3. Ethnic Diversity - R.E.D. Unofficial (v 12)
    4. Ethnic Diversity - Optional Units (v 12)
    Sorry for my confusion, and thanks in advance for your help!
     
  20. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,154
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    I've attached a small optional hotfix to the first post. They just contain a few .modinfo updates with dependencies/references/blocks added. Just copy them over your existing files, and hopefully it will help ED play nice with its own sub-mods and other compatible mods without having to always delete the cache directory or the civ5artdefines files from the other mods. I won't bother uploading the whole pack again for this tiny update. Note that I finally got around to updating NiGHTS compatibility for the next update to follow.

    ...

    Sorry for the confusion, Eunomiac, but I was preparing a post to explain those, and go into some other issues, but I never got a chance to finish it. I'll get to the rest of your questions and the other issues I want to address in a separate post, but hopefully the latest hotfix will make the process somewhat more idiot-proof (not that I'm casting aspersions). ;)

    EDIT: Actually, Eunomiac, I don't need another post for you. You have the process exactly right. Sorry that it's a bit confusing, but it's tough since I'm trying to make ED be all things for all people.

    EDIT #2: Though, to be clear, you didn't need to apply the 2 bugfixes, as they were to be applied to get from an earlier v12 to the latest one I have posted. Numbers 3-5 are the ones that have not (yet) been included in the full download. And I've just now removed the bugfixes, anyway.
     

Share This Page