PDA

View Full Version : Custom skills



KlatuB
February 2nd, 2018, 01:16
Back in 2016 Trenloe made an extension https://www.fantasygrounds.com/forums/showthread.php?34193-Ultramodern5-Suggestions&p=291278&viewfull=1#post291278 post #7 to show how to add custom skills to a character sheet. I'm using that example to create a similar one for a 5E sci fi campaign, I'm able to see the skills on the character sheet but when I click the description link all I get is "Unable to open window using wildcard link, because no module containing that link is open. Check your active Library modules". I have created a module with the custom skills and it is open.

I'm sure it's something simple but I'm missing it.

Trenloe
February 2nd, 2018, 02:21
Make sure your skills module uses the correct data structure. Info here: https://www.fantasygrounds.com/wiki/index.php/Data_Structure_Overview_and_Best_Practices#Data_Pa ths_-_Reference.2FRulebook_Module

KlatuB
February 2nd, 2018, 21:21
The module was created via the FG Module Export, so it should have the correct structure correct?

LordEntrails
February 2nd, 2018, 21:25
And you've made sure you module is open? What about if you open the module you used/copied the original skill from? What happens is you have the PHB and/or the basic Rules and/or the SRD open?

KlatuB
February 2nd, 2018, 21:43
The skills are from a homebrewed campaign call Fifth Age (link below), so they are not in the PHB or SRD. I have made sure the module is open in the campaign, the skills are defined in the campaign when I couldn't load the description that is when I exported the module. See the screenshot

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=22077&stc=1&d=1517607780

Fifth Age: https://www.enworld.org/forum/showthread.php?459300-Fifth-Age-A-hard-science-fiction-5e-conversion

Trenloe
February 2nd, 2018, 21:48
The module was created via the FG Module Export, so it should have the correct structure correct?
Depends... Did you export with the read only option?

If that doesn't fix it, I'd recommend you open up the export module and look where the skill data is stored - then compare with the page I linked above.

KlatuB
February 3rd, 2018, 18:59
Trenloe,

I'm not quite sure how to compare "reference.skilldata" = Skills (5E) with my code, below are is the code for the extension and module.

FifthAgeSills.ext (data_common_5th.lua)

--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

-- FifthAge data_common file - contain only changes to the base scripts\data_common.lua file.
-- The changes need to be "pushed" to the base DataCommon package. This is done in the onInit() function.

function onInit()
-- Skills.
skilldata = {
[Interface.getString("skill_value_acrobatics")] = { lookup = "acrobatics", stat = 'dexterity' },
[Interface.getString("skill_value_athletics")] = { lookup = "athletics", stat = 'strength' },
[Interface.getString("skill_value_biology")] = { lookup = "biology", stat = 'intelligence' },
[Interface.getString("skill_value_computeruse")] = { lookup = "computeruse", stat = 'intelligence' },
[Interface.getString("skill_value_culture")] = { lookup = "culture", stat = 'intelligence' },
[Interface.getString("skill_value_deception")] = { lookup = "deception", stat = 'charisma' },
[Interface.getString("skill_value_disguise")] = { lookup = "disguise", stat = 'charisma' },
[Interface.getString("skill_value_engineering")] = { lookup = "engineering", stat = 'intelligence' },
[Interface.getString("skill_value_history")] = { lookup = "history", stat = 'intelligence' },
[Interface.getString("skill_value_insight")] = { lookup = "insight", stat = 'wisdom' },
[Interface.getString("skill_value_intimidation")] = { lookup = "intimidation", stat = 'charisma' },
[Interface.getString("skill_value_investigation")] = { lookup = "investigation", stat = 'intelligence' },
[Interface.getString("skill_value_law")] = { lookup = "law", stat = 'intelligence' },
[Interface.getString("skill_value_medicine")] = { lookup = "medicine", stat = 'wisdom' },
[Interface.getString("skill_value_navigation")] = { lookup = "navigation", stat = 'wisdom' },
[Interface.getString("skill_value_nature")] = { lookup = "nature", stat = 'intelligence' },
[Interface.getString("skill_value_perception")] = { lookup = "perception", stat = 'wisdom' },
[Interface.getString("skill_value_performance")] = { lookup = "performance", stat = 'charisma' },
[Interface.getString("skill_value_persuasion")] = { lookup = "persuasion", stat = 'charisma' },
[Interface.getString("skill_value_sleightofhand")] = { lookup = "sleightofhand", stat = 'dexterity' },
[Interface.getString("skill_value_stealth")] = { lookup = "stealth", stat = 'dexterity', disarmorstealth = 1 },
[Interface.getString("skill_value_survival")] = { lookup = "survival", stat = 'wisdom' },
};

-- Party sheet drop down list data
psskilldata = {
Interface.getString("skill_value_acrobatics"),
Interface.getString("skill_value_athletics"),
Interface.getString("skill_value_biology"),
Interface.getString("skill_value_computeruse"),
Interface.getString("skill_value_culture"),
Interface.getString("skill_value_deception"),
Interface.getString("skill_value_disguise"),
Interface.getString("skill_value_engineering"),
Interface.getString("skill_value_history"),
Interface.getString("skill_value_insight"),
Interface.getString("skill_value_intimidation"),
Interface.getString("skill_value_investigation"),
Interface.getString("skill_value_law"),
Interface.getString("skill_value_medicine"),
Interface.getString("skill_value_navigation"),
Interface.getString("skill_value_nature"),
Interface.getString("skill_value_perception"),
Interface.getString("skill_value_performance"),
Interface.getString("skill_value_persuasion"),
Interface.getString("skill_value_sleightofhand"),
Interface.getString("skill_value_stealth"),
Interface.getString("skill_value_survival"),
};
-- "Push" data changes in this file to the DataCommon package - overwriting the original base data.
DataCommon.skilldata = skilldata;
DataCommon.psskilldata = psskilldata;
end

KlatuB
February 3rd, 2018, 18:59
Prior post got too long, here is the rest of the code

FifthAgeSills.mod (db.xml)

<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.3" release="8|CoreRPG:3">
<library>
<fifthageskills static="true">
<categoryname type="string">The Dragons</categoryname>
<name type="string">fifthageskills</name>
<entries>
<reference_skill>
<librarylink type="windowreference">
<class>referenceindexsorted</class>
<recordname>lists.reference_skill@FifthAgeSkills</recordname>
</librarylink>
<name type="string">Skills</name>
</reference_skill>
</entries>
</fifthageskills>
</library>
<lists>
<reference_skill>
<name type="string">Skills</name>
<index>
<id-00001>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00001@FifthAgeSkills</recordname>
</listlink>
<name type="string">Biology</name>
</id-00001>
<id-00002>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00002@FifthAgeSkills</recordname>
</listlink>
<name type="string">Disguise</name>
</id-00002>
<id-00003>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00003@FifthAgeSkills</recordname>
</listlink>
<name type="string">Computer Use</name>
</id-00003>
<id-00004>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00004@FifthAgeSkills</recordname>
</listlink>
<name type="string">Culture</name>
</id-00004>
<id-00005>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00005@FifthAgeSkills</recordname>
</listlink>
<name type="string">Engineering</name>
</id-00005>
<id-00006>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00006@FifthAgeSkills</recordname>
</listlink>
<name type="string">Navigation</name>
</id-00006>
<id-00007>
<listlink type="windowreference">
<class>reference_skill</class>
<recordname>skill.id-00007@FifthAgeSkills</recordname>
</listlink>
<name type="string">Law</name>
</id-00007>
</index>
</reference_skill>
</lists>
<skill>
<category name="" baseicon="0" decalicon="0">
<id-00001>
<locked type="number">1</locked>
<name type="string">Biology</name>
<text type="formattedtext">
<p>Intelligence (Biology) is used to cover both a general understanding of the life sciences, knowledge of living catalogued organisms, and the reasoning and capacity to study new forms of life. Characters wishing to understand an alien life form might make such a check to learn about the organism’s breathing requirements, or to find out what chemical compounds it would find poisonous.</p>
</text>
</id-00001>
<id-00002>
<locked type="number">1</locked>
<name type="string">Disguise</name>
<text type="formattedtext">
<h>Check</h>
<p>Your Disguise check result determines how good the disguise is, and it is opposed by others’ Spot check results. If you don’t draw any attention to yourself, others do not get to make Spot checks. If you come to the attention of people who are suspicious (such as a guard who is watching commoners walking through a city gate), it can be assumed that such observers are taking 10 on their Spot checks.</p>
<p>You get only one Disguise check per use of the skill, even if several people are making Spot checks against it. The Disguise check is made secretly, so that you can’t be sure how good the result is.</p>
<p>The effectiveness of your disguise depends in part on how much you’re attempting to change your appearance.</p>
<p>If you are impersonating a particular individual, those who know what that person looks like get a bonus on their Spot checks according to the table below. Furthermore, they are automatically considered to be suspicious of you, so opposed checks are always called for.</p>
<p>Usually, an individual makes a Spot check to see through your disguise immediately upon meeting you and each hour thereafter. If you casually meet many different creatures, each for a short time, check once per day or hour, using an average Spot modifier for the group.</p>
<p>See also: epic usages of Disguise.</p>
<h>Action</h>
<p>Creating a disguise requires 1d3×10 minutes of work.</p>
<h>Try Again</h>
<p>Yes. You may try to redo a failed disguise, but once others know that a disguise was attempted, they’ll be more suspicious.</p>
<h>Special</h>
<p>Magic that alters your form, such as alter self, disguise self, polymorph, or shapechange, grants you a +10 bonus on Disguise checks (see the individual spell descriptions). You must succeed on a Disguise check with a +10 bonus to duplicate the appearance of a specific individual using the veil spell. Divination magic that allows people to see through illusions (such as true seeing) does not penetrate a mundane disguise, but it can negate the magical component of a magically enhanced one.</p>
<p>You must make a Disguise check when you cast a simulacrum spell to determine how good the likeness is.</p>
<p>If you have the Deceitful feat, you get a +2 bonus on Disguise checks.</p>
<h>Synergy</h>
<p>If you have 5 or more ranks in Bluff, you get a +2 bonus on Disguise checks when you know that you’re being observed and you try to act in character.</p>
<h>Source</h>
<p>https://www.d20srd.org/srd/skills/disguise.htm</p>
</text>
</id-00002>
<id-00003>
<locked type="number">1</locked>
<name type="string">Computer Use</name>
<text type="formattedtext">
<p>Intelligence (Computer Use) is used when one interfaces with a computer in more than a casual fashion, and covers general knowledge of networks, programming and computer security systems. A character might make a computer use check to hack into a captured data pad, write a program to alert them to the comings and goings of a particular person on a station, or to keep another character from infiltrating the ship’s network by hypernet. Note that most uses of computer use require a means of interfacing with the computers in question, requiring access to a console or the user to possess a co</p>
</text>
</id-00003>
<id-00004>
<locked type="number">1</locked>
<name type="string">Culture</name>
<text type="formattedtext">
<p>Intelligence (Culture) is a general understanding of sociology, current events and pop culture that let you understand the cultural events going on in society around you. A character might use this skill to recognize a popular musician, fashion trend, artistic style, customs or a pop culture reference.</p>
</text>
</id-00004>
<id-00005>
<locked type="number">1</locked>
<name type="string">Engineering</name>
<text type="formattedtext">
<p>Intelligence (Engineering) covers a wide variety of physical sciences and knowledge common to starship personnel operating in the field. Use of this skill would be appropriate for overloading a reactor, boosting a thruster’s output, or designing a replacement part for a damaged system.</p>
</text>
</id-00005>
<id-00006>
<locked type="number">1</locked>
<name type="string">Navigation</name>
<text type="formattedtext">
<p>(Navigation) is used to plot Hyper-courses as well as plotting in normal space, and requires a solid mix of complex maths and common sense. A character would make such a check when preparing to make a jump out of a system too close to the gravity well, in an attempt to shave some relativistic time off of a trip or when attempting to conserve fuel when travelling body to body in a system.</p>
</text>
</id-00006>
<id-00007>
<locked type="number">1</locked>
<name type="string">Law</name>
<text type="formattedtext">
<p>Intelligence (Law) is used to represent a character’s knowledge of legal procedure and precedent, and such a skill might be used to recall what goods might be illegal in a region, write a business contract, understand a contract, and to argue in a court of law.</p>
</text>
</id-00007>
</category>
</skill>
</root>

Trenloe
February 3rd, 2018, 19:20
Trenloe,

I'm not quite sure how to compare "reference.skilldata" = Skills (5E) with my code, below are is the code for the extension and module.
Info here on FG database notation and structure: https://www.fantasygrounds.com/wiki/index.php/Developer_Guide_-_Rulesets_-_Database

The skill data is stored in your module in skill - this is why it is not being picked up. It has just been exported as a normal data module.

As I mentioned in post #6 above - export the module as "Read Only" (the option is in the module export window) and this will store the skills in the reference.skilldata format. "Read only" is for reference modules - which is what the skill links are looking for.

KlatuB
February 3rd, 2018, 20:44
Trenloe,

Info here on FG database notation and structure: https://www.fantasygrounds.com/wiki/i...ets_-_Database

The skill data is stored in your module in skill - this is why it is not being picked up. It has just been exported as a normal data module.

As I mentioned in post #6 above - export the module as "Read Only" (the option is in the module export window) and this will store the skills in the reference.skilldata format. "Read only" is for reference modules - which is what the skill links are looking for.

Thanks for the explanation that make sense. I have exported the module as readonly but I'm still unable to open the descriptions, I'm still getting the "Unable to open window using wildcard link, because no module containing that link is open. Check your active Library modules" message.

Attached are the extension and module.

Trenloe
February 3rd, 2018, 22:40
Ah right - sorry. There's one final bit of manual editing of the module XML to do.

FG exports the skills with a numerical id-000001, id-00002, etc. database name. These need to be changed to the name of the skill - all one word (no spaces), all lower case.

For example, the below code shows <navigation> which has been changed from <id-00006>, and it also shows the old <id-00007> entry that needs to be changed to <law>. Remember to changed the closing tags too - that is, </id-00007> should be changed to </law>


<navigation>
<locked type="number">1</locked>
<name type="string">Navigation</name>
<text type="formattedtext">
<p>(Navigation) is used to plot Hyper-courses as well as plotting in normal space, and requires a solid mix of complex maths and common sense. A character would make such a check when preparing to make a jump out of a system too close to the gravity well, in an attempt to shave some relativistic time off of a trip or when attempting to conserve fuel when travelling body to body in a system.</p>
</text>
</navigation>
<id-00007>
<locked type="number">1</locked>
<name type="string">Law</name>
<text type="formattedtext">
<p>Intelligence (Law) is used to represent a character’s knowledge of legal procedure and precedent, and such a skill might be used to recall what goods might be illegal in a region, write a business contract, understand a contract, and to argue in a court of law.</p>
</text>
</id-00007>
</category>
</skilldata>

I've made all the changed needed in the attached module. Let me know if it works.

KlatuB
February 3rd, 2018, 22:57
That worked, I took a look at the 3.5 Base Rules module and was thinking that is might be the way FG exports information based on a number sequence rather than name, but I missed the fact that the name needs to be all lower case.

Trenloe
February 3rd, 2018, 23:08
That worked, I took a look at the 3.5 Base Rules module and was thinking that is might be the way FG exports information based on a number sequence rather than name, but I missed the fact that the name needs to be all lower case.
Cool - glad it's working now. Sorry I forgot about changing the numbers... doh! ;)