1. #1

    Hiding the Combat Tracker and Character Sheet from laters (Core RPG/MoreCore)

    Every so often my group and I like to have one person learn the rules for a game system, have that person develop a randomized way to create characters with various background events and then play a campaign where the players have absolutely no clue about the rules and only descriptions to judge their stats/abilities by. It's always great fun. I'm setting up a game like this this time, and thought it would be a great help to me to track some stats, combat turns, etc, in MoreCore, as this method of playing does obviously have the GM handle large amounts of information.

    That said, the idea is to reveal as little as possible to the players, so I'm wondering if it's possible to:
    - Deny players access to the combat tracker (this is the more important one)
    - Allow players to select their characters, but block them from being able to open their character sheet

    Willing to do the work myself, but don't want to go on a wild goose chase if it's not possible/just too difficult for a novice.

    Any pointers appreciated!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,669
    Both will require coding (XML and LUA file editing) but are possible.

    The combat tracker will be the easier one. You could remove the combat tracker button from the desktop for players. This is in CoreRPG scripts\data_desktop.lua - the "aCoreDesktopStack" table controls these buttons - ["client"] is for the player side, with the icon="button_ct" section defining the combat tracker button.

    For the PC you could intercept the character sheet opening when they click on the portrait - this should be fairly easy to do. This is the bringCharacterToTop function in CoreRPG desktop\scripts\characterlist_entry.lua - you'll want to block this for players - putting if User.isHost() then ... end around the code might be enough. You'll also have to stop the character sheet opening when the player first selects a character.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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
    Quote Originally Posted by Trenloe View Post
    Both will require coding (XML and LUA file editing) but are possible.

    The combat tracker will be the easier one. You could remove the combat tracker button from the desktop for players. This is in CoreRPG scripts\data_desktop.lua - the "aCoreDesktopStack" table controls these buttons - ["client"] is for the player side, with the icon="button_ct" section defining the combat tracker button.

    For the PC you could intercept the character sheet opening when they click on the portrait - this should be fairly easy to do. This is the bringCharacterToTop function in CoreRPG desktop\scripts\characterlist_entry.lua - you'll want to block this for players - putting if User.isHost() then ... end around the code might be enough. You'll also have to stop the character sheet opening when the player first selects a character.
    That all sounds logical and doable, going to set some time aside this weekend to tinker with it. Cheers in advance.

  4. #4
    Quote Originally Posted by Trenloe View Post
    Both will require coding (XML and LUA file editing) but are possible.

    The combat tracker will be the easier one. You could remove the combat tracker button from the desktop for players. This is in CoreRPG scripts\data_desktop.lua - the "aCoreDesktopStack" table controls these buttons - ["client"] is for the player side, with the icon="button_ct" section defining the combat tracker button.

    For the PC you could intercept the character sheet opening when they click on the portrait - this should be fairly easy to do. This is the bringCharacterToTop function in CoreRPG desktop\scripts\characterlist_entry.lua - you'll want to block this for players - putting if User.isHost() then ... end around the code might be enough. You'll also have to stop the character sheet opening when the player first selects a character.
    I was able to get this to work as a custom ruleset without too much trouble. Thanks!

    I'd like to start learning how to make extensions so I don't have to replace entire rulesets all the time when making small changes. I've tried to follow a tutorial on it (https://www.fantasygrounds.com/forum...asic-Extension) to incorporate the changes I made into just an extension, but I cannot get it to function. I always get the error "Database Error: A XML parse error occurred processing file scripts/data_desktop.lua - Error on line 0: Error document empty."

    Could you tell me what I'm doing wrong? I have attached a zip of the extension (though I was just using it as a folder while testing), I'd be much obliged if you could have a quick look!
    Attached Files Attached Files

  5. #5
    Finally got it to work!

    Just in case anyone else searching the same error situation on google comes across this thread (I had fairly little success with googling this issue myself):
    It seems that at first, I had the .lua files in <includefile> tags and that was wrongbad. Got rid of the error by putting them in <script> tags instead; however, at that point they failed to do anything at all until I realized I had to give the data_desktop.lua file the attribute "name='Desktop'". I found the name by using my editor to "search in files" for references to data_desktop.lua, essentially. The other file I saw was defined in template_desktop.xml like this:

    Code:
    	<template name="characterlist_entry">
    		<genericcontrol>
    			<anchored to="anchor" width="75" height="75">
    				<left anchor="right" relation="relative" offset="3" />
    				<top />
    			</anchored>
    			<script file="desktop/scripts/characterlist_entry.lua" />
    		</genericcontrol>
    	</template>
    I guess it's also the name that is important here for overwriting purposes, so I ended up just including the entire template_desktop.xml file in the extension and letting that call the script file as normal, which did the trick.

    I'm happy it works now, but that's still two entire files I'm duplicating, which seems like a bad practice for future proofing. Can I trim the files down to just the bits I'm overwriting? I can't figure out which bits to keep and which to discard, if this is possible.

Thread Information

Users Browsing this Thread

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

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