I'm playing Masterwork mod (version 1.30, for Dwarf Fortress version 43.05) and I wish to change my adventurer's deity to another civilization's. I don't want to generate the world again or recreate my adventurer from scratch, as I'm already highly invested in them as they are. My adventurer is an elf from a human civ and has a human deity, and I wish to change it to a specific deity from succubus civ, but there is no temple to that deity in the world (I checked in Legends Viewer) so it's impossible to go about it in a legitimate way by joining her religion. I know it's technically possible to create a fort and retire an adventurer from succubus civ there with that specific deity so I should be able to create a temple to her myself, but 1) it would take a long time I'm not really willing to spend on it and 2) I am not sure a player-created temple would allow my adventurer to join the religion anyway (if anyone made this way work let me know, please, it would be good to know!).
I want the deity-worshipper link to be set up correctly so it's potentially possible for the deity to be able to grant a secret to this character. I've looked around for some time but found no ready tool to do it. I would appreciate it if somebody pointed me in the right direction, or gave a few tips how to go about developing my own script. I'm familiar with programming but not with lua specifically. Do I understand correctly that a character's object of worship information is stored in the same way as marriage information and similar character relationships, so I could base it on a pre-existing marriage script by changing "spouse" to "deity" and probably tweaking a few other minor things? Would the link have to be added for both sides as it would have to be with marriage, or is it the deity-worshipper a one-way relationship link and it would suffice to add it from adventurer's side? All help is highly appreciated!