Thread: Extension and png error?
-
November 23rd, 2023, 06:37 #1
- Join Date
- Mar 2020
- Location
- USA
- Posts
- 89
Extension and png error?
It was recommended on discord that I post this here:
Hello, I have a question about an extension I'm trying to make. It's to add sidebars in Star Trek 2d20, and it mostly does what I need it to in that I have sidebar menu items and can enter stuff in them.
However, when I try to change the icons for the sidebar, I get:
Code:[ERROR] Error loading extension XML file. [STA Reputation Spends 2] [graphics/sidebar/sidebar_icon_background.png]: Invalid character in the given encoding. Line 1, position 1.
-
November 23rd, 2023, 06:39 #2
Well the path you pasted has a space in Fantasy
Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
November 23rd, 2023, 06:47 #3
- Join Date
- Mar 2020
- Location
- USA
- Posts
- 89
I think that got added when I copy/pasted from discord; it's not there in the original discord post. Either way, that's where I got the png from, not where it's located in the extension.
(Edit: It's also not present when I go to edit my original post here, so *shrug*.)
-
November 23rd, 2023, 08:17 #4
Adding a space in long strings is a "feature" of the forum software.
@Felderburg - assuming the ruleset is layered on top of the CoreRPG ruleset (which I believe STA is) then you don't need to copy resources from CoreRPG - you can just reference them with the CoreRPG resource name - in this case the icon resource name is "sidebar_icon_recordtype_background"
If you've edited the graphics file, then that's a different matter...
I think the reason for the error you detail in post #1 is that you've used <includefile source="graphics/sidebar/sidebar_icon_background.png" /> in your extension. <includefile> is for XML files only. To reference an icon resource, use the <icon> tag - for example (taken from CoreRPG): <icon name="sidebar_icon_recordtype_background" file="graphics/sidebar/sidebar_icon_background.png" />Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 25th, 2023, 21:54 #5
- Join Date
- Mar 2020
- Location
- USA
- Posts
- 89
-
November 25th, 2023, 22:56 #6
The XML files under the ruleset graphics directory purely define the icons, frames, etc. resources - basically matching a name to a graphics file.
For example:
Code:<icon name="sidebar_icon_recordtype_background" file="graphics/sidebar/sidebar_icon_background.png" />
And also the developer API: https://fantasygroundsunity.atlassia...996645466/iconPrivate Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks