I`m trying to create a cinematics for my game, using 3 images (1920 *1080). I opened these jpeg images in GIMP, and exported them as DDS files to my mod_assets/textures/cinematics/intro folder following the guide on here. I then wrote an intro.lua then exported the game out as a dat file so I could test it. But the game crashes with an error messege: [string"CinematicMode.lua"]:0:D3DError- Create Texture failed:D3DERR_INVALIDCALL. What have I done wrong?
My code is as follows (in intro.lua file)
enableUserInput()
startMusic("assets/samples/music/intro.ogg")
showImage("mod_assets/textures/cinematic/intro/ogre_titlepic1.tga")
fadeIn(2)
click()
fadeOut(1)
showImage("mod_assets/textures/cinematic/intro/background.tga")
fadeIn(0)
setFont("Intro")
textWriter([[
It was all over: at least physically, anyway. But once\nagain you awake in
the middle of the\nnight:shaking, covered in cold sweat, your mind\nstill
recoiling from the horrors of the battle\nin the catacoombs beneath Mt
Shwaab. The\ndarkess, the hideous creatures..]])
click()
fadeOutText(0.5)
fadeOut(1)
showImage("mod_assets/textures/cinematic/intro/ogre_titlepic2.tga")
fadeIn(0)
textWriter([[The monster that was Turkum, the Ogre Lord, and the\nfiendish
traps that claimed so many of\nyour comrades...]])
click()
fadeOutText(0.5)
fadeOut(1)
showImage("mod_assets/textures/cinematic/intro/background.tga")
fadeIn(0)
textWriter([[A sudden tap on your door startles you. As you\nswing your
legs off the bed, a note slides under\nthe door, followed by the sound of
footsteps\nmoving quickly away..You pick up the note and\nbegin to read.
You catch your breath as dread grips\nyour heart and an icy ball forms in
the pit\nof your stomach. It is from King Leasus. His son, Urdril, and
\nfriends went to Mt Shwaab yesterday..and haven`t returned..]])
click()
fadeOutText(0.5)
textWriter([[The King has asked that you round up a search\nparty to go
and find him. As a Knight of the\nHoly Order, it is a request that you
cannot\nrefuse. Grabbing what items you can, you head out\into the night
air..]])
fadeOutText(0.5)
fadeOut(1)
showImage("mod_assets/textures/cinematic/intro/ogre_titlepic3.tga")
fadeIn(2)
textWriter([[The Ogre Lord is dead. You, yourself, saw the\monster buried
beneath tonnes of rubble. So it should\nbe quite safe...shouldn`t it?]])
click()
fadeOutText(0.5)
fadeOut(4)
fadeOutMusic(3)
Thanks guys.
George
cinematics help!
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: cinematics help!
just a quick one before going into deeper troubleshooting
make sure that this is not a lower/upper case issue, that the cinematic folder isn't named Cinematic, and that the file names are not Background.DDS etc.
make sure that this is not a lower/upper case issue, that the cinematic folder isn't named Cinematic, and that the file names are not Background.DDS etc.
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: cinematics help!
I tried to recreate this error D3DERR_INVALIDCALL by messing things up, its unlikely that this is a path or upper/lower case issue since that always comes with a file not found error.
The only time I can recreate the D3DERR_INVALIDCALL error is when the texture is simply invalid, e.g. the resolution is not in the power of 2 (but yours are 1920x1080 so that's fine), when I export the DDS file with weird compressions like Palette ARGB or 16.16f floating point etc, make sure you are exporting them as DXT1, DXT3 or DXT5 depending on your alpha.
The only time I can recreate the D3DERR_INVALIDCALL error is when the texture is simply invalid, e.g. the resolution is not in the power of 2 (but yours are 1920x1080 so that's fine), when I export the DDS file with weird compressions like Palette ARGB or 16.16f floating point etc, make sure you are exporting them as DXT1, DXT3 or DXT5 depending on your alpha.
Re: cinematics help!
I believe that the images must be uncompressed files.
Try saving the images using the D3DFMT_A8R8G8B8 DDS format.

*Yeah... This will make your mod's size increase tremendously! (But that's how it is. For Nexus, having your mod in a compressed archive, will store those images compressed.)
Try saving the images using the D3DFMT_A8R8G8B8 DDS format.

*Yeah... This will make your mod's size increase tremendously! (But that's how it is. For Nexus, having your mod in a compressed archive, will store those images compressed.)