2026/01/12 Update 2
Fixed Hidden Talent. Potions are usable w/ Tenser's Transformation. Defaulted to Fire damage for Dragon breath. Corrected Dragonfire Channeling TLK entry.
This commit is contained in:
@@ -1,125 +0,0 @@
|
||||
//:://////////////////////////////////////////////////////////////////
|
||||
//:: Hidden Talen
|
||||
//:: ft_hidntalent_ft
|
||||
//:://////////////////////////////////////////////////////////////////
|
||||
/** @file
|
||||
THis allows you to pick a hidden talent @ 1st level
|
||||
|
||||
@original author Fencas
|
||||
@date Created - 2025-01-12
|
||||
|
||||
@revised by Jaysyn (for Hidden Talent)
|
||||
@date Revised - 2025-01-30 07:42:03
|
||||
*/
|
||||
//:://////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "inc_dynconv"
|
||||
#include "prc_inc_function"
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "inc_persist_loca"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Constant Definitions
|
||||
//////////////////////////////////////////////////
|
||||
const int STAGE_SELECT_ABIL = 0;
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Main Function
|
||||
//////////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oSkin = GetPCSkin(oPC);
|
||||
int nRow;
|
||||
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
|
||||
int nStage = GetStage(oPC);
|
||||
int nLevel = GetPersistantLocalInt(oPC, "HiddenTalentCheck");
|
||||
|
||||
// Abort if DynConv_Var is not set properly
|
||||
if (nValue == 0)
|
||||
{
|
||||
if (DEBUG) DoDebug("ft_hidntalent_ft: Aborting due to error.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Conversation Setup Stage
|
||||
if (nValue == DYNCONV_SETUP_STAGE)
|
||||
{
|
||||
if (!GetIsStageSetUp(nStage, oPC))
|
||||
{
|
||||
if (nStage == STAGE_SELECT_ABIL)
|
||||
{
|
||||
// --- Step 1: Mark Already Selected Hidden Talents ---
|
||||
int nStartFeat = 25901;
|
||||
int nTotalRows = FEAT_HIDDEN_TALENT_BIOFEEDBACK - FEAT_HIDDEN_TALENT_GRIP_IRON;
|
||||
int nEndFeat = nStartFeat + nTotalRows;
|
||||
|
||||
string sFeat = Get2DAString("feat", "LABEL", nRow);
|
||||
|
||||
effect eEffect = GetFirstEffect(oPC);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectTag(eEffect) == "HiddenTalent_" + sFeat)
|
||||
{
|
||||
SetLocalInt(oPC, "HiddenTalent_" + IntToString(nRow), 1);
|
||||
}
|
||||
eEffect = GetNextEffect(oPC);
|
||||
}
|
||||
|
||||
// --- Step 2: Display Available Feats ---
|
||||
SetHeader("Choose a Hidden Talent:");
|
||||
|
||||
for (nRow = nStartFeat; nRow <= nEndFeat; nRow++)
|
||||
{
|
||||
string sName = Get2DAString("feats", "LABEL", nRow);
|
||||
int nFeat = StringToInt(Get2DAString("feats", "FEAT", nRow));
|
||||
|
||||
if (!GetHasFeat(nRow, oPC) && !GetLocalInt(oPC, "HiddenTalent_" + IntToString(nRow)))
|
||||
{
|
||||
AddChoice(sName, nRow, oPC);
|
||||
}
|
||||
}
|
||||
|
||||
SetDefaultTokens();
|
||||
MarkStageSetUp(STAGE_SELECT_ABIL, oPC);
|
||||
}
|
||||
}
|
||||
|
||||
// Token Setup
|
||||
SetupTokens();
|
||||
}
|
||||
else if (nValue == DYNCONV_EXITED)
|
||||
{
|
||||
if (DEBUG) DoDebug("ft_hidntalent_ft: Running exit handler");
|
||||
}
|
||||
else if (nValue == DYNCONV_ABORTED)
|
||||
{
|
||||
if (DEBUG) DoDebug("ft_hidntalent_ft: ERROR: Conversation abort section run");
|
||||
}
|
||||
// --- Stage Selection & Feat Application ---
|
||||
else
|
||||
{
|
||||
int nChoice = GetChoice(oPC);
|
||||
int nLevel = GetHitDice(oPC);
|
||||
|
||||
if (nStage == STAGE_SELECT_ABIL)
|
||||
{
|
||||
SetPersistantLocalInt(oPC, "HiddenTalent_" + IntToString(nLevel), 1);
|
||||
|
||||
if (nChoice > 0)
|
||||
{
|
||||
effect eBonusFeat = EffectBonusFeat(nChoice);
|
||||
eBonusFeat = UnyieldingEffect(eBonusFeat);
|
||||
eBonusFeat = TagEffect(eBonusFeat, "HiddenTalent_" + IntToString(nChoice));
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBonusFeat, oPC);
|
||||
}
|
||||
|
||||
DeletePersistantLocalInt(oPC, "HiddenTalentCheck");
|
||||
AllowExit(DYNCONV_EXIT_FORCE_EXIT);
|
||||
}
|
||||
|
||||
if (DEBUG) DoDebug("ft_hidntalent_ft: New stage: " + IntToString(nStage));
|
||||
|
||||
SetStage(nStage, oPC);
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ void ActivateBreath(int nSpellLevel, object oPC = OBJECT_SELF)
|
||||
//if none left, exit
|
||||
if(!bCanUse) return;
|
||||
|
||||
int nDamageType;
|
||||
int nDamageType = DAMAGE_TYPE_FIRE;
|
||||
struct breath DracBreath;
|
||||
|
||||
//Acid
|
||||
|
||||
@@ -64,8 +64,10 @@ void main()
|
||||
// Handle Hidden Talent
|
||||
if(GetHasFeat(FEAT_HIDDEN_TALENT, oPC) && !GetPersistantLocalInt(oPC, "HiddenTalentChosen"))
|
||||
{
|
||||
if(DEBUG) DoDebug("prc_levelup: Entering Hidden Talent Branch");
|
||||
// Trigger Hidden Talent power selection conversation
|
||||
AssignCommand(oPC, ActionStartConversation(oPC, "hidden_talent_cv", TRUE, FALSE));
|
||||
//DelayCommand(0.5, ExecuteScript("psi_hidntalent", oPC));
|
||||
DelayCommand(1.0f, StartDynamicConversation("ft_hidntalent_ft", oPC, DYNCONV_EXIT_ALLOWED_SHOW_CHOICE, TRUE, FALSE, oPC));
|
||||
}
|
||||
|
||||
// Execute scripts hooked to this event for the player triggering it
|
||||
|
||||
@@ -400,7 +400,16 @@ void main()
|
||||
|
||||
if(GetHasFeat(FEAT_SPELLFIRE_WIELDER, oPC))
|
||||
SpawnNewThread("PRC_Spellfire", "prc_spellfire_hb", 6.0f, oPC);
|
||||
|
||||
|
||||
// Handle Hidden Talent
|
||||
if(GetHasFeat(FEAT_HIDDEN_TALENT, oPC) && !GetPersistantLocalInt(oPC, "HiddenTalentChosen"))
|
||||
{
|
||||
if(DEBUG) DoDebug("prc_onenter: Entering Hidden Talent Branch");
|
||||
// Trigger Hidden Talent power selection conversation
|
||||
//DelayCommand(0.5, ExecuteScript("psi_hidntalent", oPC));
|
||||
DelayCommand(1.0f, StartDynamicConversation("ft_hidntalent_ft", oPC, DYNCONV_EXIT_ALLOWED_SHOW_CHOICE, TRUE, FALSE, oPC));
|
||||
}
|
||||
|
||||
//if the player logged off while being registered as a cohort
|
||||
if(GetPersistantLocalInt(oPC, "RegisteringAsCohort"))
|
||||
AssignCommand(GetModule(), CheckHB(oPC));
|
||||
|
||||
Reference in New Issue
Block a user