Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Mar 19, 2014 17:48:08 GMT 10
A little placeholder for now, i hope in the end of day if will release it. Already released look for posts bellow!
Tool has no GUI, actually its an open source script that you can improve and help make it better.
Idea of this mod installer is to develop common standard of texture (for now, when other thing could be moddable we can all improve it) mod distribution, to allow combination of various mod and to reduce size of mods by distribution only textures and not entire packs, also this tool should update existing mod installations and add new mods to already modded pack files.
Before i release it ill explain how it works and how mods should be distributed:
1) leave only textures you changed in XXXXXXX directory which was made by YZ2tool from pack file
2) create BIO4MOD directory which will be used as common directory for mods before merge
3) created directory with name of you mod, just dont make it to long and avoid using any characters except for A-Z a-z and 0-9, never ever use non latin characters, spaces should be no problem, but try no to leave trailing spaces in the end of name
So now we have something like
BIO4MOD \_My example mod
4) now in that example just replicate directory structure as you saw it in game ROOT, so that your mod folder would act as ROOT of game folder Mek it like that BIO4MOD
\_My example mod \_BIO4 \_ImagePack \_ImagePackHD
Yes you need to have both ImagePack and ImagePackHD texture folders (but empy for now, remember, we just copying structure) other non texture folders could go as well and TOOL will merge them together (but for now will not unpack them so entire LFS files will be replaced for now, but its good if you want to combine texture and model replacement in same mode, you can even add SweetFX configs and dlls and Exe files into BIN32 and this will be copied to main game folder).
5) Now copy you Folder made from unpacked pack like 0700000 into both ImagePack and HD (well you can ignore SD texture packs if you want, but i strongly sugest to take care about both SD and HD pack and include textures for both just by copy)
BIO4MOD
\_My example mod
\_BIO4
\_ImagePack
\_07000000
\_0000.dds \_ImagePackHD \_07000000
\_0000.dds
6) Make sure you dont have repicated TGA and DDS textures. like 0000.dds and 0000.tga. Tool by default will give priority to TGA and will remove dds of same name, however this make cause weir situation, when some mods uses DDS for this textures and other TGA, that one which uses TGA will always overide dds one, so i suggest you to prefer TGA. But i took some care for it, and made command line argument that will OPEN both duplicated texture DDS and TGA in associated viewer (use Xnview for example), so you can see them and compare and decide which one you want to keep, and will ask you to enter in command prompt if you want to keep TGA or DDS. But this mode is pretty annoying if you have many textures so its not enabled bu default, thats why i suggest to stick to TGA, however this is subject to change, tool can be modified and most of constants rihgt in begining allow to change a lot thing, swap TGA and DDS priority and even force "Ask before replace" mod.
This script is actually designed to be part of mod distribution, and not just stand alone tool, it will be released with conjuction of RE4 styled RAR sfx module to make some simple, yet good looking, standard customizable and easy to made installers, and script will act as expansion for lack of inner WinRar sfx scripting. With WinRar 5 new 7z like argorithm you can do very litthe mods with heavy bunch of textures inside.
7) now pack your BIO4MOD + script (which you can customize before this) file folder into RAR archive, add SFX module and set packed script as setup executable. Customize readme and license if you want, you can even use HTML + CSS (and even with images encoded as Base64 and enmbed in CSS) to add some style and colors.
You have now nice and easy mod installer.
Now, if you will not heavily change script code, and will stick to standards voodoo magic will work:
Once any mod is installed in game, its textures will remain in BIO4MOD folder just in case of repacking, however you can delete some mods manually, the will be in pack anyway and if there is nothing that will override them these mods will remain in pack after installation of any other mod.
Mod sorting and priority given by name of mod folder, that one that goes last will always override the 1st one in case if same textures exist in both, if you want to give some priority to you mods, just add something like Z in begining,
But i advice you to stick to naming standards (we are talking about folder name, is someone lost what im talking about):
Lets start every name of mod folder with number from 00 to 10 which will give the priority to mods, 10 is highest and 00 is lowest.
so you mod name folder would be like
00 Specular fix
others would be
01 Intensive fog
another one will be
10 Albert texture mod
just dont give 10 in any mode name if its not super important, start with 00, i suggest to give 10 only to global override mods such as ALber texture mods. I case if everyone will give 10 to every mod, this will lead to unpredctable priority by 1st letter of following mod name, so anything with Z will get more priority than A.
You can ignore priority number in mame and just name it as you wish, and A-z will get higher priority than 1-10 but i strongly suggest you to not do it.
But this is just precation measures in case of mods collision, most likely your mod will not override anything from other mod.
Dont forget you can pack anything in, even entire pack files (but packs not suggested) and will be installed relative to game ROOT folder as put in you mod folder.
For now it only solves texture conflicts and pack overriding each other, but in future this can be and will be improved if needed.
Script distributed in BAT format for now, i made it like that so that anyonce can easily understand how it works, improve it and so that sources and results can be availalbe to everyone without need of any compillers.
Bat has some limitations (like non latin characters) but for now it works just fine, in future if these limits will prevent us doing some coold things i can port it to AutoIt script (which again i prefer to use because you dont need heavy compillers and has access to sourcecodes and its easy to understand and improve by anyone and just like batch scripting looks almost like BASIC language) or PowerShell (never tried it, but i think it better replacement for batch files which built in anything starting from Vista and available for XP as stand alone installation).
Today i will do some extra testing and polishing, will finish or remove some unifinished things and will publish it, not sure if i'll finish RAR module today, but expect it soon, you can still use stanard modules for now and easilly replace them in existin mod archives with newer one.
Ok, any suggestions and ideas?
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Mar 20, 2014 3:04:31 GMT 10
For now just code, have problems with hosting and have no time to pack anything.
Download YZ2tool and QuickBMS and put both exe files in RE4 root, dont forget to include them as part of your distibution,
here the script (keep i mind, its not fully polished):
@echo off setlocal enabledelayedexpansion set "GameExe=Bin32\bio4.exe" set "GameData=BIO4" set "GameTex=ImagePack" set "Ext1=.pack" set "Ext2=.yz2" set "Ext3=.lfs" set "Ext4=.bak" set "Tex1=.dds" set "Tex2=.tga" set "Tex3=.bin" set "GameId=254700" set "GameName=Resident Evil 4 HD" set "ModDir=BIO4MOD" set "BMS=RE4HD.bms" title !GameName! mod installer cd cls
:Init rem echo [ %DATE% %TIME% ]>debug.log FOR %%A IN (%*) do ( IF /I "%%A"=="/ask" ( set AskMode=1 ) )
if exist "!GameExe!" ( set "GameDir=%CD%" ) else ( set "GameDir=%CD%" rem call :SteamDetect call :GameDetect cd /d "!GameDir!" ) call :ModDetect call :TexDetect pause exit
:SteamDetect if /i %PROCESSOR_ARCHITECTURE%==x86 ( for /f "tokens=2*" %%D in ( 'REG QUERY "HKLM\SOFTWARE\Valve\Steam" /v "InstallPath"' ) do ( set "SteamDir=%%E" ) ) else ( for /f "tokens=2*" %%D in ( 'REG QUERY "HKLM\SOFTWARE\Wow6432Node\Valve\Steam" /v "InstallPath"' ) do ( set "SteamDir=%%E" ) ) exit /b 0
:GameDetect if /i %PROCESSOR_ARCHITECTURE%==x86 ( for /f "tokens=2*" %%D in ( 'REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App !GameId!" /v "InstallLocation"' ) do ( set "GameDir=%%E" ) ) else ( for /f "tokens=2*" %%D in ( 'REG QUERY "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App !GameId!" /v "InstallLocation"' ) do ( set "GameDir=%%E" ) ) exit /b 0
:ModDetect for /f "tokens=* delims=" %%A IN ( 'dir "!ModDir!" /b /a:d' ) do ( rem check for mod folder set "ModName=%%~A" for /f "tokens=* delims=" %%B IN ( 'dir "!ModDir!\!ModName!" /b /a:d' ) do ( set "ModData=%%~B" if /i "!ModData!"=="!GameData!" ( rem check for texture folder in bio4 for /f "tokens=* delims=" %%C IN ( 'dir "!ModDir!\!ModName!\!ModData!" /b /a:d' ) do ( set "ModTex=%%~C" rem check if we have SD texture if /i "!ModTex!"=="!GameTex!" ( rem detect and copy entire SD pack data to temp call :PackDetect rem call :RePack ) rem check if we have HD if /i "!ModTex!"=="!GameTex!HD" ( rem detect and copy entire HD pack data to temp call :PackDetect "HD" rem call :RePack "HD" ) ) ) call :ModMerge ) ) exit /b 0
:PackDetect for /f "tokens=* delims=" %%A IN ( 'dir "!ModDir!\!ModName!\!ModData!\!ModTex!" /b /a:d' ) do ( rem here we have pack name, probably set "PackName=%%~A" rem lets make sure that we actually have any folder if /i not "!PackName!"=="" ( rem getting original files unpacked first, but we need to make sure it exist rem priority is LFS > YZ2 > PACK if exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext3!" ( rem do we have BIO4\ImagePackHD\*.pack.yz2.lfs? rem if so, check if we had backup BIO4\ImagePackHD\*.pack.yz2.lfs.bak if not exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext3!!Ext4!" ( rem No backup? Lets make some! copy /y "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext3!" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext3!!Ext4!" ) rem lets unpack yz2 to shared temp folder if not exist "!GameData!\!GameTex!%~1\!PackName!" ( rem lets unpack LFS with QuickBMS call :QuickBMS "!BMS!" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext3!" "!GameData!\!GameTex!%~1" call :YZ2tool "x" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!" call :FixBin "%~1" ) ) else if exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext3!" ( rem do we have BIO4\ImagePackHD\*.pack.lfs? rem if so, check if we had backup BIO4\ImagePackHD\*.pack.lfs.bak if not exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext3!!Ext4!" ( rem No backup? Lets make some! copy /y "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext3!" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext3!!Ext4!" )
rem lets unpack pack to shared temp folder if not exist "!GameData!\!GameTex!%~1\!PackName!" ( rem lets unpack LFS with QuickBMS call :QuickBMS "!BMS!" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext3!" "!GameData!\!GameTex!%~1" call :YZ2tool "x" "!GameData!\!GameTex!%~1\!PackName!!Ext1!" call :FixBin "%~1" ) ) else if exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!" ( rem do we have BIO4\ImagePackHD\*.pack.yz2? rem if so, check if we had backup BIO4\ImagePackHD\*.pack.yz2.bak if not exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext4!" ( rem No backup? Lets make some! copy /y "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext4!" ) rem lets unpack yz2 to shared temp folder if not exist "!GameData!\!GameTex!%~1\!PackName!" ( call :YZ2tool "x" "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!" call :FixBin "%~1" ) ) else if exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!" ( rem do we have BIO4\ImagePackHD\*.pack? rem game dont have pack files by default, if we have one, this means we have mod installed and not backup needed
rem lets unpack pack to shared temp folder if not exist "!GameData!\!GameTex!%~1\!PackName!" ( call :YZ2tool "x" "!GameData!\!GameTex!%~1\!PackName!!Ext1!" call :FixBin "%~1" ) ) ) ) exit /b o
:TexDetect for /f "tokens=* delims=" %%A IN ( 'dir "!GameData!" /b /a:d' ) do ( rem check if we have SD if /i "%%~A"=="!GameTex!" ( call :MergeDetect ) rem check if we have HD if /i "%%~A"=="!GameTex!HD" ( call :MergeDetect "HD" ) ) exit /b o
:MergeDetect for /f "tokens=* delims=" %%A IN ( 'dir "!GameData!\!GameTex!%~1" /b /a:d' ) do ( rem here we have pack name, probably set "PackName=%%~A" rem lets make sure that we actually have any folder if /i not "!PackName!"=="" ( call :RePack %~1 ) ) exit /b o
:RePack if exist "!GameData!\!GameTex!%~1\!PackName!" ( for /f "tokens=* delims=" %%A IN ( 'dir "!GameData!\!GameTex!%~1\!PackName!" /b /a:-d' ) do ( if /i "%%~xA"=="!Tex2!" ( if !AskMode! equ 1 ( if exist "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex1!" ( start CMD /c "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex2!" start CMD /c "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex1!" set /p input=Texture [%%~nA] present in 2 formats. Please compare both and select which one you want to keep. Type [1] to keep [TGA] or [2] to keep [DDS], and press [ENTER]. You can also press just [ENTER] to keep both files, but this may lead to unexpected results. Make your choice : if !input! equ 1 ( del /q /f "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex1!" ) else if !input! equ 2 ( del /q /f "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex2!" ) set input= ) ) else ( if exist "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex1!" ( del /q /f "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex1!" ) ) ) else if /i not "%%~xA"=="!Tex1!" if /i not "%%~xA"=="!Tex2!" if /i not "%%~xA"=="!Tex3!" ( del /q /f "!GameData!\!GameTex!%~1\!PackName!\%%~A" ) ) call :YZ2tool "c" "!GameData!\!GameTex!%~1\!PackName!" rem lets remove lfs, we dont need them anymore, since we have new pack if exist "!GameData!\!GameTex!%~1\!PackName!!Ext1!" ( rd /q /s "!GameData!\!GameTex!%~1\!PackName!" del /q /f "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext3!" del /q /f "!GameData!\!GameTex!%~1\!PackName!!Ext1!!Ext2!!Ext3!" ) ) exit /b o
:QuickBMS QuickBMS -o "%~1" "%~2" "%~3" exit /b o
:YZ2tool YZ2tool -%~1 "%~2" exit /b o
:Fixbin rem dirty fix bin files bug, can be removed if YZ2tool bug will be fixed if exist "!GameData!\!GameTex!%~1\!PackName!" ( for /f "tokens=* delims=" %%A IN ( 'dir "!GameData!\!GameTex!%~1\!PackName!" /b /a:-d' ) do ( if /i "%%~xA"=="!Tex3!" ( if exist "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex3!" ( move /y "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex3!" "!GameData!\!GameTex!%~1\!PackName!\%%~nA!Tex2!" ) ) ) ) exit /b 0
:ModMerge xcopy "!ModDir!\!ModName!" "!GameDir!\" /f /y /s /e /i exit /b o
Save it as RE4HDmodinstaller.bat and start enjoying mergd mods :-)
|
|
Posts: 321
|
Post by albert on Apr 8, 2014 7:51:08 GMT 10
Hi! I've been testing (finally) this script and it only works for me when the folder contains all textures, not just the modded textures. Sure I've done something wrong. I leave 2 screenshots so you can see what I'm dong wrong: imageshack.com/a/img34/2792/t0du.pngimageshack.com/a/img28/9962/knq8.pngThere are just 2 textures inside 44000101 folder. The file resulting is smaller than the original and the game crashes... There's no problem when the folder contains all textures (modded or not) Thanks in advance! I'm posting this here just in case someone is having the same issue.
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Apr 9, 2014 1:10:02 GMT 10
oh shi~!!!!!!!! Thanks for paying my attention to this. As far as i see from screenshots, i forgot to mention QuickBMS script that required to unpack lfs files, thats why it only contain 2 files, because rest of files was not unpacked and remained in original LFS file which should now be renamed to *.lfs.bak (i need to recheck logic of extension priority and perhaps add check of all required files on start and show error that tells whats missing)
Here is the code of Script:
comtype xmemdecompress get name basename log MEMORY_FILE 0 0 goto 0x10 get chunks long append for i = 0 < chunks get zsize short get size short if size = 0 math size = 0x10000 endif get offset long math offset + 0x13 clog MEMORY_FILE offset zsize size next i append get size asize MEMORY_FILE log name 0x00 size MEMORY_FILE
save it as RE4HD.bms and put in root of Resident Evil 4 HD folder
Also keep in mind that if original archive had TGA files and you got same texture name as DDS, dds will be ignored and TGA will be put in archive, ill update this later by adding 2 arguments to set dds or tga priority manually. At the moment you can use manual compare mode by starting script with /ask argument (just create another bat script with this code
@RE4HDmodinstaller.bat /ask
also add >>debug.txt but without ask (otherwise you wound not be able to see promt and script may halt without your awareness.
@re4hdmodinstaller.bat >>debug.log and send me content of debug.log if something does not work.
In this case is both dds and tga detected, they will be opened in associated preview program and you will have to enter which one you want to keep DDS or TGA. Can be a little annoying but script could never tell which texture is better XD
But after thinking what i told you about using DDS to save VRAM and RAM, i think i should make DDS top priority by default.
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Apr 9, 2014 1:53:02 GMT 10
Okey i uploaded almost entire (have not finished RAR SFX module design, have problems setting transparency of static above bitmap) packge. Resident Evil 4 HD mod installer v1.0 beta. www.sendspace.com/file/rdrccxIts ready to use and has some example mods included, you can delete them all or leave anything you like (i strongly suggest you to delele specular fix as it was created before patch 1.0.5 fixed coordinates, now this fix will break game again. Unpack everything in Resident Evil 4 HD installation folder. Now ill think how to improve it, maybe will add udas unpacking and merging as well, since its became available after i touch script last time. You can improve it yourself, just dont forget to post your versions with improvements here.
|
|
Posts: 321
|
Post by albert on Apr 9, 2014 4:54:09 GMT 10
Ohh! It worked! The 2 new textures appeared magically in the game. The tga-dds conflict won't be a problem. I always save in the same format of the original texture. only a few textures are tga and they usualy are little textures not the super HD textures we are creating which they are always dds. I didn't install the mods you included but I'll take a look at them later! Many thanks. Now we'll just need to include changed textures as you stated few weeks ago. It looked complicated at first but I took the time to read all carefully and it's really simple. I strongly recommend this tool.
You said something about replicated textures and create some kind of index to avoid duplicated textures inside our mod packs but I can't find it anywhere right now...
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Apr 9, 2014 16:30:59 GMT 10
Thanks for report! Well, this index needs to be created manually, its not implemented yet to script.
Idea was to gather names of packs and texture index inside pack which represent same repetitive texture (this can be partially done by using any sort of picture dublicate finding software that supports dds and tga) and instead of putting these textures again and again in folders with pack names like 070000 again again, put some ini file which would tell the script to copy that single texture many time under specific name in specific folders. And this would also allow to give textures custome human-friendly names.
Lets say you have Leon pants in 01.pack 02.pack 03.pack in every pack it saved as different index number, so at one it would be 1.dds in another 2.dds and 3.dds
Normally you would include all 3 textures and would keep these ugly names that gives you no idea what they does (not like previous PC versin where names of textures actualy had meaning and you could find duplicates just by names).
But what you need to 1st, make a ini file and write down there something like
[Leon pants] 1=01\1.dds 2=02\2.dds 3=03\3.dds
Ini section names would be used to make texture regognision eye friendly, and every ini section name should be Unique and should not use anything but A-Z a-z 0-9 then every ini section value should have numeric values (this would make FOR loops easier to collect all the textures no matter how many of them we do have):
Or simplier version (well it would be simple to read from script, but not by eyes):
[Leon pants] 01\1.dds=02\2.dds=03\3.dds
This will allow to keep an eye on name which stands 1st, it will be ignored by script, but rest of values in signle line would be easy to break by "=" delimiter, then check which of them exist in folders and use 1st found as source of others.
So once i update script (actually there is a no hud speedup bat file which shows how i copied 1 single dumy texture many times to replace all hud textures, this is basically almost how it works, you can use same technique to write your own bat script that will run before mine and will copy single source texture to dublicate folders) it would be possible for script to use 01\1.dds (or anything else) as source and copy it to the places it needs to be before making pack files.
To not break current fine tunned script i can try to write 1st quick separate version of script that only deals with dublicates, and then impelent it into main script (you can call one script from anothet by using "call myscript.bat" anywhere).
The only thing that i cant do and that i hope you and other modders will do = index of dublicate texture.
Actually im thinking right now that there is no need to make index per mod, we can make unified shared index file with all the dublicate texture and just distribute it with script without making any modder to worry about dublicate textures anymore in future (this means even if he puts texture just once in any folder, script will automatically copy it to every other folder where same texture is pressent according to index file).
Can you help me and all of us by creating such index?
Just write down every replicated texture you see and know, also ask Chris and other to do the same and in the end we will have full list of dublicated textures.
|
|
Posts: 321
|
Post by albert on Apr 9, 2014 18:47:26 GMT 10
DUPLICATED TEXTURES LIST
Here's a quick created list of all repeated textures (based on original textues, since the HD folder it's a mess) Thank you again for all the explanations! When I'm home I'll do some more testing and research
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Apr 9, 2014 19:54:42 GMT 10
Wow, thanks for list!
So you actually modding SD folder? Well for unpacking and replacing original textures its a good choice, since it will require less space to temp files. Btw if you see bin file, rename it to tga and keep it as tga in your list, since its bug of YZ2 tool, not really part of the way game handles files. Now i only need to figure our how to convert your list for format i can easily handle from script, since you did it a little different thatn what i expected XD Will do now some testings.
|
|
Posts: 321
|
Post by albert on Apr 9, 2014 20:22:23 GMT 10
You're welcome!
Ahh so that "bin" thing is a bug. strange... it happens only 3 times.
No, I'm modding over the HD packs but I thought it would be a better idea finding duplicate files inside the original textures folder because there are some incoherences inside HD textures folders. Developers forgot to update some repeated textures. So, some textures duplicated in Imagepack folder are different in ImagepackHD.
Tell me if you need me to do something else.
Good luck!
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Apr 9, 2014 23:27:30 GMT 10
Is it complete list of dublicate textures? Also does it has any dublicates int different format, like one texture is dds and another tga?
As for bin, yes its a bug, which also lead to game crash if you dont rename bin to tga. My script handles this bug and autorename bin from unpacked file to tga, but in your mod folder your should NOT use bin extension, and always use tga, i dont think i added any bin check in mod folder, so be careful.
Would be nice if you will have time to rename all XXXXX to unique names, something that gives idea what texture we dealing with. If you still using old version textures with their proper names, i think it could be good idea to use that names without extension in [section name].
|
|
Posts: 321
|
Post by albert on Apr 10, 2014 0:06:22 GMT 10
I don't see any option in the duplicate file finder program about skipping if extension is not the same. I used CloneSpy. Anyway, my intuition says the chances a tga have an identical texture in dds format are really low. I could be wrong of course...
Ah, When I said there are only 3 bin files I was talking about 3 duplicate files. There are 29 bin files in total, all of them inside 3f000XXX folders.
OMG! There are "only" 6745 instances of repeated textures XD I don't have the time to do a complete research but I'll try to find out the most important ingame textures: items and effects in every room, same enemy and character textures loading every cutscene, and obvious things like that... and everything I disover while we are doing the texture patch would be included.
|
|
Posts: 321
|
Post by albert on Apr 10, 2014 3:40:57 GMT 10
I'm leaving here an example just to make sure it's all right:
[LEON GLOVE] 0d30b000\0004.dds=0e212000\0004.dds=0e120000\0007.dds=0e22a000\0013.dds=0d317050\0017.dds=0d317110\0013.dds=0e100430\0004.dds=0e228000\0019.dds=0e117100\0006.dds=0d227020\0004.dds=0d200000\0004.dds=0d316000\0006.dds=0e300000\0011.dds=0e100410\0004.dds=0e100200\0004.dds=0d119000\0020.dds=0d317060\0012.dds=0d30c000\0004.dds=0e333100\0004.dds=0d206000\0006.dds=0e200000\0004.dds=0e332100\0011.dds=0d300000\0009.dds=01000010\0015.dds=0e20b000\0022.dds=0e117000\0006.dds=0d120010\0007.dds=0d331000\0004.dds=0d227010\0015.dds=0d310000\0014.dds=0e304000\0006.dds=0e206200\0004.dds=0e316000\0006.dds=0d100410\0004.dds=0e317050\0019.dds=0e330000\0004.dds=0d204000\0004.dds=0d31c000\0015.dds=00000039\0020.dds=0e332000\0013.dds=0d227000\0015.dds=0d100430\0004.dds=0d317100\0004.dds=0d101000\0004.dds=44000500\0303.dds=0d117100\0006.dds=0e105100\0018.dds=0d215020\0004.dds=0d101210\0019.dds=0d330000\0004.dds=0e201000\0026.dds=0e31c000\0015.dds=0e329000\0013.dds=0d203000\0004.dds=0d31c010\0023.dds=0d212000\0004.dds=0d120000\0007.dds=0d31c020\0015.dds=4400051e\0212.dds=0e331100\0004.dds=0d100400\0007.dds=0e325000\0013.dds=0d11f110\0006.dds=0d320000\0012.dds=0d117000\0006.dds=0d100300\0004.dds=01000008\0016.dds=0d102000\0014.dds=0d11f020\0021.dds=0d104000\0006.dds=0d317000\0013.dds=0d100200\0004.dds=0d11f010\0010.dds=0d320010\0012.dds=0e31c020\0015.dds=0d104010\0004.dds=0d317090\0013.dds=0d304000\0006.dds=0d10b220\0011.dds=0e31c010\0023.dds=01000009\0018.dds=0d104200\0012.dds=0d10b210\0009.dds=0d105000\0011.dds=0d201000\0026.dds=0e203000\0004.dds=0d10b200\0011.dds=0d11f000\0012.dds=0e331000\0004.dds=0d105100\0016.dds=0d317080\0013.dds=0d10b100\0010.dds=0d106000\0018.dds=0d333100\0004.dds=0d321000\0009.dds=0d317040\0013.dds=0d325000\0011.dds=0e333000\0004.dds=0d333000\0004.dds=0e30b000\0004.dds=0e204000\0004.dds=0d31b000\0028.dds=0e11c000\0008.dds=0d11c200\0006.dds=0d10b000\0020.dds=0d100030\0009.dds=0e206100\0005.dds=0e104000\0006.dds=0100000a\0017.dds=0d213000\0012.dds=0d30a100\0004.dds=0d317070\0013.dds=0d20b000\0020.dds=0e11c100\0011.dds=0d317140\0004.dds=0d317010\0013.dds=0d11c100\0011.dds=01000000\0015.dds=0d214000\0026.dds=0e30c000\0004.dds=0e215000\0026.dds=0d317130\0012.dds=0d228020\0040.dds=0d215000\0026.dds=0d329000\0011.dds=0d317020\0013.dds=0e310000\0014.dds=0d215010\0026.dds=0d317120\0004.dds=0e214000\0026.dds=0d209000\0026.dds=0e215010\0026.dds=0d11c000\0008.dds=0e11f000\0012.dds=0d22a000\0011.dds=0d11b000\0008.dds=0d206200\0004.dds=0e213000\0012.dds=0d119200\0008.dds=0d317030\0013.dds=0d332100\0009.dds=0d228000\0019.dds=0d206100\0005.dds=0d332000\0011.dds=0d119100\0008.dds=0d331100\0004.dds=0d101300\0016.dds
Then... Should the texture be renamed as "LEON GLOVE.dds/tga"? Where must be placed that texture? Where must be placed the ini file containing the above text? And which name must be called this ini file?
Thanks!
Ooops! Unnecessary double post, sorry
|
|
Posts: 318
Original Join Date: Jul 12, 2007
|
Post by voodooman on Apr 13, 2014 16:44:45 GMT 10
Yeah thats exactly the format it would be easy to read from script (even if its not i can easily replace = back to CR LF . Probably adding DDS or TGA in the end of section name would be smarter for future updates where i plan to use generic file names , so that [Leon gloves.dds] and [leon gloves.tga] would be considered as different texture (in fact they are different in format) and it would be better to handle tga and dds separate way. Best place for texture, i believe would be just one of many folders it originaly exist in, im still thinking how to effectively handle every texture and check for dublicates. But for now i have idea just to check texture name and and folder, once it handled, and compare to this "dublicate database" and if there is a match, just copy it instantly to all the places... however, if disk is NTFS to save space during installation i can even do better thing that copying, i can just do a NTFS hardlink, any program would think that it dealing with copy but NTFS would just reroute all "copies" to 1 original file. Well for now texture should better keep its name as seen in unpacked folder, as for ini i would keep it right alongside to script. Can you provide me please about 5 pack folders with changed textures that includes duplicates and are notticable right in begining of game, so i can experiment witht them during script creation? Oh btw, the CloneSpy if you use it for texture duplicate search may cheat you, there are different texture with absolutely same size. I think you should use something like this www.makeuseof.com/tag/5-ways-to-find-duplicate-image-files-on-your-computer-windows/ but with TGA and DDS support. Maybe this www.duplicatephotocleaner.com/ but im not sure about dds and tga support. Programs like this would help find same textures even its different in size. Or you need to use MD5 checksum check on original textures from SD pack, but this will work for only exactly the same textures. Hm with so many file names in line i think poor DOS bat cant handle so many variables and cant handle them fast, need to port script to autoit or powershell. Once ill port it i think we could come up with better and smarted file name handling. Im thinking in future it would be possible to put all modded textures to cusom folders names like ini sections and instead of this BIO4MOD |My example mod |BIO4 |ImagePack |07000000 |0000.dds |ImagePackHD |07000000 |0000.dds Use something more like this BIO4MOD |My example mod |BIO4 |ImagePack |generic |LEON GLOVE.dds |ImagePackHD |generic |LEON GLOVE.dds and then script would take name of dds or tga it found in generic folder search for section name in duplicate DB ini, and copy\link it under all the names in ini section. What you think about this?
|
|
Posts: 321
|
Post by albert on Apr 14, 2014 3:43:09 GMT 10
Ah that last part sounds good to me! it's a good and pretty simple way to organize things As usual everything seems very compliacted but surely it's not that hard when putting it into practise XD Sure the script will need to do a really hard job with this huge duplicated textures list...
Mmmm yes, that clonespy don't look into the image appearence so if some texture has different size it will consider it different. But maybe it's better that way. Sometimes the textures is at different size because the game doesn't need a huge resolution for that specific texture in certain distant or almost hidden places. Most times the difference in size depends of the context.
44000100.pack first stage textures. Almost every texture after 0069.tga is duplicated somewhere else in the game 0d100xxx.pack textures for that area cutscenes. almost every texture is duplicated 44000120.pack stage "0". used for opening cutscene stage. Don't skip introduction video or you'll skip this "room" 0d120xxx.pack textures for that area cutscenes almost all textures are duplicated in both packs 0d120000 and 0d120010 44000101.pack second stage textures (village). Almost every texture after 0120.tga is duplicated somewhere else in the game. 0d101xxx.pack textures for that area cutscenes. almost every texture is duplicated
Good luck!!
|
|