Visual effects in NWN are server side. If you apply an effect to an object, every player will see it. There is no possibility to "hide" it from a specific observer.
Better said, their
appliance is server side (the server commands, the clients obey). But their visual representation is client side (each client loads in memory
its own local copy of an effect).
So...
There might be a workaround.
But it is a nontrivial amount of work. And it is UNTESTED, as this is just an idea off the top of my head as we speak. And if the game makes some kind of CRC check on game resources it might not work.
On the assumption that it could work...
... the idea would be that of making a visual effect resource available only to a specific player, and to none other. The selected player would receive a genuine sample of the visual effect resource, while the others would receive a dummy that could produce no screen output.
Say, for example, that you prepare one such effect, and that you call it MyFireA.
You have, say, 4 players: A, B, C and D. Each player will receive an Hak pak you prepared for play on your server.
These 4 Hak paks will differ, physically. Say that effect MyFireA is only supposed to be visible for player A. The Hak pak given to player A would contain a genuine MyFireA, while the Hak paks given to players B, C and D would contain a dummy version of MyFireA.
When -during play- you wanted to apply a fire effect to be visible only for player A, you would apply MyFireA to player A. Every player (A, B, C and D) would, technically speaking, "see" it, but only player A would truly get something going on his screen. Players B, C an D would not notice a thing because their own local copy of MyFireA, though ongoing, is essentially a void.
Similarly you would prepare 3 more versions of the same fire effect, but these you would call MyFireB, MyFireC and MyFireD. And like you did for MyFireA, you would place a genuine copy of each such effect in 1 Hak pak only, while the other 3 Haks would receive a dummy effect.
And that is how your scripts could apply an effect that is only visible for a specific player (or players).
To put it all together, say that you wanted -at some point in the game- to apply a fire effect on Player D. But this fire has to be seen only by players A, B and C. Player D must see nothing.
You would apply MyFireA to player D. Only player A would see it.
Also, you would apply MyFireB to player D. Only player B would see it.
Also, you would apply MyFireC to player D. Only player C would see it.
The end result would be that player D would have 3 fire effects active on him (as far as the game is concerned), but he could see none of them. Player A would be seeing MyFireA on his screen, player B would see MyFireB, player C would see MyFireC. And since all these fire effects are the same in appearance, the trick of an effect that is only visible to specific player(s) is achieved.
You can choose whether to go for effects that are "visible to one player only" (as described above) or effects that are "visible to all players but one". Suit yourself, the amount of visual effects to prepare in the Hak paks is the same.
But the former method allows you to choose which players are _not_ meant to see a given effect. The latter method, instead, only allows you to apply fewer effects during play. I would pick the former, for finer control over the mechanism.
Hm. My english is long winded. I hope you were not lost in my explanations.
Hopefully someone else can understand this and come up with a more concise version.
-fox
[edited to improve explanation -fox]
Modifié par the.gray.fox, 03 octobre 2012 - 12:38 .