Export effect images from client .dat and .spr into .png (1 animation frame per image):I am working on a spell creator for 1.5. Kind of like the old one that was released. Does anyone have gifs for the spell effects?
$converter->convert($gifImagesZipArchivePath);
$converter->convert($gifImagesZipArchivePath, 0.1);
It won't require a dat/spr, maybe in the future. I am not the best VB or even coding in general but I can make things happen. You will be able to add your own files if you want as I will release the source code.While you're presumably in early stages might you consider letting the user load in their own custom assets (gif/png/spr?). One of the old spell makers made it possible to import obd i think and assign a shootType or effectId or something to it so the spell maker could use it
Regardless, good luck
Any chance you have it for distance effects too?Export effect images from client .dat and .spr into .png (1 animation frame per image):
Convert exported images into animated .gif:
It generates animations with 5 frames per second. Looks too slow for effects. You can download library and run it on your PC:
Edit this line ( open-tibia-library/index.php at master · gesior/open-tibia-library (https://github.com/gesior/open-tibia-library/blob/master/tools/item-image-frames-to-animated-gif-converter/index.php#L38) ):open-tibia-library/tools/item-image-frames-to-animated-gif-converter at e9d90b8fae3e1c3c6dbda94af11078f1405838f0 · gesior/open-tibia-library
Library to manipulate files used by OTS and OTClient. Written in TypeScript. - gesior/open-tibia-librarygithub.com
To:PHP:$converter->convert($gifImagesZipArchivePath);
To change it to 10 frames per second (0.1 sec interval).PHP:$converter->convert($gifImagesZipArchivePath, 0.1);
Replace this:Any chance you have it for distance effects too?
let effectThingType = this.datManager.getEffect(effectId);
let effectThingType = this.datManager.getMissile(effectId);
this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryEffect).length);
this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryMissile).length);
Missed something maybe. I applied that and compiled. Still did magic effects not distance effectsReplace this:
open-tibia-library/effectFramesGenerator.ts at master · gesior/open-tibia-library
Library to manipulate files used by OTS and OTClient. Written in TypeScript. - gesior/open-tibia-librarygithub.comwith:Code:let effectThingType = this.datManager.getEffect(effectId);
and this:Code:let effectThingType = this.datManager.getMissile(effectId);
open-tibia-library/effectFramesGenerator.ts at master · gesior/open-tibia-library
Library to manipulate files used by OTS and OTClient. Written in TypeScript. - gesior/open-tibia-librarygithub.comwith:Code:this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryEffect).length);
recompile TypeScript - step 4 of README - and it will generate distance effects.Code:this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryMissile).length);
EDIT:
I can compile it on monday on my PC and upload to ots.me.
Looks like there are some other effect related variables. Try to replace everyMissed something maybe. I applied that and compiled. Still did magic effects not distance effects
effect
with missile
and every Effect
with Missile
. It should work.No luck lolLooks like there are some other effect related variables. Try to replace everyeffect
withmissile
and everyEffect
withMissile
. It should work.
Ye. It required one more change in library.@Gesior.pl 0.0 I tried changing all types of stuff still cant get it to work.
Not joking I messed with everything I could find in all files. Thanks for getting it working.Ye. It required one more change in library.
Added missile generator in 0.1.5 version:
Release 0.1.5 · gesior/open-tibia-library
Missile images generator. Added configurable frame rate to png-to-gif converter [animated items, effect animations].github.com
Online version:
Generator exports all directions of missile into 1 image (9 directions, no 5 is always empty [self direction?]):
After converting it to gif (using PNG to GIF converter (https://item-images.ots.me/png-to-gif-converter/) ), it looks like that:
// Also added configurable frame rate to PNG to GIF converter.