Re: [pcgen-xml] Examples
- <quote who="Frugal">
> So as the item.dagger-masterwork entity needs to ask the parent entity forHmmmm... I wonder how we can do things like Weapon Focus like this (I am
> any variables it does not know (in this case $melee_attack). Do we need to
> ask the parent for all variables, or just the one we do not know ?
> How will variables propogate? In the example of a weapon we do not want
> the character to be affected by the toHit=+1 that the item has, but for
> bracers of armour we want the armour bonus to affect the character... Do
> we need a 'propogate="true|false"' attribute of function. If the entitiy
> is asked for the functions that can affect a variable we only return the
> ones that have propogate="true". The ones that have propogate="false" are
> only used for calculations internally for that entity.
> The other alternative would be for the client to ask "what is the
> melee_attack for this character entity using this item entity" at which
> point we need to have the character return a list of propogate="true"
> functions that affect "toHit" from all child entities (recursively), plus
> the list of functions that affect "toHit" from the specific item we are
> interested in that have the 'propogate="false"' attribute.
> the difference is that in the first case the item is being asked for a
> variable and has to interrogate its parent entity, and in the second the
> top level is being asked for the variable and is specifically asked for
> the internal functions of a specific subentity that the client is
> interested in.
ignoring for the moment the choice side of Wepon Focus and concentrate on
the +1 to a certain type of weapon issue).
Weapon Focus gives the character a +1 untyped bonus to hit with a specific
weapon type eg. dagger.
The current LST syntax gives:
And then in the code to determine what the total to-hit bonus for a dagger
is the code gets the to-hit from the dagger, and then add a whole bunch of
modifiers one of which is WEAPONPROF=DAGGER|TOHIT|1
Is this acceptable for us? Do we want to say
- get the variable from the item.
- For each type in the item get any bonuses from the character for that item
i.e. we get the varible 'toHit' from the item.dagger. Then get all of the
bonuses from the character for each <type> the particular item has :
This should also allow us to do something like create a feat "Sharp Blade"
that gives the character 2d4 with a dagger rather than 1d4:
<function key="die_count.dagger" calc="2" replaces="true"/>
So when we ask for the die count for a particular dagger we will get:
<variable key="die_count" value="1" />
From the dagger item and
<function key="die_count.dagger" calc="2" replaces="true" />
From the character (and its sub entities) due to that fact that the item
has the "dagger" type and so we know to search for functions that look
Yey! Something we can not do in the existing system ;O)