ultrakorne / better-rolltables

Module for FoundryVTT to improve rolltables
MIT License
32 stars 28 forks source link

How to use "|" in a Better Table when pulling from other rolltables in a compendium? #150

Open Shuggaloaf opened 2 years ago

Shuggaloaf commented 2 years ago

Hi I have a rolltable that is not in a compendium that has as results other rolltables that are in a compendium.

Some of the results in the compendium rolltables look like this @creature[Giant Boar] and some look like this @creature[Shadow Mastiff|VGM]. If I get a result that has the "|" in it, those results have messed up formatting. The ones without a "|" do not have issues.

Also, I noticed that if I use the same rolltables for results but do not have them in a compendium it works fine. So this would be stock Foundry. Default table with other default tables as results. But when they are in a compendium, I have to make the main table a better table for it to roll from a compendium. And that is when there is a problem.

Is there a way to escape the "|" character so that I can still use it in the tables? I have a lot of them so I'd rather have them in a compendium if possible.

Thanks

DanielBoettner commented 2 years ago

To reproduce this, if I understand this correct.

  1. Create a table in World
  2. Reference/roll on Compendium rolltables
  3. Have results in these tables that have |

Just so I learn something new, does the | is meant to to something? is this a flag or an operator?

Shuggaloaf commented 2 years ago

Yes that is correct. This is what the tables and results look like. Figured this could help you visualize.

As you can see the 2 results that have the "|" get a lot of code displayed in the result.

I'm not sure about naming the mod that works with this here but let's just say "a mod" allows importing of actors (and other entities) by using a specific tag format. For creatures in the MM, one does not need the "|" character. So above the Naga tag looks like @creature[guardian naga]. But for creatures in other source books, an identifier is required and that is when the "|" comes in. For example the Orthon would be @creature[Orthon|MTF]. When the result is in the correct format (such as the Naga above) I can actually drag that result onto the canvas and it both adds the token to the scene and imports the actor.

Hopefully that makes more sense but if you have any questions feel free to ask. Thanks!

Shuggaloaf commented 2 years ago

Hi @DanielBoettner, I'm not expecting a fix yet or rushing you or anything, just wondering if my explanation made sense and see if you had any questions or wanted any additional info.

Thanks!

DanielBoettner commented 2 years ago

Did not yet have the time going into that exact issue. I will update you as soon as I can do so.

Thanks for your patience.

Shuggaloaf commented 2 years ago

Fast reply! No worries, take your time and just let me know if you need anything else. :-)