5E Character Create Playlist
  1. #1

    LUA file in extension not replacing original

    RESOLVED

    Hello and thanks for the help in advance.

    I'm building an extension for the 2E ruleset and having an issue with one file: data_common_adnd.lua not being replaced by the extension.



    I have it listed in the extension.xml, but it doesn't seem to notice.

    I've read that the original file from the ruleset might be loaded by another file after the extension runs, thereby 'copying over' the updated file with the old one.

    I searched for all the files in the ruleset that referenced DataCommonADND (the name of the data_common_adnd.lua file) and added them to the extension, but no dice.

    I'm new to extension coding but not new programming (although no lua experience). Any help (or point to resources) would be greatly appreciated!

    Thanks.
    Last edited by MysteryHand; April 10th, 2020 at 00:19. Reason: RESOLVED

  2. #2
    I think more information is needed on what you want to add and what is contained in your replacement data_common_adnd.lua. Can you provide more information and some background?
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  3. #3
    I'm changing the ability bonuses to match B/X rather than 2e. So I'm replacing the data contained in "data_common_adnd.lua". I'm switching the coin weights too but it's all the same thing: changing numbers in the lua file.

    I included a debug statement in the oninit function to see if the module was at least loading and not seeing anything in the console. Mind you I don't know what triggers the onInit for this file.

    I'm adding the file to extension.xml with:

    <script name="DataCommonADND" file="scripts/data_common_adnd.lua" />

    Admittedly, I'm totally new to this but I have had some success making an extension for the 5e ruleset that included modifications to lua files.

    Thanks for taking the time to look at this problem.

  4. #4
    DataCommon tends to contain lua tables to assist with, funny enough, common data that needs to be supplied during automation. It appears the 2E ruleset uses both DataCommon and DataCommonADND. You might get more mileage of just creating your own DataCommon lua file and just changing the DataCommon/DataCommonADND calls within your extension code to call your changes. This may not give you such a headache.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  5. #5
    Thank you for the quick reply! I had decided to clean my house until I got a response, now I can continue to code and let the dirt pile up

    I won't pretend that that gave me a Eureka! moment, but it does give me a path forward. Thanks, I'll start investigating that.

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    The approach to overriding the base DataCommon data is discussed in this thread: https://www.fantasygrounds.com/forum...or-Gamma-World

    There were a couple of coding issues we had to overcome, so hopefully the discussions around getting that sorted out won't confuse the issue.
    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
    Thanks for the response.

    I found my error and it wasn't anywhere near as complex as the Gamma World issue. The error was so basic, I'm embarassed to say.

    But I was very excited to see that someone was working on the Gamma World ruleset! I was thinking about doing that myself. Maybe I can help out.

    Thanks to both of you for responding. Great community.

  8. #8
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Im pretty sure that there are two DataCommons because the 2E ruleset was heavily based on 5E and mantaining the 5E structure and even files where common is easier to maintain as 5E gets developed in parrallel.

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