Give all farmer stuff to workers, remove farmer. (custom kingdom)

As the title describes,

for my nordlingmod i’d like to:
turn my workers into peasants.
so in addition to what they normally do, they get all the farmers stuff, levels and abillities on to them.
beyond that, remove the farmer as a seperate thing.

last time i tried this, everything exploded so i had to revert my attempt and start from scratch.
anyone have any experience with this and specific advice like “pay close attention to this and that?”
(beyond damnit wouter stop making stupid typo’s :stuck_out_tongue: )