Ok, I have what I feel is a better mage, this is how it's done, properly...
Level up a Mage to say level 3, remove all his spells, then go to the level tab and without using the Level up Wizard, give the wizard as many levels as you want them to have as a caster, now go back to the Spells Tab and manually give them the spells you want them casting... (If you give a NPC or Monster too many feats, this will bug them bad..)
Next, set these Variables on the Monster / NPC to control how they act...
Variable = What it does.. (Variables are set as Integers not strings!)
X2_L_BEH_OFFENSE = Chance of Peforming an Offensive Action (0 (never) to 100 / 100 = all the time)
(This more or less controls how often they cast a defensive spell or summons or a Hostile Spell)
(40 would mean more defensive casting, where 70 would mean more offensive casting)
X2_SPELL_RANDOM = Set that they randomly pick spells (not in order) (Set to TRUE or 1)
(This can make them do bizzare actions, like cast a Horrid Wilting first followed by a buff spell)
(Which can be good for the PCs, giving them time to recover from pain..
'>)
X2_L_BEH_MAGIC = Determines what % you want them casting magic..
So if you set it to 80, then they will use spells 80% of the time, and attack too
100 = Use Spells ONLY!
This will produce a very highly desirable caster, now you can also give them Haste & Quicken Spell 1/2/3 to make them a super mage!
I'm going to be tweaking monsters over the next few months, comming up with better monsters, overall..
Here are all of the other options you have for ALL Monsters / NPCs...
Simply set the variable on the monster/npc (variables use Parentheses "" )
//------------------------------------------------------------------------------
// How to Modify C R E A T U R E S Combat AI
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// * see x2_ai_demo for details
//------------------------------------------------------------------------------
const string CREATURE_VAR_CUSTOM_AISCRIPT = "X2_SPECIAL_COMBAT_AI_SCRIPT";
//------------------------------------------------------------------------------
// * Setting this variable on a creature will make its use a
// * random name.
// * see nw_c2_default9 for details.
//------------------------------------------------------------------------------
const string CREATURE_VAR_RANDOMIZE_NAME = "X2_NAME_RANDOM";
//------------------------------------------------------------------------------
// * Setting this variable on a spellcaster creature will make its spelluse a
// * bit more random, but their spell selection may not always be appropriate
// * to the situation anymore.
//------------------------------------------------------------------------------
const string CREATURE_VAR_RANDOMIZE_SPELLUSE = "X2_SPELL_RANDOM";
//------------------------------------------------------------------------------
// * Set to 1 to make the creature activate stealth mode after spawn
//------------------------------------------------------------------------------
const string CREATURE_VAR_USE_SPAWN_STEALTH = "X2_L_SPAWN_USE_STEALTH";
//------------------------------------------------------------------------------
// * Set to 1 to make the creature activate detectmode after spawn
//------------------------------------------------------------------------------
const string CREATURE_VAR_USE_SPAWN_SEARCH = "X2_L_SPAWN_USE_SEARCH";
//------------------------------------------------------------------------------
// * Set to 1 to make the creature play mobile ambient animations after spawn
//------------------------------------------------------------------------------
const string CREATURE_VAR_USE_SPAWN_AMBIENT = "X2_L_SPAWN_USE_AMBIENT";
//------------------------------------------------------------------------------
// * Set to 1 to make the creature play immobile ambient animations after spawn
//------------------------------------------------------------------------------
const string CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE = "X2_L_SPAWN_USE_AMBIENT_IMMOBILE";
//------------------------------------------------------------------------------
// * Set to 1 to make the creature immune to dispel magic (used for statues)
//------------------------------------------------------------------------------
const string CREATURE_VAR_IMMUNE_TO_DISPEL = "X1_L_IMMUNE_TO_DISPEL";
//------------------------------------------------------------------------------
// * Set this variable to 1 on a creature to make it walk through other creatures
//------------------------------------------------------------------------------
const string CREATURE_VAR_IS_INCORPOREAL = "X2_L_IS_INCORPOREAL";
//------------------------------------------------------------------------------
// * Set this variable to 1 - 6 to override the number of attacks a creature has based on its BAB
//------------------------------------------------------------------------------
const string CREATURE_VAR_NUMBER_OF_ATTACKS = "X2_L_NUMBER_OF_ATTACKS";
//------------------------------------------------------------------------------
// * The value of this variable (int) is added to the chance that a creature
// * will use magic in combat. Set to 100 for always, 0 for never
//------------------------------------------------------------------------------
const string CREATURE_AI_MODIFIED_MAGIC_RATE = "X2_L_BEH_MAGIC";
//------------------------------------------------------------------------------
// * The higher value of this variable, the higher the chance that the creature
// * will use offensive abilities in combat. Set to 0 to make them flee.
//------------------------------------------------------------------------------
const string CREATURE_AI_MODIFIED_OFFENSE_RATE = "X2_L_BEH_OFFENSE";
//------------------------------------------------------------------------------
// * The higher value of this variable, the higher the chance that the creature
// * will aid friendly creatures in combat. Not that helping usually degrades
// * the overall difficulty of an encounter, but makes it more interesting.
//------------------------------------------------------------------------------
const string CREATURE_AI_MODIFIED_COMPASSION_RATE = "X2_L_BEH_COMPASSION";
//------------------------------------------------------------------------------
// * This allows you to script items that enhance a palemaster's summoned creatures. You need
// * to put the name of a script into this variable that will be run on any creature called by
// * the pale master's summon undead ability. You can use this script to add effects to the creature.
// * You can use the OnEquip/OnUnEquip event hooks set this variable.
//------------------------------------------------------------------------------
const string CREATURE_VAR_PALE_MASTER_SPECIAL_ITEM = "X2_S_PM_SPECIAL_ITEM";
This is a template for Custom AI...
You have to set the variable X2_SPECIAL_COMBAT_AI_SCRIPT on the NPC / Monster for this script.
//::///////////////////////////////////////////////
//:: Custom AI Demo Template
//:: x2_ai_demo
//:: Copyright © 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
This is a template for those who want to
override the standard combat AI NWN uses.
The code in this file effectivly replaces
the DetermineCombatRound() function in
nw_i0_generic.nss, which is the core of the
NWN combat AI.
To override the default AI with this or any
other AI script you created, you can either
call the SetCreatureOverrideAIScript from
x2_inc_switches
*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: 2003-08-21
//:://////////////////////////////////////////////
#include "nw_i0_generic"
#include "x2_inc_switches"
void main()
{
// The following two lines should not be touched
object oIntruder = GetCreatureOverrideAIScriptTarget();
ClearCreatureOverrideAIScriptTarget();
// ********************* Start of custom AI script ****************************
// Here you can write your own AI to run in place of DetermineCombatRound.
// The minimalistic approach would be something like
//
// TalentFlee(oTarget); // flee on any combat activity
// ********************* End of custom AI script ****************************
// This line *** has to be called here *** or the default AI will take over from
// this point and really bad things are going to happen
SetCreatureOverrideAIScriptFinished();
}
Modifié par Genisys, 23 août 2010 - 12:32 .