Varsuuk
May 19th, 2019, 02:30
[SOLVED]
I feel I should remember this since it is something I've seen but first time I ran into it since starting back up on this this year. Looking at the DB info in API didn't give it - I'm sure it is in one of the wiki docs but I will toss this out there and see if someone answers while I am putting son to bed (reading Edgedancer as his bedtime story - my son is ROCKIN' the Sanderson) - if no one answers, will go through the Wiki and reply myself :)
...
-- Check for regular Darkvision
local sTraitName = DB.getValue(nodeSource, "name", "");
...
-- Add the item
local vNew = nodeList.createChild();
DB.copyNode(nodeSource, vNew);
DB.setValue(vNew, "source", "string", DB.getValue(nodeSource, "...name", ""));
DB.setValue(vNew, "locked", "number", 1);
So, what is the value based on the xml below that is being put into the vNew node's "<source type="string">???</source" node?
<halfling>
<name type="string">Halfling</name>
<text type="formattedtext">
<p><h>Halflings</h></p>
...
<missleweaponbonus>
<name type="string">Halfling Missle Weapon Bonus</name>
<text type="formattedtext">The Halfling player character has a +1 bonus when
using missle weapons.</text>
</missleweaponbonus>
...
I feel I should remember this since it is something I've seen but first time I ran into it since starting back up on this this year. Looking at the DB info in API didn't give it - I'm sure it is in one of the wiki docs but I will toss this out there and see if someone answers while I am putting son to bed (reading Edgedancer as his bedtime story - my son is ROCKIN' the Sanderson) - if no one answers, will go through the Wiki and reply myself :)
...
-- Check for regular Darkvision
local sTraitName = DB.getValue(nodeSource, "name", "");
...
-- Add the item
local vNew = nodeList.createChild();
DB.copyNode(nodeSource, vNew);
DB.setValue(vNew, "source", "string", DB.getValue(nodeSource, "...name", ""));
DB.setValue(vNew, "locked", "number", 1);
So, what is the value based on the xml below that is being put into the vNew node's "<source type="string">???</source" node?
<halfling>
<name type="string">Halfling</name>
<text type="formattedtext">
<p><h>Halflings</h></p>
...
<missleweaponbonus>
<name type="string">Halfling Missle Weapon Bonus</name>
<text type="formattedtext">The Halfling player character has a +1 bonus when
using missle weapons.</text>
</missleweaponbonus>
...