DICE PACKS BUNDLE
  1. #1

    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.
    That almost looks like it's saying the error is in the png file? I copy/pasted the icons from CoreRPG's icons (unzipped ruleset "C:\Users\redacted\AppData\Roaming\SmiteWorks\Fant asy Grounds\rulesets\CoreRPG\graphics\sidebar") so that shouldn't be causing issues, and the line 1 position 1 of all actual xml files is "<", as part of the xml version prolog.

  2. #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

  3. #3
    Quote Originally Posted by superteddy57 View Post
    Well the path you pasted has a space in Fantasy
    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*.)

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,203
    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!

  5. #5
    Quote Originally Posted by Trenloe View Post
    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" />
    That was it, thanks! So I don't need to include the graphics since they're part of the CoreRPG default set, but I assume Istill need the graphics xml to tell it what icons I want where?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,203
    Quote Originally Posted by Felderburg View Post
    ...but I assume Istill need the graphics xml to tell it what icons I want where?
    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" />
    This means that in the ruleset, or extensions, this graphic file resource can be referred to as "sidebar_icon_recordtype_background" when you're defining your own graphical elements (buttons, controls, etc). See the "Icons" section in the Wiki ruleset guide here: https://fantasygroundsunity.atlassia...leset+-+Assets

    And also the developer API: https://fantasygroundsunity.atlassia...996645466/icon
    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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Cosmere RPG Beta Launch

Log in

Log in