You are getting into quite a disciplined part of Mach 3. You mention the Z axis so therefore I assume you are talking about a milling machine application.
When you say you now have a quick change, this means that each tool will fit in the holder at the same position (or length).
The first thing you must do is decide on a start position for your tools. This means a position where Tool 0 is at, and normally axis Z is at 0 with this tool. The tool can be imaginary - in other words, there might not be a tool - just the tool holder. and this is zeroed by touching it on the work piece.
How ever you do it, all other tools in the tool table are set from this. I personally have an empty tool holder as my 0 position, and all tools in the holder then have a length protruding from the holder - and all those lengths are positive.
Remember on your GCode that G43 must be activated to take into account the tool length offset - if you are plunging, it could be that you are missing the appropriate G43 - if in doubt - put it in again, it can't do any harm.
You can enter all your tools into the tool table. Even ones you are not using on a particular job. You might just have a few, but the big boys might have a hundred all in a big drum - so they can be entered - information about them is stored. You, of course, must remember which tool is which - and I would suggest, get a tool holder for each tool and label them.
If you are milling, then tools also have a width, or diameter, and this can be entered.
That is it really - but your scripts must all start the same - cancelling all offsets etc, then building them back in as you need them, other wise the machine looses track of where it should be.
Tool changes are M6 T** where the star is the new tool number. It is best to move to a tool change co-ordinate to change your tool. This should be an absolute co-ordinate. You change your tool, the apply G43 again and then return to your position. Because you have left your position, gone to an absolute co-ordinate, then returned ( with a g43) the machine will take the NEW tool co-ordinates into account as it returns, and be in the correct position to start again. ( See the video tutors about Scripting and moving to a position for a tool change)
I think you should get the idea from that diatribe.