Page 1 of 3 123 Last
  1. #1
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,146

    Modifying the CoreRPG ruleset

    This thread is a place to put info regarding modifications to the Fantasy Grounds (FG) 3.0 CoreRPG ruleset. It's not meant to be a step-by-step guide, but a resource for people to get info that *might* help them get started on modifying a ruleset or answer some questions they may have, or give info they may never have known.

    As always, the guides in the library section of the FG site are good places to start:


    Always keep in mind that your best resource for examples is the ruleset itself! If you see something in your game that you think "wouldn't something similar be cool in window XYZ" then look in the ruleset how the functionality is coded and see about using that code for your modification.

    Note:
    This thread freqently refers to the <FG App Data Folder> - this is a directory on your hard drive where Fantasy Grounds stores all of its data. It can be reached by clicking the "Open data folder" icon in the top right of the main FG startup screen (above the version number).

    A few steps to do before getting started:
    1. Get the CoreRPG.pak file from the Fantasy Grounds <FG App Data Directory>\rulesets directory. Rename to .zip and extract to the same directory (<FG App Data Directory>\rulesets directory) so that you have a CoreRPG directory. Rename this to something like CoreRPG_DEV. This will allow you to create a new campaign, with the ruleset name CoreRPG_DEV and so you can modify the files in this ruleset and test, without impacting the normal CoreRPG rules. Do not leave the directory called CoreRPG as this will result in you still using this folder even after future updates to Fantasy Grounds.
    2. If you don't already have a preferred good text editor (that includes syntax highlighting for XML and LUA, and has a find in files function) download Notepad++ (free) and add the XML plugin: http://notepad-plus-plus.org/ You can use this for modifying both XML and LUA files - and check the XML syntax with the XML plugin. Also, "Find in Files" is your friend for working out where things are in the ruleset.
    3. Have a look at the Ruleset Modification Guide - available in the Developer Guides section of the Wiki: http://www.fantasygrounds.com/wiki/i...veloper_Guides.
    4. Check some of the XML resources mentioned in the FG library: http://www.fantasygrounds.com/modguide/introduction.xcp
    5. Check the LUA resources too: http://www.fantasygrounds.com/modguide/scripting.xcp


    Many links provided in the developer guide Wiki page: http://www.fantasygrounds.com/wiki/i...eveloper_Guide

    Whichever text editor you use, make sure you utilise "find in files" all of the time, for the whole of the ruleset directory - this is your best way to find all references to specific functionality and to find XML template definitions that are being used. FG XML definitions frequently use nested templates, so make sure you search for all definitions within the ruleset to discover what they are actually defining!

    Directly modifying a CoreRPG_DEV ruleset as mentioned in point 1 above is a "quick-and-dirty" way to change code. In the long run, you'll want to package your changes as an extension or layered ruleset - so keep track of all of the files you modify so you can put these in an extension once complete. You can usually work out which files you modify by the date changed timestamp in your operating system File Explorer.

    Also - it is a good idea to comment any modifications you make in the XML or LUA files - so you know what changes you have made from the base code and why. Just a simple "Modified for XYZ" is a good start.

    Additional details on actions (dice rolls) here: https://www.fantasygrounds.com/forum...(dice-rolling)
    Last edited by Trenloe; August 3rd, 2017 at 19:46.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,146
    A few pointers where "stuff" is in the ruleset. This is the high level directories - most contain XML files (usually GUI objects and their layout) and associated LUA scripts in the underlying \scripts directory :
    • campaign - XML and LUA to do with the campaign side of things, i.e. Characters, Story, Maps & Images, NPCs, Encounters, Items, parcels, tables, etc.. Basically, the main icons along the right side of the FG desktop. The record_char_XXX.xml files contain the definitions for the PC character sheets: record_char.xml is the top level and record_char_main.xml, record_char_inventory.xml and record_char_notes.xml define the individual tabs (subwindows).
    • common - commonly used template and scripts. Buttons, lists, toolbars, etc..
    • ct - the Combat Tracker.
    • desktop - stuff that is on the desktop: chat window, dice tower, modifier stack, etc.
    • graphics - all of the graphics used within the ruleset.
    • ps - the Party Sheet.
    • ref - XML and LUA to do with the library reference (displaying library modules) and the different windows that can be displayed for library reference entries.
    • scripts - data_common.lua (contains a lot of 3.5E and Pathfinder relevant data - like skills, effects, abilities, conditions, energy types, immune types, damage types, bonus types, etc., etc.). Also has "manager" scripts - the main code that handles specific functionality within FG - like damage, attacks, initiative, exporting, spells, targeting, etc., etc..
    • strings - The string resources that are used throughout Fantasy Grounds. These files help to facilitate translations of Fantasy Grounds.
    • utility - basically the "stuff" hanging off the small grey icons in the top right of the FG desktop - calendar, character list, effects list, tokens, modifiers, options, exporting.
    Last edited by Trenloe; May 30th, 2014 at 16:25.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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!

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,146
    Custom Dice Rolling and/or Actions

    See how to create custom actions (the main background process used by CoreRPG for rolling dice and other processes) here: http://www.fantasygrounds.com/forums...(dice-rolling)


    LUA resources

    A good beginners guide to LUA programming: http://www.amazon.com/Beginning-Lua-.../dp/0470069171
    Last edited by Trenloe; December 14th, 2016 at 20:01.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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
    Yesterday you linked to a post containing information on ruleset layering that I didn't see in your posts. Might want to splice it in until we get official documentation on merging.

    Good stuff by the way. Feel free to delete this post to make room for more.
    I never claimed to be sane. Besides, it's more fun this way.

  5. #5
    Too bad this seems to be about (or will be about) modifying CoreRPG. Unless very specific needs and knowledge, most things should be done via the new layering/cascading capability aren't they? Or will that go into placeholder 2 ?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,146
    Quote Originally Posted by Blacky View Post
    Too bad this seems to be about (or will be about) modifying CoreRPG. Unless very specific needs and knowledge, most things should be done via the new layering/cascading capability aren't they? Or will that go into placeholder 2 ?
    I haven't yet decided exactly what will be included in this thread (if at all) as it is meant to be a "get started modifying a ruleset" primer. I do mention in post #1:

    Quote Originally Posted by Post #1
    Directly modifying a CoreRPG_DEV ruleset as mentioned in point 1 above is a "quick-and-dirty" way to change code. In the long run, you'll want to package your changes as an extension or layered ruleset
    I think most people who are new to ruleset modification struggle with the extension/layering concept, so for initial minor changes/playing around I think changes directly in the ruleset are a good way to get going and avoid confusion. Once the budding ruleset modifier/developer gets more familar with the ruleset layout they can think about taking the next step and making their changes as part of an extension or layered ruleset.
    Last edited by Trenloe; March 10th, 2014 at 17:59.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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!

  7. #7

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    2,954
    Seems like this should be sticky'd.

  8. #8
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,782
    Blog Entries
    1
    Quote Originally Posted by Blacky View Post
    Too bad this seems to be about (or will be about) modifying CoreRPG. Unless very specific needs and knowledge, most things should be done via the new layering/cascading capability aren't they? Or will that go into placeholder 2 ?
    Quote Originally Posted by Trenloe View Post
    I haven't yet decided exactly what will be included in this thread (if at all) as it is meant to be a "get started modifying a ruleset" primer. I do mention in post #1:


    I think most people who are new to ruleset modification struggle with the extension/layering concept, so for initial minor changes/playing around I think changes directly in the ruleset are a good way to get going and avoid confusion. Once the budding ruleset modifier/developer gets more familar with the ruleset layout they can think about taking the next step and making their changes as part of an extension or layered ruleset.
    So there are advantages to modifying CoreRPG and not building an extension or layered ruleset. The biggest advantage is that changes to CoreRPG cant break your new ruleset as its a new fork.
    Otherwise - yeah Id go with an Extension or Layered Ruleset to ensure you continue to receive Moon Wizards largesse!
    In my experience - looking at a really basic Extension - like the Themes - helps to understand how the layering works.
    The advantage of a Ruleset over an Extension is that a Ruleset will always load after CoreRPG but an Extension may load before or after another extension and thus give potentially unexpected results....


    FG Con 6 – April 17-19th 2015 - register at www.fg-con.com for all the latest info.

  9. #9
    ShotGun Jolly's Avatar
    Join Date
    Aug 2009
    Location
    St. Johns, NL, Canada
    Posts
    549
    Damned,

    After our chat the other day, I was thinking and I have another suggestion for you to think about. First of all, I tried to do it myself, but I cant get the code to work right, as I am missing something.

    But right now, we have two pages on the character sheet, "abilities" and "inventory" Both pages support the drag and drop option, but the "abilities" page only supports the drag and drop option for the title of what ever it is you are adding there. If you click on the little info box on the side, the description is blank. But if you drag and drop an item to the "inventory" page, the info box supports what ever is in the description.

    If we could make the ability page, work the same as the inventory page. People with limited knowledge on how all this works, (like me) we can still make pretty good library mods, by using inventory items as skills, spells, special abilities, and be able to drag and drop items where ever we want.

    I am not sure if what I am saying is making any sense, but I attached the screen shot, and hopefully it will give you the idea of what I am trying to suggest.

    Capture.JPG
    ShotGun Jolly

    The Jolly GM RPG Blog

  10. #10
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,782
    Blog Entries
    1
    You want to be able to have a Library of Skills that you can drag and drop?
    Is that what you are saying? The quickest way to do this for you right now would be to have a dummy PC with the full list of skills and you can drag them from there on to other PCs.
    If the library is what you are saying you want - I will have a look and see if I can work that out...

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

Thread Information

Users Browsing this Thread

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

  1. Laramie Wall

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