DICE PACKS BUNDLE
  1. #1

    Help finding variable?

    Help! I'm trying to create a ruleset/extension for the Arcanis RPG. I'm having fits trying to reproduce the combat tracker rounds box onto the PC's sheet. I can't find the variable that keeps track of rounds. It appears to be "rounds" in the ct_template but then appears (maybe) as "combattracker.round" in the manager_combat lua in scripts. I'm totally confused. Is what I want to do even possible? Any ideas?

    Here's a pic of what I want to move.


    CropperCapture[19].jpg

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    So - one thing to remember with FG is that data is presented in the interface via a GUI control (which has a name) and that data is usually pulled from a database field - which has another name within the database hierarchy.

    My recommendation is always to go and get the data from the database, not the GUI control. This is really your only option when you want to put this data in another window.

    The easiest approach is to source the number control in the PC sheet on the database field "combattracker.round" - for example, if the control is a standard numberfield and called ct_round then you could use the following as the first line of your numberfield definition in the FG XML: <numberfield name="ct_round " source="combattracker.round">
    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
    Thank you, Trenloe! I had to walk away from the computer screen I was getting so frustrated. Wife took me to grab a beer. I think you're saying to simply use the line of code you gave me in my PC sheet initiative frame (using number field or whatever control I have in templates... I think it's lvlnumber) and make the source combattracker.round and that ought to reproduce the actual combat tracker round counter. Thank you so much! By the way, this is chillybilly using my wife's account and smart phone.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Trede View Post
    By the way, this is chillybilly using my wife's account and smart phone.
    Haha - I was confused at first!

    Quote Originally Posted by Trede View Post
    I think you're saying to simply use the line of code you gave me in my PC sheet initiative frame (using number field or whatever control I have in templates... I think it's lvlnumber) and make the source combattracker.round and that ought to reproduce the actual combat tracker round counter.
    Yes.

    Enjoy your beer!
    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
    oops, the jpg was wrong, please see the post below this.
    Attached Images Attached Images
    Last edited by chillybilly; May 11th, 2019 at 00:01.

  6. #6
    Darn. This doesn't seem to have worked. I entered this into the file for the main tab of my character sheet:

    <numberfield name="ct_round" source="combattracker.round">
    <anchored to="attackframe" position="insidetopleft" offset="90,165" width="12" height="12" />
    </numberfield>

    but it's not associating "combattracker.round" with the variable controlling which round it is on the combat tracker. Obviously, I'm doing something wrong.
    CropperCapture[20].jpg

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Ah, sorry - I keep forgetting a control source is relative to the window it's defined in. See info here about database paths: https://www.fantasygrounds.com/wiki/...ets_-_Database

    You'll need to work out exactly where in the database the window where the numberfield is and then traverse up the hierarchy to the DB root and then that will allow combattracker.round to be reached.

    Ready to start exploring the FG database? Put a number in that field in the character sheet, issue a \save chat command and open the campaign db.xml file - work out where the combattracker.round field is in the <charsheet> hierarchy and then count how many levels up to get to the root - use one more dot than number of levels you need to go up to get to the root. For example, if you need to go up 4 levels to get to the DB root, use source=".....combattracker.round" (5 dots).
    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!

  8. #8
    I have to admit that when I read your response, I wondered if you were the guy whose wife took him out for 3 beers. Then I followed your instructions AND IT WORKED!

    Seriously, how awesome are you for walking me through this? Thank you very much!

  9. #9

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by chillybilly View Post
    I have to admit that when I read your response, I wondered if you were the guy whose wife took him out for 3 beers. Then I followed your instructions AND IT WORKED!
    Fantastic! 3 beer coding is about the right level! :-)
    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
  •  
5E Character Create Playlist

Log in

Log in