2026/04/27 Evening Update
Added PRC Option to change player model to appearances in racialappear.2da Added class heartbeat script and updated Soul Eater's onHit to work with NPCs and cohorts.
This commit is contained in:
@@ -142,7 +142,6 @@ string GetBiowareDBName()
|
|||||||
if(GetPRCSwitch(MARKER_Q))
|
if(GetPRCSwitch(MARKER_Q))
|
||||||
sReturn += "q";
|
sReturn += "q";
|
||||||
return sReturn;
|
return sReturn;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -355,8 +355,38 @@ void Cache_Appearance(int nRow = 0)
|
|||||||
DelayCommand(1.0, Cache_Soundset());
|
DelayCommand(1.0, Cache_Soundset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Cache_RacialAppear(int nRow = 0)
|
||||||
|
{
|
||||||
|
if(nRow < GetPRCSwitch(FILE_END_RACIALAPPEAR))
|
||||||
|
{
|
||||||
|
Get2DACache("racialappear", "Label", nRow);
|
||||||
|
Get2DACache("racialappear", "Male1", nRow);
|
||||||
|
Get2DACache("racialappear", "Male2", nRow);
|
||||||
|
Get2DACache("racialappear", "Male3", nRow);
|
||||||
|
Get2DACache("racialappear", "Male4", nRow);
|
||||||
|
Get2DACache("racialappear", "Male5", nRow);
|
||||||
|
Get2DACache("racialappear", "Female1", nRow);
|
||||||
|
Get2DACache("racialappear", "Female2", nRow);
|
||||||
|
Get2DACache("racialappear", "Female3", nRow);
|
||||||
|
Get2DACache("racialappear", "Female4", nRow);
|
||||||
|
Get2DACache("racialappear", "Female5", nRow);
|
||||||
|
Get2DACache("racialappear", "Wing1", nRow);
|
||||||
|
Get2DACache("racialappear", "Wing2", nRow);
|
||||||
|
Get2DACache("racialappear", "Wing3", nRow);
|
||||||
|
Get2DACache("racialappear", "Tail1", nRow);
|
||||||
|
Get2DACache("racialappear", "Tail2", nRow);
|
||||||
|
Get2DACache("racialappear", "Tail3", nRow);
|
||||||
|
|
||||||
|
nRow++;
|
||||||
|
DelayCommand(0.1, Cache_RacialAppear(nRow));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DelayCommand(1.0, Cache_Appearance());
|
||||||
|
}
|
||||||
|
|
||||||
void Cache_2da_data()
|
void Cache_2da_data()
|
||||||
{
|
{
|
||||||
Cache_Appearance();
|
Cache_Appearance();
|
||||||
|
Cache_RacialAppear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -851,6 +851,7 @@ void SetDefaultFileEnds()
|
|||||||
SetPRCSwitch(FILE_END_SPELLS, PRCGetFileEnd("spells"));
|
SetPRCSwitch(FILE_END_SPELLS, PRCGetFileEnd("spells"));
|
||||||
//SetPRCSwitch(FILE_END_SPELLSCHOOL, PRCGetFileEnd("spellschools"));
|
//SetPRCSwitch(FILE_END_SPELLSCHOOL, PRCGetFileEnd("spellschools"));
|
||||||
SetPRCSwitch(FILE_END_APPEARANCE, PRCGetFileEnd("appearance"));
|
SetPRCSwitch(FILE_END_APPEARANCE, PRCGetFileEnd("appearance"));
|
||||||
|
SetPRCSwitch(FILE_END_RACIALAPPEAR, PRCGetFileEnd("racialappear"));
|
||||||
SetPRCSwitch(FILE_END_WINGS, PRCGetFileEnd("wingmodel"));
|
SetPRCSwitch(FILE_END_WINGS, PRCGetFileEnd("wingmodel"));
|
||||||
SetPRCSwitch(FILE_END_TAILS, PRCGetFileEnd("tailmodel"));
|
SetPRCSwitch(FILE_END_TAILS, PRCGetFileEnd("tailmodel"));
|
||||||
SetPRCSwitch(FILE_END_BASEITEMS, PRCGetFileEnd("baseitems"));
|
SetPRCSwitch(FILE_END_BASEITEMS, PRCGetFileEnd("baseitems"));
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ void SetupCharacterData(object oPC)
|
|||||||
case CLASS_TYPE_SOLDIER_OF_LIGHT: sScript = "prc_soldoflight"; break;
|
case CLASS_TYPE_SOLDIER_OF_LIGHT: sScript = "prc_soldoflight"; break;
|
||||||
case CLASS_TYPE_SORCERER: iData |= 0x03; break;
|
case CLASS_TYPE_SORCERER: iData |= 0x03; break;
|
||||||
case CLASS_TYPE_SOULBORN: sScript = "moi_soulborn"; break;
|
case CLASS_TYPE_SOULBORN: sScript = "moi_soulborn"; break;
|
||||||
case CLASS_TYPE_SOUL_EATER: iShifting = TRUE; break;
|
case CLASS_TYPE_SOUL_EATER: sScript = "prc_souleater"; iShifting = TRUE; break;
|
||||||
case CLASS_TYPE_SOULKNIFE: sScript = "psi_sk_clseval"; break;
|
case CLASS_TYPE_SOULKNIFE: sScript = "psi_sk_clseval"; break;
|
||||||
case CLASS_TYPE_SPELLSWORD: sScript = "prc_spellswd"; iData |= 0x04; break;
|
case CLASS_TYPE_SPELLSWORD: sScript = "prc_spellswd"; iData |= 0x04; break;
|
||||||
case CLASS_TYPE_SPINEMELD_WARRIOR: sScript = "moi_spinemeld"; break;
|
case CLASS_TYPE_SPINEMELD_WARRIOR: sScript = "moi_spinemeld"; break;
|
||||||
|
|||||||
@@ -1397,6 +1397,10 @@ const string FILE_END_SPELLS = "FILE_END_SPELLS";
|
|||||||
* This will be set automatically to a default unless FILE_END_MANUAL is turned on */
|
* This will be set automatically to a default unless FILE_END_MANUAL is turned on */
|
||||||
const string FILE_END_APPEARANCE = "FILE_END_APPEARANCE";
|
const string FILE_END_APPEARANCE = "FILE_END_APPEARANCE";
|
||||||
|
|
||||||
|
/** Last line of racalappear.2da
|
||||||
|
* This will be set automatically to a default unless FILE_END_MANUAL is turned on */
|
||||||
|
const string FILE_END_RACIALAPPEAR = "FILE_END_RACIALAPPEAR";
|
||||||
|
|
||||||
/** Last line of wingmodel.2da
|
/** Last line of wingmodel.2da
|
||||||
* This will be set automatically to a default unless FILE_END_MANUAL is turned on */
|
* This will be set automatically to a default unless FILE_END_MANUAL is turned on */
|
||||||
const string FILE_END_WINGS = "FILE_END_WINGS";
|
const string FILE_END_WINGS = "FILE_END_WINGS";
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ float DamageAvg(int iDamage);
|
|||||||
//#include "prc_spell_const"
|
//#include "prc_spell_const"
|
||||||
//#include "inc_utility"
|
//#include "inc_utility"
|
||||||
#include "prc_inc_natweap"
|
#include "prc_inc_natweap"
|
||||||
|
#include "prc_inc_onhit"
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
/* Function defintions */
|
/* Function defintions */
|
||||||
@@ -547,6 +548,12 @@ void UnarmedFists(object oCreature)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add Soul Eater onHit property if applicable
|
||||||
|
if (GetLevelByClass(CLASS_TYPE_SOUL_EATER, oCreature) > 0)
|
||||||
|
{
|
||||||
|
Add_OnHitUniquePower(oWeapL, "prc_uni_shift");
|
||||||
|
}
|
||||||
|
|
||||||
int iKi = (iMonkEq > 9) ? 1 : 0;
|
int iKi = (iMonkEq > 9) ? 1 : 0;
|
||||||
iKi = (iMonkEq > 12) ? 2 : iKi;
|
iKi = (iMonkEq > 12) ? 2 : iKi;
|
||||||
iKi = (iMonkEq > 15) ? 3 : iKi;
|
iKi = (iMonkEq > 15) ? 3 : iKi;
|
||||||
|
|||||||
47
nwn/nwnprc/trunk/scripts/prc_souleater.nss
Normal file
47
nwn/nwnprc/trunk/scripts/prc_souleater.nss
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Name: prc_souleater
|
||||||
|
//:: FileName: prc_souleater.nss
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Soul Eater class heartbeat script
|
||||||
|
Ensures onHit energy drain is applied to unarmed attacks
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Jaysyn
|
||||||
|
//:: Created On: 2026-04-27 12:35:59
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "prc_inc_combat"
|
||||||
|
#include "prc_inc_onhit"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
object oPC = OBJECT_SELF;
|
||||||
|
|
||||||
|
// Only proceed if character is a Soul Eater
|
||||||
|
if(GetLevelByClass(CLASS_TYPE_SOUL_EATER, oPC) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Only proceed if unarmed (no melee weapon equipped)
|
||||||
|
if(!GetIsUnarmed(oPC))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Get the unarmed weapon (creature weapon or gloves)
|
||||||
|
object oUnarmedWeapon = GetUnarmedWeapon(oPC);
|
||||||
|
|
||||||
|
// Apply onHit property if weapon is valid
|
||||||
|
if(GetIsObjectValid(oUnarmedWeapon))
|
||||||
|
{
|
||||||
|
// Remove any existing temporary properties first
|
||||||
|
RemoveSpecificProperty(oUnarmedWeapon, ITEM_PROPERTY_ONHITCASTSPELL,
|
||||||
|
IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 0, 1, "", -1, DURATION_TYPE_TEMPORARY);
|
||||||
|
|
||||||
|
// Set up the signature for event routing
|
||||||
|
SetLocalInt(oUnarmedWeapon, PRC_CUSTOM_ONHIT_SIGNATURE + "prc_uni_shift", TRUE);
|
||||||
|
|
||||||
|
// Add temporary onHit property
|
||||||
|
IPSafeAddItemProperty(oUnarmedWeapon,
|
||||||
|
ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1),
|
||||||
|
9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -480,8 +480,8 @@ void main()
|
|||||||
AddChoice("LA Buyoff.", 41);
|
AddChoice("LA Buyoff.", 41);
|
||||||
if(!GetPRCSwitch(PRC_DISABLE_ENCOUNTERS))
|
if(!GetPRCSwitch(PRC_DISABLE_ENCOUNTERS))
|
||||||
AddChoice("Visit an encounter area", 42);
|
AddChoice("Visit an encounter area", 42);
|
||||||
if(DEBUG) //this doesn't work at all
|
//if(DEBUG) //this doesn't work at all
|
||||||
//if(!GetPRCSwitch(PRC_APPEARNCE_CHANGE_DISABLE))
|
if(!GetPRCSwitch(PRC_APPEARNCE_CHANGE_DISABLE))
|
||||||
AddChoice("Change appearance.", 10);
|
AddChoice("Change appearance.", 10);
|
||||||
AddChoice("Miscellaneous options.", 11);
|
AddChoice("Miscellaneous options.", 11);
|
||||||
if(DEBUG)//TO DO: add separate switch
|
if(DEBUG)//TO DO: add separate switch
|
||||||
@@ -1193,6 +1193,63 @@ void main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MarkStageSetUp(nStage, oPC);
|
||||||
|
}
|
||||||
|
else if(nStage == STAGE_APPEARANCE)
|
||||||
|
{
|
||||||
|
SetHeader("Select an appearance for your race:");
|
||||||
|
|
||||||
|
int nRace = GetRacialType(oPC);
|
||||||
|
int nGender = GetGender(oPC);
|
||||||
|
|
||||||
|
// Debug: Check what race we're dealing with
|
||||||
|
string sRaceName = Get2DACache("racialtypes", "Label", nRace);
|
||||||
|
FloatingTextStringOnCreature("Race: " + sRaceName + " (" + IntToString(nRace) + ")", oPC, FALSE);
|
||||||
|
|
||||||
|
if(nGender == GENDER_MALE)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for(i = 1; i <= 5; i++)
|
||||||
|
{
|
||||||
|
string sColumn = "Male" + IntToString(i);
|
||||||
|
string sAppearance = Get2DACache("racialappear", sColumn, nRace);
|
||||||
|
|
||||||
|
// Debug: Show what we're getting
|
||||||
|
FloatingTextStringOnCreature("Column " + sColumn + ": '" + sAppearance + "'", oPC, FALSE);
|
||||||
|
|
||||||
|
if(sAppearance != "" && sAppearance != "****")
|
||||||
|
{
|
||||||
|
int nAppearance = StringToInt(sAppearance);
|
||||||
|
string sName = Get2DACache("appearance", "LABEL", nAppearance);
|
||||||
|
if(sName == "")
|
||||||
|
sName = "Appearance " + sAppearance;
|
||||||
|
AddChoice(sName, nAppearance, oPC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // Female
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for(i = 1; i <= 5; i++)
|
||||||
|
{
|
||||||
|
string sColumn = "Female" + IntToString(i);
|
||||||
|
string sAppearance = Get2DACache("racialappear", sColumn, nRace);
|
||||||
|
|
||||||
|
// Debug: Show what we're getting
|
||||||
|
FloatingTextStringOnCreature("Column " + sColumn + ": '" + sAppearance + "'", oPC, FALSE);
|
||||||
|
|
||||||
|
if(sAppearance != "" && sAppearance != "****")
|
||||||
|
{
|
||||||
|
int nAppearance = StringToInt(sAppearance);
|
||||||
|
string sName = Get2DACache("appearance", "LABEL", nAppearance);
|
||||||
|
if(sName == "")
|
||||||
|
sName = "Appearance " + sAppearance;
|
||||||
|
AddChoice(sName, nAppearance, oPC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AddChoice("Back", CHOICE_RETURN_TO_PREVIOUS);
|
||||||
MarkStageSetUp(nStage, oPC);
|
MarkStageSetUp(nStage, oPC);
|
||||||
}
|
}
|
||||||
else if (nStage == STAGE_WILDSHAPE_SLOTS)
|
else if (nStage == STAGE_WILDSHAPE_SLOTS)
|
||||||
@@ -1740,7 +1797,9 @@ void main()
|
|||||||
else if(nChoice == 52)
|
else if(nChoice == 52)
|
||||||
nStage = STAGE_WIELDING;
|
nStage = STAGE_WIELDING;
|
||||||
else if(nChoice == 10)
|
else if(nChoice == 10)
|
||||||
|
{
|
||||||
nStage = STAGE_APPEARANCE;
|
nStage = STAGE_APPEARANCE;
|
||||||
|
}
|
||||||
else if(nChoice == 11)
|
else if(nChoice == 11)
|
||||||
nStage = STAGE_MISC_OPTIONS;
|
nStage = STAGE_MISC_OPTIONS;
|
||||||
else if(nChoice == 12)
|
else if(nChoice == 12)
|
||||||
@@ -2586,6 +2645,21 @@ void main()
|
|||||||
MarkStageSetUp(nStage, oPC);
|
MarkStageSetUp(nStage, oPC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(nStage == STAGE_APPEARANCE)
|
||||||
|
{
|
||||||
|
if(nChoice == CHOICE_RETURN_TO_PREVIOUS)
|
||||||
|
{
|
||||||
|
nStage = STAGE_ENTRY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Apply the selected appearance
|
||||||
|
SetCreatureAppearanceType(oPC, nChoice);
|
||||||
|
FloatingTextStringOnCreature("Appearance changed", oPC, FALSE);
|
||||||
|
nStage = STAGE_ENTRY;
|
||||||
|
}
|
||||||
|
MarkStageNotSetUp(nStage, oPC);
|
||||||
|
}
|
||||||
// Store the stage value. If it has been changed, this clears out the choices
|
// Store the stage value. If it has been changed, this clears out the choices
|
||||||
SetStage(nStage, oPC);
|
SetStage(nStage, oPC);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user