This is fairly bare-bones, since I made it rather quickly, but it should work.
This goes in your creature_standard file in the raw/objects folder:
[CREATURE:NECROMANCER]
[COPY_TAGS_FROM:HUMAN]
[GO_TO_END]
[CAN_DO_INTERACTION:ANIMATE]
[CDI:ADV_NAME:Animate Dead]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:15]
[CDI:MAX_TARGET_NUMBER:C:2]
[CDI:WAIT_PERIOD:30]
[CAN_DO_INTERACTION:MUERTA]
[CDI:ADV_NAME:Undead Self]
This goes in your entity file:
[ENTITY:ADVENTURER]
[INDIV_CONTROLLABLE]
[CREATURE:NECROMANCER]
And finally, this goes in your interaction file:
[INTERACTION:ANIMATE]
[I_TARGET:A:CORPSE]
[IT_LOCATION:CONTEXT_ITEM]
[IT_AFFECTED_CLASS:GENERAL_POISON]
[IT_REQUIRES:FIT_FOR_ANIMATION]
[IT_FORBIDDEN:NOT_LIVING]
[IT_MANUAL_INPUT:corpses]
[I_EFFECT:ANIMATE]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Animated corpse]
[SYNDROME]
[SYN_CLASS:UNDEAD]
[CE_FLASH_TILE:TILE:165:3:0:0:FREQUENCY:2000:1000:START:0]
[CE_MATERIAL_FORCE_MULTIPLIER:MAT_MULT:INORGANIC:SILVER:2:1:START:0]
[CE_SPEED_CHANGE:SPEED_PERC:50:START:0]
[CE_ADD_TAG:OPPOSED_TO_LIFE:NO_AGING:NOT_LIVING:EXTRAVISION:NOEXERT:NOPAIN:NOBREATHE:NOSTUN:NONAUSEA:NO_DIZZINESS:NO_FEVERS:NOEMOTION:PARALYZEIMMUNE:NOFEAR:NO_EAT:NO_DRINK:NO_SLEEP:NO_PHYS_ATT_GAIN:NO_PHYS_ATT_RUST:NOTHOUGHT:NO_THOUGHT_CENTER_FOR_MOVEMENT:NO_CONNECTIONS_FOR_MOVEMENT:START:0]
[CE_REMOVE_TAG:HAS_BLOOD:TRANCES:LIKES_FIGHTING:MISCHIEVOUS:START:0]
These zombies are a fair bit weaker than normal ones, however. This is a custom interaction I've made for my own use. These guys will be weak to silver, and move half as fast as their living counterparts. They still have a lot going for them though.
Oh, and take this interaction as well:
[INTERACTION:MUERTA]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:MUERTA]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_CLASS:MUERTA]
[CE_REMOVE_TAG:MORTAL:START:0]
[CE_ADD_TAG:NO_AGING:START:0]
Use it on yourself. It should prevent undead from attacking you, by making you stop aging and no longer considered mortal. Undead tend to oppose life.
If you have any issues, let me know.