Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Bootstrapping to hero within a Gizmo? (http://forums.wolflair.com/showthread.php?t=68090)

TCArknight November 12th, 2023 02:14 PM

Bootstrapping to hero within a Gizmo?
 
Hi all!

I'm working on a dataset and in this dataset there are pieces of gear to represent the limbs, body and head of a robot.
Code:

  <thing id="robArm" name="Robot Arm" description="Arm of the robot" compset="Robot">
    <!-- Tag indicates what part this belongs to -->
    <tag group="RobotBody" tag="Arm"/>
    <tag group="ItemModCatAllowed" tag="RobotArm"/>
    <child entity="ItemMods"></child>
    </thing>

This Robot arm can come in a couple of varieties, one with a claw, and one with a laser for example. I thought about accomplishing this with a Mod whcich could be applied to the arm itself.
Code:

  <thing id="modLaserArm" name="Laser Emitter" description="You can cut objects or make ranged attacks using a laser." compset="RobotMod">
    <fieldval field="modNamePrefix" value="Laser"/>
    <tag group="ItemModCat" tag="RobotArm"/>
    <bootstrap thing="wpLaserGun"></bootstrap>
    </thing>

If I do this, the Laser Gun never shows on the hero (i think it should under the Ranged Weapons). In this instance, if I look at the gizmo Picks for robArm I see both the modLaserArm listed and the wpLaserGun listed as well.

I tried adding Helper.Shadow to the wpLaserGun bootstrap, but it didn't help.
Code:

  <thing id="modLaserArm" name="Laser Emitter" description="You can cut objects or make ranged attacks using a laser." compset="RobotMod">
    <fieldval field="modNamePrefix" value="Laser"/>
    <tag group="ItemModCat" tag="RobotArm"/>
    <bootstrap thing="wpLaserGun">
      <autotag group="Helper" tag="Shadow"/>
      </bootstrap>
    </thing>

Robot body part component:
Code:

  <component
    id="Robot"
    name="Robot Body Part"
    autocompset="no">

    <identity group="RobotPart"/>
    <identity group="RobotHasPart"/>
       
    <shadow target="hero">Helper.Shadow</shadow>
         
    </component>

Robot Mod component:
Code:

               
  <component
    id="RobotMod"
    name="Robot Modification"
    autocompset="no">

    <identity group="RobotMod"/>
       
    <shadow target="hero">Helper.Shadow</shadow>

    </component>

So, I appear to have:
Quote:

Hero
* Robot Arm
** modLaserArm
** wpLaserGun
when I'm looking to have:
Quote:

Hero
* Robot Arm
** modLaserArm
* wpLaserGun
Any thoughts on what may be missing?

Mathias November 12th, 2023 07:00 PM

You've also double-checked that a <shadow> element is within one of the components in the Weapon compset? Your posted code doesn't seem to include anything related to the weapon itself.


Also, to clarify how Shadow works - it will not remove the laser gun from inside the gizmo of the robot arm - it is still in that container, but its shadow will appear on the hero container as well, which lets you display it in various tables that are looking for picks that are in the hero container.

TCArknight November 12th, 2023 08:07 PM

Thank you sir!

I’ll check that in the morning. I don’t believe any of the weapon components had the shadow entry, so I bet that’s it.

I understand that it’s not actually on the hero, but would childfound[] register a shadowed entry?

Mathias November 13th, 2023 07:29 AM

Yes, all the usual ways of locating a pick in the hero container will work on a shadowed pick.

TCArknight November 14th, 2023 04:48 AM

That is exactly what was missing, thank you! I added the shadow entry for the BaseWeapon, and it worked. :)

And good to hear about the pick-finding too. :)


All times are GMT -8. The time now is 07:47 PM.

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