PDA

View Full Version : Variables List for coreRPG/5E



Weepdrag
September 19th, 2022, 00:57
Does anyone know if there is a variables index for the rulesets somewhere? I'm trying to find the variable names for the side buttons on CORE or 5E. Better yet, Is there a verbose debugger that would reveal the variables in general?

Thanks for all the fish

Moon Wizard
September 19th, 2022, 05:00
I'm not sure what you mean by "variables list". Every object defined in any Lua script is technically a variable. Which objects are you trying to reference? How are you trying to reference?

If you're only talking about the "record types" in the sidebar, then there is a LibraryData script in the CoreRPG ruleset that manages that; and rulesets can add additional data (such as LibraryData5E in the 5E ruleset).

Also, you can run the "/debug on" command in the chat entry box to turn on information about windows/controls that the mouse is hovering over. Any additional debugging has to be added into the ruleset/extension code.

Regards,
JPG

Weepdrag
September 19th, 2022, 17:21
Thanks Moon Wizard,
I was actually dissecting Damned's CoS Theme as a learning exercise because he was using text-string labels instead of graphic buttons. The code below was my issue:

<root>
<string name="library_recordtype_label_charsheet">Heroes</string>
<string name="library_recordtype_label_image">Images</string>
<string name="library_recordtype_label_battle">Battles</string>
<string name="library_recordtype_label_backgrounds">Background</string>
</root>
I couldn't seem to find the definition for the string variables until looking in data_Library.lua in CoreRPG.

Question:
If I were to modify the above code with this addition to:

<string name="library_recordtype_label_note">Memos</string>

Considering the following is already in place in data_Library.lua

["note"] = {
bNoCategories = true,
sEditMode = "play",
aDataMap = { "notes" },
sListDisplayClass = "masterindexitem_note",
-- sRecordDisplayClass = "note",
Is there an additional place the code would need modifying?

Thanks again

Moon Wizard
September 19th, 2022, 19:18
For the label of the record on the sidebar and related tooltip, that's all you would need to add.

Regards,
JPG

Weepdrag
September 19th, 2022, 20:02
Thanks Moon Wizard

damned
September 20th, 2022, 00:30
Just the string should work.

Weepdrag
September 20th, 2022, 17:01
Worked like a charm, thanks