Resource icon

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

I don't suppose there's a way to add them to the EE Galleon...
They'd look quite similar, but I suppose I could try to vary the scale and/or number of members [and/or play with my reskinning] to distinguish them...

I meant this error:
Sorry, when I said I fixed it, I meant in my personal build; I haven't checked it in to GitHub (let alone posted a download), since there are still some issues that I'm trying to fix.

It's a holiday here in the U.S., so I might have a little time to work on the mod over the next few days.
 
OK, new beta posted (and extra testers pack).

I've added a new function to the unit tester tool to plop all units, except organized by class instead of by civ (like the previous incarnation at the moment it's auto-firing immediately at game start). Now comparing sizes is much easier. I already see some more tweaks that need to be made, so that's... good... :undecide:
 
Ethnic Diversity is becoming more and more interesting :)

The following units are not updated: _WORKER_LATE, WORKBOAT_LATE, CARAVAN_POSTMODERN, and so on. Perhaps the file 5-EraDiversity.sql is not working as it should? Please look what could be the problem.

New "WarGalleon" is not yet displayed as EE_GALLEON in Enlightenment Era, but the idea is very good! :)
 
Thanks, @Tomahawk.nsk !

The following units are not updated...
Yes, everything in the testers pack (including Era Diversity) is still buggy, and I haven't had the time to give any of it my full attention.

Ah, thanks for the reminder about the EE Galleon; I forgot to update the art define reference in the Units table. I've got more skins to add, anyway.
 
For compatibility with City-State Diplomacy Mod (CSD) for Brave New World (v 28) we must add to the file 3-InsertArtDefines.sql:
Code:
UPDATE ArtDefine_UnitInfoMemberInfos  SET UnitMemberInfoType = 'ART_DEF_UNIT_MEMBER_SETTLER_ASIA_F2'
                                    WHERE UnitInfoType = 'ART_DEF_UNIT_EMISSARY';
UPDATE ArtDefine_UnitInfoMemberInfos  SET UnitMemberInfoType = 'ART_DEF_UNIT_MEMBER_SETTLER_F1'
                                    WHERE UnitInfoType = 'ART_DEF_UNIT_DIPLOMAT';                             
UPDATE ArtDefine_UnitInfoMemberInfos  SET UnitMemberInfoType = 'ART_DEF_UNIT_MEMBER_SETTLER_AFRI_M3'
                                    WHERE UnitInfoType = 'ART_DEF_UNIT_GREAT_DIPLOMAT';                                 
UPDATE ArtDefine_UnitInfoMemberInfos  SET UnitMemberInfoType = 'ART_DEF_UNIT_MEMBER_SETTLER_F1'
                                    WHERE UnitInfoType = 'ART_DEF_UNIT_GREAT_DIPLOMAT_RENAISSANCE';
But I don't know how to change the scale for these units...
UNIT_GREAT_DIPLOMAT successfully varies depending on the era, UNIT_GREAT_DIPLOMAT_RENAISSANCE and UNIT_GREAT_DIPLOMAT_MODERN work well.
 
Last edited:
Is an update in the works? I want to try the scaled version, but I understand that the build on the first page is still in alpha.
 
I haven't really used R.E.D. so far, but having seen some other people using it I've been considering trying to implement a basic version of it with Future Worlds to add some unit diversity. How easy is it to mod in alternative models for new units a mod may add?
 
Is an update in the works? I want to try the scaled version, but I understand that the build on the first page is still in alpha.
It is indeed in this works, but I don't have a lot of time for modding. Frankly, I don't really like the smaller scales, so they therefore haven't been a high priority for me. If you want to be a tester for R.E.D. scale, then there just happens to be a position open! :mischief:

I've been considering trying to implement a basic version of it with Future Worlds to add some unit diversity. How easy is it to mod in alternative models for new units a mod may add?
I wanted to add Future Worlds support (I've started work on Prehistoric, Renaissance Revised, and Enlightenment), but I wasn't aware of many units for diversity. I would be happy to be wrong on that point. You could give me a list (or better yet, update the newunits.xlsm file on GitHub from which I generate the SQL files) and I'll try to get to it soon.

In theory, it's pretty easy. The mod simply uses the mechanism the game uses to display the different settlers for different culture groups: If UnitArtInfoCulturalVariation in the Units table is set to 1 for a particular unit, then when the game looks up the art define to display (i.e., from UnitArtInfo in the Units table), it will first try to append the ArtStyleSuffix from the Civilizations table. If UnitArtInfo+ArtStyleSuffix exists, it will use that define (and if not, it will fall back to using UnitArtInfo alone as normal), e.g., if the civ uses "_AFRI”, and "ART_DEF_UNIT_MECH_AFRI" exists, it will be used instead of the default "ART_DEF_UNIT_MECH".

R.E.D. enables UnitArtInfoCulturalVariation for all units that don't have UnitArtInfoEraVariation enabled (unfortunately only one or the other is possible at a time using the built-in system). Also, the ArtStyleSuffix in the Civilizations table is changed to the name of the civilization, e.g., "_ZULU", so each civ can be customized individually. Also, copies are made of defines with the cultural group suffixes (e.g., _AFRI) for units where a civ doesn't have a specific unit specified to prevent the need for excessive duplication in the source tables. Send me a PM if you have further questions.
 
It is indeed in this works, but I don't have a lot of time for modding. Frankly, I don't really like the smaller scales, so they therefore haven't been a high priority for me. If you want to be a tester for R.E.D. scale, then there just happens to be a position open! :mischief:

Ok, cool. After tomorrow, I'll have a decent amount of free time on my hands and this might be a good opportunity for me to learn some coding. I had started to add some of the new units created by Vox Populi to Version 27 of RED through copy/paste before my laptop gave out and I lost it all. Will start up a game tomorrow with this mod and report back.
 
I wanted to add Future Worlds support (I've started work on Prehistoric, Renaissance Revised, and Enlightenment), but I wasn't aware of many units for diversity. I would be happy to be wrong on that point. You could give me a list (or better yet, update the newunits.xlsm file on GitHub from which I generate the SQL files) and I'll try to get to it soon.

Well... you'd be right in that there currently aren't many alternate units to use for diversity. :p But now that v6 is out I've got some free time to spare, and after watching someone play with RED on, I was intruiged to see the diversity of modern units, so I started thinking about trying to convert more models to provide at least some token diversity for Future Worlds units.

With v6 there are some late Information Age units, such as the Missile Destroyer and Supercarrier that probably may already have alternative units available - I borrow the Missile Destroyer model (an Arleigh Burke class) from one of the advanced naval units mods that also had a Japanese variant, and the Supercarrier is Danrell's model, but there's likely a Nimitz or something similar around.

For the more futuristic models, I was considering for the time being loosely grouping them into three groups based on aesthetic design and a half-developed "future history", which for the time being I'm calling Oceania, Eurasia, and Eastasia. I have a vague idea as to how specific civs would fall into these factions, but it's still under development. I wasn't sure exactly how RED assigned art defines, but given your explanation about the suffixes I'd probably have to come up with something more comprehensive. Still, I figure they'd work similar to the cultural group suffixes, so it shouldn't be too hard in the end, hopefully.

Once I've gotten a few alternative units converted, I'll let you know. I wasn't sure if it was something better done on my end (a modmod to Future Worlds, or something) or if you'd prefer to incorporate it directly into RED, as you have with the Enlightenment Era, RER and Prehistoric Era mods.
 
If you're looking for good future units to use, there is always the Warhammer 40k units that are featured in Community Call to Power.
 
To support the "UNIT_EE_GALLEON" we must to do it:

Enlightenment Era.modinfo:

<File md5="572B08AEA81C0653A4621322E8976CDB" import="0">SQL/EEGalleonDefine.sql</File>
<UpdateDatabase>SQL/EEGalleonDefine.sql</UpdateDatabase>

Enlightenment_Units.xml:
<Type>UNIT_EE_GALLEON</Type>
<UnitArtInfo>ART_DEF_UNIT_EE_GALLEON</UnitArtInfo> - this row should be changed

EEGalleonDefine.sql:
INSERT INTO ArtDefine_UnitInfos(Type, DamageStates, Formation)
VALUES ('ART_DEF_UNIT_EE_GALLEON', 1, 'TwoBigGuns');
INSERT INTO ArtDefine_UnitInfoMemberInfos(UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT_EE_GALLEON', 'ART_DEF_UNIT_MEMBER_EE_GALLEON', 1);
INSERT INTO ArtDefine_UnitMemberInfos(Type, Scale, Domain, Model, MaterialTypeSoundOverrideTag)
VALUES ('ART_DEF_UNIT_MEMBER_EE_GALLEON', 0.150000005960464, 'Sea', 'U_Spanish_Galleon.fxsxml', 'WOODLRG');
INSERT INTO ArtDefine_UnitMemberCombats(UnitMemberType, EnableActions, HasShortRangedAttack, HasLeftRightAttack, HasRefaceAfterCombat, HasIndependentWeaponFacing)
VALUES ('ART_DEF_UNIT_MEMBER_EE_GALLEON', 'Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady AttackSurfaceToAir', 1, 1, 0, 1);
INSERT INTO ArtDefine_UnitMemberCombatWeapons(UnitMemberType, "Index", SubIndex, VisKillStrengthMin, VisKillStrengthMax, HitEffect, WeaponTypeTag, WeaponTypeSoundOverrideTag)
VALUES ('ART_DEF_UNIT_MEMBER_EE_GALLEON', 0, 0, 10.0, 20.0, 'ART_DEF_VEFFECT_CANNON_IMPACT_$(TERRAIN)', 'EXPLOSIVE', 'EXPLOSION6POUND');
INSERT INTO ArtDefine_StrategicView
(StrategicViewType, TileType, Asset)
VALUES ('ART_DEF_UNIT_EE_GALLEON', 'Unit', 'sv_Galleon.dds');

1-JEDUnitGraphicConfig.sql:

SELECT '_RUSSIA', '', 'EE_GALLEON', 'EE_GALLEON', '', 'RussianGalleon', 1, 0.14, '' UNION ALL
SELECT '_SPAIN', '', 'EE_GALLEON', 'EE_GALLEON', '', 'WarGalleonSpanish', 1, 0.14, '' UNION ALL
SELECT '_NORTHEU', '', 'EE_GALLEON', 'EE_GALLEON', '', 'WarGalleonViking', 1, 0.14, '' UNION ALL
SELECT '_DENMARK', '', 'EE_GALLEON', 'EE_GALLEON', '', 'WarGalleonDanish', 1, 0.14, '' UNION ALL
SELECT '_SWEDEN', '', 'EE_GALLEON', 'EE_GALLEON', '', 'WarGalleonSwedish', 1, 0.14, '' UNION ALL
 
FWIW, I am still working on this mod (albeit slowly). Besides trying to get the alternate scales working properly, here's what I've been working on:
v.29 beta 3 (in progress)
  • add more galleon skins by Nutty for Enlightenment Era
  • add Wolfdog's Nimitz and danrell's QE and PA2 models for Future Worlds' super carriers (also for whoward69's and swatmp5's super carrier mods)
  • add a few alternate models for Future Worlds [thanks bouncymischa!]
  • a few more scaling and unit choice tweaks
  • fixes to the naming standardization to allow other mods to still use vanilla art defines
  • should no longer get invisible units for some units if user forgets to activate the Unit Pack for Mods (just no diversity for that unit)

@Tomahawk.nsk : Once again, thanks for your hard work. Can you give me a heads-up in the future if you're going to put some work in? Then I can be sure to make sure GitHub is updated with the latest, and we can be on the same page. (It's much easier to do 2-way compares than 3-way compares!) Also, if you have Excel, please use the Unit List tab of the newunits.xlsm spreadsheet to make updates to the 1-JEDUnitGraphicConfig.sql file. Hopefully you'll find it easy enough to understand. You just have to click "Create SQL" at the top left with the readout set to "1" (i.e., JED). ["Create All SQL" makes all 9 possible scaling files.]

I haven't touched Era Diversity other than making a simple ad hoc fix to the infinite loop, so thanks for working on a more general solution and experimenting with the trade units. That's a shame they have those limitations, though. It looks like the "special" rule won't ever kick in since you've commented out the PlayerDoTurn add. Does it work as-is if I uncomment it? Either way, do you think it's worth it to leave Era Diversity as a separate mod and require VMC for just that piece, or just avoid doing anything with trade units?
 
If you upgrade the trading unit in the middle of the route, he'll be stuck there and will not be able to move it. So the ships and caravans need to be updated when they are in the city. If you remove the commenting "--GameEvents.PlayerDoTurn.Add(ED_DoTurn);" then everything will work that way. But! Old unit has already taken place a trade route (This can be seen in menu review trade), and while the old unit is not officially complete the trade, the new unit will have to wait. Firaxis didn't provide us the function to cancel the trade route; this function I found in the VMC DLL.
Either way, do you think it's worth it to leave Era Diversity as a separate mod and require VMC for just that piece, or just avoid doing anything with trade units?
If DLL VMC is used, then use ED_DoTurn:
Code:
function ED_DoTurn(iPlayerID)
    if not IsModActive(DLL_VMC) then
        return;
    end
...

My changes in 1-JEDUnitGraphicConfig.sql for the last month:
1) Comment
Code:
--SELECT     '_ENGLAND',       '',               'EE_FIELD_GUN',                            'EE_FIELD_GUN',                           '',              'RHA_Cannon',                        3,     0.12,   'ThreeBigGuns'         UNION ALL
Check out this unit, it can lead to CTD.
2) Delete
Code:
SELECT     '',               '',               'CARGO_SHIP_RENAISSANCE_POSTMODERN',       'CARGO_SHIP_LATE',                        '',              'Cargo_Ship_Late',                   1,      0.07,   'DefaultCavalry'       UNION ALL
3) Added for compatibility with City-State Diplomacy Mod
Code:
SELECT     '',               '',               'EMISSARY',                                'SETTLER_ASIA_F2',                        '',                'Settlers_Asian_F2',                 1,     0.5,    'LooseCivilian'        UNION ALL
SELECT     '',               '',               'ENVOY',                                    'ENVOY',                                   '',                'Missionary_01',                     1,     0.14,   'EarlyGreatArtist'     UNION ALL
SELECT     '',               '',               'DIPLOMAT',                                'DIPLOMAT',                               '',                'EuroFemale18',                      1,     0.12,   'LooseCivilian'        UNION ALL
SELECT     '',               '',               'AMBASSADOR',                                 'AMBASSADOR',                             '',              'Archeologist',                      1,     0.12,   'DefaultCavalry'       UNION ALL
 
Hello! I tried to create a pack of the Ethnic Diversity (R.E.D. Unofficial) v29b2 mod using Multiplayer Mods Workaround so i could earn achievements and i've got black CttD error (app is not responding) on a final loading screen before the very game start. The mod itself runs perfect, it's the dlc mod package that doesnt work for some reason.
I've only selected this folders for my dlc pack:
Ethnic Diversity (v 29)
Ethnic Diversity Unit Pack (v 29)
Is it because currently Ethnic Diversity mod is not supported for such workaround manipulations?
 
@TheMihanoid : I had a DLC working that was based on an earlier beta, and I stripped out all the unnecessary table updates (MPMPM dumps the entire database, not just tables with changes). I'll try to make one based on beta 3 which is due out "soon."
 
@Nutty: Ok, thank you for the fast respond and thank you for your wonderful work on the mod
I'm one of those people who cant play civ with generic unit graphics so having an ability to play the game with such mods like this is a godsend! Keep up the good work and take your time! :)
 
Top Bottom