League-of-Foundry-Developers / torch

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

Change the color #66

Closed agassparkle closed 9 months ago

agassparkle commented 9 months ago

I tried this to change the color of torch.

{ "dnd5e": { "system": "dnd5e", "topology": "standard", "quantity" : "quantity", "aliases": { "Lantern (Bullseye)": "Bullseye Lantern", "Lantern (Hooded)": "Hooded Lantern" } "sources": { "Torch": { "name": "Torch", "type": "equipment", "consumable": true, "states": 2, "light": [ { "bright": 10, "dim": 15, "angle": 360, "color": "#ea5d2e", "alpha": 0.5, "animation": { "type": "torch", "speed": 5, "intensity": 5, "reverse": false } } ] } } }, ... }

image

here as light.json. But when it is there the torch icon dissapears from the tokens. What am i doing wrong ?

lupestro commented 9 months ago

Can you attach your light.json? The snapshot you gave has an ellipsis that hides the rest of the file, which makes it hard to troubleshoot. However, from what I can see here - are you missing a comma before "sources"?

agassparkle commented 9 months ago

It is the whole file I copied it from readme and changed it. I am not a code person be patient pls :D

lupestro commented 9 months ago

Oh, that's where it came from. Okay, no problem.

The missing comma between the aliases and the sources that I referred to earlier is actually a bug in the README.md, so thanks for calling that to my inadvertent attention. I'll get that fixed in the next release that goes out of harbor.

If you took the example of a partial file from the README.md and ran with it, if I hadn't included that typo, you could possibly get everything you want by removing the ", ..." toward the end.

Based on that, see if this gets you afloat. I took the liberty of adjusting the radius to 20 ft bright and 40 ft dim. (You still had the radii for a candle from the example.)

{
    "dnd5e": {
      "system": "dnd5e",
      "topology": "standard",
      "quantity" : "quantity",
      "aliases": {
        "Lantern (Bullseye)": "Bullseye Lantern",
        "Lantern (Hooded)": "Hooded Lantern"
      },
      "sources": { 
        "Torch": { 
            "name": "Torch", 
            "type": "equipment", 
            "consumable": true, 
            "states": 2, 
            "light": [ 
            {  
                "bright": 20, "dim": 40, "angle": 360, "color": "#ea5d2e", "alpha": 0.5, 
                "animation": { "type": "torch", "speed": 5, "intensity": 5, "reverse": false }  
             } 
          ]
        }
      }
    }
}
agassparkle commented 9 months ago

Thank you very much

lupestro commented 9 months ago

I just published a new minor version of Torch with the typo fixed along with a couple of PRs folks had submitted for support of dragonbane and demonlord