Jump to content

Recommended Posts

I made a small php script for cropping images from any spriter project.

You can use it for free. :-)

http://pastebin.com/MkhrAFRR

 

Size of your mods is very important in DST. There could be very many mods on the server. Less size of the mod, more happiness of admin (and users).

Example:

Before running the script. Size 2048x2048:

7525299.png

After running the script. Size 1024x1024. The is the same animation and it looks same way in game but takes less size in files (and video memory). Quality of the art is the same too:

7504819.png

 

How to use (you should be advanced user):

1) Create file crop.php in spriter project's folder and copy script there.

2) Set corret variable $project in crop.php, then save it.

3) Install PHP (last version)

4) Enable GD library

5) Configure paths in Windows.

6) Use console command "php crop.php" or make bat file.

​8) Compile new animation with autocompiler.exe. 

 

Advanced features for using any animation as base for your new animation:

1) Use krane to decompile any existing animation. Spriter project will be created.

For example, armor_trunkvest_summer.zip

2) Copy and modify crop.php to project's folder.

3) Edit crop.php: Set $ADD_SPACE variable to 50 or 100.

4) Execute the script. Now you have spriter project with extended images.

5) Make your art.  Change images.

6) Make changes in Spriter if needed or edit scml file directly.

7) Set $ADD_SPACE to zero. Execute crop.php again.

8) Compile new animation with autocompiler.exe.

9) Profit. :-)

 

Also you can send me your final version of Spriter project (scml + images in folders) and I will crop it for you. :-)

Link to comment
https://forums.kleientertainment.com/forums/topic/60597-neat-spriter-project/
Share on other sites

You are welcome. It's really simple script. It took me only 2 hours to make it from idea to release, including cup of tea, testing, debugging, installing php and configuring of php.ini. So enjoy. :-)

P.S. Somebody can help and improve it. Things to do: 1) auto detecting scml file name 2) alpha threshold as a config variable 3) Config variables as console parameters of the script. 4) etc

Edited by Maris

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...