Bug: Wildcard tokens using random image don't work

Currently tokens with random images that use the wildcard option don’t work because the URL is invalid. The wildcard support in FVTT is a bit more complex than the current system is using so additional work is required for it. An issue was filed in FVTT and fixed and expected for 0.5.2 which would make this easier.
I can either do the extra work now which will all be throw away later when 0.5.2 is out, or wait for 0.5.2.

Will depend on my other priorities

1 Like

I think just waiting for it is the better option <3 Though it could be a month or two, but you have enough right now :heart:

1 Like

closing as this is now fixed

I’m having trouble getting this to work. I can do it in desktop foundry, but not on here.

This is the file path I use if I want a specific orc token:

(changed the last ‘.’ to dot so it would show the text)

I’m attempting to use this for wildcard, with the box checked:

What am I doing wrong?

Not fully certain how wildcard can work.
When I very recently used path/guard*.png then those worked perfectly.
Maybe you’re having issues with saving the prototype token of the actor? It won’t work on existing tokens on the map I think.

1 Like

No, I don’t think so. When I place them on the map they just show up as the foundry mystery man.

Have you tried adding the .png after the wildcard character (*)?

1 Like

That’s normal when the image is not found.

It does work on The Forge, so the issue must be elsewhere.

1 Like

Yeah, totally.

Tried it with and without now.

Did you make sure to enable the “Randomize wildcard images” option in Foundry ? Or did you only change the URL ?
The procedure is this :

  • Open the actor sheet
  • Click the “Prototype Token” in the window decoration
  • Set your path using the * character in the filename
  • Enable the “Randomize wildcard Images” option
  • Click on “Update Token” to save your changes
  • Drag&Drop the actor onto the map

Just tried again myself and it works just as expected.

1 Like

How about path/Orc*.png?

1 Like

Hey everybody. I figured out what was happening: I was copying the path from a single token, and because my folder name had spaces in it was putting in characters as placeholders.

So /Orcs/Melee Combatants/ was turning into /Orcs/Melee%20Combatants/

Once I deleted those it works just fine. Sorry for my lack of experience and thanks for the quick response.

@kakaroto why wouldn’t that just work? Because the files browser doesn’t actually understand urls that way?

Spaces in urls always turn into %20 for compatibility, so I’m not sure why this wouldn’t work.

Yeah, me either? I assumed it would too, which is why it didn’t occur to me to replace them. It totally fixed it though. Got a clearing full of Orcs now:

1 Like

Clearing full of orcs are tight!

1 Like

My guess is that the server side code that does the search in the database for assets matching the wildcard is not doing a decoding of the URL as it should. So that’s a forge bug!

Had this issue, also I assume due to a space in my folder name.
There does not appear to be a way to simply rename assets and asset folders to resolve and remove spaces from filepaths, or am I missing something?

Oh, just saw the post about it Fixing random token actors from a bad import will attempt that fix.

I’ve just updated that other post to mention that it only applies to worlds imported before July 14th, as that bug was fixed. The other bug, when you have spaces in the path is still not fixed unfortunately.

1 Like

@eldersign @wokeye: please try again, see if the random actors are working now when they are in a folder with spaces.

I just logged into my world imported into Forge on 10 Aug (depend on your timezone) and cannot get wildcard tokens to work. I have the folder/* selected and the wildcard token button (now blue?) ticked.

Weird, but I actually cannot get it to work for folders with spaces, or without… It keeps defaulting to icons/svg/mystery-man.svg. It works in Foundry on my PC OK.