custom image for scroll or note - some help? spell scrolls?
custom image for scroll or note - some help? spell scrolls?
I can't seem to find how this was done in the game. I don't see any obvious images in the asset pack for the spell scrolls showing what runes to use. I thought if I could find that, it might give me some hinds for what I want to do. I tried to search through the script files but found no reference to the gui/scroll_images map images.
I would like to place a note and use a scroll image, but I don't know how to do it
I would like to place a note and use a scroll image, but I don't know how to do it
Finished Dungeons - complete mods to play
Re: custom image for scroll or note - some help? spell scrol
Code: Select all
defineObject{
name = "scroll_fireburst",
class = "Item",
uiName = "Scroll of Fireburst",
model = "assets/models/items/scroll_spell.fbx",
gfxIndex = 113,
scroll = true,
spell = "fireburst",
weight = 0.3,
}
-
- Posts: 59
- Joined: Sun Oct 14, 2012 7:13 am
Re: custom image for scroll or note - some help? spell scrol
I think what he means is how the game interprets "spell = "fireball"" to display the specific rune combination defined in the spell script. If he could figure out how they do that, he could apply his own images to scrolls.
Is that correct Komag?
My guess (makes sense to me) is they either have some sort of layering to it, or one image per rune combination (tons of images) and when the scroll looks up the spell, the spell gives the rune combo, and the rune combo is concatenated onto an image file prefix to return the filename of the image with that rune combination. . .
I bet there's a simpler way though, just hoping scroll displays aren't hardcoded.
Is that correct Komag?

My guess (makes sense to me) is they either have some sort of layering to it, or one image per rune combination (tons of images) and when the scroll looks up the spell, the spell gives the rune combo, and the rune combo is concatenated onto an image file prefix to return the filename of the image with that rune combination. . .
I bet there's a simpler way though, just hoping scroll displays aren't hardcoded.
Re: custom image for scroll or note - some help? spell scrol
I'm thinking that if you have something like this spell definition:
in spells.lua, you could put spell = "whatever" in the note's definition and it would work. I haven't tried it, though.
Code: Select all
defineSpell{
name = "whatever",
uiName = "Komag's Spell",
skill = "spellcraft",
level = 1,
runes = "E",
manaCost = 10,
end
Re: custom image for scroll or note - some help? spell scrol
That's it exactly, I'm not looking to make my own spell scroll, i just want to make a scroll with custom image, like the map for the dismantler crypt.Szragodesca wrote:I think what he means is how the game interprets "spell = "fireball"" to display the specific rune combination defined in the spell script. If he could figure out how they do that, he could apply his own images to scrolls.
Is that correct Komag?![]()
My guess (makes sense to me) is they either have some sort of layering to it, or one image per rune combination (tons of images) and when the scroll looks up the spell, the spell gives the rune combo, and the rune combo is concatenated onto an image file prefix to return the filename of the image with that rune combination. . .
I bet there's a simpler way though, just hoping scroll displays aren't hardcoded.
Finished Dungeons - complete mods to play
Re: custom image for scroll or note - some help? spell scrol
There's a setScrollImage(filename) function for items, that sounds like what you want.
Re: custom image for scroll or note - some help? spell scrol
hmm that sounds pretty promising, I'll try it when I have a chance
Finished Dungeons - complete mods to play
Re: custom image for scroll or note - some help? spell scrol
That was it! It works very easily, just place a script near the note or scroll with that line. The "filename" should be the path (starting with "mod_assets/")(and using /, not \) to your custom scroll/note image, which is in proper dds format, but referenced here as being in tga format
Example:
and you have a supermap.dds file there
Example:
Code: Select all
myScroll1:setScrollImage("mod_assets/textures/gui/scroll_images/supermap.tga")
Finished Dungeons - complete mods to play
Re: custom image for scroll or note - some help? spell scrol
Are there any limitations to the dds file as I can't get this to work? I get D3DError - CreateTexture failed. Are there any recommended dimensions I should be using for the image?
Re: custom image for scroll or note - some help? spell scrol
There are some DDS threads around that help with the formatting (can't remember, but I think I linked to them in the Super Thread), and as far as the size, you can check it compared to the ones in the asset pack
Finished Dungeons - complete mods to play