5E Character Create Playlist
  1. #1
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1

    Custom Character Sheet - Draggable Links

    Im building a basic ruleset that is mostly concentrating on the character sheet.
    I have several fields where I would like to be able to drag links into the field so that it shows the Name of the link and has the clickable Link icon so that you can view more info on that item.
    In this case they are background characteristics and being able to view more info on them in game would be useful.
    Can anyone point me towards an existing example I can learn from?

  2. #2

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    Are these draggable links to a formattedtextcontrol or a windowlist control?

    If it's a windowlist (I'm guessing it is) then have a look at the template "list_campaign" in the CoreRPG ruleset. This is the windowlist template used for the campaign lists (story, images and maps, etc.) so has a name and a link - which sounds like what you're looking for. Do a find-in-files for list_campaign to see where this is being used. For example, for the story list:

    Code:
    <list_campaign name="list">
    	<datasource>.</datasource>
    	<class>encountersmall</class>
    	<script>
    		function onDrop(x, y, draginfo)
    			if draginfo.isType("shortcut") then
    				return CampaignDataManager.handleDrop("encounter", draginfo);
    			end
    		end
    	</script>
    </list_campaign>
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  4. #4
    We do something like this with the race and class fields in the 5E ruleset.

    JPG

  5. #5
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Yes, as JPG has pointed out - check out the 5E ruleset charsheet, it provides fields for Race, Class, Background (including characteristics) that support drag/dropping of reference class, background and race module content. When dropped, the fields are populated with the name of the record and a window reference link. Clicking the window reference links open smaller sheets with detailed content. In the case of Backgrounds the characteristics are populated from rollable tables.

    I suggest taking a look at the campaign/campaign_char*.xml and reference/ref_*.xml files in 5E.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  6. #6
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Just to clarify this is what Im trying to do...



    @Zeus, @Moon Wizard - I went thru the 5E code but It didnt appear to take drag data in the fields that suggested it would eg Race? Am I looking at the wrong fields or will I need to run Par5e to be able to have the right drag data to drag to Race?

    @Trenloe I will look at your suggested code next...

  7. #7
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    @damned - 5E definitely supports drag/drop of Race, Backgrounds, Class, Weapons and Spells. Have a look at campaign/char_main.xml, in the window class script block you will find the onDrop handler that calls the LUA script campaign/scripts/manager_char.lua and the function addInfoDB() whenever a shortcut/window-referencelink (of type reference_background, reference_race and reference_class) is dropped on the main sheet. addInfoDB() calls a number of helper routines (again defined in manager_char.lua) to copy reference data to the char sheet.

    And yes, the content must be prepared by PAR5E as there is no way to create reference content data through the FG UI at present.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

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
  •  
STAR TREK 2d20

Log in

Log in