5E Character Create Playlist

Thread: Stored Script

  1. #1
    Foen's Avatar
    Join Date
    Jan 2007
    Location
    Suffolk, England
    Posts
    2,007

    Stored Script

    Discussions on another thread got me thinking about the possibility of storing script in a module, rather than just in a ruleset.

    The advantage (other than just adding intelligent functionality to a module) would be the ability to extend existing rulesets without having to maintain forked code (the case in point was the potential introduction of card decks to an existing ruleset).

    I first started by seeing if a script block could be added to db.xml and then executed (reasoning that if scripts could be added to the ruleset xml, there might be an undocumented chance that they would be accessible from database nodes). No dice it seems.

    I then tried to add a function handler to the database node using its metatable, hoping to save the extended node back to the db. Again, no dice - the metatable functionality is pruned in FG Lua (beyond just the documented missing features).

    I am left with the possibility of storing the script as a text field in db.xml, and trying to execute it following a loadstring command. This is also failing, as loadstring also appears absent (not just loadfile, per the documentation).

    Has anyone had any success with this or something similar?

    Cheers

    Stuart
    (Foen)

  2. #2
    No but the devs have acknowledged they are working on ways to include this type of functionality. The issue is while something nice and discrete like a card dealer works fine in a module, what about just simple changes to the charactersheet, or chatmanager chat functions? These will inheritently overwrite base files in the ruleset and thus need some sort of plugin manager. While the base d20 ruleset wouldn't be hard to implement as its fixed files its get to be a bit of an issue if you want to include multiple enhancements to the same source.

    Say I find a cool enhancement to roll skillchecks from the sheet. I include that. Now I found one that lets me specify different base skills or another column on the skill sheets, if I include that does it overwrite the other one (if its something as simple as file replacement). Designing a plugin system that accomdates that would be difficult without some sort of managemenet system for both the users AND the developers. Something like function overriding where devs can write their functions and allow them to be overrided and player can pick which functions/enhancements they want. It would need to detect conflicts in multiple plugins overriding the same function/feature and let the user choose which one he wanted in that case.
    Last edited by joshuha; August 28th, 2007 at 18:20.

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