I'm going through Earandel's code in AAI Programmable Vehicles to understand the difference between the regular Ironclad and the AI varieties. It looks like his code "splits" the Ironclad into entities ironclad, ironclad-ironclad-mortar, and ironclad-ironclad-cannon, in his prototypes/entity/entity-update-externals.lua file.
Down in aai_split_vehicle(), he takes a vehicle and creates new entity types with it based on the valid gun types associated with the vehicle. The ironclad has two valid guns named "ironclad-mortar" and "ironclad-cannon". He creates new entity types like "original_type" .. "-" .. "gun_type", resulting in "ironclad-ironclad-mortar" and "ironclad-ironclad-cannon".
That all seems straightforward. What I don't yet understand is why "RTItemProjectile-ironclad-ironclad-mortar18" isn't valid as an entity name in create_entity. It looks like those item projectile entity types are created down in your MakeProjectile() function?
Looking through my game log, I see your code creates the below projectile types.
1.225 Script @RenaiTransportation/data-final-fixes.lua:809: Creating item projectile for item-with-entity-data: ironclad
1.229 Script @RenaiTransportation/data-final-fixes.lua:809: Creating item projectile for gun: ironclad-cannon
1.229 Script @RenaiTransportation/data-final-fixes.lua:809: Creating item projectile for gun: ironclad-mortar
The AI flavor types aren't listed, just the vanilla ironclad and the guns by themselves. So that loop isn't picking up ironclad-ironclad-mortar and ironclad-ironclad-cannon when creating projectile types... I just don't understand why.