t3xx3r
March 13th, 2022, 18:41
Hello y'all,
I am new to Fantasy Grounds since a few days ago subscribing to Fantasy Grounds Ultimate and using FGU. So far, I love the program and I want to learn more about it each day. However, I have several questions I'd like to raise in this forum. With the language fonts easily coded in, using Mattekure's Fonts - Fantasy Extended, I've learned certain rulesets will only adopt the use of converting the original text into the text of the selected language (and its font) and translate it for others while other rulesets do not adopt this kind of thing, i.e. GURPS 4E ruleset. Suppose for a moment that the author will update his ruleset to meet a request from a fellow member of Fantasy Grounds, here are some of the questions I'd like to raise:
1. Is it possible to extend an extension's usage without requiring a ruleset to interface and read the strings off of the text, converting it into the selected font's style?
2. If 1 can be answered yes, then how would an extension be able to read itself through the campaign itself and "convert" the text itself through the extension, not the ruleset itself?
I'll explain a bit further because I think I may be confusing others. Let's use WFRP 2E, authored by Paul Pratt, as an example. I've unpacked the ruleset to examine how the font conversion works. So far, I've been able to trace the fonts inside the files itself:
a) A base.xml reading and sourcing the other .xml files inside using the <include file source = "" >. This one is important because it'll read the graphic fonts in.
b) The strings_wfrp.xml contains the <!-- Languages --> section in which the following code are used: <string name="">(actual name)</string>. These are reading the fonts inside an appropriate folder.
c) The managergamesystems.lua file contains every aspect of the game system and how it's managed. Here's where it gets interesting. The languages are inputted with the specific keyword [Interface.getString("same string name")]="actual name",
i.) The , after it is important. It's read as end of line so it stops and then reads the next statement. If you blank the "" after the [], it won't read the font appropriately.
ii.) to read Elvish, it would be [Interface.getString("language_value_elvish")]="Elvish",
d) Then the graphicsfont.xml file (however you want to name it but it is above the folder of all the fonts inside. It would read all the fonts like this:
<font name="Elvish">
.....<ttf file="graphics/fonts/Elvish.ttf" name="Tolkien_Elvish" size="14" />
.....<color value="#000000" />
</font>
I have outlined at least 4 different files that are in 4 different places. What I am trying to say, if I'm confusing anyone from before, is the original question I wanted to ask:
Is it possible to extend and use an extension to hold in all the fonts inside a graphics font folder and be able to read/get the font resource/convert/display the texts appropriately without requiring a ruleset to "handle" the font conversion?
Because if it is possible, sharing the code with others who can enable using the fonts inside a program using a barebones empty program with the necessary patchwork takes out the guesswork of having to unpack, read, and modify the ruleset to read the language fonts appropriately.
:worried: I hope I didn't confuse anyone.
I am new to Fantasy Grounds since a few days ago subscribing to Fantasy Grounds Ultimate and using FGU. So far, I love the program and I want to learn more about it each day. However, I have several questions I'd like to raise in this forum. With the language fonts easily coded in, using Mattekure's Fonts - Fantasy Extended, I've learned certain rulesets will only adopt the use of converting the original text into the text of the selected language (and its font) and translate it for others while other rulesets do not adopt this kind of thing, i.e. GURPS 4E ruleset. Suppose for a moment that the author will update his ruleset to meet a request from a fellow member of Fantasy Grounds, here are some of the questions I'd like to raise:
1. Is it possible to extend an extension's usage without requiring a ruleset to interface and read the strings off of the text, converting it into the selected font's style?
2. If 1 can be answered yes, then how would an extension be able to read itself through the campaign itself and "convert" the text itself through the extension, not the ruleset itself?
I'll explain a bit further because I think I may be confusing others. Let's use WFRP 2E, authored by Paul Pratt, as an example. I've unpacked the ruleset to examine how the font conversion works. So far, I've been able to trace the fonts inside the files itself:
a) A base.xml reading and sourcing the other .xml files inside using the <include file source = "" >. This one is important because it'll read the graphic fonts in.
b) The strings_wfrp.xml contains the <!-- Languages --> section in which the following code are used: <string name="">(actual name)</string>. These are reading the fonts inside an appropriate folder.
c) The managergamesystems.lua file contains every aspect of the game system and how it's managed. Here's where it gets interesting. The languages are inputted with the specific keyword [Interface.getString("same string name")]="actual name",
i.) The , after it is important. It's read as end of line so it stops and then reads the next statement. If you blank the "" after the [], it won't read the font appropriately.
ii.) to read Elvish, it would be [Interface.getString("language_value_elvish")]="Elvish",
d) Then the graphicsfont.xml file (however you want to name it but it is above the folder of all the fonts inside. It would read all the fonts like this:
<font name="Elvish">
.....<ttf file="graphics/fonts/Elvish.ttf" name="Tolkien_Elvish" size="14" />
.....<color value="#000000" />
</font>
I have outlined at least 4 different files that are in 4 different places. What I am trying to say, if I'm confusing anyone from before, is the original question I wanted to ask:
Is it possible to extend and use an extension to hold in all the fonts inside a graphics font folder and be able to read/get the font resource/convert/display the texts appropriately without requiring a ruleset to "handle" the font conversion?
Because if it is possible, sharing the code with others who can enable using the fonts inside a program using a barebones empty program with the necessary patchwork takes out the guesswork of having to unpack, read, and modify the ruleset to read the language fonts appropriately.
:worried: I hope I didn't confuse anyone.