Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 28th, 2014, 08:38 PM
In this system I think Gadgets may be the most complex thing to create. So far I've got a component with fields for: Total Story Point Cost, Good Trait Max Points, Bad Trait Max Points, Good Trait Total Points, Bad Trait Total Points, Gadget Type.

Gadgets come in 3 types, like Traits, Major/Minor/Special.

Minor can contain a positive value of 1 point, by taking bad traits you can effectively get 2 points (with a -1 from the bad trait)

Major are double, they're valued at 2 points and you can take 2 points in bad traits to gain 2 more good points to use.

Special are in reality anything greater than Major, with the base value as being 4, where you can take up to 4 points in bad traits to gain 4 more points of good traits.

There are 2 kinds of Gadgets to build, ones that will be created in the editor and ones that will be created via a custom gadget gizmo.

The editor tab will need to be able to select traits much like Magic Weapons in Pathfinder select powers. The logic in it will be that if the items are added to the gadget it doesn't have to balance out with Good Points and Bad Points.

The custom one be much like creating a custom magic weapon in Pathfinder is done. It'll have a line for it's name, the option to select good/bad traits and will have the interior logic that everything balances out to whether it's a minor/major/special gadget. There will also be a selector to whether its minor/major/special (but I figure that's a given).
AndrewD2 is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 28th, 2014, 10:37 PM
Don't think of them as different projects - if I had Pathfinder to do over, weapons would work more like Shadowrun, where everything is customizable, and the mods that can be purchased are the same items you bootstrap into the gizmo of a pre-selected custom item that you build in the editor.
Mathias is offline   #2 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 29th, 2014, 07:32 AM
I don't really see them as different projects, I see them as 2 parts of the same project, just with parts that need to be handled differently.
AndrewD2 is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 29th, 2014, 08:07 AM
That's what I meant - don't think of them as needing to be handled differently - when you create the thing entry for your custom item, you'll do so on the same editor tab as you're creating your specific items - it'll just be empty, with nothing pre-bootstrapped.

Then, there's already a Helper.CustomItem tag used for the custom gear item, so re-use that here, along with the username portal that's already set up on the gear tab to go along with that tag.
Mathias is offline   #4 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 30th, 2014, 01:14 PM
Ok, so I'm getting pretty far along in the form, I really only have one more thing to get working.

I'm guessing I need another table to show the item information on the form. But tables see to only show the things of the specific component in the container.

What I'm needing to add is the Info like Name/Custom Name, Rank/Custom Rank, how many points spent and how much you have left.

I created a fixed table, but as mentioned above that seems to only show items of a specific component on the table.

What I'm trying to get is something like the attached image, which will only need labels, menus, and a box to enter text.

I'm not sure if I actually need to use a table for this (which doesn't seem right) or some other element that I'm just not seeing to position the relative information.
Attached Images
File Type: jpg Gadget Form2.jpg (69.9 KB, 4 views)
AndrewD2 is offline   #5 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 30th, 2014, 01:28 PM
And this is the portal/template I have so far (just working to get the name to show up).

Code:
    <portal
      id="gaNameInfo"
      style="tblInvis">
      <table_fixed
        component="Gadget"
        showtemplate="gaGadName"
        headerpick="GadgetHelp">
        <headertitle><![CDATA[
          @text="Gadget Info"
          ]]></headertitle>
        </table_fixed>
      </portal>
      
   <template
     id="gaGadName"
     name="Gadget Info"
     compset="Gadget"
     marginhorz="3"
     marginvert="2">
     
     <portal
       id="name"
       style="lblNormal">
       <label>
         <labeltext><![CDATA[
           if (tagis[Helper.CustomItem] <> 0) then
             @text = "Item Name: "
           else
             @text=field[name].text
             endif
           ]]></labeltext>
         </label>
       </portal>
       
       <position><![CDATA[
       
       height = portal[name].height
       width = 265
       portal[name].left = 0
       ]]></position>
     </template>
AndrewD2 is offline   #6 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 30th, 2014, 05:15 PM
So I've discovered that I can do a template without it being attached to a portal. So I got rid of the portal above and placed the template in the layout for the form, but it's not showing up. The template is currently just 1 label: name

Code:
   <template
     id="gaGadName"
     name="Gadget Info"
     compset="Gadget"
     marginhorz="3"
     marginvert="2">
     
     <portal
       id="name"
       style="lblNormal">
       <label>
         <labeltext><![CDATA[
           if (parent.tagis[Helper.CustomItem] <> 0) then
             @text = "Item Name: "
           else
             @text=parent.field[name].text
             endif
           ]]></labeltext>
         </label>
       </portal>
       
       <position><![CDATA[
       
       portal[name].left = 0
       ]]></position>
     </template>
The only thing I currently have in the layout is this template.

Code:
  <layout
    id="gaGadTrt"
    marginvert="4">
    <!--<portalref portal="gaGadFrm" taborder="20"/>-->
    <templateref template="gaGadName" taborder="10"/>


    <position><![CDATA[

           
      ~position and size the table to span the full layout; it will only use the
      ~vertical space that it actually needs
        perform template[gaGadName].autoplace
      ~perform portal[gaGadFrm].autoplace

      ]]></position>
    </layout>
As far as I can tell this should be appearing, but it just shows a blank form with an Add button at the bottom.

EDIT: I notice that something is showing up when add the Trait Table back in, the blank space above is increased the amount of the size of the template, but still shows up bank.

EDIT 2: forcing it to be visible seems to have fixed my problem.

Last edited by AndrewD2; October 30th, 2014 at 06:19 PM.
AndrewD2 is offline   #7 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 30th, 2014, 07:10 PM
Ok, moving on from that blunder about, I'm trying to get the username field to only show up when the parent item has the "Helper.CustomItem" tag. It works for the name label script that is

Code:
     <portal
       id="name"
       style="lblNormal">
       <label>
         <labeltext><![CDATA[
           if (tagis[Helper.CustomItem] <> 0) then
             @text = "Item Name: "
           else
             @text=field[name].text
             endif
           ]]></labeltext>
         </label>
       </portal>
But if I use the parent.tag[Helper.CustomItem] in the position script I get a compilation error. I'm just trying to do if it's not a custom item, hide the portals that are only seen for custom items (names, point costs, etc)
AndrewD2 is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 31st, 2014, 08:25 AM
Here's the layout for Shadowrun 5's skill specialties. I believe the key items that aren't described in the wiki are dynamic="yes" ispick="yes" on the templateref, which tells it that its pick is the parent pick, and that in visual scripts, unlike most anywhere else, you need to use container.parent to reach the parent. Almost everywhere else you can skip container and go to the parent directly.

(Of course if you look at Pathfinder/d20's code, there's quite a lot of legacy code written back when you needed container.parent everywhere).

Code:
  <layout
    id="skSpecial">
    <portalref portal="skSpecial" taborder="10"/>
    <portalref portal="skKnowSpec" taborder="20"/>
    <templateref template="skFixedSp" dynamic="yes" ispick="yes"/>
    <position><![CDATA[
      width = 350
      autoright = width

      if (container.parent.tagis[component.SkillKnow] = 0) then
        perform portal[skSpecial].autoplace
        portal[skKnowSpec].visible = 0
      else
        perform portal[skKnowSpec].autoplace
        portal[skSpecial].visible = 0
        endif

      if (container.parent.field[sklFixedSp].isempty = 0) then
        template[skFixedSp].width = width
        perform template[skFixedSp].render
        template[skFixedSp].top = autotop + 10
        height = template[skFixedSp].bottom
      else
        template[skFixedSp].visible = 0
        height = autotop
        endif
      ]]></position>
    </layout>
Mathias is offline   #9 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 31st, 2014, 12:40 PM
so using dynamic and ispick means that checking tagis[Helper.CustomItem] is the same as checking container.parent.tagis[Helper.CustomItem] without? Is that what I'm reading (and that's what th effect seems to be) but I just want to make sure I'm understanding this correctly.
AndrewD2 is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:32 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.