]Originally Posted by Sir Robin the Brave
okay dude thanks
and if i screw up again i will be back:P
]Originally Posted by Sir Robin the Brave
okay dude thanks
and if i screw up again i will be back:P
I'll try but no promisesOriginally Posted by alpaca
but anyways i got it people:P a lot easier than before.
[IMG][/IMG]
Last edited by will119; 12-23-2006 at 23:21.
i cant post the image thats strange
Medieval II : Total War userbars HERE
www.totalwar.hotgames.cz < Admin of biggest Czech and Slovak fansite.
LOL nice job!Originally Posted by AliAS
![]()
-"My horse for a kingdom!"
I would love to have ago with this program and have an idea for a simple but useful mod. However I have only managed to download the first few KB and I also failed to get the Rome Battle Editor manual from this site.
I have tried downloading with Explorer and Freedownload manager, my security settings with Explorer may be messing things up but this does not explain why the download manager only gets a few Kb before it thinks it is complete.
Can anybody expert in these things explain what is going wrong?![]()
Hi all, and thanks for all yours Python scripts alpaca, great job.
My question is about the "mymod folder" users, what should I do in that case ? I still have to put the Io file first or I just have to convert the .texture, edit and put it back in .texture in my unit_sprit folder whiteout adding Io first in my "mymod.cfg" ?
I hope, for my first post, that I was understandable, I m belgian (from the french side) and it's hard for me to write in english (but not to read it).
Be Aware :P (I'm belgian).
That depends. I would unpack the converter into some directory, copy all files you want to convert into that and then run one of the appropriate .bat files. That way you can control more easily what is converted, which has some advantages.
You can theoretically convert all files in all subfolders, but that might have undesirable effects.
hope this isnt too late for this thread....okay, so i'm following through Epistolary Richard's wonderful 'spoiler' and im done the second step, but adobe photoshop wont open the dds files, whats wrong, any help would rock, thanks.
![]()
sry i didnt see post before me. So i need Nvidias dds plugin for Photoshop. OK
Ok it works for me.But i have got one question.Where can i find textures of for example england peasants,town militia or dismouted feudal knights?I didnt find it anywhere.I am blind maybe.
And when do i cease to be junior member?
i have deleted these files:
-- data\descr_geography_new.txt
-- data\descr_geography_new.db
In the cfg file i have this line:
[io]
file_first = true
+ i put the texture file that i want reskining in my new created folder i made too convert.
+ i converted it to DDS
+ i open it with photosho+ when i have finished, i reconverted it back to TEXTURE. and i renamed it, then put it back in it's original location. (delete the original?)
+ i run the game with the batch file with this line :
medieval2.exe --io.file_first
Hello everyone,
I'm having a problem with the texture converter. Everytime I try to run it, it gives me the "Press any key to continue" command. As instructed, I press any key (normally the enter key) and the window closes, without any changes.
More information (I assume this can help): I am running convert_all_textures.bat, I have python, and the file is texture_converter_01 in my data file.
"Half of your brain is that of a ten year old and the other half is that of a ten year old that chainsmokes and drinks his liver dead!" --Hagop Beegan
Ideally, you'd set up a working folder in which you copy the tool and the textures you want to convert.
I'm not 100% sure what could happen for you, if it doesn't present you with an error message it should run fine. Are you sure you don't have any converted files in your subfolders (where the appropriate .texture files are)?
I'm not sure whether this thread is abandoned or not, but I figured out how to fix this issue.
Problem is related to path in Python script used by Batches in order to either convert to DDS or to texture. Argument which represents path is initialized with '' and that gives no sense during execution, so you get an error.
I edited script and fixed everything. Grab it:
Then replace contents of your script with this one and use converter as usual.Code:# texture_converter.py version 0.1 (c) 2006 Stefan Reutter (alpaca) import sys import struct import os import math def convertTextureToDDS(path): f = open(path + '.texture', 'rb') fw = open(path + '.dds', 'wb') content = f.read() fw.write(content[48:]) f.close() fw.close() def convertDDSToTexture(path): f = open(path + '.dds', 'rb') content = f.read() init = [0x01000000, 0x30000000, 0x00000000] # note: attachment sets don't seem to be used normHeader = [0x0044E212, 0x00986212, 0x03C0DA12] fill = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x56, 0x3A, 0x7C, 0x03, 0x00, 0x00, 0x00] dxt = -1 size = content[12:16] if content[84:88] == 'DXT5': dxt = 16384 elif content[84:88] == 'DXT1': dxt = 4096 if dxt == -1: print 'File '+path+' could not be converted' else: fw = open(path+'.texture','wb') for i in init: fw.write(struct.pack('>i', i)) fw.write('dds') for i in normHeader: fw.write(struct.pack('>i', i)) fw.write(struct.pack('h',dxt)) for i in fill: fw.write(struct.pack('>b', i)) fw.write(size) fw.write(content) fw.close() f.close() # Main script code convertAll = False subdirectories = False verbose = False files = [] for i in sys.argv[1:]: if i.startswith('-'): i = i.strip('-') if i.lower().find('type') > -1: type = i.lower().split('=')[1] elif i.lower() == 'all' > -1: convertAll = True elif i.lower() == 'sub' > -1: subdirectories = True elif i.lower() == 't' or i.lower() == 'texture': type = 'texture' elif i.lower() == 'd' or i.lower() == 'dds': type = 'dds' elif i.lower() == 'v' or i.lower() == 'verbose': verbose = True elif i.lower() == 'h' or i.lower() == 'help': print """alpaca''s MTW2 .texture converter, version 0.1 usage: texture_converter.py [options] files options: -all: Converts all files, if this option is supplied, filenames can be omitted -d,--dds: Convert .dds to .texture -h,--help: Display this page -sub: Also convert all files in all subfolders, can only be used with -all -t,--texture: Convert .texture to .dds (default, can be omitted) -v: Verbose option, extra output""" else: files.append(i) if type == 'dds' or type == 'd': if convertAll: if subdirectories: # Changed os.walk() arg from '' to os.getcwd() to get working directory. for tup in os.walk(os.getcwd()): for filepath in tup[2]: if filepath.find('.dds') > -1: files.append(os.path.join(tup[0], filepath.split('.dds')[0])) else: # Changed os.walk() arg from '' to os.getcwd() to get working directory. for filepath in os.listdir(os.getcwd()): if filepath.find('.dds') > -1: files.append(filepath.split('.dds')[0]) i = 0 perc = 0 perc2 = 0 for filepath in files: if math.floor(i*100/len(files)) > perc: perc = math.floor(i*100/len(files)) if verbose: print 'Converting file '+filepath+'.dds('+str(i+1)+' of '+str(len(files))+') - '+str(perc)+'%' elif perc > perc2: print str(perc)+'% done' perc2 = perc convertDDSToTexture(filepath) i += 1 else: i = 0 perc = 0 perc2 = 0 x = 0 for filepath in files: if math.floor(i*100/len(files)) > perc: perc = math.floor(i*100/len(files)) if verbose: print 'Converting file '+filepath+'.dds('+str(i+1)+' of '+str(len(files))+') - '+str(perc)+'%' elif perc > perc2: print str(perc)+'% done' perc2 = perc convertDDSToTexture(filepath) i += 1 else: if convertAll: if subdirectories: # Changed os.walk() arg from '' to os.getcwd() to get working directory. for tup in os.walk(os.getcwd()): for filepath in tup[2]: if filepath.find('.texture') > -1: files.append(os.path.join(tup[0], filepath.split('.texture')[0])) else: # Changed os.walk() arg from '' to os.getcwd() to get working directory. for filepath in os.listdir(os.getcwd()): if filepath.find('.texture') > -1: files.append(filepath.split('.texture')[0]) i = 0 perc = 0 perc2 = 0 for filepath in files: if math.floor(i*100/len(files)) > perc: perc = math.floor(i*100/len(files)) if verbose: print 'Converting file '+filepath+'.texture('+str(i+1)+' of '+str(len(files))+') - '+str(perc)+'%' elif perc > perc2: print str(perc)+'% done' perc2 = perc convertTextureToDDS(filepath) i += 1 else: i = 0 perc = 0 perc2 = 0 x = 0 for filepath in files: if math.floor(i*100/len(files)) > perc: perc = math.floor(i*100/len(files)) if verbose: print 'Converting file '+filepath+'.texture('+str(i+1)+' of '+str(len(files))+') - '+str(perc)+'%' elif perc > perc2: print str(perc)+'% done' perc2 = perc convertTextureToDDS(filepath) i += 1 print 'Done'
I also commented what has been changed.
Enjoy I suppose.![]()
Welcome to the .Org, and thanks for letting us know your solution.
![]()
Looking for a good read? Visit the Library!
Got it to work!
Is there a .dds plug in for GIMP?
"Half of your brain is that of a ten year old and the other half is that of a ten year old that chainsmokes and drinks his liver dead!" --Hagop Beegan
Totally new to the MTW world and I am trying my hand at modding since I seem to have a knack for graphics and photoshop..
But first and most importantly, I have to say THX to Alpaca for all of his unheralded work and advice(as well as patience....I have been reading these forums and I am shocked at the rudeness and selfishness of some people.) Love ya for all your time and creativeness![]()
My question is.....Does it matter which dxt1 format I save in? One is 'no alpha' and the other '1 bit' I believe. My attempts at texture overlay editing renders me an 'all or nothing' kinda look. The changes are too subtle or the units look like they were wrestling in paint. I was wondering if this was a particular way that DX renders it's overlays or what was really happening....
Any advice or suggestions would be greatly appreciated and rewarded anyway I can.
Thx again,
~=]o Storm
Bookmarks