the Rainbow Networks
+++eXy FFA
Map: ztn3dm2
Players: 0 / 18
The golden pot › DEV › Maps, Models and Mods › openarena texture reducing script
openarena texture reducing script
There are worlds waiting to be explored and objects to be made. Enjoy.
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexMaps, Models and Mods
View previous topic :: View next topic  
Author Message
hyp3rfocus
Forum Addict
Forum Addict


Joined: Aug 25, 2007
Posts: 466
Location: england

PostPosted: Sun Aug 09, 2009 10:30 pm    Post subject: openarena texture reducing script Reply with quote

Code::
#!/bin/bash
#stick this in openarena's baseoa folder, make it executable and run it.
#it will make a new pk3 full of single pixel textures.

#extract folders containing images from pk3 archives
rm -rf working
rm zzz-reduced-textures.pk3
unzip pak0.pk3 textures/*
unzip pak2-players.pk3 models/*
unzip pak2-players-mature.pk3 models/*
unzip pak4-textures.pk3
unzip pak5-TA.pk3 models/*

#put folders into working directory
mkdir working
mv textures working
mv env working
mv models working
cd working

#sort out permissions
chmod -R 777 textures/*
chmod -R 777 env/*
chmod -R 777 models/*

#clear out non texture stuff
find . -name "*.md3" -type f -exec  rm {} \;
find . -name "*.skin" -type f -exec  rm {} \;
find . -name "*.txt" -type f -exec  rm {} \;
find . -name "*.cfg" -type f -exec  rm {} \;
find . -name "*.MD3" -type f -exec  rm {} \;
find . -name "*.h" -type f -exec  rm {} \;
find . -name "*.ANI" -type f -exec  rm {} \;
find . -name "*.ani" -type f -exec  rm {} \;
find . -name "*.tri" -type f -exec  rm {} \;
find . -name "*.wav" -type f -exec  rm {} \;
find . -name "*.WAV" -type f -exec  rm {} \;


#go through and turn all the images into single pixels
find . -name "*.jpg" -type f -exec  convert -resize x1 {} {} \;
find . -name "*.tga" -type f -exec  convert -resize x1 {} {} \;
find . -name "*.JPG" -type f -exec  convert -resize x1 {} {} \;
find . -name "*.TGA" -type f -exec  convert -resize x1 {} {} \;


#make a new pk3 containing the reduced images
zip -9r zzz-reduced-textures.pk3 textures
zip -9r zzz-reduced-textures.pk3 env
zip -9r zzz-reduced-textures.pk3 models
mv zzz-reduced-textures.pk3 ..
Back to top
View user's profile Send e-mail
PopeJo
Übergod
Übergod


Joined: Oct 05, 2007
Posts: 931
Location: precise!

PostPosted: Mon Aug 10, 2009 7:42 am    Post subject: Re: openarena texture reducing script Reply with quote

yay, thx, I'll try this =)

_________________
LOGIC, n.
The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding. (Devil's dictionary)
Back to top
View user's profile Visit poster's website ICQ Number
hyp3rfocus
Forum Addict
Forum Addict


Joined: Aug 25, 2007
Posts: 466
Location: england

PostPosted: Mon Aug 10, 2009 5:59 pm    Post subject: Re: openarena texture reducing script Reply with quote

in the bits where it says "convert -resize x1" the x1 means you want the x dimension shrunk down to one pixel. so if you just wanted to reduce the images down to, for example, 16x16 then you'd change it to "convert -resize x16" instead.
Back to top
View user's profile Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum Index -> Maps, Models and Mods All times are GMT + 1 Hour
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Welcome Anonymous


Membership:
Latest: kontol
New Today: 0
New Yesterday: 0
Overall: 355

People Online:
Members: 0
Visitors: 49
Total: 49
Who Is Where:
 Visitors:
01: The golden pot
02: The golden pot
03: The golden pot
04: The golden pot
05: The golden pot
06: The golden pot
07: The golden pot
08: The golden pot
09: The golden pot
10: The golden pot
11: The golden pot
12: The golden pot
13: The golden pot
14: The golden pot
15: The golden pot
16: My Account
17: The golden pot
18: The golden pot
19: My Account
20: The golden pot
21: The golden pot
22: The golden pot
23: Home
24: Home
25: My Account
26: My Account
27: The golden pot
28: The golden pot
29: My Account
30: The golden pot
31: The golden pot
32: The golden pot
33: The golden pot
34: The golden pot
35: The golden pot
36: The golden pot
37: The golden pot
38: The golden pot
39: The golden pot
40: Home
41: My Account
42: The golden pot
43: My Account
44: The golden pot
45: The golden pot
46: The golden pot
47: The golden pot
48: The golden pot
49: My Account

Staff Online:

No staff members are online!

The Rainbow Networks website is hosted by JockeTF and Soder on furver.se.

The Rainbow Networks
Interactive software released under GNU GPL, Code Credits, Privacy Policy
Azul theme and related images designed by Jamin