Resource icon

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

You'll need 2 mods: the Ethnic Diversity Unit Pack (with all the art) and one Ethnic Diversity mod for adding the art defines. The Unit Pack must be enabled first before you can enable Ethnic Diversity... or one of the alternate scaling mods: I've planned at least 6 scaling options (from smallest to largest: Xtreme, R.E.D., vanilla, Fewer Unit, Reduced Unit, Single Unit Large, and Single Unit Small; and I've left two additional slots for further scaling options in the future).

I was wondering where the 'Ethnic Diversity Unit Pack (with all the art)' was available to download. I download the link above but its only a small file. Do I need to pair it with your R.E.D unofficial or is there a separate art pack needed?
 
Thanks! Continually crashing for me on turn 147. Think it has something to do with the Netherlands, as it's their turn its crashing on. Once I deselected the mod, it worked fine. Re-enabling it leads to the same crash.

I'm using it alongside CBP.
 
I fixed the super-gigantic Swedish warrior, but it looks like I may have uploaded the version before that fix. I'll put up an update tonight.

@SyngeR6 : Last night, I tried to reproduce your crash, but for me it doesn't occur with any of the Netherlands' units. Can you plop each of the units on your system for Netherlands with LiveTuner or In-game Editor, and see if that causes the crash for you? [Even easier would be the E.D. unit tester included in the testers download; it plops all units for all civs automatically.]
 
Great to see the EE compatibility, but you forgot to include diversity for the Galleons.
 
Great to see the EE compatibility, but you forgot to include diversity for the Galleons.
I converted a bunch of those reskins myself; of course I'm using them! However, I'm using them for embarked diversity (as mentioned, that's part of a separate mod for the moment in the testers file).
 
Would you add Renaissance Era Revised compatibilty for this or the next version?
And if i use this version, will there be error even if i use vanilla scales? Sorry if i ask too much, and thanks for the great work :D
 
I tested the latest version. My fixes:
Spoiler 1-JEDUnitGraphicConfig.sql :

Code:
SELECT     '',               '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '',              '95thRifles',                        14,    0.14,   'UnFormed'             UNION ALL
SELECT     '_MED',           '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '_V3',           'bandeirante_3',                     6,     0.14,   'UnFormed'                UNION ALL
SELECT     '_MED',           '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '_V2',           'bandeirante_2',                     1,     0.14,   'UnFormed'                UNION ALL
SELECT     '_MED',           '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '',              'bandeirante_1',                     2,     0.14,   'UnFormed'                UNION ALL
SELECT     '_MED',           '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '_V3',           'bandeirante_3',                     4,     0.14,   'UnFormed'                UNION ALL
SELECT     '_MED',           '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '',              'bandeirante_1',                     0,     0.14,   'UnFormed'                UNION ALL
SELECT     '_SOUTHAM',       '',               'EE_SKIRMISHER',                           'EE_SKIRMISHER',                          '',              'u_mexican_rurales',                 14,    0.14,   'UnFormed'                UNION ALL

SELECT     '_NETHERLANDS',   '',               '_WORKER',                                'WORKER',                                   '',              'CIV5Nedwo',                         8,     0.14,   'LooseCivilian'        UNION ALL
Scale:
Code:
SELECT     '_AMER',          '',               'GALLEY',                                  'GALLEY',                                 '',              'TribalAmerican_Embark',             2,     0.10,   'TwoBigGuns'           UNION ALL
SELECT     '_NORTHEU',       '',               'GALLEY',                                  'GALLEY',                                 '',              'U_Denmark_Longboat',                2,     0.065,  'TwoBigGuns'           UNION ALL
SELECT     '_OCEAN',         '',               'GALLEY',                                  'GALLEY',                                 '',              'U_Polynesian_War_Canoe',            2,     0.06,  'TwoBigGuns'           UNION ALL
SELECT     '',               '',               'GALLEON',                                 'GALLEON',                                '',              'euro_galleon',                      2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_AFRI',          '_MED',           'GALLEON',                                 'GALLEON',                                '',              'med_galleon',                       2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_AMER',          '_EURO',          'GALLEON',                                 'GALLEON',                                '',              'euro_galleon',                      2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_ASIA',          '',               'GALLEON',                                 'GALLEON',                                '',              'WarJunk',                           2,     0.105,   'TwoBigGuns'           UNION ALL
SELECT     '_CENTAS',        '_MED',           'GALLEON',                                 'GALLEON',                                '',              'med_galleon',                       2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_EASTEU',        '_EURO',          'GALLEON',                                 'GALLEON',                                '',              'euro_galleon',                      2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_RUSSIA',        '',               'GALLEON',                                 'GALLEON',                                '',              'russian_galleon',                   2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_ENGLAND',       '',               'GALLEON',                                 'GALLEON',                                '',              'english_galleon',                   2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_FRANCE',        '',               'GALLEON',                                 'GALLEON',                                '',              'french_galleon',                    2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_GERMANY',       '',               'GALLEON',                                 'GALLEON',                                '',              'prussian_galleon',                  2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_MED',           '',               'GALLEON',                                 'GALLEON',                                '',              'med_galleon',                       2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_GREECE',        '',               'GALLEON',                                 'GALLEON',                                '',              'greek_galleon',                     2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_PORTUGAL',      '',               'GALLEON',                                 'GALLEON',                                '',              'portuguese_galleon',                2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_ROME',          '',               'GALLEON',                                 'GALLEON',                                '',              'italian_galleon',                   2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_SPAIN',         '',               'GALLEON',                                 'GALLEON',                                '',              'spanish_galleon',                   2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_MIDEAST',       '_MED',           'GALLEON',                                 'GALLEON',                                '',              'med_galleon',                       2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_NORTHEU',       '_EURO',          'GALLEON',                                 'GALLEON',                                '',              'euro_galleon',                      2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_DENMARK',       '',               'GALLEON',                                 'GALLEON',                                '',              'danish_galleon',                    2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_SWEDEN',        '',               'GALLEON',                                 'GALLEON',                                '',              'swedish_galleon',                   2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_OCEAN',         '_EURO',          'GALLEON',                                 'GALLEON',                                '',              'euro_galleon',                      2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'GALLEON',                                 'GALLEON',                                '',              'WarJunk',                           2,     0.105,   'TwoBigGuns'           UNION ALL
SELECT     '_SOUTHAM',       '_EURO',          'GALLEON',                                 'GALLEON',                                '',              'euro_galleon',                      2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '_SOUTHAS',       '_MED',           'GALLEON',                                 'GALLEON',                                '',              'med_galleon',                       2,     0.13,   'TwoBigGuns'           UNION ALL
SELECT     '',               '',               'U_SPANISH_GALLEON',                       'U_SPANISH_GALLEON',                      '',              'U_Spanish_Galleon',                 2,     0.14,   'TwoBigGuns'           UNION ALL
SELECT     '_NORTHEU',       '',               'TRIREME',                                 'TRIREME',                                '',              'battle_galley',                     1,     0.08,   ''                     UNION ALL
SELECT     '_SWEDEN',        '',               '_WARRIOR',                                'WARRIOR',                                '',              'SwedenAxe',                         12,    0.14,   'Warrior'              UNION ALL
SELECT     '_AFRI',          '',               'MISSIONARY',                              'MISSIONARY',                             '',              'EthiopianScout',                    3,     0.15,   'EarlyGreatArtist'     UNION ALL
SELECT     '_AFRI',          '',               'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '',              'EthiopianScout',                    3,     0.15,   'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'MISSIONARY',                              'MISSIONARY',                             '',              'buddhist_missionary',               1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'MISSIONARY',                              'MISSIONARY',                             '_F1',           'buddhist_missionary_01',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'MISSIONARY',                              'MISSIONARY',                             '_F2',           'buddhist_missionary_02',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'MISSIONARY',                              'MISSIONARY',                             '',              'buddhist_missionary',               1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'MISSIONARY',                              'MISSIONARY',                             '_F1',           'buddhist_missionary_01',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'MISSIONARY',                              'MISSIONARY',                             '_F2',           'buddhist_missionary_02',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'MISSIONARY',                              'MISSIONARY',                             '',              'buddhist_missionary',               1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'MISSIONARY',                              'MISSIONARY',                             '_F1',           'buddhist_missionary_01',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'MISSIONARY',                              'MISSIONARY',                             '_F2',           'buddhist_missionary_02',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '',              'buddhist_missionary',               1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '_F1',           'buddhist_missionary_01',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '_F2',           'buddhist_missionary_02',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '',              'buddhist_missionary',               1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '_F1',           'buddhist_missionary_01',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '_F2',           'buddhist_missionary_02',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '',              'buddhist_missionary',               1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '_F1',           'buddhist_missionary_01',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'MISSIONARY_RENAISSANCE',                  'MISSIONARY',                             '_F2',           'buddhist_missionary_02',            1,     0.145,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'INQUISITOR',                              'INQUISITOR',                             '_F1',           'Ninja_Japan',                       2,     0.135,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'INQUISITOR',                              'INQUISITOR',                             '_F1',           'Ninja_Japan',                       2,     0.135,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'INQUISITOR',                              'INQUISITOR',                             '_F1',           'Ninja_Japan',                       2,     0.135,  'EarlyGreatArtist'     UNION ALL
SELECT     '_ASIA',          '',               'INQUISITOR_RENAISSANCE',                  'INQUISITOR',                             '_F1',           'Ninja_Japan',                       2,     0.135,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SEASIA',        '_ASIA',          'INQUISITOR_RENAISSANCE',                  'INQUISITOR',                             '_F1',           'Ninja_Japan',                       2,     0.135,  'EarlyGreatArtist'     UNION ALL
SELECT     '_SOUTHAS',       '_ASIA',          'INQUISITOR_RENAISSANCE',                  'INQUISITOR',                             '_F1',           'Ninja_Japan',                       2,     0.135,  'EarlyGreatArtist'     UNION ALL
SELECT     '',               '',               'GREAT_ADMIRAL',                           'GREAT_ADMIRAL',                          '',              'Great_Admiral_Early',               1,     0.13,   'DefaultCavalry'       UNION ALL
SELECT     '',               '',               'GREAT_MUSICIAN_POSTMODERN',               'GREAT_MUSICIAN_LATE',                    '',              'Great_Musician_Late',               1,     0.125,  'EarlyGreatArtist'     UNION ALL
SELECT     '',               '',               'GREAT_MUSICIAN_POSTMODERN',               'GREAT_MUSICIAN_LATE',                    '_F1',           'Great_Musician_Late_F1',            1,     0.125,  'EarlyGreatArtist'     UNION ALL
SELECT     '',               '',               'GREAT_MUSICIAN_POSTMODERN',               'GREAT_MUSICIAN_LATE',                    '_F2',           'Great_Musician_Late_F2',            1,     0.125,  'EarlyGreatArtist'     UNION ALL
SELECT     '',               '',               'GREAT_WRITER_POSTMODERN',                 'GREAT_WRITER_LATE',                      '',              'Great_Writer_Late',                 1,     0.13,   'DefaultCavalry'       UNION ALL
SELECT     '',               '',               'GREAT_WRITER_POSTMODERN',                 'GREAT_WRITER_LATE',                      '_F1',           'Great_Writer_Late_F1',              1,     0.13,   'DefaultCavalry'       UNION ALL
SELECT     '',               '',               'GREAT_WRITER_POSTMODERN',                 'GREAT_WRITER_LATE',                      '_F2',           'Great_Writer_Late_F2',              1,     0.13,   'DefaultCavalry'       UNION ALL

Missing file u_mexican_rurales_sref.dds for unit 'mexican rurales'. I downloaded it again via the link.
Spoiler EraDiversity.lua :

local iMID_EMBARK_ERA = GameInfoTypes.ERA_RENAISSANCE; -- Era to switch embarked units from Galleys to Galleons
local iLATE_EMBARK_ERA = GameInfoTypes.ERA_INDUSTRIAL; -- Era to switch embarked units from Galleons to Transports
 
Where's that .lua file? It's absent in both ED folders.

<got it form GITHUB - post may be deleted.>
 
Last edited:
Can you put BrutalSamurai22's Ethnic Units version of Knights and Longswordman for Germany and England in your mod? The versions being used are kind of outdated. I would do that myself, but I have no idea how...

Edit: Or maybe can someone tell me how to do it
 
Last edited:
Sorry for being incommunicado this week, but life continues to happen. I've had a little time to do some fixing, and I should be able to post something later today.

Thanks so much once again for your continued help, @Tomahawk.nsk !

Hello! Where can I see the list of civs this mod works with?
There's now over 1000 models (though some units use multiple models), and there's some for every civ, though obviously some civs and some unit types have better coverage than others. There's a fair amount of sharing of units between culturally connected civs.

I just published a Wikia entry with some tables to give you an idea of the coverage, though I'm not sure I would have bothered if I'd realized how poorly the tables would turn out. The tables were created from the first tab of this Excel spreadsheet, which you're welcome to examine. I now maintain this mod using the other tabs of that spreadsheet; it has macros to produce the SQL table which is the intermediate step to constructing all of the art defines.

Would you add Renaissance Era Revised compatibilty for this or the next version?
There are a few unit models that would fit into RER's new unit types, but I'm already using them for other units in the base game and I'd rather not steal diversity for a mod that not everyone is going to use. I can add a few one-offs (and I just added zwei833's Indian 2-handed swordsman for the next beta). If you have units to suggest that I may have overlooked, please let me know.

And if i use this version, will there be error even if i use vanilla scales?
[EDIT: If you're talking about a conflict with RER, no, it should be fine.] As I said, the only scale that I'm recommending is vanilla scale at the moment. The others need some work (and with my limited time, I'm going to need volunteers to help), and RER scaling [as well as Prehistoric and Enlightenment Era mods] should be included when they're complete.

Can you put BrutalSamurai22's Ethnic Units version of Knights and Longswordman for Germany and England in your mod?
The units that Ethnic Units used for those units are from danrell's Ancient Unit packs. Those units are actually included in this mod, but are mixed in with the "outdated" reskins you mention (one of which is actually one of the first reskins that I did myself). Gedemon often showed a preference for creating motley assemblages of different models for a given unit where there were models available to do so. I'm not sure if I would have gone for that look if I had created this mod from scratch, but then again I also like showcasing all of the beauty and hard work that this community has had to offer over the years. Either way, you can certainly edit the 1-JEDUnitGraphicConfig.sql file as you see fit. It should be fairly self explanatory; send me a message if you're confused.
 
Last edited:
Spoiler slightly optimized code in EraDiversity.lua :
Code:
function OnSetEra(iTeamID, iEraID)
    local playerID = Teams[iTeamID]:GetLeaderID();
    local player = Players[playerID];
    if (player:IsEverAlive() and player:IsAlive()) then
        print("- Era ".. iEraID ..": ".. tostring(player:GetName()) .." - ".. Locale.ConvertTextKey(player:GetCivilizationShortDescription()) );

-- Is Cultural Diversity (with embarkation diversity) enabled?  If not, use our embarked diversity
        if not IsModActive(strCUL_DIV_ID) then
            print("Checking for embarked diversity...");
            DoEmbarkedDiversity(player, iEraID);
        else
            for culDivRow in GameInfo.JFD_GlobalUserSettings("Type = 'JFD_CULDIV_EMBARKATION_CHANGES'") do
                if culDivRow.Value == 1 then
                    DoEmbarkedDiversity(player, iEraID);
                end
            end
        end
        for pUnit in player:Units() do
-- Check era variable units for upgrade possibilities
            print("Checking for era art upgrades...");
            CheckUnitForUpgrade(pUnit, player, iEraID);
        end
    end
end

function CheckUnitForUpgrade(pUnit, pPlayer, iEraID)
    local strEraType = GameInfo.Eras[iEraID].Type:sub(5);
    local strNewUnit = "";
    local pNewUnit = nil;
    local xUnit = pUnit;
 
-- Check if alias is available for this era

    for i, tRow in pairs(tEraUnits) do
        if xUnit:GetUnitType() == tRow.ID then
 
print ("GetUnitType: " .. xUnit:GetUnitType())    --это его ID цифрой
--UNIT_CARGO_SHIP  -  ID 145
--UNIT_CARGO_SHIP_RENAISSANCE  -  ID 162
     
            if iEraID == iLATE_ERA then
               strEraType = "LATE";
            end
      
            if tRow.Type == "UNIT_CARGO_SHIP_RENAISSANCE" then
                --strNewUnit = "UNIT_CARGO_SHIP_".. strEraType;
                return  --Ignore, or the game will crash!
            else
               strNewUnit = tRow.Type .."_".. strEraType;
           end
               
            print("Check... ".. tRow.Type .." to ".. strNewUnit .. "?");
     
            for j, tNewRow in pairs(tEraUnits) do
                if tNewRow.Type == strNewUnit then
                    print("Unit ".. tNewRow.Description .." successfully replaced by ".. strNewUnit);
                    pNewUnit = pPlayer:InitUnit(tNewRow.ID, xUnit:GetX(), xUnit:GetY());
                    pNewUnit:Convert(xUnit);             
                    return
                end
            end     
        end
    end
end
But when I try to update UNIT_CARGO_SHIP_RENAISSANCE the game still hangs ( This file is currently not working.
Everything else works fine, I checked it many times.
 
Last edited:
UNIT_CARGO_SHIP_RENAISSANCE
Yeah, what's a little infinite looping among friends? Thanks. I've got that fixed. (As written it keeps upgrading the same unit over and over...) :crazyeye:

Thanks! I was able to edit the sql file with no problem. :D
:goodjob: Oh good. And I don't mean to sound that I'm not open to suggestions.
 
Super giant Swedish Warriors were hilarious whilst they lasted.

Spoiler :
 
Super giant Swedish Warriors were hilarious whilst they lasted.

Spoiler :
Open file 1-JEDUnitGraphicConfig.sql and fix this line:
Code:
SELECT     '_SWEDEN',        '',               '_WARRIOR',                                'WARRIOR',                                '',              'SwedenAxe',                         12,    0.14,   'Warrior'              UNION ALL

Yeah, what's a little infinite looping among friends? Thanks. I've got that fixed. (As written it keeps upgrading the same unit over and over...) :crazyeye:
I meant this error:
Code:
  Runtime Error: C:\Users\Tomahawk\Documents\My Games\Sid Meier's Civilization 5\MODS\(5) Ethnic Diversity (v 29)\Lua/EraDiversity.lua:165: attempt to index local 'pNewUnit' (a nil value)
stack traceback:
    C:\Users\Tomahawk\Documents\My Games\Sid Meier's Civilization 5\MODS\Ethnic Diversity - Era Variation (v 29)\Lua/EraDiversity.lua:165: in function 'CheckUnitForUpgrade'
    C:\Users\Tomahawk\Documents\My Games\Sid Meier's Civilization 5\MODS\Ethnic Diversity - Era Variation (v 29)\Lua/EraDiversity.lua:71: in function <C:\Users\Tomahawk\Documents\My Games\Sid Meier's Civilization 5\MODS\Ethnic Diversity - Era Variation (v 29)\Lua/EraDiversity.lua:51>
It appears when you try to upgrade a CARGO_SHIP to CARGO_SHIP_RENAISSANCE. Then he tries to upgrade again.
//if pNewUnit then// doesn't help, the update still loops.
P.S: I checked it in IGE and FireTuner with AutoPlay.
 
I converted a bunch of those reskins myself; of course I'm using them! However, I'm using them for embarked diversity (as mentioned, that's part of a separate mod for the moment in the testers file).
I don't suppose there's a way to add them to the EE Galleon (for the joy of seeing your nation's galleon's flying the correct colors)?
 
Top Bottom