Hi Patrik,
There is much talk in Ukelele’s manual about dead keys, but that is not going to work so well for your project, I feel.
I think the more natural approach is to type first the base letter (for the vowel) and then the tone mark to be added to that base letter.
This works in most applications, but it’s good to check if it does in the one you’ll be using.
The important point for you here is that Unicode contains two variants of most diacritics: one spacing, working just like other characters, the other "combining".
If you assign your four combining diacritics to some easy-to-reach keys, typing with your custom layout will become quite comfortable.
In the applications where this works, the position of the tone marks is automatically adjusted to the letter before: wide or narrow, capital or low-case, and you can even "stack" diacritics.
On the following line, I’ve typed the same diacritic after each letter:
ìàÀå̀Å̀ầ
Assigning them to a key in Ukelele can be done by entering their Unicode number. See the manual, point 3.1.3.
Or you can type their characters with the built-in keyboard layout called "Unicode Hex Input". That's how I entered them here:
U+0300 ̀
U+0302 ̂
U+0301 ́
U+030C ̌