PDA

View Full Version : Custom Library - all good, just need to insert some pictures.



MadBeardMan
October 7th, 2015, 23:00
Evening Folks,

Been working on adding a Library Module for a Cthulhu Book that I've converted.

Got the library working (based on CoCGameSystem.mod) just need to add in some pictures.

Can't work out how.

Normally in a modules db.xml we'd see:

<link class="imagewindow" recordname="image.id-00035">Picture - New and Old Weapons</link>

Just can't find any other data about image.id-00035 anywhere else (in any of the XML files - bar WindowState.xml).

So can anyone point to me where I should look as to how, or where to look to see it for myself.

Cheers
Colin

Trenloe
October 7th, 2015, 23:04
Modules store data in the same format as the campaign database. Make a new campaign (either CoC or CoreRPG), add an image to the campaign, save the database (exit FG or type /save) and then look at the format of the <image> data in db.xml for that campaign. Replicate this same format in your module.

MadBeardMan
October 7th, 2015, 23:10
Cheers chap.

I see that there's an image node which then maps the image to an ID.

So I need to create the image node and populate it, or simply create a campaign with all the images for the Library and cut and paste...

<id-00035>
<image type="image">
<bitmap>images/New and Old Weapon/Picture - New and Old Weapons.JPG</bitmap>
</image>
<name type="string">Picture - New and Old Weapons</name>
</id-00035>

Trenloe
October 7th, 2015, 23:28
So I need to create the image node and populate it, or simply create a campaign with all the images for the Library and cut and paste...
Either





<id-00035>
<image type="image">
<bitmap>images/New and Old Weapon/Picture - New and Old Weapons.JPG</bitmap>
</image>
<name type="string">Picture - New and Old Weapons</name>
</id-00035>
That is nearly right, but be careful with nested directories to the image file - they usually don't work correctly.

MadBeardMan
October 7th, 2015, 23:32
Ok no problems. Been a rubbish day at work as well, spent ages getting some damn web services to work, but got there in the end, like I will do with this.

Cheers for all your help :)