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

Add a new unit in the game (using SQL)

Discussion in 'Civ5 - Modding Tutorials & Reference' started by Gedemon, May 10, 2012.

  1. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,816
    Location:
    Leeds (UK)
    I'm still struggling here, so would appreciate any help. I tried looking at the Tiny Death Robots mod and mimicking it for my mod, but to no avail.

    I have the Gods+Kings expansion pack and all the DLCs; I'm making a new version of the Anno Domini mod. I would like to use Dandrell's units (and others) as both flavour units and unique units (the unique units being the more important of the two for me at the moment).

    There are no problems with the coding to get a unit into the game; let's use the Maccabee (Hebrew slinger) as an example. I have a Maccabee that has the correct icon for the civilopedia/tech tree, the correct civilopedia text entry and it does the things I'd expect a Maccabee to do, such has have a "retreat after attack" promotion. However, as I don't know how to import new animations, we have a Maccabee that uses the Incan slinger graphics in-game. Whenever I've tried to import the graphics the Nefliqus did, I get a bunch of spearmen!

    Please can anyone help?
     
  2. Androrc the Orc

    Androrc the Orc Emperor

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    Did you activate "Reload Unit System" in your mod's properties?

    Anyhow, here is an example of a .sql file that adds new unit art (based on the method developed by Gedemon):

    Code:
    -- Archer
    ---------------
    
    -- ROME --------------------------------------------------------------------------------------------------------------
    INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
    	SELECT	("ART_DEF_UNIT_ARCHER_ROME"), "DamageStates", ("Archer")
    	FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_ARCHER");
    INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
    	VALUES	("ART_DEF_UNIT_ARCHER_ROME", "ART_DEF_UNIT_MEMBER_ARCHER_ROME", "12");
    INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
    	SELECT	("ART_DEF_UNIT_MEMBER_ARCHER_ROME"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius", 
    			"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
    	FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_ARCHER");
    INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
    	SELECT ("ART_DEF_UNIT_MEMBER_ARCHER_ROME"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
    	FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_ARCHER");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    	SELECT	("ART_DEF_UNIT_MEMBER_ARCHER_ROME"), "Scale", "ZOffset", "Domain", 
    			("Archer_Rome.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_ARCHER");
    -------------------------------------------------------------------------------------------------------------------------
    
    This one in particular adds danrell's Roman archer.
     
  3. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,816
    Location:
    Leeds (UK)
    Thanks Androrc. I've not enabled the "Reload Unit System" before - it's not something I realised I needed to do! (However, I just tried that, excitedly "rebuilding" the mod via modbuddy, only to find that I still have a band of spearmen where the slinger should be. Ah well...)

    So...to enter the code you've kindly done for the Roman Archer, I take it I simply creat a new .sql file, give it a name like "units.sql" and simply copy and paste what you've done below (as well as including the Roman archer graphics in a file somewhere in the mod, all files with "Import into VFS" set to "true)??

    Once that works, I take it the next step is for me to change references to "Roman Archer" to be A.N.Other unit I want to bring into the game and also change the references to "Archer" to be whatever the base type of unit is in the game?
     
  4. Androrc the Orc

    Androrc the Orc Emperor

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    I set the Import into VFS to false for the .SQL file and then add it through UpdateDatabase as with .XML files.

    Exactly. You also need to change the .fxsxml reference to the desired .fxsxml (just a note: .fxsxml files need to be set to VSF = true, and the same goes for the .dds and .gr2 files, naturally).
     
  5. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,816
    Location:
    Leeds (UK)
    Thanks again, Androrc, you've been a big help. I've now worked out (thanks to the code you put up above) how to get Dandrell's units into the game; I'm having limited success with Nefliqus' slinger though, as I can't seem to get the sizing right or the boulder sound for the stone that's thrown. However, I'm happy experimenting for now!
     
  6. Androrc the Orc

    Androrc the Orc Emperor

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    Great! :D
     
  7. JJimmyJ

    JJimmyJ Chieftain

    Joined:
    Jul 15, 2012
    Messages:
    15
    Hello

    I'm after some help if possible. I'm really struggling to get a Unique Unit to show in my game. It's a unit that was created way back (I'm new to Civ), so it used the old civ5artdefines_unitmembers.xml and civ5artdefines_units.xml. It also contained different art for different members in the formation.
    I've stripped out 3 of the 4 fxsxml's so I'm left with 1. Same with the granny files. I've checked them in granny viewer and the models show and the assets are all in the mod. All icons, text, buildings etc show correctly.
    I've written some SQL based on all the suggestions in this thread, but every time the unit shows a spearmen.
    Can someone please check it out for me? I'm tearing out what little hair is left on my head.

    Thanks :)
     

    Attached Files:

  8. Androrc the Orc

    Androrc the Orc Emperor

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    One thing I see is that you based your highlander on "ART_DEF_UNIT_WARRIOR". But there's no such art define. The correct form is "ART_DEF_UNIT__WARRIOR" (irritating I know, but AFAIK only settlers, warriors and workers have that extra "_").
     
  9. JJimmyJ

    JJimmyJ Chieftain

    Joined:
    Jul 15, 2012
    Messages:
    15
    Thanks for looking Androrc.
    I've finally had a chance to check and I've altered the ART_DEF_UNIT_WARRIOR to ART_DEF_UNIT__WARRIOR.
    However, now when I try to make the unit, the game crashes.
    I'm now looking at removing the custom animations and replacing them with the warrior animations. It's a long shot...
    I really like the model that has been used for this mod and can't seem to find one that would fit well that I could reskin myself.
     
  10. Androrc the Orc

    Androrc the Orc Emperor

    Joined:
    Apr 19, 2004
    Messages:
    1,620
    Location:
    Vienna, Austria
    Another thing: you should definitely delete the civ5artdefines_unitmembers.xml and civ5artdefines_units.xml files from your project, since replacing them doesn't work anymore (and may even be what is causing your crash). The art define update through "Scot Rules1.sql" should be enough.
     
  11. JJimmyJ

    JJimmyJ Chieftain

    Joined:
    Jul 15, 2012
    Messages:
    15
    Thanks again Androrc. I removed the 2 files, and found one more part where I'd put the extra _ in the wrong part.
    Progress - The unit is now visible, however, I seem to have rather a lot of them. Looks like 24 of them!! I must have doubled up on the formation count somewhere.
    I'm so close to actually being able to play a game :)
     
  12. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,109
    Location:
    The Kingdom of New Zealand
  13. JJimmyJ

    JJimmyJ Chieftain

    Joined:
    Jul 15, 2012
    Messages:
    15
    Hi JFD.
    I have finally been successful after having the same issue as you. Is it purely an issue with the skin and all other elements are correct? Mine was as simple as a missing underscore in my sql (thanks to Androrc for spotting it). Are art files all named correctly and vfs set to true?
    You will get it working. If it's any comfort it took me over a week :)
     
  14. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,109
    Location:
    The Kingdom of New Zealand
    Yeah, everything else is correct - the mod is currently up on the Steam Workshop (http://steamcommunity.com/sharedfiles/filedetails/?id=80377476), but it's using the Landsknecht as the Swiss Guard atm. The reskins just aren't showing up. I've tried copying over other mods with custom arts to test it, but even there I fail to get anything other than Spearmen. I guess I'm just going to have to be meticulous about it until I can get it working.
     
  15. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,816
    Location:
    Leeds (UK)
    I'm still having problems :(. The Roman archer was transported across, no problems. Then, I tried to do the Macabee (which is what I called my Hebrew slinger, rightly or wrongly). This is the code I used; I'd added the bit to sizing, as the original unit was extremely tiny. It didn't seem to make any difference whether the template to copy into was an archer or an Incan slinger, the result was the same. However, no matter what I put in for the size, the unit is larger than it was, but dwarfed by the other units - the size remaining the same whatever the value in my code for it. I would also like to make the sound that of a boulder as at the moment, it's a rifle shot (as the "missile" is a bullet). I tried to change that, but got a massive arrow coming out of the sky due to the unit being drastically increased in size!

    Here's the code I used:

    Spoiler :

    -- Slinger
    ---------------

    -- MACCABEE --------------------------------------------------------------------------------------------------------------
    INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
    SELECT ("ART_DEF_UNIT_HEBREW_SLINGER"), "DamageStates", ("Archer")
    FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_U_INCAN_SLINGER");
    INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
    VALUES ("ART_DEF_UNIT_HEBREW_SLINGER", "ART_DEF_UNIT_MEMBER_HEBREW_SLINGER", "12");
    INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
    SELECT ("ART_DEF_UNIT_MEMBER_HEBREW_SLINGER"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius",
    "MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
    FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_U_INCAN_SLINGER");
    INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
    SELECT ("ART_DEF_UNIT_MEMBER_HEBREW_SLINGER"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
    FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_U_INCAN_SLINGER");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    SELECT ("ART_DEF_UNIT_MEMBER_HEBREW_SLINGER"), "ZOffset", "Domain",
    ("hebrew_slinger.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_U_INCAN_SLINGER");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Scale")
    VALUES (2);


    Also, I tried to get one of Danrell's Greek spearmen in the game, but get the generic spearmen that indicate wrong coding - whether I use the spearman or Greek phalanx as a template. Here's the code for that:

    Spoiler :

    -- Spearman
    ---------------

    -- MYCENAE --------------------------------------------------------------------------------------------------------------
    INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
    SELECT ("ART_DEF_UNIT_HEQETAI"), "DamageStates", ("Phalanx")
    FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_U_GREEK_HOPLITE");
    INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
    VALUES ("ART_DEF_UNIT_HEQETAI", "ART_DEF_UNIT_MEMBER_HEQETAI", "12");
    INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
    SELECT ("ART_DEF_UNIT_MEMBER_HEQETAI"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius",
    "MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
    FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_U_GREEK_HOPLITE");
    INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
    SELECT ("ART_DEF_UNIT_MEMBER_HEQETAI"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
    FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_U_GREEK_HOPLITE");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    SELECT ("ART_DEF_UNIT_MEMBER_HEQETAI"), "Scale", "ZOffset", "Domain",
    ("Spearman_Greece.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_U_GREEK_HOPLITE");
    -------------------------------------------------------------------------------------------------------------------------


    Can anyone point me in the right direction? I should add that this is my first go at sql.
     
  16. JJimmyJ

    JJimmyJ Chieftain

    Joined:
    Jul 15, 2012
    Messages:
    15
    Hi Rob,

    A bit of a longshot, but I found the 'NumMembers' code produced 36 members when I had it set to 12 in my original code. I reduced this to '4' which then gave the correct number of members (seemed to multiply by 3). Maybe this is conflicting with the unit size as it's trying to produce too many members?
     
  17. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,816
    Location:
    Leeds (UK)
    Thanks for the suggestion and I tried it. Sadly, though, the result is the same.
     
  18. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,163
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Rob/JJimmyJ,
    The problem is this:
    Code:
    INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
    	SELECT	("ART_DEF_UNIT_HIGHLANDER1"), ("ART_DEF_UNIT_MEMBER_HIGHLANDER1"), "12"
    	FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_WARRIOR");
    If you take a look at the SQL table in question, you'll notice there are 3 models that comprise ART_DEF_UNIT__WARRIOR. With SELECT, you're duplicating all 3 of those rows, but at the same time you're replacing all of the contents of that row (so you don't need a SELECT). Since you don't need to refer to the vanilla warrior, just replace all of the above with:
    Code:
    INSERT INTO ArtDefine_UnitInfoMemberInfos VALUES ('ART_DEF_UNIT_HIGHLANDER1','ART_DEF_UNIT_MEMBER_HIGHLANDER1',"12");
    EDIT:
    You could also use all 4 of the Highlander models available with a hybrid unit, and instead:
    Code:
    INSERT INTO ArtDefine_UnitInfoMemberInfos VALUES ('ART_DEF_UNIT_HIGHLANDER1','ART_DEF_UNIT_MEMBER_HIGHLANDER1',"3");
    INSERT INTO ArtDefine_UnitInfoMemberInfos VALUES ('ART_DEF_UNIT_HIGHLANDER1','ART_DEF_UNIT_MEMBER_HIGHLANDER2',"3");
    INSERT INTO ArtDefine_UnitInfoMemberInfos VALUES ('ART_DEF_UNIT_HIGHLANDER1','ART_DEF_UNIT_MEMBER_HIGHLANDER3',"3");
    INSERT INTO ArtDefine_UnitInfoMemberInfos VALUES ('ART_DEF_UNIT_HIGHLANDER1','ART_DEF_UNIT_MEMBER_HIGHLANDER4',"3");
    
    and make the appropriate changes to ArtDefine_UnitMemberInfos also:
    Code:
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    	SELECT	("ART_DEF_UNIT_MEMBER_HIGHLANDER1"), "1.4", "ZOffset", "Domain", 
    			("Highlander1.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WARRIOR");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    	SELECT	("ART_DEF_UNIT_MEMBER_HIGHLANDER2"), "1.4", "ZOffset", "Domain", 
    			("Highlander2.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WARRIOR");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    	SELECT	("ART_DEF_UNIT_MEMBER_HIGHLANDER3"), "1.4", "ZOffset", "Domain", 
    			("Highlander3.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WARRIOR");
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    	SELECT	("ART_DEF_UNIT_MEMBER_HIGHLANDER4"), "1.4", "ZOffset", "Domain", 
    			("Highlander4.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WARRIOR");
    EDIT #2: Fixed a couple of typos.
     
  19. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,163
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Rob,
    Maccabee Scale: I don't know what's going on with the last statements there.

    EDIT: Try:
    Code:
    INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
    SELECT ("ART_DEF_UNIT_MEMBER_HEBREW_SLINGER"), "1.5", "ZOffset", "Domain",
    ("hebrew_slinger.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
    FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_U_INCAN_SLINGER");
    [FYI, Nefliqus uses 1.5 scale in his original artdefines.]

    Maccabee Sound: Did you try changing WeaponTypeSoundOverrideTag to BOULDER (with WeaponTypeTag set to BULLET)?

    Greek Spearmen: I'm not sure... Are you sure you're importing the 4 files into VFS?
     
  20. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,816
    Location:
    Leeds (UK)
    Thanks for the help Nutty. I'm trying the Maccabee now and will report back. The files are all imported into VFS and I did try changing the sound to boulder without success, but I'll give it another try once I've sorted the scaling out.
     

Share This Page