Well, whith a wonderful Pack File Manager I finally managed to create a custom unit. It is almost a clone of Cossack Infantry but the unique units weren't my priority. I was trying to create a custom unit and make the game recognize it. And I made it.
To create your own unit you have to export the following db files via Package Manager and add your own lines of a new unit.
building_units_allowed
unit_stats_land
unit_to_unit_abilities_junctions
units
units_to_exclusive_faction_permissions
units_to_groupings_military_permissions
units_to_gov_type_permissions
The only problem I have is that I don't know how to give the unit a name to be shown in the game. Any tips would be appreciated.
Anyway, have a look at the screens
I will probably write a guide on "how to create your own units" tomorrow or later...