STAR TREK 2d20
  1. #1

    Images In Modules - Help Please

    Hi Guys,

    I've been pulling (what little I have left of) my hair out for the past 3 hours now and I can not get this to work.

    I have read everything I can find on the Wiki and the Forums but I still can't get this to work.

    I'm trying to do up a module. The module's name is "My Module".
    The module has an image in it. The image is called Fig_01.png. It lives in the Figures Folder inside the module.
    I don't want the image to show up under Images & Maps.
    I have the following section in my module:
    Code:
    <figures static="true">
    	<image type="image">
    		<bitmap>Figures/Fig_01.png</bitmap>
    	</image>
    </figures>
    I also have the following line of code as part of some formatted text:
    Code:
    <link class="imagewindow" recordname="figures.Figures\Fig_01.png@My Module">(See Figure 1)</link>
    The imagewindow opens as expected, but Fig_01.png is not displayed. So, logically, I have something wrong in my code.

    Could someone / anyone tell be where the error is, please?
    Last edited by dulux-oz; May 23rd, 2015 at 08:58.
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    do you have any commercial rulesets like Castles&Crusades?

  3. #3
    Quote Originally Posted by damned View Post
    do you have any commercial rulesets like Castles&Crusades?
    Yes, I've checked them, and I still can't figure out what I'm doing wrong, because as far as I can see the C&C Module's code is the same (in structure) to mine.
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  4. #4
    This is how I do my images, though not entirely sure if it is what you are going for:

    Code:
    	<image>
    		<category name="Conditions" mergeid="" baseicon="1" decalicon="10">
    			<id-00001>
    				<image type="image">
    					<bitmap>Bleed.png</bitmap>
    				</image>
    				<name type="string">Bleed</name>
    			</id-00001>
    		</category>
    	</image>
    To prevent it from showing in the Image/Maps list, remove the category tags. Might be an error due to not having a name.
    I never claimed to be sane. Besides, it's more fun this way.

  5. #5
    You have a / in the first bit of code and a \ in the second bit.

  6. #6
    Quote Originally Posted by Callum View Post
    You have a / in the first bit of code and a \ in the second bit.
    Nicely spotted.

    Have fixed this and tried it all four ways (2 by "/", 2 by "\", and each way "/" and "\") - still not working!
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Your recordname in the link is all wrong. You don't use a file path, you use a FG DB path. From the code you provided, all you'd use is "figures@my module" or something similar - I'm not 100% sure of the exact syntax you should be using for an image in the module DB.
    Last edited by Trenloe; May 23rd, 2015 at 15:10.
    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!

  8. #8
    Quote Originally Posted by Trenloe View Post
    Your recordname in the link is all wrong. You don't use a file path, you use a FG DB path. From the code you provided, all you'd use is "figures@my module" or something similar - I'm not 100% sure of the exact syntax you should be using for an image in the module DB.
    If I'm understanding you correctly then shouldn't it be "figures.Fig_01.png@My Module" - in which case, I tried that (with Fig_01.png loaded in the Figures Folder and also the "." Folder) - no work
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by dulux-oz View Post
    If I'm understanding you correctly then shouldn't it be "figures.Fig_01.png@My Module"
    Fig_01.png is a value of a database entry, it is not a reference to that database entry. You need to refer to the database entry, not the contents of the entry. Think of it like you're using DB.getValue - you need to refer to the exact DB reference, and FG uses that to identify which image it will use.

    Drag an image link in a campaign into a story entry and then look at that link in the campaign DB.xml file to give you an idea of the format of a link to an image.
    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!

  10. #10
    Hi Everyone,

    Thanks to everyone for their help and suggestions - I got it working. Something Trenloe said put me on the right track - thanks Tren.

    For anyone who's interested, the correct, working module code is below:
    Code:
    <figures static="true">
    	<Fig_01>
    	        <image type="image">
    		        <bitmap>Figures\Fig_01.png</bitmap>
    	        </image>
    	</Fig_01>
    </figures>
    
    <link class="imagewindow" recordname="figures.Fig_01@My Module">(See Figure 1)</link>
    Cheers
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

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
  •  
DICE PACKS BUNDLE

Log in

Log in