• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Entities/Forms/Weapons

BoomerET

Well-known member
I'm working on allowing a user to create a magic weapon, albeit quite simply for now.

I want the user to be able to select a weapon, and give the following:

Damage Dice (my idea, use a menu_literal for # of dice)
Another menu_literal for the dice (d4/d6/d8/d10/d12)
and another menu_literal for adding something.

So the final result will hopefully look like 2d6+3

In addition to this, I want a menu_literal for To Hit bonus.

So, in my current weapon list, I added an entry at the top:

Code:
<thing id="wpCustom" name="- Custom/Magic Weapon -" description="Melee weapon" compset="Melee">

I have this at the bottom of my equipment.str file:
Code:
<entity id="addMagWep" form="magwepgiz"> </entity>

Now, when a user selects the Custom, my form is in fact popping up. Hooray!!

The user is able to select a weapon from the list, as I want, but custom/magic entry is displayed as well.

However, when I click add in the form, the weapon is listed as - Custom/Magic Weapon -, but of course I want it to list the weapon the user selected.

Also, in my form, where I have the weapon list, the custom entry appears again, so I want to hide it, because if they click it, of course another form pops up.

Please help, I've dug through the sample code, as well as the wiki, and it's gotten me this far, but now I'm stuck.


Thanks,


BoomerET
 
The user is able to select a weapon from the list, as I want, but custom/magic entry is displayed as well.

You can filter it out with a tag expression in the table or chooser (assuming that's what you used) using either the candidatefield or candidatepick element.

However, when I click add in the form, the weapon is listed as - Custom/Magic Weapon -, but of course I want it to list the weapon the user selected.

It sounds like you want them to modify an existing weapon, right? If so, why not attach a child element to those weapon things you want them to customize? In other words, let the user add a sword to the hero as normal, but with the option to customize it.

I did this in my Qin data files (see my sig) -- in that game, pretty much an object can be crafted as a legendary object, so most objects have gizmos which allow objects to apply adjustments to the hero. That structure might work well here.

You'll also want a default thing defined for the entity, but it sounds to me like you're doing this all through menu literals on the form then modifying the weapon fields?
 
Kairos,

Thanks for the reply, gonna take a look at your stuff and creatively borrow what I need.


BoomerET
 
Kairos,

Thanks for pushing me, I simply removed the -CUSTOM- thing, added a actEdit that opens my modifier form.

Next step is to verify that the weapons I modify actually keep the changes.

I appreciate your assistance, thanks.


BoomerET
 
Back
Top