I suspect you dont need to do any of that. LinuxCNC tool tables aready define both tool number and pockets. Tool numbers are unique, but pockets dont have to be.
There is a carousel tool changer comp which supposedly already works with the Schaublin tool changer.
www.forum.linuxcnc.org/10-advanced-confi...carousel-toolchanger
So lets consider your example.
For a job we mount all of these tools. The first three go on the three postion gang tooling holder you have. We mount that in turret position 1 which in the tool table is pocket 1.
T1- Spot drill - Pocket 1
T2- Drill - Pocket 1
T3- boring bar - Pocket 1
T4 - RH VCMT turning tool in pocket 2
T5 - Kurling tool in pocket 3
T6 - LH VCMT turning tool in pocket 4
T7 - but we also need a threading tool, so that is on another tool holder, and will be manually changed into pocket 1.
T8 - Parting tool on the rear tool post, which we will call Pocket 5.
I have not looked at the code of that carousel.comp, but suspect it only trigers activity of the tool holder when a pocket in it's assigned range is called. So if pockets 1-4 are assigned in the comp to the carousel, then the behaviour would be:
At the start of the program, I would add an M1 and a pop up message to remind that the gang tool has to be in pocket 1.
The M6T1G43, the carousel indexes back to pocket 1, if not already there.
First three M6TxG43, the carousel is not called, LinuxCNC just assigns the correct called tool, offset, orientation and nose radius, and continues.
M6T4 G43 - Turrent indexes once, then LCNC assigns the correct called tool, offset, orientation and nose radius, and continues.
It would be at this point that I would have programmed in the M1 stop, to manually remove the gang tool holder with it's T1-3, and load T7.
M6T5 ( and T6) Indexes around one.
Calling M6T7G43 would rotate the turret back to pocket 1, with its changed tool.
M6T8G43 I would expect to again do nothing with the turret and just load the offsets for the parting tool.
It would probably be a good idea to add another M1 and text pop up at the end of the program to remind to reinstall the gang tool in pocket one, so the program is ready to go on a restart.
Of course I could be wrong about that carousel.comp not moving the turret on a tool change which calls a pocket outside it's range (or no pocket). But if that is the case, it would be best to modify the comp. Misusing the tool diameter for this would lose the ablity to do tool radius compensation, which is important on a lathe.
CAM software doesn't care where the tools come from. It just assumes the appear with the correct offsets, orientation and radius.
For tool table hygiene, it might be good to standardise like anything in pocket 1 is called T1xx, in pocket 5 -->T5xx etc.
Cheers,
Mark