@Ramon I believe by default tech dice use the dice sides specified on the top of the XML (by default 6). So if you want to give tech a dice of 4, you'd be changing the dice sides that regular combat units use as well.
If you want tech to be rolled with 4 dice sides and the other rolls with 6 dice sides, I think theoretically it would possible, but would it would be insanely complicated and require the use of a user action phase with a lot of nested triggers/conditions.
Also, some of the stuff you want to implement that is currently not possible can be made possible by making changes to the engine. So if you'd like to see this happen, feel free to post a feature request here: https://github.com/triplea-game/triplea/issues
(click on "New Issue" and select the top option "Feature Request")