I've managed to add skill books to NPCs, by adding mine to the Fire Spell Book's treasure tables.
All you need to do is open up and add some lines to 'Stats\Generated\Links\Object.txt' and 'Stats\Generated\Data\Object.txt'; then modify 'Public\mod_directory_xxxx-xxxxxx-xxxx\RootTemplates\Books_Scrolls.lsb' by duplicating a pre-existing summon skill book entry and modifying it to match the data entered into the other .txt files.
1.)
'Stats\Generated\Links\Object.txt':
Here is an example of me adding a custom skill book called "SKILLBOOK_SummonKickstarterPetWhitecat":
object itemstat "SKILLBOOK_SummonKickstarterPetWhitecat","b0d4cfdb-71dc-468c-ace7-a558d00z5121","",0,0,"SkillbookFire",1,1,10,0,1,20
- NOTES:
- "b0d4cfdb-71dc-468c-ace7-a558d00z5121" - should be a unique ID so it doesn't interfere with any existing IDs, otherwise I believe it can be any combination of characters you want(but I'd keep this structure to be safe)
- "SkillbookFire" - Category to add the book to and from which it is spawned. In this case, NPCs which sell fire books or chests/bodies which have a chance to spawn them will have a chance to spawn your spell book(even if it's not a fire skill book it's self).
2.)
'Stats\Generated\Data\Object.txt':
new entry "SKILLBOOK_SummonKickstarterPetWhitecat"
type "Object"
using "_Skillbooks"
data "Act part" "6"
data "Requirements" "Level 4"
- NOTES:
- data "Act part" "6" - Basically, how soon in the story books will be available, I just used the same value as other Level 4 spells; copy from another item in 'Data\Object.txt' if unsure.
- data "Requirements" "Level 4" - Level requirement of the book when spawned.
3.) If you haven't done so already, a spell must be associated with it's skillbook in 'Stats\Generated\Data\SkillData.txt', by adding it below it's 'new entry' line and before the next spell's:
new entry "Summon_KickstarterPetBrowncow"
...
data "Skillbook" "SKILLBOOK_SummonKickstarterPetBrowncow"
4.) Modify 'Public\Enhanced_Skillbooks_25602373-8487-4951-9b8b-af40d658e15a\RootTemplates\Books_Scrolls.lsb'. You need a duplicated summon skillbook entry(your new entry will be at the bottom of the list, the first time you create it) and modifying all properties to match your skillbook's(there are additional object properties hidden in the '[+] GameObject' tree, if you expand it and navigate).
The mod I've created includes a number of other ones with some of my own tweaks and uses the same id as the 'Enhanced Skillbooks'(which may not be working in mine for some reason), in order to be compatible with any save files which previously used it.
My mod currently includes:
- 4 Player Mod.
- Improved Player Speed Mod(+30%).
- All strength requirements are set to 1, so other classes can utilize plate.
- Kick Starter Pets can be summoned from level 4 Earth skill books which are made available from any source a fire spell book can spawn(eg. fire spell shop or chests/corpses). However, they currently have no descriptive text, so which pet/spell you are getting from these added books is a surprise.
- All summons last until they die or are replaced.
I haven't released my mod, because it's a bit of a mash up catered to my self and currently all enabled summon-able kick-starter pets are considered level 4 earth skills, with no skills or stat adjustments, but I will offer the link for any one who wants to download/share/adjust it:
https://drive.google.com/file/d/0B5kweJTwMjQyS0ZLc0xMdm9qZFE/edit?usp=sharing