Advanced AI Uploaded to FTP
Posted: Sat Apr 16, 2011 8:31 pm
I have uploaded the advanced AI to the ftp builders share folder.
Please follow these instructions carefully to install it in your module.
1)import "sand_advanced_ai" to your module.
2)To install the AI on a creature you have two options. I have included two template onspawn files. acf_cre_os_advai_template and acf_cre_os_advai_norandom. It is recommended you use one of these files. DO NOT modify acf_cre_os_advai_template, duplicate it to create custom on_spawn files for your creatures. There are lots of option in this file for generating random appearance and equipment for your NPC, the file is fully commented and should be simple enough to set up. If you use the "norandom" option there is no need to duplicate, simply put this script in the creatures on_spawn event.
3)If you wish to also use the looting system, open acf_cre_ondeath and change the line #include "acr_creature_i" to read #include "acr_creature_i_advanced"
. Your creature will now leave a corpse and a lootable object that can be interacted with totake items from the corpse. - THIS IS NOT YET FULLY TESTED. DO NOT USE ON A LIVE ALFA MOD YET.
4)Re-Compile all scripts in module
The AI is now installed, but please keep reading.
You do not need to set any spawn in switches on your NPCs. The system will allocate switches based on a large number of factors; equipment, allignment, intelligence, specific spells, etc.
If you need to force the NPC to use spells more or less often you can safely set X2_L_BEH_MAGIC to a value between 0 and 100. This is a percentage that the AI uses to determine if casting or using an ability is an option each turn. Note setting this to 100 does not mean the NPC will use a spell each round, only that using a spell will be an option each round.
You can also safely set the following options without interfering with the AI.
X2_L_SPAWN_USE_AMBIENT_IMMOBILE = 1 -or- X2_L_SPAWN_USE_AMBIENT = 1
to make the NPC use ambient animations.
NOTES FOR DMS
You will notice your creatures are much more effective now. You may need to re-asses their CR values. Of particular note is behaviour of groups, Large numbers of low CR creatures will now be more effective than they were previously. If you are a DM then I strongly suggest you experiment with the new AI in an OOC area to get a feel for how creatures behave.
Spellcasters and creatures with special abilites especially will be much more lethal.
Do not try to intefere with creatures once a fight has begun, you will only break the AI routines if you give movement or attack commands to the NPCs. This is because they are always "talking" to each other to co-ordinate actions. If you give a command for an archer to target something other than the target it has chosen then it will just revert to its chosen target in the next round and all other creatures involved will behave and plan as if it had been attacking that creature all the time. It is esspecially important you don't interfere with spellcasters. As a rule, once its spawned, leave it alone!
Please follow these instructions carefully to install it in your module.
1)import "sand_advanced_ai" to your module.
2)To install the AI on a creature you have two options. I have included two template onspawn files. acf_cre_os_advai_template and acf_cre_os_advai_norandom. It is recommended you use one of these files. DO NOT modify acf_cre_os_advai_template, duplicate it to create custom on_spawn files for your creatures. There are lots of option in this file for generating random appearance and equipment for your NPC, the file is fully commented and should be simple enough to set up. If you use the "norandom" option there is no need to duplicate, simply put this script in the creatures on_spawn event.
3)If you wish to also use the looting system, open acf_cre_ondeath and change the line #include "acr_creature_i" to read #include "acr_creature_i_advanced"
. Your creature will now leave a corpse and a lootable object that can be interacted with totake items from the corpse. - THIS IS NOT YET FULLY TESTED. DO NOT USE ON A LIVE ALFA MOD YET.
4)Re-Compile all scripts in module
The AI is now installed, but please keep reading.
You do not need to set any spawn in switches on your NPCs. The system will allocate switches based on a large number of factors; equipment, allignment, intelligence, specific spells, etc.
If you need to force the NPC to use spells more or less often you can safely set X2_L_BEH_MAGIC to a value between 0 and 100. This is a percentage that the AI uses to determine if casting or using an ability is an option each turn. Note setting this to 100 does not mean the NPC will use a spell each round, only that using a spell will be an option each round.
You can also safely set the following options without interfering with the AI.
X2_L_SPAWN_USE_AMBIENT_IMMOBILE = 1 -or- X2_L_SPAWN_USE_AMBIENT = 1
to make the NPC use ambient animations.
NOTES FOR DMS
You will notice your creatures are much more effective now. You may need to re-asses their CR values. Of particular note is behaviour of groups, Large numbers of low CR creatures will now be more effective than they were previously. If you are a DM then I strongly suggest you experiment with the new AI in an OOC area to get a feel for how creatures behave.
Spellcasters and creatures with special abilites especially will be much more lethal.
Do not try to intefere with creatures once a fight has begun, you will only break the AI routines if you give movement or attack commands to the NPCs. This is because they are always "talking" to each other to co-ordinate actions. If you give a command for an archer to target something other than the target it has chosen then it will just revert to its chosen target in the next round and all other creatures involved will behave and plan as if it had been attacking that creature all the time. It is esspecially important you don't interfere with spellcasters. As a rule, once its spawned, leave it alone!