Some elaboration
1. 1. Create a visual effect around a player’s
portrait when their health is low. For example, once a player reaches 20% of
their HP, their portrait turns red.
1. Possible, player health model iirc
2. 2. Display an enemy’s health bar above their head
during battle.
2. Possible probably only through lots of custom models and scripting with getcurrenthp and a fake hp bar
3. 3. Create a “halo†or other visual indicator around
the target of an enemy during battle.
3. Possible, theres models for targeted enemies
The problem here, is that in nwn, npc's dont exactly target players and then direct all actions at that target. Sure.. Players can be the target of events, of actions and spells etc, but they are not designated as being the Active target, they are just used as the target for the current action. The Next action that is carried out, could be done on a different target. As such, I dont think you can accurately get the target that the creature is currently trying to attack or target.
GetAttemptedAttackTarget
Determines the last creature that an attempted attack was made on.
The last creature, may not necessarilly be the current creature - depending on how you are calling this script.
Eg - If you call this on a Heartbeat script, then there is 6-7 seconds between each heartbeat, and this gives plenty of time for the target to have changed.
If you are dead set on having a halo - there are halo visual effects in CEP2.3/4
Open up your CEP2.3 / CEP2.4 top hak, and extract the visualeffects.2da - there are halos further down in the list. Apply them to whatever creature you need, in the appropriate event.
4. 4. Provide some visual indicator to others about
the spell that a player is casting.
4. Possible, modify casting animation
You can also investigate using nwnx_funcs : It grants the ability to fire visual effects for one player, but not for others.
Using this, you could have a mage preparing to cast a spell, and then his opponents (if they are mages) could see a visual cue, that everyone else cannot see. I use this in my server in a customized detect mode, it makes sparkly visual effects appear around points of interest, but other players cannot see it.
5. 5. Alter the “Respawn†screen such that a player can’t respawn
immediately, but rather must wait a set period of time before respawning.
5. Possible, OnRespawn event
Some servers do this, to force people to respawn, but you kinda want the inverse of it.
The onDeath event of your server, is what brings up the death panel I believe.
You can customize it, to bring it up, on a delay of X seconds.
You can also customize the respawn script, so that if you attempt to click the respawn button before the delay has expired, then it wont function, and the panel stays in place.
If you want customized graphics and buttons for the respawn menu, you would need to modify other files, beyond scripts, including but not limited to tlk file modifications etc.