Closed magispitt closed 2 years ago
@magispitt
Does the browser console give any errors?
@magispitt
Does the browser console give any errors?
I see the following errors after pressing F12 on Microsoft Edge using the Forge as a host:
Lets start from the bottom.
Could you click on the small arrow next to d
and post a screenshot of the handlebars issue?
I can imagine that there is a bug regarding filepaths (windows/linux).
The line in question tries to get the default spell compendium.
const defaultPack = game.settings.get(MODULE.ns, BRTCONFIG.SPELL_COMPENDIUM_KEY);
if (!pack || pack === defaultPack) {
const spellCompendium = game.packs.get(defaultPack);
const spellCompendiumIndex = await spellCompendium.getIndex({ fields: ['data.level', 'img'] });
In the settings we set the default compendium to pf2e.spells-srd
.
Could you make sure that this compendium exists? Or if you changed the compendium, make sure this one exists.
Either way, I will try to add a check to above code that checks if a spellCompendium
was loaded successfully.
The error at the top would suggest that maybe the structure of items we expect is 5e but we get PF2E. But that could be an unrelated error.
Lets start from the bottom.
Handlebars issue
Could you click on the small arrow next to
d
and post a screenshot of the handlebars issue? I can imagine that there is a bug regarding filepaths (windows/linux).updateSpellCache
The line in question tries to get the default spell compendium.
const defaultPack = game.settings.get(MODULE.ns, BRTCONFIG.SPELL_COMPENDIUM_KEY); if (!pack || pack === defaultPack) { const spellCompendium = game.packs.get(defaultPack); const spellCompendiumIndex = await spellCompendium.getIndex({ fields: ['data.level', 'img'] });
In the settings we set the default compendium to
pf2e.spells-srd
. Could you make sure that this compendium exists? Or if you changed the compendium, make sure this one exists. Either way, I will try to add a check to above code that checks if aspellCompendium
was loaded successfully.Item issue
The error at the top would suggest that maybe the structure of items we expect is 5e but we get PF2E. But that could be an unrelated error.
Alright, for the handlebars error the drop-down menu reveals this:
if I reveal the drop-down menu within that it reveals this, which in turn has further drop-down menus (which I can post if needed)
The error triggering for Pathfinder 2e content confuses me, because the world I'm running is a Pathfinder 1e world. I don't see any Pathfinder 2e compendiums loaded within the world, but I do have a second world (which is Pathfinder 2e) that is also hosted on Forge -- should I be checking that world as well?
*edit: I think I have resolved that handlebar error, there was a tile that was using an image I had changed
You could test with PF2e world. Did you check the settings for BetterRolltables if you can set the default spell compendium?
Please try the following.
[F12]
to open the consoleput in the following into the console (bottom part, if you don't see it hit [Esc]
)
game.system.id
an press [Enter]
I would like to know what that says. Because I just guessed PF2E as a system because
I read something with ItemPF
. So if this doesn't say pf2e
that is likely the problem.
So far in the code we only take care of PF2E
. What exactly changed that it worked
before with PF1 is another question.
game.settings.get('better-rolltables', 'default-spell-compendium')
and press [Enter]
pf1.spells
If the above says undefined
or null
or something.
game.settings.get('better-rolltables', 'default-spell-compendium')
Please test the latest release. This should fix your problem.
Please be aware that BetterRolltables does not officially support PF1. There are likely more errors.
You could test with PF2e world. Did you check the settings for BetterRolltables if you can set the default spell compendium?
Please try the following.
- Press
[F12]
to open the consoleput in the following into the console (bottom part, if you don't see it hit
[Esc]
)
game.system.id
an press[Enter]
I would like to know what that says. Because I just guessed PF2E as a system because I read something with
ItemPF
. So if this doesn't saypf2e
that is likely the problem.So far in the code we only take care of
PF2E
. What exactly changed that it worked before with PF1 is another question.
copy this into the console
game.settings.get('better-rolltables', 'default-spell-compendium')
and press[Enter]
- This should give you some kind of textstring like
pf1.spells
If the above says
undefined
ornull
or something.
- go into the settings
- go to the Better Rolltable Settings
- Check or select the spell compendium (some compendium with spells, preferably PF1 spells)
- check again via console
game.settings.get('better-rolltables', 'default-spell-compendium')
This is on the v.1.8.91 version, I see you have kindly updated the system but I will conduct the requested tests on this version first -- the module appears to work on the Pathfinder 2e system, as you suggested
Ah yes it appears that the game.system.id return pf1 on my Pathfinder 1e game. I had not actually attempted to use the automatic compendium integration before with Pathfinder 1e on Better Rolltables, I was only dragging actors onto my rolltables and using Better Rolltables to roll the number of actors within the table -- e.g. a table might look like (roll 1d3):
Curiously, my Pathfinder 1e game appears to be using D&D 5e spells when I enter:
game.settings.get('better-rolltables', 'default-spell-compendium')
Within the settings I'm uncertain how to change the spell directory used, but I see that there is an update so I will now test that
Please test the latest release. This should fix your problem.
Please be aware that BetterRolltables does not officially support PF1. There are likely more errors.
Alright unfortunately after loading the new update I see this error for a few seconds before it automatically dissapears:
Fortunately though the initial issue appears to have been resolved and I can use the Better Rolltable functionality again!
Thank you kindlly for your assistance!
The error appears cause the thing the error suggests happend.
That is because.
In the code we default to dnd5e.spells
.
For PF2e we do
if (game.system.id === 'pf2e') {
defaultLootSheet = 'pf2e.LootSheetNPC';
defaultSpellCompendium = 'pf2e.spells-srd';
BRTCONFIG.QUANTITY_PROPERTY_PATH = 'data.quantity.value';
BRTCONFIG.PRICE_PROPERTY_PATH = 'data.price.value';
BRTCONFIG.SPELL_LEVEL_PATH = 'data.level.value';
BRTCONFIG.ITEM_LOOT_TYPE = 'treasure';
// pf2e scroll is "Scroll of 1st-level Spell"
BRTCONFIG.SCROLL_REGEX = /\s*Scroll\s*of\s*(\d+)/gi;
}
You could try to set the compendium to pf1.spells
in the settings.
In the below image you made, that would be the second line.
I tried to get conformation on the PF1 structure on discord, but no response yet.
I am uncertain if this is related to the advertised interface updates