What do you know, creatures can rest too
chimeric
Member Posts: 1,163
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:
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?
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:
IF PartyRested() THEN RESPONSE #100 ActionOverride(Protagonist,GlobalShout(12)) END IF Heard([ANYONE],12) THEN RESPONSE #100 Rest() ENDBut 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?
0
Comments
Not sure if I understand correctly... You can specify [GOODBUTBLUE], or [PC], or [GOODCUTOFF] to match both players and their allies, etc. Whatever EA.IDS supports, really.
Death as a metaphor of sleep.
Edit: Okay, I tried it and it doesn't work without an added bit - ActionOverride to some creature who then does the killing... eh, the resting of allies. I put Protagonist in there, but it's not very attractive when he strains after he is passed the order. This kind of straining after every camp... not aesthetically pleasing. In addition, if an action has to be sent through a creature, if the engine can't order actions directly, doesn't that mean I would have to use an actor to cast that Everyone-targeted spell as you suggested, Ardanis? Who is going to do Cast()?
Are there ways around this? If I absolutely must do either the spell or the script action through ActionOverride, then at least I don't want to see my characters convulse in such an unappealing manner. Things need to happen behind the scene as much as possible. What about objects like MostPowerfulOf? Do you know how they are used? If I spawn an invisible with 50 levels in a class and make him issue the call to bed...
I'd try to ApplySpellRES("xxxx",Player1) instead of Rest(), xxxx targeting good but blues with opcode 318.
ActionOverride(WeakestOf([ANYONE]),Kill([GOODBUTBLUE])
There is always a weakest on a map, and hopefully it's not one of the PCs, so this should mostly do away with the straining, especially as the party levels up. If there is no one left but the PCs, then the weakest PC will do it. If there is only the Protagonist remaining, then he's the weakest of all. A kind of reversed Highlander, if you will.
This command works out of baldur, so I feel that I'm on the right path. The difference between Kill() and Rest(), though, is that Rest() doesn't accept objects, so it has to be passed on to GOODBUTBLUE creatures, and then they'll rest themselves. And strain before they do... Anyway, it's impossible to put one ActionOverride inside of another, so this weakest dude, wherever he is on the map exactly... This weakest guy or gal, I say, I may just use to issue a Global Shout, and then those who hear it... The rest is yet foggy. If you have suggestions about doing it from the script, I'm all ears.
It's awfully late here. Tomorrow. Stay tuned for more mad science from Chimeric, everyone! Or is this art? Something in between, I guess.
Perhaps my best option is a combination of Weakest and your resting spell. A tasloi somewhere doing a quick cast, yes, that may be inconspicuous enough.
Anyway, what I have right now, after your suggestion, is this: Seems to work. And thanks for ApplySpellRES, I've used ReallyForceSpellRES everywhere so far. They work the same way, yes, except the Apply doesn't wave hands? That's very good for making things look more natural.
Contrary to what one might expect, no.
Sort of. It's like ReallyForceSpell() done by the "game" rather than particular creature.