Images on Scrolls?
Images on Scrolls?
Is there a way to add an image to a scroll? Like the spell scrolls or (if I recall correctly) the map fragments?
I want to add a note to my party when the dungeon starts with a map to the exit of the dungeon.
I want to add a note to my party when the dungeon starts with a map to the exit of the dungeon.
Re: Images on Scrolls?
I'm just gonna go ahead and keep my eye on this thread. lol
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Images on Scrolls?
Well I found it in the Scripting reference:
but I just keep getting File not found errors. I've tried everything I could think of to reference the texture file and it keeps giving me this error.
Anyone got any ideas?
But I can't get it to work. This is my code:Item:setScrollImage(filename)
Sets custom scroll image to be displayed in the tooltip.
Code: Select all
spawn("note", party.level, party.x, party.y,0):setScrollImage("assets/textures/scroll_images/treasure_map_vault.dds")Anyone got any ideas?
- Edsploration
- Posts: 104
- Joined: Wed Sep 19, 2012 4:32 pm
Re: Images on Scrolls?
Do you think this could be the issue? I haven't messed with item graphics yet so I'm guessing in the dark a bit.On the Creating Custom Assets reference page they wrote:we here at Almost Human use .tga as an intermediate format (which we then automatically convert to DDS which the game engine uses) and the formatting of the item definitions follow this convention. To put it simply: keep the file as a .dds but use .tga in its stead in the item definition.
Open Project -> Community FrankenDungeon: viewtopic.php?f=14&t=4276
Re: Images on Scrolls?
I tried this out to confirm that it works and it does. I saved a .dds image with an alpha channel and used the following script to set the image in my case:
Code: Select all
imageScroll:setScrollImage("mod_assets/textures/treasure_map.dds")Steven Seagal of gaming industry
- djoldgames
- Posts: 107
- Joined: Fri Mar 23, 2012 11:28 pm
- Contact:
Re: Images on Scrolls?
It's working, but it is invalid path to dds file in your code ("gui" directory missing).Bucnasti wrote:Well I found it in the Scripting reference:
But I can't get it to work. This is my code:
but I just keep getting File not found errors. I've tried everything I could think of to reference the texture file and it keeps giving me this error.Code: Select all
spawn("note", party.level, party.x, party.y,0):setScrollImage("assets/textures/scroll_images/treasure_map_vault.dds")
Anyone got any ideas?
Right path in assets is: "assets/textures/gui/scroll_images/treasure_map_vault.dds"
I use the scrolls with my textures with larger dimensions 512x512 and working fine.
Possible problems: If you cannot see any texture (or black square?) you have not set the Alpha channel...
[MAP] Interactive Maps of Isle Nex - using Google maps technology
[MOD] Eye of the Beholder: Waterdeep Sewers - recreation for Grimrock
www.oldgames.sk
[MOD] Eye of the Beholder: Waterdeep Sewers - recreation for Grimrock
www.oldgames.sk
Re: Images on Scrolls?
This path is correct in the sense that if you want to refer to pre-existing LoG assets, this is what you should use. But yeah, when using your own assets, the mod_assets is of course the right place.djoldgames wrote:It's working, but it is invalid path to dds file in your code ("gui" directory missing).
Right path in assets is: "assets/textures/gui/scroll_images/treasure_map_vault.dds"
Steven Seagal of gaming industry
Re: Images on Scrolls?
I don't know what I was doing wrong but now this is working:
Now the next step, I want to put the map in the players hand at the start of the game,
This works just fine:
but this:
gives me the error:
bad argument #2 to 'insertItem' (Item expected, got ???)
Code: Select all
spawn("note", party.level, party.x, party.y,2):setScrollImage("mod_assets/textures/scroll_images/map.dds")This works just fine:
Code: Select all
party:getChampion(1):insertItem(7,spawn("note"):setScrollText("mod_assets/textures/scroll_images/map.dds"))Code: Select all
party:getChampion(1):insertItem(7,spawn("note"):setScrollImage("mod_assets/textures/scroll_images/map.dds"))bad argument #2 to 'insertItem' (Item expected, got ???)
Re: Images on Scrolls?
Try this:
local note = spawn("note")
note:setScrollImage("mod_assets/textures/scroll_images/map.dds")
party:getChampion(1):insertItem(7, note)
Should be a bit easier to read too
local note = spawn("note")
note:setScrollImage("mod_assets/textures/scroll_images/map.dds")
party:getChampion(1):insertItem(7, note)
Should be a bit easier to read too
- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: Images on Scrolls?
You probably set the colons wrong. Can't try myself but I think it could work this way:
Code: Select all
party:getChampion(1):insertItem(7,spawn("note")):setScrollImage("mod_assets/textures/scroll_images/map.dds")