Creating Ethnic Unit. Need help, please.

trashmunster

Warlord
Joined
Feb 20, 2024
Messages
105
Hey! I am trying to understand how to add an ethnic unit to the game, so no changes to stats, or game mechanics, just using new model akin to Ethnic mods.
I am absolutely new to modding. Following simple mod tutorial I managed to make a mod that adds 50 happiness to colosseum as a test. It worked. Now I am trying to make an ethnic unit mod and somehow cant get it right, maybe somebody experienced could help?
The game sees the mod, and doesnt crash while configuring but nothing happens. As a test I tried to add ethnic spearman for Rome as a test.

I tried to write it based on Gedemon thread in making units.
I know I am dumb, but I am willing to understand. My dream is to add more ethnic units to the game and make it Dolen2pack and VoxPopuli compatible. First for private use.

Thanks!
 
Last edited:
Ok after further learning I tried to rewrite it. Still zero effect in game. Please help! :(

SQL
Code:
UPDATE Civilizations SET ArtStyleSuffix = "_ROME" WHERE Type = 'CIVILIZATION_ROME';
UPDATE Units SET UnitArtInfoCulturalVariation = 1 WHERE Type = 'UNIT_SPEARMAN';
INSERT INTO ArtDefine_UnitInfos(Type, DamageStates, Formation)
SELECT ("ART_DEF_UNIT_SPEARMAN_ROME"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_SPEARMAN");
INSERT INTO ArtDefine_UnitInfoMemberInfos(UnitInfoType, UnitMemberInfoType, NumMembers)
SELECT ("ART_DEF_UNIT_SPEARMAN_ROME"), ("ART_DEF_UNIT_MEMBER_SPEARMAN_ROME"), "NumMembers"
FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_SPEARMAN");
INSERT INTO ArtDefine_UnitMemberCombats(UnitMemberType, EnableActions, ShortMoveRadius, ShortMoveRate, TargetHeight, HasRefaceAfterCombat, ReformBeforeCombat)
SELECT ("ART_DEF_UNIT_MEMBER_SPEARMAN_ROME"), "EnableActions", "ShortMoveRadius", "ShortMoveRate", "TargetHeight", "HasRefaceAfterCombat", "ReformBeforeCombat"
FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_SPEARMAN");
INSERT INTO ArtDefine_UnitMemberCombatWeapons(UnitMemberType, "Index", SubIndex, WeaponTypeTag, WeaponTypeSoundOverrideTag)
SELECT ("ART_DEF_UNIT_MEMBER_SPEARMAN_ROME"), "Index", "SubIndex", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_SPEARMAN");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
SELECT ("ART_DEF_UNIT_MEMBER_SPEARMAN_ROME"), "Scale", "ZOffset", "Domain",
("Triarii_Rome.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_SPEARMAN");

And modinfo file
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="c95f2ed2-1fc0-46d6-b319-1707a7c04629" version="1">
<Properties>
<Name>Samnite2</Name>
<Stability>Alpha</Stability>
<Description>jjddjdjjjdjdj</Description>
<Authors>Brb</Authors>
<SpecialThanks>Samnite2</SpecialThanks>
<AffectsSavedGames>1</AffectsSavedGames>
<MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>1</SupportsMultiplayer>
<SupportsMac>1</SupportsMac>
<ReloadLandmarkSystem>0</ReloadLandmarkSystem>
<ReloadUnitSystem>1</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="32CBE77CCC66955EB10FC8D32C26DCB9" import="0">SQL/SamniteRules1.sql</File>
<File md5="1BABC3C612220AE7F64A462D9E3ED4B6" import="1">Unit/Pikeman_Rome.dds</File>
<File md5="C9EF0371967420CC23227455CE8B6915" import="1">Unit/Pikeman_Rome_gloss.dds</File>
<File md5="6443ABFB5A7CA1219F83312D3E080901" import="1">Unit/Triarii.dds</File>
<File md5="E4CF332C9B9B4CA9D01B51EA5F199A5B" import="1">Unit/Triarii_Rome.fxsxml</File>
<File md5="A308743A70978BEAA17C3B910F77056A" import="1">Unit/Triarii_Rome.gr2</File>
<File md5="4F803C326722844C44B6724BE7ABF649" import="1">Unit/Triarii_sref.dds</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>SamniteRules1.sql</UpdateDatabase>
</OnModActivated>
</Actions>
</Mod>
 
Last edited:
Back
Top Bottom