1. #1

    Setting up fields for drag and drop

    I have my item window set up the way I want (except for hiding certain fields based on "Type" selected with the cycler while window is unlocked). I was looking through the CoreRPG ruleset record_char_inventory.xml, template_char.xml, template_common.xml and ItemManager(manager_item.lua) in order to figure out how to set up my Attack window to accept drag and drop and grab the correct data to populate it.

    My Attack frame will already accept drag/drop but right now it displays name and reference link.

    record_char_more.xml
    Code:
    <string_labeled name="weaponlabels" >
    					<anchored to="weaponframe" position="insidetopleft" offset="15,20" width="590" />
    					<labelres>char_label_weaponlabels</labelres>
    			</string_labeled>
    
    			<list_text name="testthis">
    
    					<anchored to="weaponframe">
    						<left offset="15" />
    						<top offset="45" />
    						<right offset="-20" />
    						<bottom offset="-5" />
    					</anchored>
    
    					<newfocus>name</newfocus>
    					<datasource>.testlist</datasource>
    					<class>char_test</class>
    					<acceptdrop>
    						<class>referencetext</class>
    						<class>referencetextwide</class>
    						<field>*</field>
    					</acceptdrop>
    			</list_text>
    I would also like to attach MoreCore's sCMD "crom" as a dice roller after dragging it into the frame (based on the "Damage [CD]" field of the item), but I'll tackle that after I get this working.

    Any advice on the most efficient way to achieve this? Thanks for any input.


  2. #2
    Damned covers that sort of thing in his videos. Not sure which one. I would look over them again about the Class drop, it would be the same thing in regards to what you are trying to accomplish.

  3. #3

  4. #4
    Thanks for the direction, I will make sure to watch the vids.

    damned, where might I find the char sheet extension that you created in the videos?
    Last edited by Ranzarok; July 25th, 2019 at 23:27.

  5. #5
    He isn't finished it but you can see some of it from this thread:
    https://www.fantasygrounds.com/forum...ding-Tutorials

  6. #6
    Thanks superteddy

    With your suggestion and damned's videos, I managed to get it done. It's not completely automated, I still have to input the qualities, reach, grip, CD and bonus manually, but you can drag and drop the item/weapon into the frame with the proper containers, it links back to the item window and the roller takes the CD value, adds the +CD value and rolls that many d6s. I know for a more advanced modder that's no biggie, but man I feel pretty good about accomplishing that.

    Thanks again for the help.


  7. #7
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,749
    Blog Entries
    1
    Its a journey! Today you take a little step, another one tomorrow...

  8. #8
    Baby steps. Each win is a win and that's how I see it. Some things come easier for some, but everytime I make something I give myself a pat on the back and do a little dance.

    If you can crack and share how to link your weaponlist's frame to the inventory, you would figure out something I've spent the last year trying to figure out. So we each have our own little obstacles lol.
    Last edited by superteddy57; July 26th, 2019 at 17:37.

  9. #9
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,749
    Blog Entries
    1
    So my example of drag and drop was for more static data like classes.
    Weapons are far more customisable so you need to find an example where they pull the data from the XML record source rather than a Lua array.
    The 5E and 2E and 3.5E rulesets are probably your best examples of this.

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

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