// 0.79.9

//
//  THE EASY WAY
// 
//  If your kit's deity/ethos is already handled by the Faiths & Powers sphere systems, 
//  and if you want your kit to have default usability and proficiencies,
//  you can just paste this:

//DEFINE SPHERE ACCESS______________________________________________________________
//
INCLUDE ~%MOD_FOLDER%/lib/fnp_compatibility.tpa~
ACTION_IF (FILE_EXISTS_IN_GAME ~fnp_sphere_list.tpa~) BEGIN
  INCLUDE ~override/fnp_sphere_list.tpa~
  LAF ~DEFINE_FNP_KIT_INFO~
	STR_VAR
      clab_name 	= ~[clab file]~
      class 		= ~cleric~
      sphere_list 	= ~[deity]_spheres~
  END
  LAM ~READ_FNP_KIT_INFO~
  ACTION_IF FILE_EXISTS_IN_GAME ~d5__spheres.d5~ BEGIN
    LAF apply_fnp_spheres STR_VAR clab_name = ~[clab file]~ END
  END
  ACTION_IF FILE_EXISTS_IN_GAME ~d5__fnp_usability.d5~ BEGIN
    LAF apply_fnp_usability STR_VAR clab_name = ~[clab file]~ END
  END
END
//__________________________________________________________________________________

// Substitute the appropriate text for everything in [ square brackets ] and paste it 
// into your mod, somewhere after the kit itself is installed.




//
// THE MORE-INVOLVED WAY
// 
//  If your kit follows a new/different delty, or you just want it to have special 
//  handling for spheres and/or usability, you can define the variables yourself.
//  They are explained below.  (You can omit any variables you don't want to custom-define.)

//DEFINE SPHERE ACCESS______________________________________________________________
//
INCLUDE ~%MOD_FOLDER%/lib/fnp_compatibility.tpa~

ACTION_IF (FILE_EXISTS_IN_GAME ~fnp_sphere_list.tpa~) BEGIN
  INCLUDE ~override/fnp_sphere_list.tpa~
END

LAF ~DEFINE_FNP_KIT_INFO~
  INT_VAR
//
// put a '1' next to the types of armor usable by the kit
// put a number from '1' to '5' next to the weapons the kit can use
// the number will determine the kit's proficiency limits with those weapons
//
	u_leather_armor 	= 1
	u_chain_armor 		= 0
	u_plate_armor 		= 0
	u_club_staff	 	= 1
	u_hammers	 		= 1
	u_maces 	 		= 1
	u_flails 			= 1
	u_axes 				= 0
	u_daggers 			= 1
	u_short_swords		= 1
	u_long_swords		= 0
	u_scimitars 		= 0
	u_katanas 			= 0
	u_bastard_swords 	= 0
	u_2hand_swords 		= 0
	u_halberds 			= 0
	u_spears 	 		= 1
	u_darts 			= 0
	u_slings	 		= 1
	u_bows 				= 0
	u_crossbows 		= 1
//
  STR_VAR
//
// The "class" variable tells the mod what class or archetype your kit is.
// Enter 'cleric' 'druid' 'shaman' 'paladin' 'zealot' or 'ranger'
// If multiclass, enter 'fighter_cleric' 'cleric_mage' 'cleric_thief' 'ranger_cleric' or 'fighter_mystic'
//
// The "multiclass" variable tells the mod that this (single-class) kit can be cloned as a multiclass kit.
// If a cleric, you can enter some combination of "fc_cr_ct_cm" (can be just "fc" or "cr_cm" or whatever).
// If a druid, you can enter "fd" to create a fighter/druid version.
//
// The "sphere_list" variable lets you link your kit to a particular deity or other kit already in the sphere system.
// See /faiths_and_powers/data/sphere_systems/sphere_list_fnp.tpa for a list.
// If you enter a deity here, e.g. "helm_spheres", then you can omit the rest of the sphere variables.
// You can still include *some* sphere variables; they will override that sphere in the deity's sphere list.
// 
// For selected sphere variables, enter 'focus' 'major' 'minor' 'paladin' or 'ranger'
//
    clab_name 	= ~[your kit's clab.2da filename]~
	class 			= ~x~	 
	multiclass		= ~x~
	sphere_list		= ~custom~
	s_Life 			= ~x~
	s_Death 		= ~x~
	s_Benediction 	= ~x~
	s_Destruction 	= ~x~
	s_Protection 	= ~x~
	s_War 			= ~x~
	s_Exploration   = ~x~
	s_Knowledge 	= ~x~
	s_Deception 	= ~x~
	s_Thought 		= ~x~
	s_Dread 		= ~x~
	s_Vigor 		= ~x~
	s_Affliction 	= ~x~
	s_Animal 		= ~x~
	s_Plant 		= ~x~
	s_Earth 		= ~x~
	s_Water 		= ~x~
	s_Air 			= ~x~
	s_Fire 			= ~x~
	s_Light 		= ~x~
	s_Shadow 		= ~x~
	s_Magic 		= ~x~
	s_Astral        = ~x~
END

LAM ~READ_FNP_KIT_INFO~

ACTION_IF FILE_EXISTS_IN_GAME ~d5_spheres.d5~ BEGIN
	LAF apply_fnp_spheres STR_VAR clab_name = ~[your kit's clab.2da name]~ END
//
// 	if this is an NPC mod, put your divine-class .cre file(s) here and uncomment the following 5 lines
/*
  ACTION_FOR_EACH cre_file IN ~this_npc~ ~this_npc25~ BEGIN
	COPY_EXISTING  ~%cre_file%.cre~ ~override~
	  REMOVE_MEMORIZED_SPELLS
	BUT_ONLY
  END
*/
END

ACTION_IF FILE_EXISTS_IN_GAME ~d5_fnp_usability.d5~ BEGIN
	LAF apply_fnp_usability STR_VAR clab_name = ~[your kit's clab.2da name]~ END
END

ACTION_IF (FILE_EXISTS ~override/d5_fnp_settings.ini~) BEGIN
  INCLUDE ~override/d5_fnp_settings.ini~
  LAM d5_spont_option
  ACTION_IF (d5_spell_spontaneous > 0) BEGIN
	APPEND ~[your kit's clab.2da]~ ~SPNT_SPLS    GA_D5FPSP2  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        **** ~
  END
END

ACTION_IF (FILE_EXISTS_IN_GAME ~d5__fnp_spont_option.d5~) AND (FILE_EXISTS ~faiths_and_powers/lib/system_fnp_spontaneous.tpa~) BEGIN
  ACTION_IF (FILE_EXISTS ~faiths_and_powers/language/%LANGUAGE%/fnp_spontaneous.tra~) BEGIN
    OUTER_SPRINT spont_lang ~%LANGUAGE%~
  END ELSE BEGIN
    OUTER_SPRINT spont_lang ~english~
  END
  ACTION_IF (FILE_EXISTS ~faiths_and_powers/language/%spont_lang%/fnp_spontaneous.tra~) BEGIN
    WITH_TRA ~faiths_and_powers/language/%spont_lang%/fnp_spontaneous.tra~ BEGIN
      INCLUDE ~faiths_and_powers/lib/system_fnp_spontaneous.tpa~
      LAF fnp_spontaneous STR_VAR kit_clab = ~[your kit's clab.2da name]~ learn_res = ~[a variation on your kit's clab.2da name]~ END
    END
  END
END
// NOTE, the 'learn_res' variable above can only be seven characters long. 
//     For six-character clab files, like "b_ctyr.2da," FnP adds a z, to become "b_ctyrz"
//     For seven-character clab files, like "d5clmys.2da," FnP might replace a letter with a z, to become "d5clmyz"
//     For eight-character clab files, you'll have to figure something out. But, you don't put eight-character files into the game, do you??

ACTION_IF (FILE_EXISTS_IN_GAME ~d5_cleric_umd.d5~) BEGIN
  APPEND ~[your kit's clab.2da]~ ~NO_UMD      AP_D5_NUMD  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        **** ~
END
//__________________________________________________________________________________
