pplans / foundry-vtt-module-motion-tracker

A module giving life to the Alien RPG motion tracker in foundry VTT
MIT License
6 stars 8 forks source link

Scan Other Players Setting Not Working #67

Open rdefendi opened 1 year ago

rdefendi commented 1 year ago

The "Scan Other Players" setting isn't working. I performed my tests with Dante and Zmijewski from Destroyer of Worlds. I logged my player Aaron in so you could see that Dante is assigned to Aaron's player account. Zmijewski is running the motion tracker for this test. In the first screenshot, we're performing a baseline. Here are my settings.

Initial Setup

You can see I have "Scan other Players" marked. Here are the results. You can see that Dante and the 3 UPP soldiers are all showing up. (I moved the UPP around in this second screenshot so their signatures on the tracker weren't clumped up. I've also clicked the motionless status on and off on Dante to make certain the closer dot is, indeed, Dante.

Base Test

Now we turn off the "Scan Other Players" toggle, as you can see here.

Adjusted Setting

Here are the results. You can see they are exactly the same.

Test 2

pplans commented 1 year ago

thanks that's weird indeed, I'll try to repro with your setup or as close as I can

rdefendi commented 1 year ago

One thing that occurred to me after I wrote the issue is that Dante is the only character currently assigned to a player because I haven't started this game yet. So Zmijewski isn't assigned to a player, only Dante. I don't know if a player-assigned actor has to be selected when you open it for it to work.

pplans commented 1 year ago

am not sure anymore, it's been a while I wrote those lines, but definitely I need to put a message or something about this to warn the users

CodaBool commented 1 year ago

My v11 fix broke this. I'll take a look at fixing it and put out a PR within a week.

Should also be able to fix the audio volume controls not working.

EDIT: looks like there has been plenty of work by @pplans so, I think my issues I introduced have already been patched

CodaBool commented 1 year ago

The way it's written right now an actor is considered a PC by their permissions. If an actor has a permission of ownership by at least one user (other than the GM), then they are considered PC.

You can't have them as Observer it needs to be highest permission level of Owner.

Once you do that then it will know they are PC and ignore them on the scans.

Can you run a test where you put Dante as an owner to a user other than the GM?

The way the code is written it doesn't matter who opens the motion tracker. So, not having Zmijewski be owned by a player shouldn't matter here.

pplans commented 1 year ago

I am adding a visual feedback or something for the "not selected player actor" case, it will help maybe avoiding some issues reporting

pplans commented 11 months ago

Is this still an issue ?

CodaBool commented 11 months ago

@pplans I noticed that this is how monks-active-tiles finds player tokens in the current scene.

Which I've found useful.

const players = game.scenes.viewed.tokens.filter(t => {
    return t.actor != undefined && t.actor?.hasPlayerOwner && !['npc', 'familiar', 'hazard', 'loot'].includes(t.actor?.type)
  })

This is a separate issue and I can open a ticket if you'd like but skipping over actor type loot might solve a different issue I had. Which when running item-piles all piles would show on the monitor as non-player blips.

pplans commented 11 months ago

hum, alright but I want this to be data driven as the rest (meaning, all going into the configuration page), I'll try to poke it out before the end of the year :)