NWN1 Blast from the ALFA past ... Level 4 Validation
Posted: Sun Jun 25, 2017 9:24 pm
Had forgotten all about that
Faerun Lives
http://www.alandfaraway.info/phpBB3/
http://www.alandfaraway.info/phpBB3/viewtopic.php?f=3&t=52020
Its not in the onplayerlevelup part of the module scripts?ayergo wrote:Dirtiest of the PGers!
I should have remembered about that because it messed with my testing a lot. I don't know at what point it changed but it used to only kick in at level 10 and I haven't been able to find the code for it.
Will dig in and see. Didn't expect to have such dedicated players!Arianna wrote:Its not in the onplayerlevelup part of the module scripts?ayergo wrote:Dirtiest of the PGers!
I should have remembered about that because it messed with my testing a lot. I don't know at what point it changed but it used to only kick in at level 10 and I haven't been able to find the code for it.
Agree 150% on that and I'm working on it. Give me until July 9th and I'll have some more content up and the sewers a bit more reasonable.Stormbringer wrote:Need more areas to explore... The Rat hills are getting deadly with the super swarms and same with the sewers. Either more gold earned so we can better equip our toons or something needs to give. Would love to look into Daggerford server and see if it is worth hosting/fixing up. Maybe tie it into WD so peeps have other places to explore.
Arianna wrote:the script that controls the level validation is csm_onlvlup, unfortunately it is in the ahp_3.0_2da.hak
You may be able to override it by-
open your script editor , click all resources, find csm_onlelvlup , open it change line 25
from
if ( nLevel < 3 )
to
if ( nLevel < 10 )
save and compile, save mod. This places the script in the mod itself.
Removing the script would cause other scripts to fail
I think mod scripts overide hak scripts but not 100% certain on this
Ideally the hak script should be changed to conserve resources
Code: Select all
#include "csm_include"
void main()
{
object oPC = GetPCLevellingUp();
object oModule = GetModule();
string sID = GetName( oPC ) + GetPCPublicCDKey( oPC );
int nExp = GetXP( oPC );
int nLevel = GetHitDice( oPC );
int nNewExp = CSM_GetXPForLevel( nLevel ) - 1;
int nFlag = GetLocalInt( oModule, ALFA_ALLOW_LEVELUP+sID );
if ( nLevel < 3 )
return;
// If the player has been granted XP by a DM, the player's good to go
if ( nFlag )
{
SetLocalInt( oModule, ALFA_ALLOW_LEVELUP+sID, FALSE );
return;
}
// Drop the player to within 1 xp of the level he just made
SetXP( oPC, nNewExp );
SendMessageToPC( oPC, "Congratulations, adventurer! Please see a DM to proceed to the next level of power." );
SendMessageToPC( oPC, sID + ", your level has been calculated at " + IntToString( nLevel ) + "." );
}
Code: Select all
void ALFA_OnPlayerLevelUp()
{
object oPC = GetPCLevellingUp();
/* Force DM assistance on levels 11+ */
ExecuteScript( "csm_onlvlupaay", OBJECT_SELF );
/* Subraces */
ExecuteScript( "sei_subracelvlup", OBJECT_SELF );
/* Animal Companions */
AC_OnLevelUp(oPC);
/* Familiar adjustment */
FamiliarCheckOnLevelUp(oPC);
/* User Defined */
SignalEvent( OBJECT_SELF, EventUserDefined(ALFA_EVENT_MODULE_ON_LEVEL_UP) );
}