Thread: Acceptdrop

  1. #1

    Acceptdrop

    Hello,

    I have a windowlist that I set up:

    Code:
                    <acceptdrop>
                        <class>item</class>
                        <field>*</field>
                    </acceptdrop>
    Which works and copies anything from the Items list. However, I would like it to only copy items with type set as "armor". Can I do that, and if so, how?
    Add me on Twitch: twitch.tv/statik367

    If you like what I am doing, you can support me via PayPal: paypal.me/wesleytoma
    Or Venmo: venmo.com/Wesley-Toma-Lee

  2. #2
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,333
    I've not used this option but there is this in the 5E ruleset.

    Code:
    				<acceptdrop>
    					<type>dice</type>
    					<type>number</type>
    					<type>attack</type>
    					<type>damage</type>
    					<type>heal</type>
    					<type>init</type>
    					<type>save</type>
    					<type>check</type>
    					<type>recovery</type>
    				</acceptdrop>
    I'd really be interested in seeing complete docs on all these options. I wasn't aware of these flags so never used them.
    ---
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  3. #3
    That didn't work. I think those are for drag and drop to the chat window not the windowlist. Then again, I could be wrong. Either way, that didn't seem to work for me.
    Add me on Twitch: twitch.tv/statik367

    If you like what I am doing, you can support me via PayPal: paypal.me/wesleytoma
    Or Venmo: venmo.com/Wesley-Toma-Lee

  4. #4
    @statik37,
    There's no way to dynamically filter based on what is in the data; only which classes are accepted and which fields to copy. If you want something more complex, you'll need to remove acceptdrop, and write your own onDrop event function.

    @celestian,
    It's documented in the windowlist tags here:
    https://www.fantasygrounds.com/refdoc/windowlist.xcp

    Regards,
    JPG

  5. #5
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,333
    Quote Originally Posted by Moon Wizard View Post
    @statik37,
    There's no way to dynamically filter based on what is in the data; only which classes are accepted and which fields to copy. If you want something more complex, you'll need to remove acceptdrop, and write your own onDrop event function.

    @celestian,
    It's documented in the windowlist tags here:
    https://www.fantasygrounds.com/refdoc/windowlist.xcp

    Regards,
    JPG
    I was mostly referring to something like <type> which isn't documented as far as I could tell. I've a good idea what it does but would be nice to know for sure as well as if there are others not listed.

    Currently I think ALL of my onDrops are filtered based on custom code like you mentioned which is why I was interested in this.
    ---
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  6. #6
    @celestian,
    Those are actually part of a script used for the ModifierStack. It's not part of the CoreAPI.

    Regards,
    JPG

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Log in

Log in