PDA

View Full Version : Reference Manuals for Star Wars EOTE Ruleset



shikage
July 27th, 2017, 19:32
I would like to extend the Star Wars EOTE Ruleset with the ability to include Reference Manual library modules. It does not currently support this and I am hoping some of the more experienced minds here can help me get onto the right track with this. I had thought I could look for what manages this in the 5E or CoreRPG ruleset code and use this is a starting point on how I might implement it within the SW RPG ruleset. Unfortunately, I am having difficulties finding where it has anything for this other than a few mentions of referencepage and referencelist but no lua managing it. Is it just necessary to create frame definitions for these in the ETOE ruleset to enable reference manual library modules or am I missing some related code that handles this?

Trenloe
July 27th, 2017, 19:40
Look at the XML and scripts in the \ref directory in the CoreRPG ruleset. There are various areas to the reference manual, contained in the ref_manual.xml file (and associated scripts which are referenced in this file).

Details on data layout is available here: https://www.fantasygrounds.com/wiki/index.php/Reference_Manuals which should help you find the relevant classes in the FG XML (start with the two classes mentioned in the "Overview" section).

Talyn
July 27th, 2017, 20:44
@Trenloe -- what's the trick to load the .mod file to begin with? I click the Library button but I'm not seeing any buttons or anything to load any modules.

shikage
July 27th, 2017, 20:56
@Trenloe -- what's the trick to load the .mod file to begin with? I click the Library button but I'm not seeing any buttons or anything to load any modules.

In the Star Wars EOTE ruleset there is a small button for modules at the top along with the buttons for settings, characters, etc.. this can be used to load modules into the ruleset.

Talyn
July 27th, 2017, 21:04
Aha, thanks, I'd never looked at the EotE ruleset before now. I was going to offer to do the reference manual markup in my spare time but it doesn't look like this is a CoreRPG-layered ruleset to begin with???

shikage
July 27th, 2017, 21:15
Aha, thanks, I'd never looked at the EotE ruleset before now. I was going to offer to do the reference manual markup in my spare time but it doesn't look like this is a CoreRPG-layered ruleset to begin with???

Not currently. I believe there is work being done towards that but no estimate on when that can be completed. So, in the meantime.. I am very slowly picking some features I'd like to see and working them into extensions. This one will be significant work so is likely to take me quite awhile to get all the pieces together and working. There's also some additional extensions to the dice rolling in this ruleset I'd like to include in my previous extension. Like ways for the GM to manipulate the dice pool of players a bit more (upgrade/downgrade the dice, add successes, etc..)

shikage
July 28th, 2017, 02:24
Look at the XML and scripts in the \ref directory in the CoreRPG ruleset. There are various areas to the reference manual, contained in the ref_manual.xml file (and associated scripts which are referenced in this file).

Details on data layout is available here: https://www.fantasygrounds.com/wiki/index.php/Reference_Manuals which should help you find the relevant classes in the FG XML (start with the two classes mentioned in the "Overview" section).

Thanks again for an amazingly fast response that was extremely helpful. I've actually made some reasonable progress so far, in that I am able to use /openwindow reference_manual to load an empty reference manual frame, and similar for /openwindow reference_manualtextwide.

Two things I am struggling with:
1) Why does it not attempt to open this window when clicking the reference module in the library window. There is no error or warning in the console and when clicking nothing at all happens. I see the module in it's category, and I see the reference manual link after selecting the module, but can not launch the reference manual from the link.

2) How do I push a data source to the /openwindow command? That is, what is the format of the datasource (let's assume a module with name = TestManual and filename test.mod with the following common.xml)



<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="3.0">
<reference>
<referencemanual>
<page>
<name type="string">Page 1</name>
<blocks>
<block1>
<blocktype type="string">text</blocktype>
<text type="formattedtext">
<p>The first page, in the first topic of the first chapter</p>
</text>
</block1>
</blocks>
</page>
</referencemanual>
</reference>
<lists>
<RefManual>
<chapters>
<r01Chapter>
<name type="string">Chapter 1</name>
<subchapters>
<topic>
<name type="string">Topic 1</name>
<refpages>
<page>
<listlink type="windowreference">
<class>reference_manualtextwide</class>
<recordname>reference.referencemanual.page</recordname>
</listlink>
<name type="string">First Page</name>
<keywords type="string">reference page</keywords>
</page>
</refpages>
</topic>
</subchapters>
</r01Chapter>
</chapters>
</RefManual>
</lists>
<library>
<ReferenceTest>
<name type="string">Test Manual</name>
<categoryname type="string">References</categoryname>
<entries>
<r01refmanual>
<librarylink type="windowreference">
<class>reference_manual</class>
<recordname>lists.RefManual</recordname>
</librarylink>
<name type="string">Reference Manual</name>
</r01refmanual>
</entries>
</ReferenceTest>
</library>
</root>

Trenloe
July 28th, 2017, 03:52
1) Why does it not attempt to open this window when clicking the reference module in the library window. There is no error or warning in the console and when clicking nothing at all happens. I see the module in it's category, and I see the reference manual link after selecting the module, but can not launch the reference manual from the link.

listlink is just for links that stay within the Star Wars library structure, they won't open windows external to that. For your library section use this:

<library>
<ReferenceTest>
<name type="string">Test Manual</name>
<categoryname type="string">References</categoryname>
<entries>
<r01refmanual>
<classname type="string">reference_manual</classname>
<recordname type="string">lists.RefManual@TestManual</recordname>
<name type="string">Reference Manual</name>
</r01refmanual>
</entries>
</ReferenceTest>
</library>



2) How do I push a data source to the /openwindow command? That is, what is the format of the datasource (let's assume a module with name = TestManual and filename test.mod with the following common.xml)
/openwindow reference_manual lists.RefManual@TestManual

shikage
July 28th, 2017, 04:22
@Trenloe

Many thanks, that absolutely did the trick. The appearance leaves a LOT to be desired currently as I just pulled it in from CoreRPG and I suspect some portions of the display are not being loaded for whatever reason, plus it doesn't match the EOTE ruleset look and feel at all, but it does in fact work. I'll see what time I get in the next few days to make it reasonably presentable and hopefully soon I can have an alpha version extension for people to test out.

shikage
July 29th, 2017, 08:00
My latest question on this would be.. is it possible to get the formatted text within a reference manual to be passed through the text replacement for the EOTE Ruleset? Primarily, is it possible to get the dice and symbol substitutions within the reference manual content?

Trenloe
July 29th, 2017, 16:47
My latest question on this would be.. is it possible to get the formatted text within a reference manual to be passed through the text replacement for the EOTE Ruleset? Primarily, is it possible to get the dice and symbol substitutions within the reference manual content?
As you're using a reference manual - which is never edited within the campaign, it is static text, you can just use the original text replacement values in your text. See classes/common/baseformattedtextfield.lua for the replacement values. For example, a success which uses original text = (S) is replaced with &#255;

Also keep in mind that only one EotE ruleset font has these symbols in them: chatfont

shikage
July 30th, 2017, 01:27
As you're using a reference manual - which is never edited within the campaign, it is static text, you can just use the original text replacement values in your text. See classes/common/baseformattedtextfield.lua for the replacement values. For example, a success which uses original text = (S) is replaced with ÿ

Also keep in mind that only one EotE ruleset font has these symbols in them: chatfont

I did get this to work, thanks. I had hoped it might be possible to do some processing of the text before it is rendered/displayed so that module authors can use the far simpler substitutions instead of the character codes. Is it correct that these icons in the formatted text fields are intended to not be fully colored? I expect it is but just checking.

Also, I've got most of the graphics aligned with the ruleset aside from some margin issues I think. However, all of the current window headers have the text coded into them and there's not blank template. Do you have a template, could make a new header with Reference on it, or could refer me to who might have these? I think a blank one is good, and the font used if possible, and then I can make the header more dynamic, prepping the way for translations, and hopefully easing the transition to layering this piece onto Core.

Trenloe
July 30th, 2017, 07:35
I did get this to work, thanks. I had hoped it might be possible to do some processing of the text before it is rendered/displayed so that module authors can use the far simpler substitutions instead of the character codes.
I doubt this is possible as the reference manual data is read only.


Is it correct that these icons in the formatted text fields are intended to not be fully colored? I expect it is but just checking.
The fonts are limited to 4 levels of greyscale (including black and white).


However, all of the current window headers have the text coded into them and there's not blank template. Do you have a template, could make a new header with Reference on it, or could refer me to who might have these? I think a blank one is good, and the font used if possible, and then I can make the header more dynamic, prepping the way for translations, and hopefully easing the transition to layering this piece onto Core.
String controls have two ways of specifying within XML what they contain (if the contents of the control is not data stored in the database) - i.e. labels, headings and such won't have that data in the database it ill be specified in the XML definition. Look at the Definition for the string control here: https://www.fantasygrounds.com/refdoc/stringcontrol.xcp Look at the <static>.. <textres> entry if you want to replace the hard coded string with a <string> entry. Do a search for textres in CoreRPG and you'll see plenty of examples of this being used, the <string> definitions are in the various files in the \strings directory.

shikage
July 30th, 2017, 08:47
String controls have two ways of specifying within XML what they contain (if the contents of the control is not data stored in the database) - i.e. labels, headings and such won't have that data in the database it ill be specified in the XML definition. Look at the Definition for the string control here: https://www.fantasygrounds.com/refdoc/stringcontrol.xcp Look at the <static>.. <textres> entry if you want to replace the hard coded string with a <string> entry. Do a search for textres in CoreRPG and you'll see plenty of examples of this being used, the <string> definitions are in the various files in the \strings directory.

I follow this already. What I have noticed though is in the current Star Wars EotE ruleset the labels at the top of windows such as Library, Portraits, Preferences, Modules, etc.. have static images which include the heading text in a pretty nice font included in the image. I am now realizing there is enough empty space I could chop up the image a little differently to effectively have myself a blank template. This would let me overlay text from the Strings definitions onto an image that would at least suit the overall appearance of the ruleset better. Ideally, if I could get the font used then I could either use that font for the string overlaid onto the image or I could make a new static image that follows the same style as the existing ones. I've actually implemented the use of a string overlaid onto a blank heading, which does get me close to the results for the rest of the titles, as shown in the attachments.

Trenloe
July 30th, 2017, 15:59
Lobosolo did the graphics. Drop them a PM to see what font they used.

shikage
July 30th, 2017, 17:16
Thanks, I'll look into that.