po-devs / pokemon-online

Online Pokemon Battle Simulator
http://pokemon-online.eu
GNU General Public License v3.0
290 stars 171 forks source link

Script for Animated Sprites #106

Closed Dimbreath closed 12 years ago

Dimbreath commented 12 years ago

There. Files are splitted in this way:

EGGS GEN 1 GEN 2 GEN 3 GEN 4 GEN 5

We'll ignore EGGS folder.

On each GEN folder there are more folders. They're named like this:

Back Back - Female Back - Female - Shiny Back - Shiny Front Front - Female Front - Female - Shiny Front - Shiny

(For GEN 1)

Then in GEN 2 and above we add 4 more folders.

Back - Alternate Formes Back - Alternate Formes Shiny Front - Alternate Formes Front - Alternate Formes Shiny

(I'll do the Alternate Formes manually, so ignore this...)

Inside of those folders are the .gif files.

Then for the files renaming, i just need to remove letters and for the first 0 - 100 Pokemons remove the 0 at the start. For example:

001 = Bulbasaur Remove the first two 0 leaving only "1"

coyotte508 commented 12 years ago

http://veekun.com/dex/downloads

You can download gen 1/2 sprites already there, in the current folders. The only problem is that their background is white, non -transparent, but there exists programs to mass replace their background to fix that problem.

Dimbreath commented 12 years ago

Yeah, but they're not the BW animated ones, they just contain the sprite t hat's shown when the Pokémon is sent out.

coyotte508 commented 12 years ago

If you need to remove numbers in the beginning do that in git bash:

find folder -name "*.gif" -exec bash -c "r=\$(echo {} | sed 's/^0[0]*//'); mv {} \$r" \;

Where folder is the base folder.

Dimbreath commented 12 years ago

It says that mv needs to be a directory.

coyotte508 commented 12 years ago

In those cases it's generally useful if you paste the whole output ^^

coyotte508 commented 12 years ago
find . -name "*.gif" -exec bash -c "r=\$(echo {} | sed 's/\/0[0]*/\//'); mv {} \$r" \;

It will display error messages for files not starting with 0 but w/e

Dimbreath commented 12 years ago

I can't get it to work. I still get that mv needs to be a directory o.O

mv: when moving multiple files, last argument must be a directory Try 'mv --help' for more information

coyotte508 commented 12 years ago

Do you have spaces in your file paths? Too bad @.@

find . -name "*.gif" -exec bash -c "r=\$(echo '{}' | sed 's/\/0[0]*/\//'); mv '{}' \$r" \;

Maybe that'll work

Or move the folder to a path without spaces (none of the upper directories have spaces) and it'll work too.

Dimbreath commented 12 years ago

Close this Issue, i'm making my own script with Qt.