• 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

Get value of portal within a template.

BoomerET

Well-known member
This is for my Castles & Crusades plugin (ruleset?)

I have a tab that displays a characters abilities and senses.

One of these abilities is 'Weapon Specialization', which has a chooser where the player chooses which weapon to specialization.

I need to access this in another tab, and I can't believe it's causing me so much grief considering what I've accomplished so far with Hero Lab.

The template ID: chClPick
Portal within that template ID: weapSpec

Please help!!


BoomerET
 
I have a chooser table:
Code:
<portal
    id="weapSpec"
    style="chsNormal"
    width="120">
    <chooser_table
      component="WeaponBase"
      choosetemplate="LargeItem">
      <chosen><![CDATA[
        if (@ispick = 0) then
          @text = "{text clrwarning}Select Weapon"
        else
          @text = field[name].text
          endif
        ]]></chosen>
      <titlebar><![CDATA[
        @text = "Choose the weapon for your character"
        ]]></titlebar>
      </chooser_table>
   </portal>

This portal is within the template:

Code:
<template
    id="chClPick"
    name="Ability Pick"
    compset="ClassAbil"
    marginhorz="3"
    marginvert="2">

I'm trying to get the item that the user selected from the chooser.

I'm doing this in a different tab from where the selection is being made.


BoomerET
 
Why not just add a new table whose list expression will mean that the selected item gets shown there? That way, you're displaying to the user the selection that's been made.
 
It's already being shown on the other tab, I need to add a display of +1, +2 or 0 based on the selection. (Depending on the PC's level)

Just because the user has chosen it as a specialization, it doesn't necessarily mean he owns that particular weapon.
 
Yup, going to have to do it another way, because the way I'm doing it, it populates the weapon chosen for specialization automatically in the armor/weapons tab.

That's not the results I'm after, so going to have to do it like you suggested of course.
 
Just finished that little bit, and it's working great.

No idea why I got stuck for two days trying to figure something out that wasn't going to work the way I had it.


Baby steps!


BoomerET
 
Drop-down menus create a link to something.

Choosers add that thing to the character.

I'm guessing that was the confusion?
 
Thanks for the help Mathias, I'm sure as time goes on I'll have more of course.

I can't believe I'm still working on this though. Usually projects I end up getting bored after a few days to a week, but I've been working on this for months (a year?).

I did take a break for a few months at Christmas, but I'm back and plugging away.

One of the users of my plugin (ok, so what do we call them?) is a Beta backer of Realm Works, and was curious how my plugin interacted.

Well, it works awesome. I have some work to do on the stat block, but I'm very pleased with the outcome.


BoomerET
 
Back
Top