-
June 8th, 2023, 02:35 #1
- Join Date
- Dec 2022
- Posts
- 59
sOs SIDEBAR category how to add a ext to a custum sidebar category?! ext issue
I noticed that I can load only three ext under the campaign category! Is that normal? Is there a limit on the number of ext that can be loaded under the campaign if so how do I add my ext to a new custom category? what is the script code, and xml string code that goes with it? Did anyone else have this problem with loading more than three ext under the campaign category?!
thanks a bunch"When in doubt wing it!"
"cool, a different error code finally making some progress!"
-
June 8th, 2023, 02:56 #2
- Join Date
- Dec 2022
- Posts
- 59
I figured out how to add a new category but I can only load two sidebar ext at a time. is there a limit on ext use on the sidebar?
"When in doubt wing it!"
"cool, a different error code finally making some progress!"
-
June 8th, 2023, 09:28 #3
There's no limit on the number of extensions you can load. Provide examples of the code you're using to add sidebar buttons and maybe we can help identify the issue.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 8th, 2023, 11:29 #4
- Join Date
- Dec 2022
- Posts
- 59
I use this script code with PSIONICS IS THE EXT EXAMPLE NAME
Code:function onInit() LibraryData.aRecords ["PSIONICS"] = { bExport = true, aDataMap = { "PSIONICS", "reference.PSIONICS" }, sRecordDisplayClass = "PSIONICS", sSidebarCategory = "mycategory" , } end
Code:<?xml version="1.0" encoding="iso-8859-1"?> <root> <string name="library_category_label_mycategory">mycategory</string> <string name="library_recordtype_label_PSIONICS">PSIONICS</string> </root>
Last edited by twoditdmonk; June 8th, 2023 at 11:31.
"When in doubt wing it!"
"cool, a different error code finally making some progress!"
-
June 8th, 2023, 11:32 #5Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 8th, 2023, 12:20 #6
- Join Date
- Dec 2022
- Posts
- 59
I am lost! I dont know what to make of it.
THE FILE 5E.LUA is confusing way too much info!
Am I to use aRecords = {
Code:["skill"] = { bExport = true, aDataMap = { "skill", "reference.skilldata" }, aDisplayIcon = { "button_skills", "button_skills_down" }, sRecordDisplayClass = "reference_skill", aGMListButtons = { "button_skill_bystat" }; aPlayerListButtons = { "button_skill_bystat" }; aCustomFilters = { ["Type"] = { sField = "stat", fGetValue = getSkillTypeValue}, }, aPlayerListButtons = { "button_skills_type_player" }; },
Code:aRecords = { -- ["image"] = { -- bExport = true, -- bID = true, -- sIDOption = "IMID", -- aDataMap = { "image", "reference.images" }, -- aDisplayIcon = { "button_maps", "button_maps_down" }, -- sListDisplayClass = "masterindexitem_id", -- sRecordDisplayClass = "imagewindow", -- aGMListButtons = { "button_folder_image", "button_store_image" }, -- },
"When in doubt wing it!"
"cool, a different error code finally making some progress!"
-
June 8th, 2023, 12:25 #7
As I mentioned - look at the onInit function at the end of that file, it only does two things - set a custom handler (ignore that) and adds the custom records to the library.
Specifically, this is the code:
Code:for kRecordType,vRecordType in pairs(aRecords) do LibraryData.setRecordTypeInfo(kRecordType, vRecordType); end
Set the aRecords LUA table in that a similar file with the data you need to setup your sidebar buttons - there's plenty of examples in that file, and the CoreRPG library_data.lua file has a bunch of comments (and more examples). Then have an onInit function that does the above code.Last edited by Trenloe; June 8th, 2023 at 12:28.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 8th, 2023, 15:03 #8
- Join Date
- Dec 2022
- Posts
- 59
ok I looked through both files, and I admit I am lost (I am not new to code work every program uses its own values even though it's the same program language.) I need a clear example from start to Finish with psionics as an example in the code. sorry. I understand what you are saying I need to do it's just the exact code on how to achieve it escapes me.
I was up all night trying to come up with a working example code with no luck. I feel a little burned out. if someone can take the time I would appreciate it. the code I used is what was shown to me through a tutorial.
sorry again for asking for help.
thanks a bunch for your effort."When in doubt wing it!"
"cool, a different error code finally making some progress!"
-
June 8th, 2023, 15:49 #9
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 19,634
Look at the 4E ruleset in the file data_library_4E.lua. It's a simpler version of the other ones.
Try this simple example that I clipped from the 4E code:
Code:aRecordOverrides = { ["feat"] = { bExport = true, aDataMap = { "feat", "reference.feats" }, sRecordDisplayClass = "powerdesc", }, }; function onInit() LibraryData.overrideRecordTypes(aRecordOverrides); end
FG Wish List - https://fgapp.idea.informer.com/
-
June 8th, 2023, 16:09 #10
Or try this extension. It includes a basic "psionics" windowclass.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks