Greetings. I have no desire to learn any more than I need to for modding this game than I absolutely need to. I just want to be able to alter my gameplay to suit my desire. In this situation, I have been wanting to fiddle with the Crossroads Keep subgame.
I extracted the 21_module_load.NSS and did a simple numeric change to increase the number of initial peasants at module load and attempted to use the built-in script compiler with the toolset.
I receive an error that tells me I have an invalid declaration type on a script not even loaded, (kinc_globals.nss(1): ERROR: INVALID DECLARATION TYPE).
I have not changed any script functions, only altered the number 5 to 50.
My initial thoughts is that the original script was written using an older format that the game designers used which the subsequent mod community has improved upon, requiring syntax updates. Here is the NSS file for anyone magnanimous enough to peruse. Any enlightenment would be appreciated.
// 21_module_load
/*
This is the custom on module load for Crossroad Keep.
It sets the starting variables for the Keep.
*/
// FAB 9/29
// ChazM 10/03/05 - added initial Joiners.
#include “21_inc_cr_vars”
#include “ginc_debug”
void main()
{
int nCheck = GetGlobalInt( "21_Mod_Load" );
if ( nCheck == 0 )
{
// Spawn the recruits who are in Crossroad Keep by default at the beginning.
SetGlobalInt(JOIN_KANA , 1);
SetGlobalInt(JOIN_VEEDLE , 1);
SetGlobalInt(JOIN_WOLF , 1);
SetGlobalInt(JOIN_SAL , 1);
SetGlobalInt(JOIN_UNCUS , 1);
SetGlobalInt(UNIT_COUNT, 100); // This is the number of troops at the start
SetGlobalInt(PEASANTS, 500 ); // This is the number of peasants on the PC's lands
SetGlobalInt(MERCHANTS, 10 ); // This is the number of merchants using the road
SetGlobalInt(RECRUITING_BAR, 5); // This is the default elite rating
ChangeCivility( -1, 1); // -1 is the starting civility of the Greycloak troops
SetGlobalInt( "21_Mod_Load",1 ); // Don't run this "if" section again.
PrettyDebug( "Initial variables set." );
}
ExecuteScript( "k_mod_load",OBJECT_SELF ); // Continue with default loading script
}