STAR TREK 2d20
Page 3 of 4 First 1234 Last
  1. #21

    Join Date
    May 2013
    Location
    East Coast USA.
    Posts
    945
    Quote Originally Posted by Nickademus View Post
    I remember back in the NWN days, ...
    It's still kickin!

  2. #22

  3. #23
    I believe if you leave the <ruleset> tag empty it will default to CoreRPG.
    I never claimed to be sane. Besides, it's more fun this way.

  4. #24
    Quote Originally Posted by damned View Post
    What needs to be in definition.xml to see it in CoreRPG? The only module I can seem to get to open in CoreRPG is Calendar...
    Try using:
    Code:
    	<ruleset>Any</ruleset>
    or:
    Code:
    	<ruleset>CoreRPG</ruleset>

  5. #25
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    I have tried Any, CoreRPG and blank.
    Maybe there is something else I am missing?

    definition.xml
    db.xml
    zip it up and rename it .mod

  6. #26
    Quote Originally Posted by damned View Post
    I have tried Any, CoreRPG and blank.
    Maybe there is something else I am missing?

    definition.xml
    db.xml
    zip it up and rename it .mod
    Send me your definition.xml and db.xml; I'll message you my email.
    I never claimed to be sane. Besides, it's more fun this way.

  7. #27
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by damned View Post
    I have tried Any, CoreRPG and blank.
    Maybe there is something else I am missing?

    definition.xml
    db.xml
    zip it up and rename it .mod
    Make sure you zip up within the folder containing those files - don't zip up from outside (i.e. selecting the directory folder then zipping) as this will create a directory within the zip file and FG won't reognize it.
    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!

  8. #28

  9. #29
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Ok - I dont know why I couldnt convert Nickademus's .mod but doing it the other way - creating some content in the campaign and exporting it and then updating that file has worked for me...

    And yes - at least on some of those attempts I did zip up the root folder too - doh!

    So... moving along...

    To be able to drag content (of any nature) into a character sheet... like you can drag spells into spell sheet and items and armour and weapons into inventory.... Is that coding in the spells/armour/weapons/equipment lists/database/module or in the character sheet tab?

    Look I *know* I'm asking some dumb questions - but I'm finding this really bloody hard ok!

  10. #30
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by damned View Post
    To be able to drag content (of any nature) into a character sheet... like you can drag spells into spell sheet and items and armour and weapons into inventory.... Is that coding in the spells/armour/weapons/equipment lists/database/module or in the character sheet tab?
    It's all in the character sheet control where the drag-drop is taking place.

    Assuming you're doing this in the C&C ruleset?

    Look at \campaign\record_char_abilities.xml - the "abilitylist" control is defined as follows:
    Code:
    <list_text name="abilitylist">
    	<anchored to="abilityframe">
    		<top offset="30" />
    		<left offset="15" />
    		<right offset="-15" />
    		<bottom offset="-15" />
    	</anchored>
    	<datasource>.abilitylist</datasource>
    	<class>char_ability</class>
    	<sortby><control>value</control></sortby>
    	<newfocus>value</newfocus>
    	<acceptdrop>
    		<class>ability</class>
    		<field>*</field>
    	</acceptdrop>
    	<script>
    		function onDrop(x, y, draginfo)
    			local sDragType = draginfo.getType();
    			if sDragType == "shortcut" then
    				local sClass, sRecord = draginfo.getShortcutData();
    				if sClass == "ability" then
    					local w = createWindow()
    					if w then
    						local n = w.getDatabaseNode();
    						DB.copyNode(sRecord, n);
    						DB.setValue(n, "locked", "number", 1);
    					end
    				end
    				
    				return true;
    			end
    		end
    	</script>
    </list_text>
    The <acceptdrop> tag allows it to accept dropped data of the type "ability" and the onDrop script code performs the data copy locally - you won't need to do this with an image, just link to the image itself in the database - no need to copy the data, use something like:
    Code:
    w.value.setValue(DB.getValue(nodeSource, "name", ""));
    w.shortcut.setValue(draginfo.getShortcutData());
    See the 3.5e ruleset "list_charabilities" template in \campaign\template_char.xml as an example - which is used in record_char_abilities.xml file (the Abilities tab of the PC charsheet).

    Another way for you to do this is to add an extra tab and put a <formattedtextcontrol> in the tab: https://www.fantasygrounds.com/refdo...extcontrol.xcp These have the ability to have links embedded - but there is not direct drag-drop capabilities, you need to enable the link first and then drag/drop the item to the link - just like creating links in Story entries.
    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!

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
  •  
FG Spreadshirt Swag

Log in

Log in