PDA

View Full Version : Add a button to the (new) Sidebar



Maspalio
February 27th, 2021, 18:20
Hello,

I don't get it, trying to figure how to add a new section to the sidebar.
For a CoreRPG_based ruleset, i created a record_guild.xml to populate with specificities. But the button don't show up in the Sidebar.
I looked into 5E ruleset but didn't find out how sheets like Feats, Class, Backgrounds are automaticaly added to the Sidebar.
In last resort, i duplicate the CoreRPG record_vehicule.xml and renamed it to something else, called via the base.xml. No success either.

What am i missing ?
How to make my record_whatever pop up ?

Can someone please help me with that ?

damned
February 27th, 2021, 23:35
Something like this:



--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

aRecords = {
["mc_investigator"] = {
bNoCategories = true,
sEditMode = "play",
aDataMap = { "mc_investigator", "reference.mc_investigator" },
aDisplayIcon = { "button_investigator", "button_investigator_down" },
sListDisplayClass = "masterindexitem_investigator",
-- sRecordDisplayClass = "note",
},
["ability"] = {
bExport = true,
sEditMode = "play",
aDataMap = { "ability", "reference.ability" },
aDisplayIcon = { "button_mcability", "button_mcability_down" },
-- sListDisplayClass = "ability",
},
["mc_locations"] = {
sEditMode = "play",
aDataMap = { "mc_locations", "reference.mc_locations" },
aDisplayIcon = { "button_mc_locations", "button_mc_locations_down" },
sListDisplayClass = "mc_locations",
-- sRecordDisplayClass = "note",
},
["pcclass"] = {
bExport = true,
sEditMode = "play",
aDataMap = { "pcclass", "reference.pcclass" },
aDisplayIcon = { "button_pcclass", "button_pcclass_down" },
sRecordDisplayClass = "pcclass",
},
["pcrace"] = {
bExport = true,
sEditMode = "play",
aDataMap = { "pcrace", "reference.pcrace" },
aDisplayIcon = { "button_pcrace", "button_pcrace_down" },
sRecordDisplayClass = "pcrace",
},
["mc_world"] = {
bExport = true,
sEditMode = "play",
aDataMap = { "mc_world", "reference.mc_world" },
aDisplayIcon = { "button_world", "button_world_down" },
sRecordDisplayClass = "mc_world",
},
["mc_organisations"] = {
sEditMode = "play",
aDataMap = { "mc_organisations", "reference.mc_organisations" },
aDisplayIcon = { "button_mc_organisations", "button_mc_organisations_down" },
sListDisplayClass = "mc_organisations",
},
["cas"] = {
bExport = true,
sEditMode = "play",
aDataMap = { "cas", "reference.cas" },
aDisplayIcon = { "button_cas", "button_cas_down" },
-- sListDisplayClass = "cas",
-- sRecordDisplayClass = "note",
},
};

Trenloe
February 28th, 2021, 08:35
The code @damned has posted is from the ruleset data_library code - which sets the sidebar buttons (among other things). For CoreRPG this is scripts\data_library.lua - there are lots of comments at the beginning of that file. Rulesets usually expand on this with a data_library_<ruleset name>.lua file, e.g. data_library_5E.lua.

Maspalio
February 28th, 2021, 09:00
Thank you very much, I located thanks to your indications. It seems obvious once someone points it out to you. :D