5E Character Create Playlist
  1. #1

    Another Modules question - Images

    Greetings again - still working on modules, but this is a different issue. I have two images I want to link inside my Module. I've copied and then opened one of the default modules in FG and scanned through the db.xml file to see how it was done, and have copied that same syntax. However, I'm having a strange issue that makes no sense. I ended up creating a test module that just includes the relevant snippets to test, with the same results. For the sake of clarity and being clear on what I'm dealing with, I'm including code snippets below.

    My module file has the following files:

    Code:
    db.xml
    definition.xml
    image1.png
    image2.png
    The db.xml file has the following code:

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <root version="3.1" release="2|CoreRPG:3">
        <library>
            <imagetest static="true">
                <name type="string">Test</name>
                <categoryname type="string">Call of Cthulhu Essentials</categoryname>
                <entries>
                    <section-01>
                        <librarylink type="windowreference">
                            <class>referencetext</class>
                            <recordname>..</recordname>
                        </librarylink>
                        <name type="string">Image Testing</name>
                        <text type="formattedtext">
                            <p>Testing the images</p>
                            <p></p>
                            <linklist>
                                <link class="imagewindow" recordname="reference.id-00000">Image 1</link>
                            </linklist>
                            <linklist>
                                <link class="imagewindow" recordname="reference.id-00001">Image 2</link>
                            </linklist>
                        </text>
                    </section-01>
                </entries>
            </imagetest>
        </library>
        <reference>
            <id-00000>
                <image type="image">
                    <bitmap>image1.png</bitmap>
                </image>
                <name type="string">Image 1</name>
            </id-00000>
            <id-00001>
                <image type="image">
                    <bitmap>image2.png</bitmap>
                </image>
                <name type="string">Image 2</name>
            </id-00001>
        </reference>
    </root>
    What SHOULD happen is that when I click on the link for Image 1, Image 1 pops up, and likewise for Image 2.

    However, what's actually happening is that Image 2 pops up for BOTH links. I can't understand why this is happening, considering the code is correct (I've wracked my brain making sure it's correctly coded). I've tried changing the Library section to an INDEX rather than a TEXT, and that doesn't change anything. I've even re-compiled the .MOD file, flushed my campaign's DB, restarted FG several times, etc.

    Am I missing something somewhere maybe? What's frustrating is that I'm sure that the solution is probably something agonizingly simple...

    Ultimate License Holder!
    Anyone can play!
    Timzone:
    US Central (-6 GMT)

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,825
    It's possible that you are using .png's rather than jpg's. png files are usually only for tokens whereas jpg's are for pretty much everything else. I'm just guessing though since I don't really know.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  3. #3
    It looks like it should work from quick scan. Try posting your files zipped up so we can check on our installs.

    Cheers,
    JPG

  4. #4
    I completely forgot about the JPG issue. Yes, both images were PNG's - when I converted them to JPGs, it worked. I knew it was something simple I was overlooking. Thanks for the help!

    Ultimate License Holder!
    Anyone can play!
    Timzone:
    US Central (-6 GMT)

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
  •  
5E Product Walkthrough Playlist

Log in

Log in