Putting Rest() in a creature's script refreshes its spells.
That's news to me.
I'm thinking how to use that for my ally control mod. Here is an idea: whenever the party rests, its allies on the current map rest too. This should make use of the PartyRested() trigger, but where to put it? In baldur.bcs? I've never edited that one yet. I suppose there are two ways to do this: something overarching that always applies, like baldur.bcs, which would then pass the Rest() command to creatures of the GOODBUTBLUE allegiance... a few uncertainties about this one... or an Everyone-targeted spell (again from baldur.bcs, I suppose) with some filters that spawns an invisible for every ally, and the invisible then does an ActionOverride(Nearest,Rest()) on a custom spell state. I've used this method before, but never on such a potentially wide scale.
The Siege of Dragonspear has crowds of allies in some places, from what I've read, so a spell may challenge the performance something fierce. Both ways seem possible, but a script action is more promising... Any ideas? I would just try an ActionOverride to everybody of the right allegiance, but allegiance isn't a parameter for [ANYONE]. But PC is, yes?
Hmm. The second-simplest way I can think of is putting this in baldur.bcs:
But how to exclude the party? Allegiance is not a creature's property that's tracked, but whether it's a PC or an NPC is, yes? Instead of Protagonist I can put an any-not-PC filter and then just command the creatures directly without bothering with shouts. It's all the same whether creatures on the map are allies or not, really. If the party has managed to rest, they can be assumed to have recuperated too.
I can use a suggestion how to pass that Rest() command directly to not-PC creatures, from better code writers than myself.
P.S. By the way, the description of PartyRested() on G3 says it works if the party has just finished resting. How recently does it have to be? Post-morning wood, pre-tooth brush?