How to make familiars immortal/invincible?

I’m looking for a way to make my familiars be completely immortal/invincible while I control it and enemies must completely ignore it. Instead, enemies must fight as usual aganst the familiar’s master. But sometimes it happens when the enemy throws a nasty fireball or a familiar just ends up a nearby enemy and it dies. I’m looking to make familiars completely indestructible and invincible (like a DM). As wiki says: Familiars start at caster level one of their master with the evasion feat. At caster level four it is replaced with improved evasion. Perhaps by editing some .2da files giving some special feats by default after the familiar is summoned? Any suggestions?

Ooops! The word you are looking for is immortal (means can’t die) and not immoral (means without morals). You missed out the ‘T’ in the middle there :innocent:.

TR

1 Like

Only one letter but the meaning is significant!

you could override the stock summon familiar script … nw_s2_familiar … with →

// 'nw_s2_familiar'

void plot(object oTarget)
{
	SetPlotFlag(oTarget, TRUE);
}

void main()
{
	SummonFamiliar();

	if (GetIsOwnedByPlayer(OBJECT_SELF))
	{
		object oTarget = GetAssociate(ASSOCIATE_TYPE_FAMILIAR);
		DelayCommand(0.f, plot(oTarget));
	}
}

 
( careful there may be another nw_s2_familiar script in /override … )

but it renders the familiar unhurtable/unattackable whether or not you’re controlling it

 
[edit]
if you really want the familiar’s plotflag to toggle depending on possession its gonna get messy.

EVENT_PLAYER_CONTROL_CHANGED in the familiar’s user-defined handler …

1 Like

My current familiar script (default) nw_s2_familiar (Kaedrin’s PrC Pack at override) is:

//::///////////////////////////////////////////////
//:: Summon Familiar
//:: NW_S2_Familiar
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This spell summons an Arcane casters familiar
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Sept 27, 2001
//:://////////////////////////////////////////////

void main()
{
//Yep thats it
SummonFamiliar();

int nCL = GetLevelByClass(CLASS_TYPE_WIZARD);
nCL +=  GetLevelByClass(CLASS_TYPE_SORCERER);

if (nCL > 10)
{
	object oMyPet = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, OBJECT_SELF);
	effect eSR = EffectSpellResistanceIncrease(nCL+5);
	eSR = SupernaturalEffect(eSR);	
	DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSR, oMyPet));				
}

}

So should I remove it completely and replace it with yours? Or should I add an additional script to the default and current one?

id copy Kaedrin’s .NSS file → nw_s2_familiar_bak.nss

then replace the text in his original with

//::///////////////////////////////////////////////
//:: Summon Familiar
//:: 'nw_s2_familiar'
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
	This spell summons an Arcane casters familiar.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Sept 27, 2001
//:://////////////////////////////////////////////


void test(object oCaster)
{
	object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oCaster);

	if (GetIsObjectValid(oFamiliar))
	{
		SendMessageToPC(GetFirstPC(FALSE), GetName(oFamiliar) + " is Plot = " + IntToString(GetPlotFlag(oFamiliar)));
		SendMessageToPC(GetFirstPC(FALSE), GetName(oFamiliar) + " has SR = " + IntToString(GetSpellResistance(oFamiliar)));
	}
	else
		SendMessageToPC(GetFirstPC(FALSE), GetName(oCaster) + " doesn't have a Familiar.");
}

void main()
{
	// Yep thats it
	SummonFamiliar();

	if (GetIsOwnedByPlayer(OBJECT_SELF))
	{
		object oTarget = GetAssociate(ASSOCIATE_TYPE_FAMILIAR);
		DelayCommand(0.f, SetPlotFlag(oTarget, TRUE));
	}


	int nCL = GetLevelByClass(CLASS_TYPE_WIZARD)
			+ GetLevelByClass(CLASS_TYPE_SORCERER);

	if (nCL > 10)
	{
		effect eSR = EffectSpellResistanceIncrease(nCL + 5);
		eSR = SupernaturalEffect(eSR);

		object oTarget = GetAssociate(ASSOCIATE_TYPE_FAMILIAR);
		DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSR, oTarget));
	}

	DelayCommand(5.f, test(OBJECT_SELF));
}

and recompile. The delays may need to be tweaked (etc)

[edit] updated with a test function

2 Likes

That works. But there is a way to provide a feat/spell to the familiar like Etherealness spell or improved invincibility feat upon summoning or any other similar that makes him unnoticeable? Because enemies still for some reason during the battle randomly choose and attack familiar even if it is far away or when the main character (master) becomes invincible, enemies wasting their spells on familiar which is quite useless?

try Plot + Ethereal →

//::///////////////////////////////////////////////
//:: Summon Familiar
//:: 'nw_s2_familiar'
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
	This spell summons an Arcane casters familiar.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Sept 27, 2001
//:://////////////////////////////////////////////

void invulnerable(object oTarget)
{
	SetPlotFlag(oTarget, TRUE);

	effect eEther = EffectEthereal();
	eEther = SupernaturalEffect(eEther);
	ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEther, oTarget);
}

//
void main()
{
	// Yep thats it
	SummonFamiliar();

	if (GetIsOwnedByPlayer(OBJECT_SELF))
	{
		object oTarget = GetAssociate(ASSOCIATE_TYPE_FAMILIAR);
		DelayCommand(0.f, invulnerable(oTarget));
	}


	int nCL = GetLevelByClass(CLASS_TYPE_WIZARD)
			+ GetLevelByClass(CLASS_TYPE_SORCERER);

	if (nCL > 10)
	{
		effect eSR = EffectSpellResistanceIncrease(nCL + 5);
		eSR = SupernaturalEffect(eSR);

		object oTarget = GetAssociate(ASSOCIATE_TYPE_FAMILIAR);
		DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSR, oTarget));
	}
}
2 Likes

Works absolutely fine now, many thanks for your help as always!

1 Like

note. (combat mechanic spoiler)

Iirc you can stall a hostile mob with an ethereal/sanctuaried partymember …

The AI scripts typically check for the nearest creature to fight (no check is made for ethereal). But the hardcoded combat engine won’t attack an ethereal creature … so the hostile just stands there and glowers …

 
So … you can run your rabbit in front of a dragon – None shall pass!

2 Likes