FG Spreadshirt Swag
  1. #1

    Links to graphics in mods

    Hi, just wondering if I could pick some brains

    I'm doing a mod for a custom ruleset and want to include a link to a graphic in some formatted text.

    I've included this so far

    <linklist>
    <link class="imagewindow" recordname="graphics.assassinranks">Assassin Ranks</link>
    </linklist>

    I have put the graphic in the icons folder and added this to graphics

    <icon name="assassinranks" file="icons/assassinranks.jpeg"/>

    The link opens up a image window but with no graphic showing.

    I'm not really certain that I'm going about this the right was so has anybody got any ideas how I can make this work????

    Cheers

  2. #2
    Foen's Avatar
    Join Date
    Jan 2007
    Location
    Suffolk, England
    Posts
    2,007
    Is this going to form part of the custom ruleset, or be a module that goes with it?

    Stuart

  3. #3
    Quote Originally Posted by Foen
    Is this going to form part of the custom ruleset, or be a module that goes with it?

    Stuart
    Hi

    Its part of the mod

    Dave

  4. #4
    Quote Originally Posted by dynotrope
    Hi, just wondering if I could pick some brains

    I'm doing a mod for a custom ruleset and want to include a link to a graphic in some formatted text.

    I've included this so far

    <linklist>
    <link class="imagewindow" recordname="graphics.assassinranks">Assassin Ranks</link>
    </linklist>

    I have put the graphic in the icons folder and added this to graphics

    <icon name="assassinranks" file="icons/assassinranks.jpeg"/>

    The link opens up a image window but with no graphic showing.

    I'm not really certain that I'm going about this the right was so has anybody got any ideas how I can make this work????

    Cheers
    <link class="imagewindow" recordname="graphics.assassinranks">

    1) I am not sure if FG like JPE extension, it might just be looking for JPG.
    2) You don't need to declare it as an icon unless you want to use it as an icon somewhere.
    3) Is assassinrank.jpeg in a folder in your compiled module called graphics?

  5. #5
    Foen's Avatar
    Join Date
    Jan 2007
    Location
    Suffolk, England
    Posts
    2,007
    Hi Dave

    I have attached a very simple MOD file (zipped, so it can be uploaded, you'll have to unzip it) demonstrating this. It was created by starting a new campaign, adding one story entry and one image entry, and linking the image to the story.

    Key bits of the module file are the story entry:

    Code:
          <id-00001>
            <name type="string">Test Story</name>
            <text type="formattedtext">
              <p>An entry to test the inclusion of images.</p>
              <linklist>
                <link class="imagewindow" recordname="image.id-00001"></link>
              </linklist>
              <p>That should do it.</p>
            </text>
          </id-00001>
    And the associated image entry:

    Code:
          <id-00001>
            <image type="image">
              <bitmap>Abandoned Lodge Upper.png</bitmap>
            </image>
            <name type="string">Abandoned Lodge Upper</name>
          </id-00001>
    Note that the recordname points to the image list entry, not to an icon definition or even to the filename of the image itself.

    Give me a shout if I've missed your point.

    Stuart

  6. #6
    Just an aside related to this, is it possible to prepopulate a monster entry with a token image, so that when you open it from the library, it already has a token (which I can then use)? Do those tokens need to be packaged up with the xml inside the mod file?

  7. #7
    Foen u are friggin GENIUS!!! I have spent the past 2 sleepless nights trying to resolve a similar graphic related problem and ur lil .zip file held the key! Cheers Feon. I can now move on to the rest of my ruleset changes. Just thought a big thank u was in order.
    Regards
    Uni

  8. #8
    Ah thanks Feon I have to agree with unimatrix zero, that worked cheers


    Also thanks Joshuha - didn't spot the jpeg/jpg thing!!


    Dave

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