Activation are made via options, not defines.
You set it up either by adding it to the option table (XML or SQL) or Lua
SQL example
Code:
INSERT INTO GameOptions (Type, "Default", Visible) VALUES ( 'GAMEOPTION_CAN_STACK_IN_CITY', 1, 0 );
Lua example
Code:
PreGame.SetGameOption("GAMEOPTION_CAN_STACK_IN_CITY", 1)
Note that this option is used to allow any unit to stack with other in a city (infinite amount), you won't have to set any option for your class mechanism.
For 2 stacking class, I'm using "SetIsSpecialType(boolean)" to units, it's always available when the DLL is active.
When an unit is created, I check if its one of the "support" unit in the mod (Howitzer, Field Guns, AA-Guns, Tank Destroyer, Assault Gun, ...) then initialize it with
Code:
unit:SetIsSpecialType(true)
Now that unit will be able to stack with" classic" units (infantries, tanks, etc...) but not with any other unit initialized this way.
SetIsSpecialType is not the simplest way to create such a mechanism, but I've used it to allow temporary stacking of any unit that can be remove it with unit:SetIsSpecialType(false)
I plan to add a more specific feature: create a new table "UnitStackingClass" and a new corresponding tag in the UnitClasses table.
You could then simply add a "COMBAT" class type and a "SUPPORT" class type in "UnitStackingClass", set the "StackingClass" tags for each UnitClasses to be one or the other, and the DLL would then allow stacking of units that have different "StackingClass"