PDA

View Full Version : Reference Module & Character Race (Core RPG Unity)



Casimir
April 18th, 2022, 18:56
I've got a reference module that I designed for my campaign that was set up to be used with D&D 5E. I have different race setups in my campaign, and these were set so that they would show up in the Races Category in 5E like any other racial record. I'm now, however, interested in switching my campaign over to Lonarandir's Mythras ruleset Mod for CoreRPG - and of course naturally the Races list doesn't pop up any of the records when I click on the race links with that ruleset.

So my question is how can I modify my Module to include a subCategory, or Category, of Races in CoreRPG? Is there an easy way of simply enabling something, or will I need to do it via LUA scripting by adding a new Category?

Moon Wizard
April 18th, 2022, 19:07
That is something that has to be added via a Ruleset or Extension; as the CoreRPG system has no inherent records for that type of data.

Regards,
JPG

Casimir
April 22nd, 2022, 19:48
Alright, I've figured out how to do this with an exension (through combing through the CoreRPG files and some other extensions). But I'm now stuck on the graphics themselves. All but one button show the default button icon (a 20 sided die graphic), and I'd like to change them to better reflect their purpose. However, I can't seem to locate the graphic references themselves. There are a bunch of icons that seem to be the same ones used in /graphics/sidebar, but when I attempt to use those filenames I still get the default 20 sided die graphic. Right now I have one that displays the correct graphic and a couple that do not. Here is the LUA for the one that works:



function onInit()
LibraryData.aRecords["race"] = {
aDataMap = { "race", "reference.racedata" },
aDisplayIcon = { "button_races", "button_races_down" },
sRecordDisplayClass = "reference_race",
bExport = true,
}
end

The buttons that do not work use the exact same basic code, but the aDisplayIcon doesn't seem to work (and, in truth, the "button_races" listed in aDisplayIcon was lucky). I've tried using the filenames of the icon graphics in the /graphics/sidebar folder and none seem to work.

The "data_library.lua" file shows button data of course, but I can't seem to figure out the icon graphic specifically from that code. Instead of showing aDisplayIcon with the button graphic name (wherever that is located), it instead shows aGMListButtons, which I'm assuming is the button icon graphic reference. I've attempted to replace the aDisplayIcon with aGMListButtons in my LUA code but that doesn't work either.

Could someone by chance point me in the right direction? Is there a reference file somewhere that has those graphics listed with specific class names?

Trenloe
April 23rd, 2022, 01:16
Don't use filenames, use the icon definition names.

https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996645466/icon

They'll be defined in the various .xml files in \graphics.

Casimir
April 23rd, 2022, 23:45
Okay, thanks Trenloe - that did help a bit.

But, I'm still not finding what I need. I've opened up the graphics_ref.xml, the graphics_icons.xml, and the graphics_sidebar.xml and combed through them looking for the icon filenames I wanted to use, then copied the icon definition names into my LUA script. That doesn't seem to be working... I'm still left with the default 20 sided die icon.

What's interesting too is that the icon definition name I used in my example above (i.e., "button_races") I cannot find anywhere in any of those files - and I've attempted to look for it in the other graphic.xml files located in the /graphics directory as well, with no success. And for whatever reason, that one works.