I’m back and working on the next version of the Companion and Monster AI

@kevL_s ,

It is because gb_comp_attack calls gb_assoc_attack which then calls SetCommandable(TRUE). This brawl is controlled by turning off commandable for the brawlers and assigning targets outside the AI.

But this is for the Companions after the fight ends … when they should be returning to normal behavior and player-control

(the companions remain player-controlled from what I’ve seen so far … only the NPCs go uncommandable)

 
ps. i tend to think it’s just one of the many (sic) vagaries i see in OC scripting …

 
[edit]  found a CreatureOverrideAIScript →

// '0dcr_amie_brawl'
/*
	CreatureOverrideAIScript

	Prevents Amie and PC from using magic during the Harvest Brawl when they are
	under AI-control.

	Note that spells can be cast manually but Merring throws a hissy fit and
	heals the opponents.

	- set for PC and Amie during combat trials
		- by TransitionToFightOne()  '0a_trialhelper'
		- by TransitionToMossFight() 'gui_0a_hard_fight'
*/
// DBR 2/7/06

#include "nw_i0_generic"

//
void main()
{
	ClearCreatureOverrideAIScriptTarget();

	if (!__InCombatRound())
	{
		object oIntruder = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY,
											  OBJECT_SELF, 1,
											  CREATURE_TYPE_IS_ALIVE, CREATURE_ALIVE_TRUE);
		__TurnCombatRoundOn(TRUE);
		ActionAttack(oIntruder);
		__TurnCombatRoundOn(FALSE);

		SetCreatureOverrideAIScriptFinished();
	}
}
1 Like

@ahag

i got the Mossfelds (in your save) attacking again w/

FindNewTarget() in 0b_moss_hb and/or 0b_brawler_dmg

but it’s kinda fudgy and am going to think about it some more … watch the Nwn2fixes thread if/when i get it up.

1 Like

Progress update on the next version

Added support for a few dozen of Kaedrin’s PrC class feats. Specialized ones or ones that have unusual conditions like another feat for damage type, the caster can’t move (Forest Master), a weapon must be equipped, etc. have been skipped. Also, class feats that use bard songs were not done.

Rework of incorporeal creatures. They now are set to not collide so they can go right through one of your party to get to a better target. They now use charisma bonus including spells that increase their base charisma for deflection AC per PnP. A high move silently skill is set on them too, they should never get heard now also per PnP. The game’s default incorporeal creatures generally have no move silently skill. Wraiths and shadows also get some missing feats like mobility and spring attack like they should, this encourages them to go after better targets. All these changes make them slightly more difficult.

A global option to enable incorporeal, lich, and demilich touch attacks has been added. This makes them more difficult, the strength and constitution drain is supernatural and is not removed on resting and can kill on hardcore and above difficulty. For lower difficulties, the ability drain will go away on resting or time out after a while. The demilich’s touch attack is also deadly. Because of the difficulty increase and this change requiring a spells.2da change for one row it is optional, default off. The installation will include a renamed 2da with instructions to rename or merge it to enable the touch attack feature. Note that Kaedrin’s PrC pack already contains the changed row in spells.2da.

Reworking of the melee and spell casting code to account for creature size. Large and especially huge creatures could easily go past the previous hard coded thresholds. Spellcasting code also reworked to move when it should or can and to consider ranges better. Some issues with curing spells were also fixed.

Changed bard song to use a game 2da cached feat list. This will eventually enable adding in the bard song class feats from Kaedrin’s PrC pack.

Started rework of bard inspirations. As part of this I wanted to add the feature of selecting the bard song to use out of combat, a long standing request in the bug and features list. Adding yet another setting to the already too long behavior settings has made me do this: Rework character and creature examine settings to add extra tabs, making the windows slightly taller. It is mostly done this is what it will look like:

Only the game options list is still long, that is probably OK since it doesn’t get changed as much. The behavior tab has the remaining settings like puppet mode and out of combat things like locks, traps and picking up items.

Hopefully this will be easier to work with. The changes should still work with old custom UI xmls. I am not sure if I will update my version of Charlie’s UI with these changes because it already has a more compact UI.

Will get back to bard inspirations, PrC bard songs, and adjusting the return to starting location issue reported by @ahag. Strange thing is that for the same area as the issue reported, I decided to enable the return to starting location for neutral and friendlies since other NPCs can get out of place during the large, spread out battle.

5 Likes

Great additions for the upcoming release! More support for Kaedrin’s feats and spells and focusing on Bard class, will this release support Bard’s prestige classes like Stormsinger or Lyric Thaumaturge? ( Stormsongs)

Thanks! Very good news! But i want to report about two problems in main campaign

  1. ford Locke graveyard crypt. In corridor with many traps enemies and my party members try running through the traps and dying (one dying enemy have katana +1).

And in other places my party members often trying run through the detected trap to attack enemies.

May be make option that allow get around the trap if it detected or stand and wait until the trap is cleared?

  1. In Highcliff catacombs (monster wander and monster open doors turns on) my party members fighting with enemies when black priest talking with Black Garius

Yes, the PrCs Stormsinger, Lyric Thaumaturge, and possibly Dissonant Chord. Gust of Wind is not supported by the AI right now, but the other feats follow existing spell patterns so should be easy to add. The general feat Snowflake Wardance might get done too.

1 Like

I tried adding general support for handling traps during combat into the NWN2 AI early on, but I couldn’t get things to work acceptably. Using follow me, puppet mode, etc. are the only options currently. I might look at this again, but it is a larger project that might not be possible. Adding options to stand around for traps get tricky because the existing script calls make it difficult to determine if a trap is in the path to the enemy. A general option to stand around if any traps detected without considering position is possible.

Using the monster wander and open doors feature can cause these types of issues. My only option would be to disable it for the that specific area in the OC module. I did this for one area in NWN, but this approach is not a general fix.

3 Likes