• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

How to create new combat class?

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'
);
 
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.
 
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.
 
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?
 
By the way Spatz, can you do your psychic mindworm damage now that we have more code access?

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.
 
Back
Top Bottom