Sets custom scroll image to be displayed in the tooltip

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Ulwaen
Posts: 44
Joined: Thu Feb 07, 2013 4:12 pm

Sets custom scroll image to be displayed in the tooltip

Post by Ulwaen » Thu Feb 07, 2013 4:44 pm

Hello guys!
I'm actually finishing a mod and I would like to give collectible cards as reward at the end of the dungeon.
So I have 6 pictures I made in 1024/1024 pixel.
I would like to know what excally it need to do to show one picture in a scroll, and place this one in an alcove (It will be the same process for each picture).
I found the script > Item:setScrollImage(filename) > then I read the topic > viewtopic.php?f=14&t=3342 > But I dont really understand the process.
Could somebody explain me how to do (I'm more graphist than friend with script ^^)

User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Sets custom scroll image to be displayed in the tooltip

Post by crisman » Thu Feb 07, 2013 5:07 pm

Exactly, are you having problems placing the scroll on the alcove, or add the image to the scroll?

User avatar
Ulwaen
Posts: 44
Joined: Thu Feb 07, 2013 4:12 pm

Re: Sets custom scroll image to be displayed in the tooltip

Post by Ulwaen » Thu Feb 07, 2013 5:18 pm

Nop my issue is about the picture and the process to "link" them to the scroll.
There is my first test:

local TarotCard01= spawn("scroll")
TarotCard01:setScrollImage("mod_assets/textures/scroll_images/TheWisdow.dds")
TarotCardAltar01:addItem(TarotCard01)

I linked that script to the "TarotCardAltar01"
Then I place the picture in .dds format in > Documents\Almost Human\Legend of Grimrock\Dungeons\Dhae'l Ahrkbeth Ruins\mod_assets\textures\scroll_images

There is the error I get :
"Unknown uncompressed DDS pixel format in file mod_assets/textures/scroll_images/TheWisdow.dds X"

User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Sets custom scroll image to be displayed in the tooltip

Post by crisman » Thu Feb 07, 2013 5:26 pm

Then I don't think I'll be so useful, but I'll try to help you anyway :)
Try to call the file with a .tga format.
Do not rename the file, just call it like that in the editor, such as
TarotCard01:setScrollImage("mod_assets/textures/scroll_images/TheWisdow.tga")
If it won't work, then I think there's some issue with the .dds file itself. What program do you use for creating them?
If you use GIMP, be sure to check the "generate mipmaps" before saving the .dds file.
For now that's all I can come up with.

User avatar
Ulwaen
Posts: 44
Joined: Thu Feb 07, 2013 4:12 pm

Re: Sets custom scroll image to be displayed in the tooltip

Post by Ulwaen » Thu Feb 07, 2013 5:54 pm

I tried with tga, but now the error is :
"D3DError - D3DXSaveTextureToFile failed: D3DXERR_INVALIDATA X"
grumf....
How for the dds I used a converter on the net!

User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Sets custom scroll image to be displayed in the tooltip

Post by crisman » Thu Feb 07, 2013 6:10 pm

Then I think its the converter... Probably there are some parameters you are not considering while converting, or there aren't at all...
You should try with gimp and its .dds plug-in.
If you wish I might try to convert a picture for you with PM ;)

User avatar
Ulwaen
Posts: 44
Joined: Thu Feb 07, 2013 4:12 pm

Re: Sets custom scroll image to be displayed in the tooltip

Post by Ulwaen » Thu Feb 07, 2013 6:40 pm

YOUHOUUUUU!!!
I have instaled the dds plugin for photoshop CS6 and it's now working!!!
Thx dude!

User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Sets custom scroll image to be displayed in the tooltip

Post by crisman » Thu Feb 07, 2013 7:46 pm

Why using gimp when you have photoshop :D
I'm glad it works now ;)

Post Reply