← PRC8
Heroes Of Profound Enlightenment :: Manual :: Module Building :: PRC NPCs
This is a brief guide to getting NPCs to begin to work with the new PRC classes.
The PRC has added some scripts you need to hook into NPC scripts in order to have the
PRC passive abilities work. Simply add ExecuteScript("NAME_OF_SCRIPT", OBJECT_SELF);
somewhere in the AI script for each event, just below void main() { is probably a good
place. Most of these scripts do not do anything at the moment, but they might do more in
future versions for example, if things need to be triggered from these events.
This will only allow the passive abilities, such as skill bonuses, to work. The AI will probably not actively use any of the PRC content (such as the new Power Attack).
There is one exception, the PRC NPC scripts do contain a basic wrapper AI for using the new epic spells. If you want epic spellcasters to have specific epic spells, assign them directly. Otherwise epic spellcasters will have a random selection of epic spells. Also, since some epic spells use up XP when cast, you can give NPCs virtual XP by setting a local int called "NPC_XP" on them. This is treated the same as a PCs XP score, so it cannot go lower than the minimum for their level. If the local int is not set, NPCs will be randomly given enough XP to be between 25% and 75% of the way to the next level.
Another thing to note when making PRC NPCs; the toolset will throw up errors whenever the LevelUp or Character Wizards are used with the certain classes. We are not sure why it does it, and it only does it with certain classes. The best way around the problem is to hand make all the NPCs, which is probably a good idea anyway since biowares feat assignments are not always that smart.
| OnBlocked | prc_npc_blocked |
| OnCombatRoundEnd | prc_npc_combat |
| OnConversation | prc_npc_conv |
| OnDamaged | prc_npc_damaged |
| OnDeath | prc_npc_death |
| OnDisturbed | prc_npc_disturb |
| OnHeartbeat | prc_npc_hb |
| OnPerception | prc_npc_percep |
| OnPhysicalAttacked | prc_npc_physatt |
| OnRested | prc_npc_rested |
| OnSpawn | prc_npc_spawn |
| OnSpellCastAt | prc_npc_spellat |
| OnUserdefined | prc_npc_userdef |
This will only allow the passive abilities, such as skill bonuses, to work. The AI will probably not actively use any of the PRC content (such as the new Power Attack).
There is one exception, the PRC NPC scripts do contain a basic wrapper AI for using the new epic spells. If you want epic spellcasters to have specific epic spells, assign them directly. Otherwise epic spellcasters will have a random selection of epic spells. Also, since some epic spells use up XP when cast, you can give NPCs virtual XP by setting a local int called "NPC_XP" on them. This is treated the same as a PCs XP score, so it cannot go lower than the minimum for their level. If the local int is not set, NPCs will be randomly given enough XP to be between 25% and 75% of the way to the next level.
Another thing to note when making PRC NPCs; the toolset will throw up errors whenever the LevelUp or Character Wizards are used with the certain classes. We are not sure why it does it, and it only does it with certain classes. The best way around the problem is to hand make all the NPCs, which is probably a good idea anyway since biowares feat assignments are not always that smart.