DICE PACKS BUNDLE
  1. #1

    Need your expertise about char_main.xml

    Hello everyone,
    I'm working on an extension.
    I need to show a single value common to all players.
    This value will change during game play and will remain for the next session
    I wanted to post it on the desktop but I understand that the values of the desktop are not saved in the database.
    Can you help me please ?
    thank you for everything

  2. #2

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    Use the MOTD extension and edit the MOTD story entry during play?

  3. #3
    MOTD extension is not the good way.
    The game system grants at the beginning of the game a common pool of special dices that all players can use. This dice stock decreases as they use these special dices. The goal is that players can see this dice stock easily.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,410
    You can save desktop panel data to the FG campaign database, you just have to code it to do so.

    You can look at the lightsidechit in the Star Wars EotE ruleset. The lightsidechit windowclass is added to the lightsidechit panel in definitions\desktop.xml. A public lightsidechit database node is created in managers\desktopmanager.lua (the database needs to be public so that the player side can access it) and the code to handle it is covered in classes\desktop\chit.lua. It's not simple, as OOB messaging has to be used (depending on who has access to the desktop panel information).
    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!

  5. #5
    Thanks for your help.
    I'm going to see it. I try your solution

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,410
    Attached is a simple example extension of storing a number in the database and displaying it on the desktop.

    This should work in any CoreRPG based ruleset.

    The extension "Desktop Panel Example" adds a basic panel to the desktop (can be unlocked and moved) with a number control within. Only the GM can change it by clicking on it and typing a number, or using the scroll wheel.

    On the player side, we need to wait for FG to fully initialize before the code can access the database. So, for the player, the desktop panel will show "Click to sync". Once each player clicks on the panel then the number displayed will be in sync with the GM - it's read only on the player side.

    This is just an example of how to store data in the database and access it to display in a desktop panel. Different data could be handled in the same way. If you wanted the players to be able to change it then you'd need to setup some OOB messaging from the players to the GM, as only the GM can change public data.

    Here's an example, showing the desktop panel:

    Last edited by Trenloe; May 19th, 2017 at 21:14.
    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!

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