Hey, guys.
I’m still working on my remastered version of the Blackguard series, and while most of it is busywork that only requires time, the following scripts are beyond my ken. The first one used to work fine, but doesn’t anymore, so I think it clashes with NWN EE in some way. The second and third ones, however, I’ve never seen working, even in the old days (in fact, I only found out about them because I went through every script in each module). These are the biggest remaining obstacles I can think of, so hopefully I can quit bothering you guys after this
For context, the first script is meant to execute during a battle against three planetars. Whenever one of them dies, one of the remaining two would immediately try to resurrect his fallen comrade. Right now, they don’t do that, even if I kill one and then just draw out the fight. The full script is:
//::///////////////////////////////////////////////
//:: Default: End of Combat Round
//:: NW_C2_DEFAULT3
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Calls the end of combat script every round
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 16, 2001
//:://////////////////////////////////////////////
#include “NW_I0_GENERIC”
#include “nw_i0_spells”string ReplyStr()
{
string sReturn;
switch(Random(10))
{
case 0: sReturn = “No! Do not worry, I’m here.”; break;
case 1: sReturn = “I won’t let you down, old friend.”; break;
case 2: sReturn = “This evil will not take you!”; break;
case 3: sReturn = “I will raise you back, my friend.”; break;
case 4: sReturn = “You won’t die before I do.”; break;
case 5: sReturn = “This won’t be that easy.”; break;
case 6: sReturn = “Death will not take you.”; break;
case 7: sReturn = “NO!!”; break;
case 8: sReturn = “Light shall prevail!”; break;
case 9: sReturn = “I’m coming, brother.”; break;
}return sReturn;
}
void main()
{if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL)) { DetermineSpecialBehavior(); } else if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS)) {
//************************************************************
string sTag = GetTag(OBJECT_SELF);
object oPlanetarProtect;/*
if (sTag == “Planetar1”)
oPlanetarProtect = GetObjectByTag(“Planetar2”);
else if (sTag == “Planetar2”)
oPlanetarProtect = GetObjectByTag(“Planetar3”);
else if (sTag == “Planetar3”)
oPlanetarProtect = GetObjectByTag(“Planetar1”);
*/// The tag of who the planetar will protect - (heal + ressurect) oPlanetarProtect = GetObjectByTag( GetLocalString(OBJECT_SELF, "PlanetarProtect")); int iAction = GetLocalInt(OBJECT_SELF, "OffensivePlanetar");
// object oDragon = GetObjectByTag(“SILVERDRAGON”);
//Heal Self First if (TalentHealingSelf()) return; //Heal Dedicated Friend if (Random(2) == 0 && !GetIsDead(oPlanetarProtect) && TalentHeal(FALSE, oPlanetarProtect)) return; //Ressurect Dedicated Friend if (GetIsDead(oPlanetarProtect) && GetHasSpell(SPELL_RESURRECTION) ) { ClearAllActions(); ActionMoveToObject(oPlanetarProtect, TRUE); SpeakString( ReplyStr() ); ActionCastSpellAtObject(SPELL_RESURRECTION, oPlanetarProtect); ActionDoCommand( DetermineCombatRound() ); } else if (iAction == 1) { if (Random(3) == 0) SetLocalInt(OBJECT_SELF, "OffensivePlanetar", 0); DetermineCombatRound(); } else { if (Random(3) == 0) SetLocalInt(OBJECT_SELF, "OffensivePlanetar", 1); if (TalentMeleeAttack(bkAcquireTarget())) SetLocalInt(OBJECT_SELF, "NW_L_MEMORY", 0); //remember else DetermineCombatRound(); }
//************************************************************
}
if(GetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1003));
}}
The second and third scripts are also meant to happen during combat, specifically with the eponymous hero (well, protagonist) and Valshera against two Solars. As I mentioned above, I have never seen it actually happen. As best I can understand, the Solars are meant to resurrect each other (which also isn’t happening at the moment), so Valshera comments on it, summons her familiar to block their spells, a bit of dialog ensues, and then the Solars lose the ability to resurrect each other.
The first of these two scripts, chronoglogically (judging by Valshera’s dialog) is this one:
//::///////////////////////////////////////////////
//:: Default: End of Combat Round
//:: NW_C2_DEFAULT3
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Calls the end of combat script every round
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 16, 2001
//:://////////////////////////////////////////////
#include “NW_I0_GENERIC”
#include “nw_i0_spells”void ValsheraReply( int iRessu)
{
object oValshera = GetObjectByTag(“Valshera”);string sStr; switch(iRessu) { case 10: sStr = "These fools can heal and resurrect at will! We must prevent them!"; break; case 20: { sStr = "I cannot counter their magic, I'll summon someone who will..."; SetLocalInt(oValshera, "SummonQuasit",1); }; break; } AssignCommand( oValshera, SpeakString(sStr));
}
string ReplyStr( string sTag)
{
string sReturn;if (sTag == "Solar1") // Ilazikiel switch(Random(3)) { case 0: sReturn = "Hang in there, Garlazriel."; break; case 1: sReturn = "Garlazriel!!"; break; case 2: sReturn = "By the justice of Tyr, I won't allow this to happen."; break; } else switch(Random(3)) // Garlazriel { case 0: sReturn = "Ilazikiel!!"; break; case 1: sReturn = "Rise again, Ilazikiel."; break; case 2: sReturn = "The lady of Luck will not let you down."; break; } return sReturn;
}
void main()
{//************************************************************
string sTag = GetTag(OBJECT_SELF);
object oSolarProtect;
object oMod = GetModule();// The tag of who the solar will protect - (heal + ressurect) oSolarProtect = GetObjectByTag( GetLocalString(OBJECT_SELF, "SolarProtect")); int iAction = GetLocalInt(OBJECT_SELF, "OffensiveSolar"); //Valshera Reply*** int iRessuSolar = GetLocalInt(oMod, "RessuSolar") + 1; SetLocalInt(oMod, "RessuSolar", iRessuSolar); if (iRessuSolar == 10 || iRessuSolar == 20) ValsheraReply(iRessuSolar); //*** //Heal Self First if (TalentHealingSelf()) return; //Heal Dedicated Friend if (Random(3) == 0 && !GetIsDead(oSolarProtect) && TalentHeal(FALSE, oSolarProtect)) return; //Ressurect Dedicated Friend if (GetIsDead(oSolarProtect) && GetHasSpell(SPELL_RESURRECTION) ) { ClearAllActions(); ActionMoveToObject(oSolarProtect, TRUE); SpeakString( ReplyStr( GetTag(OBJECT_SELF) ) ); ActionCastSpellAtObject(SPELL_RESURRECTION, oSolarProtect); ActionDoCommand( DetermineCombatRound() ); } else if (iAction == 1) { if (Random(3) == 0) SetLocalInt(OBJECT_SELF, "OffensiveSolar", 0); DetermineCombatRound(); } else { if (Random(3) == 0) SetLocalInt(OBJECT_SELF, "OffensiveSolar", 1); if (TalentMeleeAttack(bkAcquireTarget())) SetLocalInt(OBJECT_SELF, "NW_L_MEMORY", 0); //remember else DetermineCombatRound(); }
//************************************************************
}
Then the second script is this one:
//::///////////////////////////////////////////////
//:: Associate: End of Combat End
//:: NW_CH_AC3
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Calls the end of combat script every round
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 16, 2001
//:://////////////////////////////////////////////
#include “x0_inc_henai”void SummonQuasit()
{
effect eSummon = EffectSummonCreature(“artgrek”, VFX_FNF_SUMMON_GATE, 3.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetLocation(OBJECT_SELF), 180.0);
}void main()
{
if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS))
{
//SendMessageToPC(GetFirstPC(), "COMBAT: "+IntToString(GetCombatDifficulty(GetMaster(),TRUE)));if (GetCombatDifficulty(GetMaster(),TRUE) > 0) //with magic { SetLocalInt(OBJECT_SELF, "SAVE_YOUR_SPELLS", FALSE); } else //without magic { if (GetItemInSlot(INVENTORY_SLOT_RIGHTHAND) == OBJECT_INVALID) { ActionEquipMostDamagingMelee(); ActionSpeakString("I shall enjoy this."); } SetLocalInt(OBJECT_SELF, "SAVE_YOUR_SPELLS", TRUE); }
//“X2_L_BEH_MAGIC”
//“X2_L_BEH_OFFENSE”
//“X2_L_BEH_COMPASSION”//SendMessageToPC(GetFirstPC(), "COMBAT: "+IntToString(GetLocalInt(OBJECT_SELF, “SAVE_YOUR_SPELLS”)));
if (GetLocalInt(OBJECT_SELF, "SummonQuasit") == 1) { ClearAllActions(); ActionCastFakeSpellAtObject(SPELL_GATE, OBJECT_SELF); DelayCommand(2.0, SummonQuasit()); SetLocalInt(OBJECT_SELF, "SummonQuasit",0); DelayCommand(6.0, SpeakString("Art'hgrek ! Counter the Solars' spells!")); DelayCommand(10.0, AssignCommand(GetObjectByTag("Arthgrek"), SpeakString("But mistress...Solars too powerful!"))); DelayCommand(14.0, SpeakString("Art'hgrek ! You'd rather feel my wrath?")); DelayCommand(18.0, AssignCommand(GetObjectByTag("Arthgrek"), SpeakString("...no...Art'hgrek counter spells then..."))); DelayCommand(18.0, SetLocalInt(GetObjectByTag("Arthgrek"), "CounterMagic", 1)); } HenchmenCombatRound(OBJECT_INVALID); } if(GetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT)) { SignalEvent(OBJECT_SELF, EventUserDefined(1003)); }
}
I know this is a big ask, but I am way out of my depth here, and this is pretty much the final hurdle. I’d hate to release Blackguard - Remastered with these issues unresolved, so I beseech you - please, lend me your (scripting) power.
And of course, thanks in advance.