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

How to create new combat class?

Discussion in 'Civ5 - Creation & Customization' started by Thalassicus, Jan 4, 2013.

  1. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    How do I make a new combat class play combat animations?

    I made chariots mounted archers. They show movement animations, but not combat animations.
    Code:
    INSERT OR REPLACE INTO UnitCombatInfos(Type, Description)
    VALUES ('UNITCOMBAT_MOUNTED_ARCHER', 'TXT_KEY_UNITCOMBAT_MOUNTED_ARCHER');
    
    UPDATE Units
    SET CombatClass = 'UNITCOMBAT_MOUNTED_ARCHER'
    WHERE CombatClass = 'UNITCOMBAT_ARCHER' AND Class NOT IN (
      'UNITCLASS_ARCHER',
      'UNITCLASS_COMPOSITE_BOWMAN',
      'UNITCLASS_CROSSBOWMAN',
      'UNITCLASS_GATLINGGUN',
      'UNITCLASS_MACHINE_GUN'
    );
     
  2. trystero49

    trystero49 Prince

    Joined:
    Apr 30, 2012
    Messages:
    515
    IIRC this has been asked before, and with no satisfying solution.

    Maybe it has something to do with something in the ArtDefines referencing a CombatClass? Either that or something is hardcoded into the engine.
     
  3. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    You don't, as far as I can tell. It just doesn't work; something is being done internally that screws up when you use a combat class other than one of the existing ones. It doesn't matter if the art define itself is exactly the same as before, simply changing the combat class will cause it to stop animating.

    My own mods suffer from this; my future mod is entirely filled with five new combat classes, and my Mythology mod depends on a new Myth combat class, and I can't use animations for any of them.
     
  4. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    Yeah, I investigated two years ago when I made this change. I figured someone might have discovered something since then, especially now that we have access to parts of the game core.

    I re-searched again through the xml files for references to the archer combat class and chariot unit. I traced through the ArtDefines files up several levels without finding anything. I also searched for these things in the game core without getting any hits. :think:

    By the way Spatz, can you do your psychic mindworm damage now that we have more core access?
     
  5. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    If you mean "can you do it like it was in SMAC", then no. I mean, someone could figure out how to do stubs for that then I'm sure it'd be possible, but with what I've seen so far, it's not possible to get the AI to recognize it correctly.

    If you mean "can you do it like I had in my own mod before patch 674 broke everything", then I think so; I'm in the process of testing that now, with the new combat events people have added. The AI's still a bit stupid about it, but since I'd capped the Psi adjustment at ~25% it wouldn't cause the AI to handle it too badly.
     

Share This Page