Closed epsilon7430 closed 2 years ago
Since version 0.7.0, the module has been rewritten to allow for each system to have a css file to define the style and a description file of the mapping for the "ImageReplacer" feature.
Now the community can "come" to me a little, testing the css on their browser and help me understand which combination is the best, i file css si trovano nella directory degli styles, here a example for the dnd5e system
So the steps to follow to create or update a system are:
1) [Already created for Ae5] Creation or update of the style file in the styles directory the file must respect the chat-portrait-style-XXX.css
nomenclature where XXX is the system id e.g. "dnd5e".
2) [Already created for Ae5] Creation or update of the typescript file for the mapping of the "ImageReplacer" feature if you do not want to use this feature create the file as empty and I'll take care of integrating the version with the empty arrays. In the minimal case you just need to copy the contents of the file generic.ts and insert the id of your system in the property "SYSTEM_ID" remember that you have to rename the file with the system id.
3) [Already created for Ae5] Insert the system if absent in the configuration file systems.ts
4) After you have prepared the css style for your system, open a pr on contact me in some way, by open a issue ecc.
Hi - thanks for considering this ticket. Not experienced with PRs and don't trust my work.
Your a5e system setup has some typos for the system name. "ae5" instead of "a5e". Issue found in various filenames and inside files.
After renaming "ae5.js" to "a5e.js" and adding the import constants line to top of file, I experience a portrait stretching style issue that I can't figure out how to resolve. This doesn't happen in my dnd5e world. I have not changed style defaults so don't know why this happens - it only happens when the a5e.js exports the correct system id ('a5e' on line 3). See pic. This style issue pretty much breaks the module for use in a5e.
Also, I'm unsuccessful at configuring imagereplacer. I don't understand the connection between the module and the system. e.g., how does the module know that when I configure 'a5e.AbilityStr' it maps to an a5e strength check? Or is there something else I need to be aware of to make the connection? { name: 'a5e.AbilityStr', icon: /modules/${CONSTANTS.MODULE_NAME}/assets/strength.svg
},
Thanks for your help.
Hi - someone fixed the issue I mention above and set up image replacer - thank you.
One more update should get it fully configured. Text "A5E." needs to be added to skill name references in a5e.js file. Here is the fixed list:
{ name: 'A5E.SkillAcr', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/acrobatics.svg` },
{ name: 'A5E.SkillAni', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/animal_handling.svg` },
{ name: 'A5E.SkillArc', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/arcana.svg` },
{ name: 'A5E.SkillAth', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/athletics.svg` },
{ name: 'A5E.SkillCul', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/culture.svg` },
{ name: 'A5E.SkillDec', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/deception.svg` },
{ name: 'A5E.SkillEng', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/engineering.svg` },
{ name: 'A5E.SkillHis', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/history.svg` },
{ name: 'A5E.SkillIns', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/insight.svg` },
{ name: 'A5E.SkillItm', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/intimidation.svg` },
{ name: 'A5E.SkillInv', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/investigation.svg` },
{ name: 'A5E.SkillMed', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/medicine.svg` },
{ name: 'A5E.SkillNat', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/nature.svg` },
{ name: 'A5E.SkillPrc', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/perception.svg` },
{ name: 'A5E.SkillPrf', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/performance.svg` },
{ name: 'A5E.SkillPer', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/persuasion.svg` },
{ name: 'A5E.SkillRel', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/religion.svg` },
{ name: 'A5E.SkillSlt', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/sleight_of_hand.svg` },
{ name: 'A5E.SkillSte', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/stealth.svg` },
{ name: 'A5E.SkillSur', icon: `/modules/${CONSTANTS.MODULE_NAME}/assets/survival.svg` },
Hello settled. Can I ask you a favor? could you prepare the images missing in the form a5e by downloading them from the site https://game-icons.net/ and renaming them as expected ?
Hi - for my note above, the icons shipped with the module work fine after the A5E prefix is added.
If you're speaking of the specialities in the .js list, they aren't mission critical - I'm not even sure when they would be displayed.
K i'll close this issue, reopen if you need something else re-open the ticket.
Hi - I now understand what you were saying above. Only two icons need to be added: engineering.svg and culture.svg. Thanks
Like Chat Portrait! The module mostly works in Foundry worlds using the A5e Level Up system and I have not seen any console errors so far. However, the Image Replacer feature does not work. I suspect this is because the module needs to understand the A5e system data model to detect applicable rolls to replace.
As a user, it would be very helpful if Chat Portrait could fully support the A5e system. Image replace for ability rolls is particularly useful. Thanks for considering.
https://github.com/Pjb518/FoundryVTT-Level-Up-Official https://discord.gg/KcsQnagX