PDA

View Full Version : Adding New Campaign Data Record Types to the LibraryData Script



leozelig
December 23rd, 2021, 16:10
For some reason I am having a mental block on this even though I have done it before for other rulesets... I'm trying to add a new record type called a 'Destiny' to the 5E ruleset using an extension. I added the following code to aRecordOverrides in the LibraryData5E script:



["destiny"] = {
bExport = true,
aDataMap = { "destiny", "reference.destinydata" },
sRecordDisplayClass = "reference_destiny",
},

This generates a blank sidebar button under the Campaign menu. My questions are:

1. Why is the label not showing?
2. How do I move this to the Character menu?
3. How do I change the icon (say, to the Quests icon)?

Screenshot attached...

Trenloe
December 23rd, 2021, 16:44
1) Define the label in a string resource called library_recordtype_label_<record name> - in this case library_recordtype_label_destiny
2) Add sSidebarCategory = "player" - The defauls are set in CoreRPG scripts\manager_desktop.lua in the _tDefaultRecordTypeCategories LUA table.
3) Define an icon called sidebar_icon_recordtype_<record name> - in this case sidebar_icon_recordtype_destiny - see graphics\graphics_sidebar.xml in CoreRPG for some examples.

leozelig
December 23rd, 2021, 17:54
Awesome thank you Trenloe!