STAR TREK 2d20
  1. #1

    User.isHost has some unexpected behavior for me

    [EDIT: TURNS out this was all console logs writing all the logs to one place (host and player)]

    As I develop extensions I always run my host, and a player. Two separate instances of the game. One to load the campaign - the other to host.

    I was pretty surprised when I put in User.isHost guards in my code and the player instance simply seemed to thing they were the host.

    Technically, the user SilentRuin is running both the load campaign and the join. But I was hoping it would tell me who was actually the host (load of campaign). It seems confused since my name is technically both.

    Is there a way to truly and absolutely tell the code who is the host and who is the player?
    Last edited by SilentRuin; June 26th, 2020 at 02:14.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  2. #2
    I've never seen that before. If that was the case, then a lot of the core ruleset code wouldn't work correctly.

    Can you create a minimal extension that recreates the issue?

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    I've never seen that before. If that was the case, then a lot of the core ruleset code wouldn't work correctly.

    Can you create a minimal extension that recreates the issue?

    Regards,
    JPG
    Something else must be going on - I was looking at compile logs and it looked like my player was running through all the host calls - but now that I've printed out the isHost value - its doing the right thing. Something else is going on - probably in the stupid category - sorry to have wasted your time. You can delete this thread if you wish.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  4. #4
    Wow my compile logs are showing crazy stuff... I've got a DB.handler that i was originally processing only at the host when a database value changed for any character. But then I realized I had to have players check one value so made it happen for everyone, just the players ingored the bulk of the code and only processed one tiny section.

    But when I just compiled the logs on the players side I saw this from the debug.console I have at the top of the DB.handlers call (prints out isHost).

    [6/25/2020 7:41:51 PM] isHost was false'
    ... a few other log prints per normal ... then ...
    [6/25/2020 7:41:51 PM] isHost was true'


    I'll have to add more logs and figure out what is happening.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #5
    ARRGGHHHH... this is some kind of compile logs artifact I've been churning on. If I compile logs on SilentRuin the player - I see the 4 places I put isHost result logs as false 1st/true 1st/true 2nd/true 3rd/true 4th all in the console log I generated from the player.

    Compiled the logs from the host - and got the EXACT some console log.

    This is probably because the console log is simply writing everything from my player an host to the same file making my logs useless the way I'm running (sigh).
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  6. #6

  7. #7
    Quote Originally Posted by damned View Post
    I dont think the console log can differentiate between two instances of FG on teh same computer.
    I can verify it doesn't. Just have to put very clear logging to keep the threads readable. Confused me when I thought it was just the instance I was compiling the logs from. My bad.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  8. #8
    If you're running two copies of FG on the same machine; they are both writing to the same log files, since they both have the same Settings.

    Regards,
    JPG

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