Fantasy Grounds Merchandise
  1. #1

    Can anyone explain 'Datasource'?

    Hi All
    I am looking at modding FG and would really like some help on this.
    Can someone please explain the 'datasource' tag? Is this simply various locations that are hard coded into the FG .exe in order to retrieve info? Can different 'datasources' be created? What is its connection to the db.xml file?

    I recall Doval changing the 'class' datasource to 'rules' in order to get somesort of mod working over at FUM's boards, was this neccessary or could it have worked without a datasource tag?

    I am particularly interested in the 'images' datasource.

    windowclass name="imagelist">
    <datasource name="image" />
    <frame name="scrollboxfortabs" />
    <dynamic />
    <defaultsize width="275" height="350" />
    <minimumsize width="200" height="220" />
    <softclose />
    <sheetdata>

    Also can different folder names be assigned for images and portraits? If so where would I go about changing the path name?
    Thanks
    Uni

  2. #2
    I am guessing you already know this by now, but for those that do not the datasource tag refers to a node class in the XML files in the database folder (those that are loaded by base.xml that is )

  3. #3
    Cheers for the info....how do I get to modify info in FG and get it to save to the relevant datasource? i.e. when you fill in the character sheet the modified info is saved under 'charsheet' in the db.xml .
    I have created a weapons.xml datasource but i want to be able to add to it whilst running campaigns, by using the 'create new entry' buttons (similar to items/maps etc) but the info is not retained!! is this possible?

    Uni

  4. #4
    I'm probably over-simplifying here but: there are basically 2 sorts of datasources - Dynamic and Static.

    If you create an xml file, pre-populated with weapon info, and add it into FG using a "staticdata" node in base.xml then you can't modify or add to it from within FG. Though you can still edit the xml file (with notepad or other editor) and add more data to it.

    If you set up xml classes similar to the ones for item/npc/story/image then then the datasource is 'dynamic' and the actual entries you create will be stored inside your db.xml.
    note: I'd recommend using the story, item or npc classes as a base for creating your own classes. The Image classes have some stuff in them that really only apply to images.
    Work Less, Game More!

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