Change Clerics Domains

I am building out a Deity system for my module and would like the choice of Deity to force or restrict the Domains the Cleric can have. I have a starting area and before you can leave it you have to choose a Deity and it’s set via scripting.

I see a GetDomain function but of course there is no corresponding SetDomain function. Is there anything short of LETO I can do that anyone is aware of to set or restrict domains?

You could restrict the deity selection depending on the choosen domains instead. Might leave lots of clerics with no deity to choose though. For multiclass clerics you could use the OnPlayerLevelUp to force the player to relevel if the choosen domains do not match the deity (or force them to select a new deity).

There’s an idea … can you force a re-level of your first level?

I am going to guess no but that would fix it. What I might need to do is post the domains that will restrict you. For example if you want the founder to be your god (he’s about construction, crafting and industry) then the plant and animal domains are out so if you select one of them you can’t pick him as your Deity.

Will have to think on that.