Installation is literally this for the health percentages:
1. Download file from vault
2. Open module in toolset
3. Import erf with the script
4. Copy/paste one line of code into the OnSpawn script
5. Copy/paste a six line block of code into the OnPerception script
Done!
-----------------------------------------------------------------------------
Vault Page: http://nwvault.ign.c....Detail&id=3879
Video below is slightly out of date - the general concept is the same but the script is called in the OnPerception instead of OnSpawn and the script shuts down if no PCs are in the creature's area. See change log for v1 to v2.
Video Demonstration:
------------------------------------------------------------------------------
UpdateHP is a system with two primary features - the ability to display the health percentage of creatures and to allow effective hit points far beyond what the toolset can provide by default (toolset limit is roughly 13,000 whereas this system can support a little over two billion if somehow needed) without actually appearing to do anything special. These two features are independent - you can use either or both of them as you desire. The system can also be used to defend against the default Devastating Critical - see "Immortality" under Miscellaneous Information (though using the entire script for just that purpose is somewhat overkill). The system is extremely easy to set up and configure in general, though if you use MassiveHP there are some special details you should know (regarding interaction with other scripts/effects, primarily healing and extreme burst damage).
In general, the system works by starting the script once the creature perceives an enemy or PC. It then checks the creature every second (the frequency can be adjusted as per your needs). If the creature's hit points have changed (taken damage or been healed) and the health percentage has changed, it updates the creature's health percentage. If MassiveHP is enabled and the creature's hit points have changed, it updates the creature's effective hit points. If hit points have not changed, it simply checks again in a second. The checking speeds up to every half second if the creature is using MassiveHP and is below 3000 raw hit points.
If there are no PCs in the with the creature, the script shuts down and starts back up once the creature perceives another enemy or PC. This prevents the script from using resources when it does not need to be running (it does not start until needed and stops when not needed).
If you use this system, I ask that you do not make major modifications to the script without asking me - I would prefer to be able to incorporate any significant improvements into the base system so everyone can take advantage of it (giving credit for the improvement, of course). This does not apply to the frequency at which the script runs, adjust that as you would like. There is also a function called "Special" which can be freely customized to suit your module if you need something special done every time the bulk of the script runs. And, of course, feel free to comment out either ShowHP or MassiveHP if you only care about one of the features. Thank you.
Have fun!
--------------------------------------------------------------------------
Version 4 is up. Needed to fix a potential bug introduced in v3 that ONLY occurs if you use the advanced option. Specifically, the advanced option would call the script on any creature in the area, even if the script was not meant to run on the creature. New version will only run on creatures who previously had the script running on them.
- Fixed bug in advanced option introduced in v3 that would call the script on any creature in the area, even those who weren't meant to have the script run on them (potentially henchmen, summons, etc). No impact if you weren't using the advanced option
Version 3 is up. Chunk of code provided to cover a fringe scenario. Extra work to install for little gain, but possible if you want to cover it (more details in ReadMe under "Advanced Option"):
- Chunk of code provided in script header to place in OnEnter script for areas to avoid having an incorrect health percentage for a few seconds if a player attacks a regenerating creature and retreats (leaving the area entirely) without killing it and returns before the monster despawns (player would see an incorrect health percent for a few seconds upon returning before the script started running again)
Version 2 is up. Takes one additional (simple) step to install with the following improvements:
- Called with OnPerception when an enemy or PC approaches to avoid using resources until needed
- Shuts down if all PCs leave the creature's area and starts back up when approached again
- Calls itself every second by default once triggered (compared to previous 0.5 seconds), speeding up to 0.5 seconds if the creature is using MassiveHP and below 3000 raw hit points
Modifié par MagicalMaster, 18 mars 2013 - 07:03 .





Retour en haut







