• 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

Minions Help?

TCArknight

Well-known member
Hi all.

After a time away from HL and related coding I'm diving back into it.

The dataset I'm attempting involves Vehicles as Minions (seems to be the default for the Sample Dataset)

I have the following:
components
Code:
  <!-- Vehicle component
        All vehicles use this to display for purchase/selection
  -->
  <component
    id="Vehicle"
    name="Vehicle Helper"
    autocompset="no">

    </component>
	
  <!-- VehicleBase component
        All vehicles use this for the vehicle details/attributes
  -->  
  <component
    id="VehicleBase"
    name="Vehicle Base"
	autocompset="no">	

    <field
      id="vebReliability"
      name="Reliability"
      minvalue="0"
      maxvalue="6"
      type="derived">
      </field>
	  
    <field
      id="vebCombatSpeedOn"
      name="Combat Speed (On Road)"
      minvalue="0"
      defvalue="0"
      type="derived">
	  </field>
	
    <field
      id="vebCombatSpeedOff"
      name="Combat Speed (Off Road)"
      minvalue="0"
      defvalue="0"
      type="derived">
	  </field>
	  
    </component>

Compset:
Code:
  <!-- Vehicle -->
  <compset
    id="Vehicle"
    stackable="no">
    <compref component="Vehicle"/>
    <compref component="VehicleBase"/>
    <compref component="Equipment"/>
    <compref component="Gear"/>
    <compref component="Minion"/>
    </compset> 
  <!-- VehicleBase -->
  <compset
    id="VehicleBase"
    stackable="no">
    <compref component="VehicleBase"/>
    <compref component="Minion"/>
    </compset>
Thing:
Code:
  <thing id="vehM1114HMMWV" name="M1114 HMMWV" compset="Vehicle" stacking="never">
    <fieldval field="grCost" value="12000"/>
    <minion id="Vehicle" ownmode="no" livefield="minEnabled" coupledfield="minCoupled">
      <tag group="MinionSet" tag="Vehicle" name="Vehicle" abbrev="Vehicle"/>
      <bootstrap thing="vebM1114HMMWV"></bootstrap>
      </minion>
    </thing>
	
  <thing id="vebM1114HMMWV" name="M1114 HMMWV" description="Testing" compset="VehicleBase" uniqueness="unique">
    <tag group="VehicleCat" tag="USMil"/>
    <tag group="VehicleType" tag="4WDCar"/>
    <fieldval group="vebReliability" value="5"/>
    <fieldval field="vebCombatSpeedOn" value="5"/>
    <fieldval field="vebCombatSpeedOff" value="4"/>
    </thing>

(continued next post)
 
As expected, when I add the vehicle from the Gear tab for the hero, a secondary minion character is created.

When the minion is selected, I am trying to do is to display the appropriate fields on a new tab -

VehicleBasics tab:
Code:
  <template
    id="vbaDetails"
    name="Personal"
    compset="Personal">

    <portal
      id="title"
      style="lblTitle">
      <label
        istitle="yes"
        text="Details">
        </label>
      </portal>

    <portal
      id="lblVehCat"
      style="lblLeft">
      <label>
        <labeltext><![CDATA[
		  debug "Category: " & minion.child[actor].field[name].text
		  @text = "test:"
		  ]]></labeltext>
        </label>
      </portal>

    <portal
      id="lblVehType"
      style="lblLeft">
      <label>
        <labeltext><![CDATA[
          @text = "Type: " & hero.findchild[VehicleBase].idstring
          ]]></labeltext>
        </label>
      </portal>
	  
    <portal
      id="lblVehRel"
      style="lblLeft">
      <label
          text="Reliability: ">
        </label>
      </portal>

    <portal
      id="VehReli"
      style="lblLeft">
      <label
          field="vebReliability">
        </label>
      </portal>
		
    <position><![CDATA[

      ~freeze our value in advancement mode or if an advancement has modified us
      ~Note: All freezing must be done *before* any positioning is performed.
      ~if (state.iscreate = 0) then
      ~  portal[value].freeze = 1
      ~elseif (autonomous = 0) then
      ~  portal[value].freeze = 1
      ~  endif

      ~position our tallest portal at the top
      portal[title].top = 0
	  portal[title].width = width

      ~center the other portals vertically
      portal[lblVehCat].left = 0
	  portal[lblVehCat].width = width
	  portal[lblVehCat].height = 30
      portal[lblVehCat].top = portal[title].bottom + 5
	  portal[lblVehCat].visible = 1
	  
	  
	  portal[lblVehType].top = portal[lblVehCat].bottom + 5
	  portal[lblVehType].left = portal[lblVehCat].left
	  portal[lblVehType].width = width

      height = portal[lblVehType].bottom + 10
	  
      ]]></position>

    </template>	  

  <layout
    id="vehbasics">
    <templateref template="vbaDetails" />

    <!-- This script sizes and positions the layout and its child visual elements. -->
    <position><![CDATA[
	  perform template[vbaDetails].autoplace[10]

      ~perform template[vbaDetails].render
	  
      ~figure out the total height we need for the tab
	  height = template[vbaDetails].bottom
	  
      ]]></position>

    </layout>

  <panel
    id="vehbasics"
    name="Vehicle Basics"
    marginhorz="5"
    marginvert="5"
    order="110">
    <live>CharType.Vehicle</live>
    <layoutref layout="vehbasics"/>
    <position><![CDATA[
      ~get the height used by the layout and use it, as that means we scroll
      ~if necessary
      perform layout[vehbasics].render
      height = layout[vehbasics].height
      ]]></position>
    </panel>

However, I get this error:
Hero Lab was forced to stop compilation after the following errors were detected:

Template 'vbaDetails' - Reference to portal 'VehReli' using a field for a different component set
Layout 'vehbasics' - Template in reference 'vbaDetails' uses fields and must specify a thing/pick

What am I missing to get the tab to be able to access the information on the VehicleBase component?
 
Templates displayed directly on a layout need to reference which pick they're displaying the information from:

<templateref template="vbaDetails" thing="some id" ispick="yes"/>


In the template, it says the compset is Personal:
<template id="vbaDetails" name="Personal" compset="Personal">

And then later you're displaying a portal that is field-based:
<portal id="VehReli" style="lblLeft"> <label field="vebReliability"> </label> </portal>

But according to your first post, the vehReliability field is in the VehicleBase component, which is in the Vehicle compset - you don't show the Personal compset, so unless that compset also has VehicleBase as one of its components, then the template's compset doesn't match the field used in it.
 
Thank you Mathias!

That's what I get for cutting and pasting..... :(

Ok, I changed it to compset="Vehicle" and am getting this:
Hero Lab was forced to stop compilation after the following errors were detected:

Layout 'vehbasics' - Template in reference 'vbaDetails' uses fields and must specify a thing/pick

When I add thing="actor" to the templateref in the layout, I get this:
Layout 'vehbasics' - Reference 'vbaDetails' specifies thing with incompatible component membership

thing="minion" gives:
Layout 'vehbasics' - Reference 'vbaDetails' specifies a non-existent thing

Is there something else I need to adjust?
 
Oh, OK, the picks with the "Vehicle" compset are effectively the race. That means you can't use a template that requires a specific pick. You have to have this template be within a table that displays picks from the Vehicle compset, or you need to redesign your template if you want it to be based on a more generic piece of the hero, like "personal". In that case, you need to use labeltext to reference the values, like this:
<label>
<labeltext><![CDATA[
perform hero.findchild[Vehicle].setfocus
doneif (state.isfocus = 0)
@text = focus.field[vebReliability].text
]]></labeltext>
</label>


Based on the information it looks like you're trying to display, I'd just make the table where the user chooses a vehicle type be a tall table, so that you've got room to display lots of info about the vehicle race that was added.
 
Ah. Ok, I see why in SR5 the Vehicle details are part of the RaceVeh component. If I understand correctly:

1) There are (at least) two sets of attributes in SR5, Character (Body, etc) and "Vehicle" (Handling, Speed, etc.).
2) Where normal attributes are bootstrapped to Character heros, the Vehicle ones are bootstrapped to the RaceVeh (VehicleBase in my case).
3) The display of the Basics tab in SR5 changes depending on which set of attributes is being used.

Everything else is functioning like a normal hero, where weapons, etc are picks on the Vehicle race, correct?
 

Attachments

  • Screenshot 2021-08-13 160328.gif
    Screenshot 2021-08-13 160328.gif
    42.4 KB · Views: 0
Last edited:
Ah. Ok, I see why in SR5 the Vehicle details are part of the RaceVeh component. If I understand correctly:

1) There are (at least) two sets of attributes in SR5, Character (Body, etc) and "Vehicle" (Handling, Speed, etc.).
2) Where normal attributes are bootstrapped to Character heros, the Vehicle ones are bootstrapped to the RaceVeh (VehicleBase in my case).
3) The display of the Basics tab in SR5 changes depending on which set of attributes is being used.

Everything else is functioning like a normal hero, where weapons, etc are picks on the Vehicle race, correct?


1) There's some overlap on the attributes - Body, for example, appears in both, but Charisma is only used for characters, and Handling is only used for vehicles. But they're all in the attribute compset, and where they're used is just a matter of tags.
2) yes
3) it's based on a tag on the hero that tells me the character type
Yeah, vehicles are just another character type in SR5.
 
1) There's some overlap on the attributes - Body, for example, appears in both, but Charisma is only used for characters, and Handling is only used for vehicles. But they're all in the attribute compset, and where they're used is just a matter of tags.
2) yes
3) it's based on a tag on the hero that tells me the character type
Yeah, vehicles are just another character type in SR5.
I'll give it a try that way, thanks. :)

Another thing I notice though, is that no field other than a simple label with text is showing (per attached screenshot). Am I missing something?
Code:
<position><![CDATA[

      ~position our tallest portal at the top
      portal[title].top = 0
	  portal[title].width = width

      ~center the other portals vertically
      portal[lblVehCat].left = 0
	  portal[lblVehCat].width = width
	  portal[lblVehCat].height = 30
      portal[lblVehCat].top = portal[title].bottom + 5
	  
	  portal[lblVehType].top = portal[lblVehCat].bottom + 5
	  portal[lblVehType].left = portal[lblVehCat].left
	  portal[lblVehType].width = width

	  portal[lblVehRel].top = portal[title].bottom + 5
	  portal[lblVehRel].left = 0
	  portal[lblVehRel].width = width
	  
	  portal[VehReli].top = portal[lblVehRel].bottom + 5
	  portal[VehReli].left = 0
	  portal[VehReli].width = width
	  
      height = portal[VehReli].bottom + 10
	  
      ]]></position>
 

Attachments

  • Screenshot 2021-08-13 160328.gif
    Screenshot 2021-08-13 160328.gif
    42.4 KB · Views: 1
Two portals are placed at the same vertical position, so the second one is hiding the first

portal[lblVehCat].top = portal[title].bottom + 5

portal[lblVehRel].top = portal[title].bottom + 5

There's not enough info for me to diagnose why VehReli isn't showing - or at least I don't see the problem in just the position code.
 
Ok, things seem to be working fine as long as there is only one Minion/Vehicle.

If the main hero purchases a second vehicle, then tries to shift to it the Minion doesn't seem to get the correct Type, or display the correct tabs. Is there a secret to having multiple Minions on a character?
 
Back
Top