DICE PACKS BUNDLE
  1. #1

    [SWADE] Adding a Parcel to a Character turns Weapons/Armor into Gear

    There are two ways to add items from a parcel to a character:
    1. Party Sheet -> Inventory -> Drag&Drop the Parcel into "Parcel Items" -> Assign each item to a character -> Click "Distribute Assignments and Coincs"
    2. Drag&Drop the Parcel directly onto a character

    Using the first method works just fine.
    When utilizing the second method, items lose all of their special properties - that is, everything become a "Mundane Item" and is no longer a melee/ranged/vehicle weapon or armor.
    Drag&Drop seems to work with other rulesets (I only checked Pathfinder 1E) just fine, so something seems funky with SWADE in this regard.

    Steps to reproduce:
    1. Create a new Parcel
    2. Add a weapon or armor to it
    3. Drag&Drop the parcel onto a character sheet
    4. Marvel at the weapon showing up in "Mundane Items" instead of "Weapons" and scratch your head at the fact that opening its info shows the Description, but not its damage, AP and so on.


    Version: 5.5.0 with FGU 4.2.2

    Cheers
    FrodoB
    Last edited by FrodoB; July 11th, 2022 at 08:23.

  2. #2
    FrodoB, if you create the parcel, add the item (weapon or armor) give a name to this parcel, lock the padlock, put the item in the party sheet, name who will receive this parcel and distribute, instead of dragging the error remains?

  3. #3
    Yes, that's why I wrote down way 1 in such detail. I'll edit my post to clarify that this does indeed work just fine.

  4. #4
    Yes, Ikael created a distinction in different item types on the PC sheet that is very different than other rulesets; so he wrote a whole system of script coding to manage that. I'll reach out to him to see if he has time to update to support that use case; because it's quite a bit of digging for me to try to understand and/or change as an external developer just helping out.

    Regards,
    JPG

  5. #5
    I suspect the issue stems from the decision that Mundane Items can only be added to the "Mundane Items" tab, Armor to the "Armor" tab and Weapons to the "Weapons" tap. Dropping a weapon onto "Armor" doesn't do anything. Each tab has a list of things they accept ("Mundane" accepts Items and Parcels, "Weapons" accepts Weapons and Attack).

    So when dropping the parcel the scripting would have to crawl through the contents of the Parcel and "hand them off" to the appropriate tabs. Right now it's utilizing the CoreRPG handleParcelTransfer which sets every single type as "item". That would probably have to be overwritten in a way that determines the type of item for each part of the Parcel...

  6. #6
    @MoonWizard

    I figured out how to do it. I'm not sure it's the best way to do it, but it is a way to do it. You are probably a better judge if it's ideal.
    I could send you the patch, but I'm not sure how that works with licensing and such, so here's where the issue lies...
    SavageWorlds' ItemManager2 (manager_item2.lua) does not have its own handleParcelTransfer(msgOOB) method, so it uses the one of the normal ItemManager. That one calls:

    ItemManager.handleItem(nodeTargetRecord, nil, "item", vParcelItem.getPath(), true);

    Instead of "item" that call should go to the actual ItemClass which can be determined by getItemClass(vParcelItem), probably by declaring a variable beforehand to assign it to. sItemClass or something like that, I'm not sure how the LUA naming conventions are.
    Then, to force the OOBManager to actually USE that method, in the onInit() method one has to unregister the original messageHandler and register the new one. SavageWorlds uses its own OOBMessageHandler, so simple registering it won't help - this will only add a second function call to ItemManager.OOB_MSGTYPE_TRANSFERPARCEL.

    Hit me up if you need more info or detail, I'm hesitant to go too far into detail here. Don't want to trigger a "Thanks, now we cannot use this because you technically hold the copyright to this" or some other legalese issue.
    Last edited by FrodoB; July 11th, 2022 at 22:52.

  7. #7
    If code is provided to us with specific approval to be included as part of our code (i.e. granting us the rights to use as we see fit, and releasing your rights); then we can use it. You'd have to do that even if you provided to Ikael, since he has to submit to us to publish. It's really up to you. I never push on this stuff, just offer to use if copyright is released to us, and we'll do ongoing maintenance. I will say that in many situations, we don't even use the code "as is" in these scenarios, and often just use some of the ideas.

    In general, I won't even look at extensions unless specifically asked for help. If we end up offering a similar feature in the future, I build from scratch.

    Regards,
    JPG

  8. #8
    Understood, will send you a PM then!

  9. #9
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,384
    I have addressed this issue. After I implemented my solution I started to read this thread further and saw that my implementation was pretty much what FrodoB suggested. Due to legacy reasons SavageWorlds does have own implementation of OOBManager and you can replace/override callbacks by unregistering previously registered callbacks.

    @MoonWizard, could you see my latest commit in PEGFGSWBASE repository. I really wish CoreRPG's ItemManager would not hard-code "item" but instead would get the value from function which we could override. For instance, the default implementation could be something simple as

    Code:
    function getItemType(nodeTarget)
        return "item"
    end
    And for instance, handleParcelTransfer would have
    Code:
    for _,vParcelItem in pairs(DB.getChildren(nodeParcel, "itemlist")) do
        ItemManager.handleItem(nodeTargetRecord, nil, getItemType(vParcelItem ), vParcelItem.getPath(), true);
    end
    "Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness

    Post your SavageWorlds ruleset feature requests and issue reports here!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in