View Full Version : Hiding the Combat Tracker and Character Sheet from laters (Core RPG/MoreCore)
Unahim
January 17th, 2017, 18:31
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!
Trenloe
January 17th, 2017, 19:03
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.
Unahim
January 17th, 2017, 20:24
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.
Unahim
January 22nd, 2017, 11:12
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/forums/showthread.php?20449-Tutorial-Creating-a-Basic-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!
Unahim
January 25th, 2017, 18:54
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:
<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.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.