It's working fine! The only thing I noticed is that the immediate update changes the name in the left (personal) panel, but not in the slave list (until I change screens). I presume there's a "rebuild slave list" call or something that'd do that, just like your last line there.
I went ahead and updated the logic to include the effect on the slave:
func _on_namechangeconfirm_pressed():
get_node("namechange").visible = false
var text = "Yes, $master."
if person.obed >= 70: ## Highly obedient
if person.loyal >= 50:
text = "— Of course, $master. It's my pleasure to mold myself to your desire."
person.loyal += 10 ## They're pleased with the personal attention and "gift" of a new name
person.stress -= 5
else: ## They're not yet broken in, but have been forced to high obedience
text = "— Of course, $master. Your will is all that matters."
person.loyal += 5 ## They have mixed feelings about the personal attention
person.stress += 5
elif person.obed < 35: ## Not yet broken
if person.conf > 30:
text = "— You can't just take my name away!"
else:
text = "— Are you really going to take away even my name??"
person.stress += 15 ## Highly stressed at having their individuality taken from them
else: ## Moderate, compelled obedience
if person.conf > 60:
text = "— I guess I don't have much choice, do I?"
else:
text = "— Yes... $master."
person.stress += 5 ## Kinda used to it by this point, but it's still a negative
person.name = get_node("namechange/LineEdit").get_text()
get_tree().get_current_scene().close_dialogue()
get_tree().get_current_scene().popup(person.dictionary(text))
get_parent().slavetabopen() # Ankmairdor - add this to update GUI and show new name immediately
So basically, if you name them right away it helps to break them; if you've already done some work before naming them it's a little stressful; if you wait until they're well trained then it's still a little stressful but bonds them more to you; and if you hold off until you're sure of their loyalty then it's a wonderful gift.
I mean you could totally abuse the function to just repeatedly stress them out (or increase their loyalty a bunch), but I don't intend to use it that way and thus don't care to code around it.
P.S. Forgot to include support for Mute characters, but now have a similar section with reactions ranging from outrage to resignation to joy. There's so much that can be done with body language, even without access to words!