PDA

View Full Version : Links to graphics in mods



dynotrope
March 25th, 2008, 22:26
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

Foen
March 26th, 2008, 07:02
Is this going to form part of the custom ruleset, or be a module that goes with it?

Stuart

dynotrope
March 26th, 2008, 15:19
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

joshuha
March 26th, 2008, 15:25
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?

Foen
March 26th, 2008, 15:32
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:



<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:



<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

Malovech
March 26th, 2008, 18:13
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?

unimatrixzero
March 26th, 2008, 21:29
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

dynotrope
March 26th, 2008, 22:23
Ah thanks Feon I have to agree with unimatrix zero, that worked cheers :)


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


Dave