Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4   Go Down

Author Topic: Skins Folder Tool updated  (Read 30778 times)

0 Members and 1 Guest are viewing this topic.

<Gunny>

  • member
  • Offline Offline
  • Posts: 1393
Re: Skins Folder Tool updated
« Reply #24 on: January 23, 2015, 12:11:07 AM »

Dear Bravo that tool works like a charm.
Thank You . :)
Logged

Godzyla

  • member
  • Offline Offline
  • Posts: 223
Re: Skins Folder Tool updated
« Reply #25 on: January 26, 2015, 07:56:48 AM »

I'm working on a batch script that reads air.ini file.
Plus other features like fixing QMB game crash.
I will post it later. I'm quite busy right now.

@Solo : my script is in french too.

I will also translate it in English for non french speakers
Logged

Godzyla

  • member
  • Offline Offline
  • Posts: 223
Re: Skins Folder Tool updated
« Reply #26 on: January 26, 2015, 10:33:07 AM »

Here is the origina version (French)

Code: [Select]
@echo off
title Il-2 Game Fixer (French)


set qmbFolder=.\Quicks\
set qmbFile=.last.quick
set screenshotsFolder=.\Screenshots\
set netCacheFolder=.\PaintSchemes\netCache\
set cacheFolder=.\PaintSchemes\Cache\
set skinsFolder=.\PaintSchemes\Skins\
set iniFolder=.\MODS\STD\com\maddox\il2\objects\

:menu
cls
echo Mise en garde :
echo Les ‚l‚ments supprim‚s sont directement ‚ffac‚s de l'ordinateur.
echo Ils ne sont PAS envoy‚s … la corbeille!
echo.
echo Que voulez-vous faire?
echo 1 Corriger le QMB
echo 2 Supprimer les screenshots
echo 3 Nettoyer le dossier NetCache
echo 4 Vider le cache des skins
echo 5 Cr‚er les dossiers de skins des avions manquants
echo 9 Aide
echo 0 Quitter
set /p choice=Option :
echo -----
if %choice% EQU 1 goto QMB
if %choice% EQU 2 goto Screenshots
if %choice% EQU 3 goto NetCache
if %choice% EQU 4 goto cache
if %choice% EQU 5 goto skinsFolders
if %choice% EQU 9 goto aide
if %choice% EQU 0 goto end
echo choix invalide
pause
goto menu

:QMB
if exist %qmbFolder%+%qmbFile% ( del %qmbFolder%+%qmbFile% ) else echo Le fichier %qmbFile% n'existe pas.
echo Le fichier a ‚t‚ supprim‚ ou n'existe plus
echo.
pause
goto menu

:Screenshots
dir %screenshotsFolder%
rem suppression de touts les fichiers dans le dossier screenshots
if exist %screenshotsFolder%grab*.tga ( del %screenshotsFolder%grab*.tga ) else echo Le dossier ne contient pas de screenshots targa
echo Fin du traitement des screenshots targa
echo -----
if exist %screenshotsFolder%grab*.jpg ( del %screenshotsFolder%grab*.jpg ) else echo Le dossier ne contient pas de screenshots jpeg
echo Fin du traitement des screenshots jpeg
echo -----
echo Les screenshots ont ‚t‚ supprim‚s
echo.
pause
goto menu

:NetCache
dir %netCacheFolder%
rem nettoyage des skins dans le dossier NetCache
if exist %netCacheFolder%*.bmp ( del %netCacheFolder%*.bmp) else echo Le dossier NetCache a d‚j… ‚t‚ nettoy‚
echo Fin du traitement du dossier NetCache
echo.
pause
goto menu

:cache
rem dir %cacheFolder%
rem nettoyage des nosearts en cache
if exist %cacheFolder%Noseart*.tga ( del %cacheFolder%Noseart*.tga ) else echo Les nosearts ont deje ‚t‚ supprim‚s
echo Fin du traitement des nosearts
echo -----
rem nettoyage des textures pilote en cache
if exist %cacheFolder%Pilot*.tga ( del %cacheFolder%Pilot*.tga ) else echo Les textures des pilotes ont d‚j… ‚t‚ effaces
echo Fin du traitement des textures des pilotes dans le cache
rem echo -----
rem nettoyage des skins sous stock‚s au format tga
rem rmdir /S %cacheFolder%*
echo.
pause
goto menu

:skinsFolders
for /f "tokens=*" %%a in (%iniFolder%air.ini) do (
rem echo %%a
for /F "tokens=1 delims= " %%b in ("%%a") do (
rem echo %%a
rem echo %%b
rem echo %skinsFolder%%%b
mkdir %skinsFolder%%%b
)
)
rem Un r‚sidu de la lecture du fichier, la ligne [AIR] n'est pas … prendre en compte
rmdir %skinsFolder%[AIR]
pause
goto menu

:aide
cls
echo 1. Corriger le QMB.
echo.
echo Cette action vient supprimer le fichier %qmbFile% qui est "alt‚r‚".
echo Le jeu n'‚tant pas con‡u pour ajouter et retirer des avions … la vol‚e,
echo le fichier de configuration du QMB peut contenir des traces
echo d'un avion qui a pu ˆtre retir‚ entretemps.
echo Ce type d'exception n'est pas pris en charge par le jeu, la suppression
echo du fichier est une alternative au bon fonctionnement du jeu.
echo.
echo Le QMB reg‚nŠre un nouveau fichier si celui-ci n'existe pas.
echo.
pause
echo -----
echo.
echo 2. Supprimer les screenshots
echo.
echo Cette action supprime les captures d'‚cran du dossier screenshots.
echo Seuls les screenshots dont le nom n'a pas ‚t‚ modifi‚ (commen‡ant par grab)
echo et portant l'extension jpg ou tga seront effac‚es.
echo.
pause
echo -----
echo.
echo 3. NetCache
echo.
echo Cette action vide le dossier NetCache dans le dossier PaintSchemes
echo pour faire de la place sur le disque dur. Tous les skins utilis‚s
echo par les autres joueurs lors de parties en ligne sont stock‚s … cet endroit.
echo Certains skins pouvant dater de plusieurs ann‚es,
echo il peut ˆtre judicieux de faire de la place de temps en temps.
echo.
pause
echo -----
echo.
echo 4. Cache
echo.
echo Cette action vient … supprimer les textures mises en cache.
echo Pour le moment, seules les textures des pilotes et nosearts sont supprim‚s.
echo Une am‚lioration visant … supprimer les dossiers des diff‚rents avions
echo en cache est en cours de d‚veloppement.
echo.
pause
echo -----
echo.
echo 5. Cr‚er les dossiers de skins des avions manquants
echo.
echo Ce programme liste les avions dans le fichier air.ini
echo et cr‚e les dossiers manquants dans le dossier
echo %skinsFolder%
echo.
pause
echo -----
echo.
echo 9. Aide
echo.
echo Cette section affiche le fonctionnement de chaque fonctionnalit‚ propos‚e
echo dans ce programme.
echo.
pause
echo -----
echo.
echo 0. Quitter
echo.
echo Cette option permet de fermer l'application.
echo.
pause
goto menu

:end
echo Fermeture du programme en cours.

And this is translation for non-French speaking persons.
Code: [Select]
@echo off
title Il-2 Game Fixer (English)


set qmbFolder=.\Quicks\
set qmbFile=.last.quick
set screenshotsFolder=.\Screenshots\
set netCacheFolder=.\PaintSchemes\netCache\
set cacheFolder=.\PaintSchemes\Cache\
set skinsFolder=.\PaintSchemes\Skins\
set iniFolder=.\MODS\STD\com\maddox\il2\objects\

:menu
cls
echo Advice :
echo Files are simply deleted!
echo They are NOT sent to trash bin!
echo.
echo How can I help you?
echo 1 Fix QMB Crash
echo 2 Delete screenshots
echo 3 Clean NetCache folder
echo 4 Clear Cache Folder
echo 5 Creating missing skin folders for planes
echo 9 Help
echo 0 Close
set /p choice=Option :
echo -----
if %choice% EQU 1 goto QMB
if %choice% EQU 2 goto Screenshots
if %choice% EQU 3 goto NetCache
if %choice% EQU 4 goto cache
if %choice% EQU 5 goto skinsFolders
if %choice% EQU 9 goto Help
if %choice% EQU 0 goto end
echo Invalid Choice
pause
goto menu

:QMB
if exist %qmbFolder%+%qmbFile% ( del %qmbFolder%+%qmbFile% ) else echo %qmbFile% doesn't exist.
echo %qmbFile% no longer exists.
echo.
pause
goto menu

:Screenshots
dir %screenshotsFolder%
rem Deleting targa and jpeg screenshots with grab prefix
if exist %screenshotsFolder%grab*.tga ( del %screenshotsFolder%grab*.tga ) else echo No targa screenshots in this folder
echo End of targa screenshots process
echo -----
if exist %screenshotsFolder%grab*.jpg ( del %screenshotsFolder%grab*.jpg ) else echo No jpeg screenshots in this folder
echo End of jpeg screenshots process
echo -----
echo Screenshots have been deleted
echo.
pause
goto menu

:NetCache
dir %netCacheFolder%
rem Deleting all bitmap files from netCache folder
if exist %netCacheFolder%*.bmp ( del %netCacheFolder%*.bmp) else echo NetCache have already been cleaned
echo End of NetCache folder process
echo.
pause
goto menu

:cache
rem dir %cacheFolder%
rem Deletes nosearts
if exist %cacheFolder%Noseart*.tga ( del %cacheFolder%Noseart*.tga ) else echo Nosearts have already been deleted
echo End of Nosearts process
echo -----
rem Deletes pilots tectures
if exist %cacheFolder%Pilot*.tga ( del %cacheFolder%Pilot*.tga ) else echo Pilot textures have already been deleted
echo End of pilot textures process
rem ----------
rem NOT FIXED
rem echo -----
rem deleting folders (all of them contains 3 tga files and 1 tgb file)
rem rmdir /S %cacheFolder%*
rem ----------
echo.
pause
goto menu

:skinsFolders
rem opening air.ini file
for /f "tokens=*" %%a in (%iniFolder%air.ini) do (
rem echo %%a
for /F "tokens=1 delims= " %%b in ("%%a") do (
rem creating folder (if the folder already exists, action is not performed)
rem echo %%a
rem echo %%b
rem echo %skinsFolder%%%b
mkdir %skinsFolder%%%b
)
)
rem Deleting [AIR] folder
rmdir %skinsFolder%[AIR]
pause
goto menu

:help
cls
echo 1. Fix QMB Crash
echo.
echo This feature deletes %qmbFile% file.
echo Game is not suitable to switch planelist QMB can have elements
echo of a missing plane. This kind of exception is not handled by the game.
echo.
echo No worries if the file is missing, QMB will create a new one.
echo.
pause
echo -----
echo.
echo 2. Delete Screenshots
echo.
echo This feature deletes screenshots. Only jpg and tga screenshots
echo that begins with "grab" filename will be deleted
echo.
pause
echo -----
echo.
echo 3. NetCache
echo.
echo This folder stores skins used by other people during network missions.
echo Some of them are no longer used by other players so it can be useful
echo to clean that folder sometimes. Some skin were stored few years ago.
echo.
pause
echo -----
echo.
echo 4. Cache
echo.
echo This part deletes textures stored in cache folder.
echo Only pilots et nosearts textures are deleted.
echo An update is in progress to delete planes folder in cache.
echo.
pause
echo -----
echo.
echo 5. Creating missing skins folders
echo.
echo This part of the application reads air.ini file
echo to create missing folders in
echo %skinsFolder% path
echo.
pause
echo -----
echo.
echo 9. Help
echo.
echo This feature explains how to use the other features.
echo.
pause
echo -----
echo.
echo 0. Close
echo.
echo This feature closes the program
echo.
pause
goto menu

:end
echo Closing in progress.
Logged

Satanas

  • member
  • Offline Offline
  • Posts: 26
Re: Skins Folder Tool updated
« Reply #27 on: February 10, 2023, 06:53:33 AM »

Hi folks
First, sorry for my bad english, it's a Deepl online traduction.

As the updates, reinstallation and download of skins and other campaigns the simulator's skins folder has grown.
With each version, the names of the planes declared in the air.ini files have sometimes evolved, so some skin folders can be missing and others completely obsolete.
So I dug up a little utility I had made with Epervier a few years ago and modified it. On the one hand to make it compatible with B.A.T version 4.2.2+hotfix4 and on the other hand to make it move useless directories into a backup folder.
Normally the utility does not delete anything, but make a backup of Paintschemes\Skins just in case.
2 versions of the batch file are there:
one in _FR for French speakers (my nationality language)
the second in _EN  for English speakers
Explanations of operation and use are in the ReadMe files
Files are on a server that only keeps archives for 1 month. If someone wants to get them back and put them on another server (mediafire for example), no problem.

See you later

Satanas (Solo was my old nickname here).
Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9442
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Skins Folder Tool updated
« Reply #28 on: February 10, 2023, 10:57:31 AM »

Tu peux m'envoyer le prog !
Je le mettrais à la place de cette archive (Create_SkinFolders.zip) dans "mon" Mediafire :
https://www.mediafire.com/folder/xuwc5rxara3av/IL-2_Public
onglet Outils_IL-2
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Satanas

  • member
  • Offline Offline
  • Posts: 26
Re: Skins Folder Tool updated
« Reply #29 on: February 10, 2023, 12:47:58 PM »

Salut copain.
Tu as les liens dans mon post au dessus pour aller récupérer les 2 versions sur le serveur de Free.
Si tu ne peut pas les récuperer, passes moi ton mail en MP (je ne l'ai plus depuis le temps), je t'enverrais ça.
Si tu utilises IES, j'ai aussi une version qui fait le même boulot pour la V3.9 de ce mod. Je pourrais te la passer aussi.
Je l'ai passée a 2 membres du forum pour test et mise a disposition chez les EMS (uniquement en FR pour celle là).
J'ai prévu de bosser sur les versions pour Hsfx703, UP3.4 Cassie et VpModpack, mais je n'en suis qu'au début des adaptations, j'ai pas encore débuté les tests pour ces mods. Le testing, c'est ce qui me prends le plus de temps mais vu que j'ai déjà les versions BAT et IES qui tournent, ce ne devrait pas être trop compliqué.
Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9442
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Skins Folder Tool updated
« Reply #30 on: February 10, 2023, 02:31:12 PM »

Tu as les liens dans mon post au dessus pour aller récupérer les 2 versions sur le serveur de Free.
J'avais oublié mes lorgnons...
J'ai renommé les archives pour que ce soit plus explicite..  ;)


The Satanas archive is also available at these links:
- English
https://www.mediafire.com/file/b6u1yelfxpvlp6k/Create_SkinFolders_EN.zip/file
Explanations of operation and use are in the ReadMe files.


- Français
https://www.mediafire.com/file/0pnhrvb0fckxwh8/Create_SkinFolders_FR.zip/file
Les explications sur le fonctionnement et l'utilisation se trouvent dans les fichiers ReadMe.

Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Satanas

  • member
  • Offline Offline
  • Posts: 26
Re: Skins Folder Tool updated
« Reply #31 on: February 10, 2023, 09:26:30 PM »

Nickel.
Merci bien.
Logged

Satanas

  • member
  • Offline Offline
  • Posts: 26
Re: Skins Folder Tool updated
« Reply #32 on: March 01, 2024, 08:13:19 AM »

As I updated, modified, added, etc. my B.A.T mod, I realized that my skin folder was growing and that some liveries had become obsolete. Similarly, the planes.properties file contained unnecessary lines and some were missing.
I took the batch tool we'd made with Epervier, ran it under Powershell and added a more user-friendly interface, the ability to check the plane.properties and replace the original files with the updated ones.
The script doesn't do everything by itself, so you'll have to edit the plane.properties yourself.
Read the ReadMe.txt for more details.
Nothing is deleted, files or folders are moved to a backup directory or saved before being modified.
There are 4 versions of the script, for W7 and W10/11, in English and French.
The file will be hosted for only one month on the current server, so if anyone wants to retrieve the file and host it on a more permanent medium, no problem, thank you.

The file is Here
Logged

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2238
Re: Skins Folder Tool updated
« Reply #33 on: March 01, 2024, 09:29:53 AM »

Nice tool and thank you  for this. Would it be possible to have a generic version that we can use in IL-2 versions different than BAT?
Logged

Satanas

  • member
  • Offline Offline
  • Posts: 26
Re: Skins Folder Tool updated
« Reply #34 on: March 01, 2024, 10:17:14 AM »

hello Frankiek.
The problem is that each mod has its own architecture.
For some, air.ini and plane.properties are encapsulated in SFS files, others are not encapsulated but in sub-folders not bearing the same name, some activate periods with selctor and others with jsgme, etc....
For each mod, I have to rework the operating routines, adapt and then test them (very time-consuming to get something working with a minimum of bugs).
What's more, I'm not a programmer, I'm learning on my own, so my code is far from clean and optimized.
If you wants the plain-text ps1 file to work on, i can send it in PM. You'll pull your hair out when you'll see how bad where my tricks, but I can provide it.

I currently have 3 tools that work (not sure they're bug-free), one for B.A.T, another for IES and the last one (actually the first one I wrote in Powershell) for Ultraspain.
The only one translated into English is the one for BAT (and yes, I'm French, so I write script texts in my mother tongue).
Again, translation is therefore quite time-consuming for me, as I speak very little English and have to use online translators to be (at least I hope so) well understood by English speakers  ;) :).
Logged

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2238
Re: Skins Folder Tool updated
« Reply #35 on: March 01, 2024, 12:33:46 PM »

If you want  I can help you with translation and adaptation for different IL-2 versions.  I am already doing this for my own consumption and do understand the batch file structure (never practiced Powershell though) and having worked for more than 30 years in a multilingual environment  this part come easy.
Logged
Pages: 1 2 [3] 4   Go Up
 

Page created in 0.121 seconds with 27 queries.