League-of-Foundry-Developers / torch

Simple torch module for Foundry VTT
10 stars 20 forks source link

Torch token button does not seem to work with Pathfinder 1e #23

Closed vgeirnaert closed 1 year ago

vgeirnaert commented 2 years ago

Ever since upgrading to Foundry V10 and associated game system and module updates, the token button for Torch does not appear in my Pathfinder 1e game. It still works for Pathfinder 2e.

Pathfinder 1e: image

Pathfinder 2: image

Module version: Torch 2.1.1 Game System: Pathfinder 1, v0.82.1 Foundry Version: Version 10, build 284

Altrix1 commented 1 year ago

No button in DnD5e - too

image
Kallel181 commented 1 year ago

having the same issue on pathfinder 2e

lupestro commented 1 year ago

I've tried this recently on Pathfinder 1e and 2e - we do have specific light sources defined on both systems now, so I'm surprised. I'd like to find out more about your situation.

Questions:

I very much want to track down what is happening here so we can get it squared away.

vgeirnaert commented 1 year ago

However, your question has made me check the inventory. Once I add a torch to the inventory of a character I do see the option (both in PF1 and PF2), and without a torch I do not. This is even when the use inventory options are disabled. Perhaps I'm misunderstanding what these are for, but I'd like to give my players the option to use the torch button regardless of what's in their inventory.

vkdolea commented 1 year ago

Hey @lupestro I was using a custom JSON file before the last update and it was working fine, but now I keep having errors on library.js in the exactly the same portion of code that was changed. My errors are normally between lines 25 and 34. Here is the json code I was using.

Note: I am using module on AGE System and FVTT 10.286.

{
    "age-system": {
      "system": "age-system",
      "topology": "standard",
      "quantity" : "quantity",
      "sources": {
        "Lanterna": {
          "name": "Lanterna",
          "type": "equipment",
          "consumable": false,
          "states": 2,
          "light": [
            { 
              "bright": 10, "dim": 15, "angle": 30, "color": "#ff9329", "alpha": 0.5,
              "animation": { "type": "torch", "speed": 5, "intensity": 5, "reverse": false } 
            }
          ]
        },
        "Visão Noturna": {
            "name": "Visão Noturna",
            "type": "equipment",
            "consumable": false,
            "states": 2,
            "light": [{
                "bright": 1000, "dim": 1000, "angle": 360, "color": "#184601", "alpha": 0.4,
                "animation": { "type": "none", "speed": 5, "intensity": 5, "reverse": false },
                "light": {"luminosity": 0.3}
            }]
        }
      }
    }
}

Attached is the error I get when rendering token hud: image

I am logging this here as I believe the error I am facing is closely related to the ones posted in this thread.

Cheers!

lupestro commented 1 year ago

@vgeirnaert Language is a tricky devil - the language around “uses inventory” should probably be around “consumes inventory” in the sense of decrementing the quantity on use. I can change the names on the existing options to “consumes” rather than “uses”.

On systems where we haven’t defined settings for specific light sources, the user gets a default light source - “self” - that takes on the lighting set in the config. Perhaps under the control of an option, we can offer this for systems where light sources are configured.

@vkdolea I’m going to track what you’re finding as a separate issue and hopefully get to the bottom of it right away.

Sorry for the delays on addressing Torch issues, folks - in the time available for VTT work, I’ve been trying to get a system for Fudge out the door.

MrPrimate commented 1 year ago

I'm also seeing the lack of button in 5e.

lupestro commented 1 year ago

@MrPrimate Hi! Let's see if we can get this working. Bear with me over any of the following that might be "is it plugged in" questions - I've got a shrewd guess what you might be encountering:

If this isn't the source of the problem, we can dig in deeper.

In general, if you look at sources.json, you can see the light sources that are delivered out of the box for all the systems. As outlined in the README.md -- and, as of today, the v10 branch is finally merged to main, so you don't have to go to a branch to see the right README.md -- you can supply a JSON to module configuration to extend or modify what is already there, make things flicker, etc.

Most of the comments I have received have only required nips and tucks for special situations. I need to simplify the requirements of the JSON and improve the guidance to make all this easier.

I am also working on an alias mechanism, so if you can indicate to me which of the light sources we provide in our base settings have different names in ddb-import than in the compendia, I can make sure that, when I deliver aliases, I can deliver those aliases out of the box, so that ddb-import use with Torch is seamless.

lupestro commented 1 year ago

@vgeirnaert Hopefully the updates to the README.md in v2.2.0 will help with any confusion. I think this issue has long since been resolved and I only waited to close this until I got the README updated.

@MrPrimate I supplied the aliases for the two lanterns to match the ddb-importer names in tonight's release. See if that helps your situation. The original issue of this ticket has long since been addressed.

I'm closing this ticket but I don't want to cut you off, so if this latest release didn't address your issue, please open a fresh ticket with a bit of detail of what you're seeing, as player or GM, what light sources you have defined, what language you are using, and we can work through it together.

MrPrimate commented 1 year ago

@lupestro hi! Sorry, this is on my to do list I'll check out the changes ASAP and get back to you. Thanks