Quote:
Originally Posted by CapedCrusader
The MI Skills and MII Skills are wrappers for the actual Skill objects.
A gizmo is a place to hang things off of. It's an object-oriented thing.
Here's an example:
Code:
<thing
id="miDuelistB"
name="Duelist’s Blade"
compset="miMelee"
description="This ornately worked rapier is very popular with duelists. It grants +2 to Fighting, +1 damage, and increases the wielder’s Parry by +2."
summary="">
<fieldval field="miAttack" value="2"/>
<fieldval field="miDamage" value="1"/>
<fieldval field="wpParry" value="1"/>
<fieldval field="grCost" value="13150"/>
<fieldval field="gearWeight" value="3"/>
<usesource source="Fantasy"/>
<tag group="WeaponDie" tag="2"/>
<containerreq phase="Initialize" priority="2000"><![CDATA[
source.Fantasy]]></containerreq>
<child entity="fcMagItemP">
<bootstrap thing="wpRapier"></bootstrap>
<bootstrap thing="mieBlock2"></bootstrap>
</child>
</thing>
In this case, the gizmo is called fcMagItemP. The mieBlock2 is the wrapper for the Improved Block Edge. Magic Items got a little weird. It was my first serious project, and we had to do some interesting things to get it to work.
|
Thanks for the example, this will help some and I will add this(changing the name a bit and the id) to try this out.
You mentioned OO for gizmo. From what I have seen, many if not all of the magic items have fcMagItemP as it's gizmo. To me, that implies that fcMagItemP acts like a superclass or interface in java/C#(those are two languages I know semi decently)? Are then others and if so, when would one use one entity vs another?
The explanation of mieBlock2 is great and that part makes sense now. I see that that thing then just bootstraps the edge from the original core file.
Now on to miAttack and miDamage: I did some searching, and these are defined in miscellaneous.str along with a fairly decent number of other "mi*" things. These are what modifies bonuses to various traits and derived stats right? I ask because right above miDamage in that file, I see miParry, but in the above example, you use wpParry instead, so I am trying to figure out the discrepancy as to why?
wpRapier seems to be added to enforce an "IS A" relationship to the Rapier object. Ie, thing miDuelistB "IS A" Rapier. I assume this is correct?
Oh, and what is the
Code:
<tag group="WeaponDie" tag="2"/>
thing for? I assume this says that the weapon does d6 die type in damage, but is this needed since it appears to "inerhit" wpRaiper. I assume it's required you would not put it there(or is that some type of override from the wpRapier object?)