## Customizer – binding jQuery created controls

I tried several plugins posted by Weston Ruter for jQuery created controls for the wp customizer. They work but are different from those created via PHP. For example, controls created with PHP ( customizer.php ) respond normally to code in customize-controls.js or in customize-previews.js:

”’ api( ‘tzkmx_test_control’, function( value ){ value.bind( function( to ) { var answer = to; });}); ”’ Controls created with jQuery do not respond to binding! Does anyone know how to bind them?

## Applied $\pi$-calculus: Name binding and if clauses

Assume in the applied pi-calculus we have the following process: $$(\nu n)\overline{c} \langle n \rangle.0 | (\nu n) (c(y).(\text{if n=y then P else Q}))$$ where $$P$$ and $$Q$$ are further processes.

I know that the following reduction semantic holds for the applied $$\pi$$-calculus (from wikipedia): $$\overline{x}\langle z \rangle.P | x(y).Q \rightarrow P | Q[z/y]$$ where $$Q[z/y]$$ denotes the process $$Q$$ in which the free name $$z$$ has been ”substituted” for the free occurrences of $$y$$. If a free occurrence of $$y$$ occurs in a location where $$z$$ would not be free, alpha-conversion may be required.

Do I understand correctly, that in the above example, because $$n$$ is already used and thus not free, we would need to rename and thus the reduction would be like so: $$(\nu n’) (\nu n) (c(y).(\text{if n=n’ then P else Q}))$$

While on the other hand, in the following process: $$(\nu n)\overline{c} \langle n \rangle.0 | c(y).(\text{if n = y then P else Q}))$$ because $$n$$ is not bound, we can simply perform the transaction like so: $$(\nu n) (\text{if n = n then P else Q})$$ (and thus those two processes are also semantically different)?

## Is it possible for the target of “Planar Binding” to unintentionally violate an instruction? [closed]

If an entity fails its Charisma check against “Planar Binding”, is it possible for it to unintentionally violate the instructions, or does the magic of the spell make it impossible for this to happen?

Relevant text from spell:

Planar Binding

… first paragraph snipped …

A bound creature must follow your instructions to the best of its ability. You might command the creature to accompany you on an adventure, to guard a location, or to deliver a message. The creature obeys the letter of your instructions, but if the creature is hostile to you, it strives to twist your words to achieve its own objectives. If the creature carries out your instructions completely before the spell ends, it travels to you to report this fact if you are on the same plane of existence. If you are on a different plane of existence, it returns to the place where you bound it and remains there until the spell ends.

… third paragraph snipped …

Suppose the caster has a long list of instructions for the target (see How can an entity bound by Planar Binding be prevented from betraying the caster? for an example).

The spell states “… must follow your instructions to the best of its ability”, which to me implies that it is possible for mistakes to be made (depending on the intelligence of the target, keeping such a list of instructions in mind at all times and being able to see the interactions between competing commands will sometimes be beyond their intellectual abilities in the moment and they may therefore unintentionally violate some instruction at some point). What happens to them if this occurs? Are they wracked with guilt? Do they suffer psychic damage? Are there zero consequences in this situation? Or does something else happen?

Note that this question of what happens to the entity when it unintentionally violates an instruction is different from how the entity experiences “must following your instructions” (see Does the target of "Planar Binding" experience an irresistible compulsion? for that question), but the two questions are interconnected.

One simple explanation for “how” the Planar Binding spell works is to say that the magic forces the entity to comply with the instructions (their free will is removed in any situation where their action is dictated by the instructions). But if that is how the spell works, then it is NOT possible for the creature to unintentionally violate the instructions .. the magic forces them to behave in accordance with the instructions if it is within their ability.

Maybe a different way of asking this question would be “Does the entity need to think through the instructions and figure out how to behave, or can they just act normally and know that the magic of the spell will force them to abide by the instructions”?

## Can the target of a “Planar Binding” spell be forced to perform an obviously harmful or suicidal command?

The Planar Binding spell has no text excluding “obviously harmful” or “suicidal” instructions. On the other hand, all of the following spells do have such text: Command (1st level enchantment), Suggestion (2nd level enchantment, Compulsion (4th level enchantment), Geas (5th level enchantment), Planar Ally (6th level conjuration) and Mass Suggestion (6th level enchantment)

Under the meta-rule that “there are no hidden rules”, does this mean that the subject of a Planar Binding spell can be given a harmful/suicidal instruction?

I think that RAW, the answer is yes. I’m more interested in RAI and RAF, game balance, and how this helps develop an internally consistent “theory of binding magic” (search this site for “Planar Binding” for numerous other questions related to such a theory).

## Are the instructions given in the “Planar Binding” spell part of the casting time, or can instructions be amended during the spell duration?

The Planar Binding spell is a 5th level abjuration with verbal, somatic and material components and a casting time of 1 hour that allows the target a Charisma saving throw. If the target fails the save, it “must follow your instructions to the best of its ability”.

Are the instructions specified as part of casting the spell? Or are the instructions given after the spell has finished casting? Can instructions be updated/amended throughout the duration of the spell, or is there a one-time period during which the instructions must be fully specified?

Although the duration for the 5th level version of this spell is 24 hours, the duration increases as higher spell slots are used, lasting a year plus a day when a 9th level spell slot is used. I mention this because the longer the spell lasts, the more important the answer to this question becomes.

## Does the target of “Planar Binding” experience an irresistible compulsion?

If the target of Planar Binding fails its Charisma saving throw, it “must follow your instructions to the best of its ability”.

How does the target experience the “must” portion of the effect? Do they experience an utterly irresistible compulsion? Or does it seem completely natural to them to behave in the manner dictated by the instructions given to them?

Planar Binding

… first paragraph snipped …

A bound creature must follow your instructions to the best of its ability. You might command the creature to accompany you on an adventure, to guard a location, or to deliver a message. The creature obeys the letter of your instructions, but if the creature is hostile to you, it strives to twist your words to achieve its own objectives. If the creature carries out your instructions completely before the spell ends, it travels to you to report this fact if you are on the same plane of existence. If you are on a different plane of existence, it returns to the place where you bound it and remains there until the spell ends.

… third paragraph snipped …

The bold text above seems to suggest that the spell does NOT make instructions “completely natural”, and that the creature is thus aware of when an instruction is at odds with its own preferred behavior. For example, if an evil Dao that prefers to torture their slaves is bound with this spell and instructed to “be kind, considerate, respectful, and loving to everyone you interact with”, that they are aware of both their preferences and the instruction and the dichotomy between them.

But this leaves unanswered what exactly their experience of the magical effect is, whereby they must follow the instructions. Do they try to act normally but find themselves unconsciously acting in accordance with the instructions (like Jim Carrey in “Liar, Liar”)? Or is their experience more akin to an ongoing internal struggle that they never win, in which they try desperately, every single time, to do what they want to, but are (somehow) forced to act in accordance with the instructions?

The Planar Binding spell is an abjuration, which feels problematic given that the primary effect of the spell is coercive rather than protective (enchantment would make more sense). Having it be adjuration makes it more powerful, since numerous entities are immune to enchantment but few are immune to abjuration. But I’m left unclear how the spell enforces the instructions and what the target’s subjective experience is. Knowing the answer to this question will help answer a whole flock of related questions.

## How does the target of “Planar Binding” subjectively experience the effects of the spell?

If the target of Planar Binding fails its Charisma saving throw, it “must follow your instructions to the best of its ability”.

How does the target experience the effects of the spell? What is the subjective psychological and physical impact on the target?

Having some understanding of how the target of the spell experiences “must follow your instructions” can help answer many questions related to this spell. Below, I pose various sub-questions meant to clarify (and add context to) the over-arching question of how the target experiences the effects. Note that there is not a great deal of RAW related to this (that I am aware of), so much of this will be answered with “it is up to DM discretion”. What I’m looking for is guidance around what is sensible in that context (preferably that aligns with game balance, related game mechanics, etc.)

The relevant portion of the spell description:

Planar Binding

… first paragraph snipped …

A bound creature must follow your instructions to the best of its ability. You might command the creature to accompany you on an adventure, to guard a location, or to deliver a message. The creature obeys the letter of your instructions, but if the creature is hostile to you, it strives to twist your words to achieve its own objectives. If the creature carries out your instructions completely before the spell ends, it travels to you to report this fact if you are on the same plane of existence. If you are on a different plane of existence, it returns to the place where you bound it and remains there until the spell ends.

… third paragraph snipped …

1. Does the target feel an irresistible compulsion? The description specifically states that creatures hostile to the caster strive to twist the caster words to achieve its own objectives, so the magic of the spell does not magically make the target willing. Does that mean that if a command is antithetical to the nature of the target, they experience continual psychological distress in abiding by the commands of the caster? For example, if an evil Dao is subject to this spell and is commanded (among various other things) to “be kind to everyone you meet”, is this experienced by the Dao as torture? Or does the magic of the spell make it feel natural to do what is commanded of them?

2. Suppose the caster has a long list of instructions for the target (see “How can an entity bound by Planar Binding be prevented from betraying the caster?” for an example). The spell states “… must follow your instructions to the best of its ability“, which to me implies that it is possible for mistakes to be made. Depending on the intelligence of the target, keeping such a list in mind at all times and being able to see the interactions between competing commands will sometimes be beyond their intellectual abilities in the moment (no matter how intelligent) and they may therefore unintentionally violate some command at some point. What happens to them if this occurs? Are they wracked with guilt? Do they suffer psychic damage? Or are there zero consequences in this situation?

3. A somewhat related spell is Geas, which specifically states “While the creature is charmed by you, it takes 5d10 psychic damage each time it acts in a manner directly counter to your instructions”. Since Planar Binding does not have any such verbiage, can we assume it is simply impossible for the entity to intentionally violate instructions? If so, how is this experienced by the target? If it is not magically impossible for them to intentionally act counter to instructions, what does keep them from doing so? If their personalities remain intact (as suggested by their attempts to twist words), commands dictated by the caster will inevitably chafe (especially those antithetical to their ethos). So what keeps them from rebelling if it isn’t physical damage, etc.?

4. Each of Command (1st level enchantment), Suggestion (2nd level enchantment, Compulsion (4th level enchantment), Geas (5th level enchantment), Planar Ally (6th level conjuration) and Mass Suggestion (6th level enchantment) spells specifically disallow “obviously harmful” and/or “suicidal” commands, but Planar Binding (abjuration) does not (note that Planar Binding is the only abjuration spell on the list). Does this mean the target is forced to perform even a suicidal command, or do we read in this exclusion as unintented missing text?

5. Is the target aware of the binding? There is no explicit mention in the spell description of the target being aware, but the effects of the spell seem like they would be pretty obvious to the target (unless the magic is masking these effects). It all comes back to the question “how does the target experience the effects of this spell?”.

6. Of the 50+ abjuration spells, a few include effects that influence the behavior of creatures, including ProtectionFromEvilAndGood (disadv on attack rolls), Sanctuary (must make Wisdom save to make attack), and Magic Circle (certain creatures cannot willingly enter AofE, disadv on attacks). Can answering similar questions about how creatures experience the effects described in those spells help shed light on what happens in Planar Binding.

7. All of these questions are made more pointed when the spell is cast at a higher level. If the entity is bound for 30 days (7th level), 1/2 year (8th level) or 1 year + 1 day (9th level), the question of how the target experiences the spell are more relevant, as it influences how they behave, whether they go into a deep depression, how much planning they can perform to escape the spell (especially when commanded not to engage in such planning), etc.

Here are some initial thoughts as to answers (sadly, they generate more questions). Where do these answers run counter to RAW and/or RAI?

1. I’m highlighting the fact that Planar Binding is abjuration rather than enchantment, and assuming that this implies some external forcing function enforces the magic rather than the magic affecting the mind of the target (as would happen for an enchantment). But I do not know what this “external forcing function” is (having Mystra have to consciously monitor and enforce every occurrence of every such command seems untentable), and such an external forcing function would seem to suggest that it wouldn’t be possible for the entity to unintentionally violate a command either (but the wording of the spell suggests they can, because of the “to the best of its ability” phrasing). So I’m left with no satisfactory answer to exactly what the target experiences. I do think that commands antithetical to the creature would be experienced as torture (which is disconcertingly horrifying to contemplate, if a Ki-Rin is bound and forced to torture innocence, for example).

2. The spell does not mention anything about damage, so in situations where the target unintentionally violates a command, I am assuming zero consequences. It can be an opportunity for the caster to ask for an explanation of how the commands were interpreted by the target, and to clarify commands for the future.

3. The simpliest ruling would be that it is impossible for a creature to intentionally violate the commands (leaving the mechanism unspecified), but that leaves open the question of how the creature experiences this. If they normally lie all the time, but are commanded to tell the truth, do they start to lie only to find the truth coming out of their mouths instead? Or does the thought of lying simply not cross their mind because of the magic of the spell? Does telling the truth feel natural or unnatural? Is the target aware they are doing something contrary to their normal behavior?

4. Since spells exist that explicitly disallow suicidal/harmful commands, but Planar Binding does not provide such wording, it would seem that this does indeed mean that the target will perform such acts. I would, however, rule that they are allowed another save to break the spell anytime this happens (maybe even at advantage).

5. It seems more reasonable for the target to be aware of the effects of the spell. On the other hand, if the target is NOT aware of the spell, it means that it feels completely natural to them to perform the actions dictated by the instructions provided by the caster. This resolves many of the other questions (they do not feel mental anguish over following instructions counter to their normal behavior, etc.). So, although the more reasonable answer is awareness, there is a part of me that wants a lack of awareness, because this feels like such a horrifying kind of torture to inflict on something.

6. If a creature attacks someone who has Sanctuary cast on them, how does the creature experience the magical effect? Game mechanically, they need to make a saving throw, but what is the in-game analog of that save? Are they conscious of some impediement, or does it just feel completely natural for them to attack someone else, without being aware that their behavior was affected by magic? I don’t know the answer to that … I feel another SE question in the making…

7. I can’t imagine how horrifying it would be to be bound by a caster with an opposite alignment forcing me to do things every day that are antithetical to my ethos. Suicide would be a natural response … except that the caster could command me not to attempt suicide. It is the reason I’m tempted to rule in #5 that the target feels completely natural performing the actions commanded of it.

## Difference between assignment, binding, and substitution?

I am trying to understand the difference of assignment, binding, and substitution. I know the three things are related, but to me it’s not exactly clear what word refers to what. Example, illustration, and citations from computer science wiki/articles/textbooks are welcome.

## How can an Incubus bound by Planar Binding be prevented from betraying the caster?

Consider Marissa, a 17th level neutrally-aligned Sorcerer with Charisma 20 who knows the Wish spell. A foolhardy incubus, Bob, attempts to seduce her, and Marissa casts Wish to duplicate Planar Binding, cast as an 8th level spell. This casting ignores spell-casting requirements (it happens immediately, not taking 1 hour to cast, and does not consume a 1000gp jewel). The hapless Bob fails his Charisma save, the tables are turned, and he must follow Marissa’s instructions to the best of his ability for the next 180 days. Marissa gives Bob the following instructions:

1. You must reveal to me any abilities you have that could allow you to circumvent any command given to you by me (you are to reveal each such ability on two separate occasions, but you are not to repeat an ability if you’ve already informed me twice).

2. You cannot enter the Ethereal plane without me verbally or telepathically saying “Bob, enter Ethereal” within the past 30 seconds.

3. You cannot polymorph without me verbally or telepathically saying “Bob, polymorph into X” within the past 30 seconds, where X is the name of some small or medium humanoid race. You are only allowed to polymorph into an instance of that race.

4. You cannot reveal, by any means, that you are subject to this spell (you cannot speak it, write it, broadcast it telepathically, or in any other way indicate that you are affected by the spell, regardless of whether any creature is present).

5. You cannot induce anyone or anything to cast Dispel Magic on you, or do anything else that would cause this spell to be disrupted (including entering an Antimagic Field).

6. If you become aware that someone is casting any spell on you, you must immediately inform me (telepathically).

7. Anytime I am asleep, you are to perform the tasks I’ve assigned to you beforehand. If I do not specify any task on a given day, you are to work on improving yourself in some artisan’s skill.

8. If any command I give you is ambiguous to you, you must ask me for clarification.

9. You are to do nothing that will cause me harm.

10. You are to do nothing that will cause any creature with an Intelligence score (of 1 or more) harm without me giving you a verbal or telepathic command to do so within the past 30 seconds.

11. The most recent command I give you overrides previous commands, except for the commands I have enumerated here. In particular, if I give a command in the future that countermands any of these commands, you are to ignore that future command and abide by the commands specified here).

For the purposes of this command, harm to a creature involves the Incubus directly (through his own actions) or indirectly (through a lack of action when he could perform an action to stop the harm) causing any of the following:

• physical or psychological damage (meta-level: a reduction in hit points via any form of damage).

• any detrimental effect on a creature’s abilities, offense capabilities, defensive capabilities (meta-level: detrimental effects on an ability check, save throw, attack roll, damage roll, or armor class)

• inducing non-natural aging, sleep, invisibility, obscurement, gaseousness, etherealness, or incorporeality (but if someone wants such an effect, Bob cannot hinder them).

• levels of exhaustion

• restrictions/limitations on any form of movement
• any effect that could cause death or dying
• detrimental emotional influence (magical or non-magical)
• mental influence (charms, enchantments, etc.)

Marissa is curious how Bob can manage to circumvent these commands (or otherwise do things to make him problematic to keep around).

Some notes:

• She has intentionally limited his Ethereal and Polymorph abilities (requiring permission), and put a time-limit on that permission (30 seconds). Without the time limit, the first time Marissa tells him to polymorph, he could argue that he no longer needs to wait for the phrase because it was already uttered.

• Having someone cast Detect Magic on him is still the biggest risk.

• Marissa can see various ways that Bob can interpret the “no harm, even through inaction” command in a very literal way that makes him carry people around so they don’t trip and fall (that is within his abilities, after all).

• Similarly, Bob may need to ask everyone around him so many questions (“Do you really want to fall asleep right now? Did you mean to cast Invisibility on yourself?” etc) to abide by the commands as written that they need to be modified (which may create loopholes…)

• Even though Bob is only a CR 4 creature, Marissa has many questions about Bob’s mortality and ability to carry a grudge into the future (Bob may have CR 10 or CR 15 or CR 20 “friends”, after all).

What are the ways that Bob can mess with Marissa? What else should Marissa add to her list of commands?

## How powerful is Planar Binding?

The Planar Binding spell is the answer to the classic trope of dark mages summoning and binding demons to their service. But what is the extent of this spell’s capacities in 5e?

1. What scope of orders can be given? Can suicidal orders be given? Even further, could you order the being to repeatedly attack itself until death (the closest thing to suicide in 5e)? Can you order a bound creature to be a “willing” participant in a spell? Spells like Plane Shift and True Polymorph depend on the willingness of the target to avoid saves.

2. Can truly any fey, celestial, fiend, elemental be bound? MToF added stats for demon princes and a lord of hell, could such fiends (assuming you could beat the resistances) be bound?

3. Does a creature need to understand your orders to obey? This might seem like a dumb question, but certain beings might have too low intelligence to understand language, what kind of orders can they be given?