Aller au contenu

Photo

Designing a Blue?


  • Veuillez vous connecter pour répondre
15 réponses à ce sujet

#1
rjshae

rjshae
  • Members
  • 4 497 messages
How would you go about designing a Blue in NWN2?

I've got some goblinoid encounters for low level encounters and I thought I 'd throw in a couple of blues to flavor things up a bit more. Perhaps it could use a Sorcerer class (but limited to certain spells) with some special abilities for the unique stuff. Or maybe a Warlock? Is there a way to futz the Spellcraft skill so the PCs can't pick up on what's being cast?

Any ideas? :ph34r:

Modifié par rjshae, 12 juillet 2012 - 09:59 .


#2
Dann-J

Dann-J
  • Members
  • 3 161 messages
I'd probably keep it as a 'humanoid' class (like other goblins), and give it a bunch of special abilities:

- Mage Armor (inertial armor), 1 use should be enough.
- Dominate (psionic charm), lots of uses at a decent caster level.
- Orb of Sound (mind thrust), lots of uses at a caster level of 3 (actually does 1d4 damage per level, despite the spell description).

That'd be for a level 1 psionic. You might want to give them weapon focus - ranged touch to improve their odds of landing Orb of Sound successfully.

You'd have to experiment to see whether creatures will use Orb of Sound as a special ability though. I know that Dominate works well as a special ability as I've used it in one of my own modules. Mage Armor shouldn't be a problem either.

#3
kamal_

kamal_
  • Members
  • 5 254 messages
According to those pages, psionic charm is essentially charm person, with the exception you can spend more power and charm more things. In practice though, the only additional power would go to charming animals (the pc's summons and such). So maybe 2 uses of charm person and one of charm animal given the description of a blue typically having only 4 psionic power points.

Orb of Sound for mind thrust as DannJ said. The description of it says it's auditory, so it's a sound based power.

Inertial Armor is Mage armor, also as DannJ said. It matches the description of Mage Armor very closely.

#4
kamal_

kamal_
  • Members
  • 5 254 messages

rjshae wrote...
 Is there a way to futz the Spellcraft skill so the PCs can't pick up on what's being cast?

If the party isn't familiar with psionics, the characters with spellcraft will identify the "spells", they will simply be wrong. The abilities are pretty similar to standard spells, so no reason to think the party wizard be able to tell the difference, or even for the party to know the blues are actually psionic.

#5
rjshae

rjshae
  • Members
  • 4 497 messages
Thanks guys. I'll give it a try and see how well it behaves in combat...

...ah, not so well. It just goes straight to melee combat mode even if I give it a high magic use weight. Guess I'll have to work through the tangled AI routines.

Modifié par rjshae, 14 juillet 2012 - 01:45 .


#6
rjshae

rjshae
  • Members
  • 4 497 messages
After some investigation, it appears that a creature's special abilities only get recognized as spell talents (by the FindItemSpellTalentsByCategory routine in hench_i0_itemsp) if they have a '2' in the UserType column of spells.2da. For example, MageArmor and Orb of Sound are type 1 while the Mind Flayer's Psionic_Inertial_Barrier is type 2.

I think I'll try the special abilities as item abilities on a hide item and see if that works better...

...crud, that didn't work either. But it looks like it must be something funcky with the AI scripts I'm trying because it's at least finding the skin item properties now,

:blink:

Modifié par rjshae, 15 juillet 2012 - 11:46 .


#7
rjshae

rjshae
  • Members
  • 4 497 messages
Okay, I think I've at least partly figured out what is going wrong, and in the process I may have discovered a bug in the AI code.

In the 'hench_i0_ai' file there is a routine called 'InitializeItemSpells' that, among other things, determines whether to exclude item "talents". Down about 45 lines from the start of the function, there is an 'if' statement that first checks if the creature is polymorphed, then looks to see if the first item in the inventory is valid. It is here where the problem occurs. My Blue is equipped with a quarterstaff and a hide, but has nothing in the unequipped inventory. This causes the GetFirstItemInInventory to return an invalid object, resulting in the exclusion of item talents. As soon as I add an object to the unequipped inventory, no matter how mundane, the item talents are enabled.

I guess a fix is to write a subroutine that checks the inventory then cycle through the equipped items, returning true if it finds something. There's probably a routine somewhere that does that already...

Hurray!

#8
kevL

kevL
  • Members
  • 4 070 messages
rj, are you using TonyK's AI 2.2 ?

i am, & had a look at 'hench_i0_ai' -- InitializeItemSpells( ) has been moved to 'hench_i0_itemsp'


and it, uhm sorta looks fixed ...

#9
rjshae

rjshae
  • Members
  • 4 497 messages
Hmm, yes I am, and the problem seems to be there (and in the original). Not sure what's going on then, but the item exclusion flag is definitely being set because it's not looking at item talents.

#10
kevL

kevL
  • Members
  • 4 070 messages
huh, oh well, maybe i got my files from Mars or something ..

if (bPolymorphed
|| !GetIsObjectValid(GetFirstItemInInventory())
|| !GetCreatureUseItems(OBJECT_SELF))
{
gExcludedItemTalents |= TALENT_EXCLUDE_ITEM;
}


okay, so it wants to exclude ItemTalents if poly'd etc.

#11
rjshae

rjshae
  • Members
  • 4 497 messages

kevL wrote...

huh, oh well, maybe i got my files from Mars or something ..

if (bPolymorphed
|| !GetIsObjectValid(GetFirstItemInInventory())
|| !GetCreatureUseItems(OBJECT_SELF))
{
gExcludedItemTalents |= TALENT_EXCLUDE_ITEM;
}


okay, so it wants to exclude ItemTalents if poly'd etc.


Yup, so I'm suggesting the
GetFirstItemInInventory()
call isn't checking the equipped items, at least in my toolset. (I'm patched up to 1.23.)

#12
kevL

kevL
  • Members
  • 4 070 messages
sounds right. I'm curious what solution ya go for .....

rewrite the script (which does seem sorta wrong) or change the UserType in Spells.2da


or,

#13
rjshae

rjshae
  • Members
  • 4 497 messages
Well... I guess one could use the campaign spawn script (in nw_c2_default9) to check whether a spawned creature has no inventory but does have an equipped item. If this is true, it could add a worthless item to the creature's unequipped inventory. The worthless item would then cause the GetFirstItemInInventory to succeed.

If you wanted to go further, the creature's equipped items could be checked for suitable item properties before adding the junk item. But that may be overkill.

#14
kevL

kevL
  • Members
  • 4 070 messages
aside: I'm tempted to add something like this to InitializeItemSpells( )


if (bPolymorphed
|| (!GetIsObjectValid(GetFirstItemInInventory())
&& !GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CARMOUR))) // <- add
|| !GetCreatureUseItems(OBJECT_SELF))


/ o_O
yep, it's just the start of a subroutine you mentioned earlier; on the easy side, i notice this doesn't check the actual itemprops for suitability - assumedly that's done elsewhere

anywho the onSpawn item sounds convenient,

Modifié par kevL, 18 juillet 2012 - 02:42 .


#15
rjshae

rjshae
  • Members
  • 4 497 messages
I was just using this little subroutine:

// Return TRUE if the target has an equipped item or inventory
int HasAnItem( object oTarget = OBJECT_SELF )
{
    if ( GetIsObjectValid( GetFirstItemInInventory( oTarget ) ) )
        return TRUE;
    int nSlot;
    for ( nSlot = INVENTORY_SLOT_HEAD; nSlot < NUM_INVENTORY_SLOTS; nSlot++ ) {
        if ( GetIsObjectValid( GetItemInSlot( nSlot, oTarget ) ) )
            return TRUE;
    }
    return FALSE;
}
called with the following line:
    if ( bPolymorphed ||
         !HasAnItem( OBJECT_SELF ) ||
         !GetCreatureUseItems( OBJECT_SELF ) )
Probably it can be improved upon; I was mainly aiming for speed.

Modifié par rjshae, 19 juillet 2012 - 12:35 .


#16
kevL

kevL
  • Members
  • 4 070 messages
nice, will throw't into mine too

tks.