Official Soldat Forums

Soldat Fans => Fan Apps => Topic started by: SyavX on January 23, 2012, 06:10:03 am

Title: ScrCnv (automatic screenshot converter)
Post by: SyavX on January 23, 2012, 06:10:03 am
Scr(http://apps.soldat2d.com/projects/scrcnv/logo/48x48.png)Cnv
Download (#post_Download)

ScrCnv ? is a tool for automatic conversion of Soldat screenshots.

Features:
1 ? for now, ForceF1 feature doesn't work when match ends because of points limit in non-team based game modes (DM, PM & RM).

(http://apps.soldat2d.com/projects/scrcnv/screenshots/v041_1.png)

(http://apps.soldat2d.com/projects/scrcnv/screenshots/v041_2.png)

(http://apps.soldat2d.com/projects/scrcnv/screenshots/v041_3.png)

(http://apps.soldat2d.com/projects/scrcnv/screenshots/v041_4.gif)

Code: (ScrCnv.ini) [Select]
[General]
; Conversion format:
; 0 - PNG, 1 - JPEG, 2 - JPEG 2000
Format = 0
;
; Encoding quality (for JPEG & JPEG 2000 formats only):
; 0 - worst, 10 - maximum
Quality = 10
;
; Image color depth (for PNG format only):
; 8 - 8-bit, 24 - 24-bit
Depth = 8
;
; Apply dithering (for 8-bit PNG format only):
; 0 - disabled, 1 - enabled
Dithering = 0
;
; Delete original screenshots:
; 0 - disabled, 1 - enabled
Delete = 1
;
; Force displaying of scoreboard (F1 menu) at the end of the match:
; 0 - disabled, 1 - enabled
ForceF1 = 1
;
; Log debug messages into ScrCnv.log file:
; 0 - disabled, 1 - enabled
Debug = 0

[SmartDeletion]
; Delete 'endgame' screenshots following the rules described below:
; 0 - disabled, 1 - enabled
Enabled = 1
;
; Time in seconds within which the 'endgame' screenshots will be automatically deleted.
; So, if you don't want to store 'endgame' screens created while early map restarts
; (e.g. first minute of the game), then set value to '60':
Time = 60
;
; A space-separated list of maps, 'endgame' screenshots of which will be automatically deleted
; (e.g. 'HallOfHeroes Lothic'):
Maps =

[SmartRenaming]
; Rename converted screenshots using file name masks and placeholders listed below:
; 0 - disabled, 1 - enabled
Enabled = 1
;
; Placeholders that could be used in rename masks for different game modes:
; %yyyy   - year   number, 4 digits
; %yy     - year   number, 2 digits
; %mm     - month  number with     leading zeros
; %m      - month  number without  leading zeros
; %dd     - day    number with     leading zeros
; %d      - day    number without  leading zeros
; %hh     - hour   number with     leading zeros
; %h      - hour   number without  leading zeros
; %ii     - minute number with     leading zeros
; %i      - minute number without  leading zeros
; %ss     - second number with     leading zeros
; %s      - second number without  leading zeros
; %mmmm   - month         full     localized name
; %mmm    - month         short    localized name
; %ww     - day of week   full     localized name
; %w      - day of week   short    localized name
;
; %map    - map name (e.g. 'ctf_Ash')
; %type   - screenshot type ('endgame' or 'screenshot')
; %mode   - game mode ('DM', 'PM', 'TM', 'CTF', 'RM', 'INF', 'HTF')
; %score1 - score of Team 1 (CTF, HTF, INF & TM modes only)
; %score2 - score of Team 2 (CTF, HTF, INF & TM modes only)
; %score3 - score of Team 3 (TM mode only)
; %score4 - score of Team 4 (TM mode only)
;
; Tip: Use empty string to prevent files from being saved
DM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
PM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
TM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
CTF = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
RM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
INF = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
HTF = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type

This tool is not the first try to make an automated screenshots conversion tool for Soldat (take a look at Soldat Screenshot Converter (http://forums.soldat.pl/index.php?topic=35377.0) by Toumaz), but it has a list of advantages.

Advantages:Install:Uninstall:Compatibility:
Changelog:
+ Added feature | - Removed feature | ~ Fixed feature | % Modified feature | * Comment

Version 0.4.1 [build 759] (15 Jul 2016):
+ Added compatibility to work with Soldat 1.7.1

Version 0.4 [build 757] (06 Feb 2016):
+ Added GUI config
+ Added more placeholders for SmartRenaming feature (see ScrCnv.ini)
- Removed Separate feature (could be done with SmartRenaming now)
% Modified SmartRenaming to create folders structure for custom save paths
% Modified interception method of screenshot files creation (should work faster and more stable now)

Version 0.3 [build 378] (02 Mar 2014):
+ Added Separate feature
+ Added ForceF1 feature
+ Added SmartDeletion feature
+ Added SmartRenaming feature
+ Added Browse, Run, Close functions
+ Added intergated tray menu with Soldat's tray icon
* Code has been rewritten. Next changelogs will use this version as their base

Version 0.2 (09 Feb 2012):
+ Added "Rename converted BMPs" option (adds current map name & scores in CTF/HTF/INF modes)
+ Added "Open 'screens' folder" function

Version 0.1 (23 Jan 2012):
* Initial release


This software is provided "AS-IS", without any express or implied warranty.
In no event shall the author be held liable for any damages arising from the use of this software.


Title: Re: ScrCnv (automatic screenshot converter)
Post by: jrgp on January 23, 2012, 08:13:23 am
Features:
  • "on-the-fly" screenshot conversion, right after they have been created;
I'm liking what you've done here, but I have a question. How does the on the fly screenshot detector work? Something similar to inotify (http://en.wikipedia.org/wiki/Inotify) on Windows?[/list]
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on January 23, 2012, 08:28:07 am
It's hard for me to compare a way it works in Linux, but it looks similar:
FindFirstChangeNotification (http://msdn.microsoft.com/en-us/library/windows/desktop/aa364417%28v=vs.85%29.aspx) and/or ReadDirectoryChangesW (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: machina on January 23, 2012, 02:27:57 pm
Nice, but didn't Toumaz do the same thing long time ago? Why is that one app better?
Title: Re: ScrCnv (automatic screenshot converter)
Post by: Dusty on January 23, 2012, 03:04:32 pm
Nice, but didn't Toumaz do the same thing long time ago? Why is that one app better?

 :-\ is this what the community has become?

This tool is not the first try to make an automated screenshots conversion tool for Soldat (take a look at Soldat Screenshot Converter (http://forums.soldat.pl/index.php?topic=35377.0) by Toumaz), but it has a list of advantages.

Advantages:
  • no need to rename Soldat.exe;
  • doesn't require administrator permissions;
  • no need of  .Net Framework;
  • recent screenshots lost (overwriting) issue has been bypassed (that's why there are temporary BMPs)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: machina on January 24, 2012, 09:28:23 am
Okay, fine logo so it's cooler than Toumaz's converter!
Title: Re: ScrCnv (automatic screenshot converter)
Post by: Prodigyx on January 24, 2012, 10:25:59 am
Good job, man!

I loved the features and advantages  :)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: Vv00t-SN on January 24, 2012, 02:32:23 pm
Okay, fine logo so it's cooler than Toumaz's converter!

youre pretty much immune to any reading whatsoever, are you then?
Title: Re: ScrCnv (automatic screenshot converter)
Post by: Prodigyx on February 01, 2012, 10:01:37 am
Why converted image has black borders?

http://img845.imageshack.us/img845/1420/screenshot12012606.png
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on February 01, 2012, 03:02:00 pm
I have no idea why this has happened.
1. Is this a single converted file with such black bars or there are others?
2. If there are other corrupted files, were they converted in PNG format too?
3. Could you provide me the original BMP(s)?
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on February 09, 2012, 03:50:02 pm
Version 0.2 (09 Feb 2012):
+ Added "Rename converted BMPs" option (adds current map name & scores for CTF/HTF/INF modes)1
+ Added "Open 'screens' folder" function

1 ? works for Soldat 1.6.2 only


See first post for the download link... (http://forums.soldat.pl/index.php?topic=41620.msg503294#msg503294)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: Thomas on February 09, 2012, 04:51:49 pm
It's hard for me to compare a way it works in Linux, but it looks similar:
FindFirstChangeNotification (http://msdn.microsoft.com/en-us/library/windows/desktop/aa364417%28v=vs.85%29.aspx) and/or ReadDirectoryChangesW (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx)
That's about what inotify does. Too bad it doesn't work on windows (I'd need it for a dropbox-clone)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: Illuminatus on February 10, 2012, 12:58:39 pm
+ Added "Rename converted BMPs" option (adds current map name & scores for CTF/HTF/INF modes)
Awesomeness! :D
Title: Re: ScrCnv (automatic screenshot converter)
Post by: machina on February 10, 2012, 01:46:58 pm
+ Added "Rename converted BMPs" option (adds current map name & scores for CTF/HTF/INF modes)
Wow, exactly it's very useful...
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on March 02, 2014, 03:26:29 pm
Version 0.3 [build 378] (02 Mar 2014):
+ Added Separate feature
+ Added ForceF1 feature
+ Added SmartDeletion feature
+ Added SmartRenaming feature
+ Added Browse, Run, Close functions
+ Added intergated tray menu with Soldat's tray icon
* Code has been rewritten. Next changelogs will use this version as their base


See first post for the download link... (http://forums.soldat.pl/index.php?topic=41620.msg503294#msg503294)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: nosejj on March 02, 2014, 07:05:52 pm
SmartDeletion - Amazing job! NICE!

Where exactly do I feel the line for custom smart-renaming?
I want to use: %dd-%mm%yyyy (%hh-%ii) - %map - Score %score1 - %score2 .


If you could add an option to make the program have the photos spreaded in folders, each date has it's own folder. That would be super!
Or generally the ability to spread the photos through folders, whether it's by server/gamemode/date/whatever. this way people can make it whatever's comfy for them.
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on March 04, 2014, 02:19:00 pm
Where exactly do I feel the line for custom smart-renaming?
See [SmartRenaming] section in ScrCnv.ini file.
All of possible settings with full descriptions are available there too.



If you could add an option to make the program have the photos spreaded in folders, each date has it's own folder. That would be super!
Or generally the ability to spread the photos through folders, whether it's by server/gamemode/date/whatever. this way people can make it whatever's comfy for them.

I've send you a PM (via forums and later in IRC) more than a week ago about your mod-pack (http://forums.soldat.pl/index.php?topic=43011.0) (you included only ScrCnv's settings file instead of it's main .dll file) and provided you a link to an alpha version of ScrCnv v0.3 to test it's new features, since you were suggesting (http://forums.soldat.pl/index.php?topic=43009.0) something similar in the past. But I had no response from you...

I'm not sure is it worth bothering with changing/adding more features, as there is not much activity in here.
Title: Re: ScrCnv (automatic screenshot converter)
Post by: nosejj on January 28, 2015, 08:58:35 am
Hmm, yeah, I'll update it now.

One more suggestion, currently it's able to insert images into folders of different game modes. what about a folder for each month and in it each date? (x:\soldat\screens\january\1st\)

Come to think of it also, it'd be great to have a similar tool for demos, as in cut demos which are shorter than x:xx, etc.
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on February 02, 2015, 05:46:13 pm
Hmm, yeah, I'll update it now.
ScrCnv v0.3 isn't compatible with current game version (1.6.8). Soldat won't load it automatically, and even if it was loaded, some functions won't work. Don't forget that this tool is a hack (a good one, but still it is) and should be used with compatible game version(s).


One more suggestion, currently it's able to insert images into folders of different game modes. what about a folder for each month and in it each date? (x:\soldat\screens\january\1st\)

I've added more date placeholders. Here is a documentation from current dev version:
%yyyy   - year   number, 4 digits
%yy     - year   number, 2 digits
%mm     - month  number with     leading zeros
%m      - month  number without  leading zeros
%dd     - day    number with     leading zeros
%d      - day    number without  leading zeros
%hh     - hour   number with     leading zeros
%h      - hour   number without  leading zeros
%ii     - minute number with     leading zeros
%i      - minute number without  leading zeros
%ss     - second number with     leading zeros
%s      - second number without  leading zeros
%mmmm   - month  full  localized name
%mmm    - month  short localized name
%ww     - day    full  localized name
%w      - day    short localized name



Come to think of it also, it'd be great to have a similar tool for demos, as in cut demos which are shorter than x:xx, etc.
Yeah, something similar has been already suggested by ool years ago. But I was postponing implementation of this feature again and again, because I wasn't satisfied with a way ScrCnv worked with screenshots...

And for this reason I've tried to rewrite it again. It works great except of instability and periodic Soldat crashes :D
Title: Re: ScrCnv (automatic screenshot converter)
Post by: jrgp on February 02, 2015, 11:15:56 pm
ScrCnv v0.3 isn't compatible with current game version (1.6.8). Soldat won't load it automatically, and even if it was loaded, some functions won't work. Don't forget that this tool is a hack (a good one, but still it is) and should be used with compatible game version(s).

You gonna rewrite it to add compatibility to 1.6.8 then? And I'm guessing SXS.DLL is the name of a generic library that Soldat automatically tries to load if its present, which is how you get around having to rename soldat.exe etc?
Title: Re: ScrCnv (automatic screenshot converter)
Post by: nosejj on February 03, 2015, 10:54:59 am
Yeah man, I just noticed the other day that v0.3 doesn't work. should I use an older version? :o
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on February 03, 2015, 04:07:13 pm
... which is how you get around having to rename soldat.exe etc?
Yes.

You gonna rewrite it to add compatibility to 1.6.8 then?
As I said, in addition to updating memory addresses and using a new DLL name I've rewritten a code and tried a new interception method of screenshot files creation.
Unfortunately, in some cases it made app to crash. I need to find a way to make it stable before releasing a new version that will be compatible with 1.6.8.

Yeah man, I just noticed the other day that v0.3 doesn't work. should I use an older version? :o
Older version is incompatible too, for the same reason. Wait for an updated one.
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on November 10, 2015, 06:43:38 pm
Since there is an alpha version (http://forums.soldat.pl/index.php?topic=44043.60) of 1.7.0 around, you can test an alpha version of ScrCnv for alpha version of Soldat!
(http://matthieu-totet.fr/Koumin/wp-content/uploads/2015/07/1386271588578.jpg)

New advantages:

+ Added GUI config
+ Added more placeholders for SmartRenaming feature (see ScrCnv.ini)
- Removed Separate feature (could be done with SmartRenaming now)
% Modified SmartRenaming to create folders structure for custom save paths

Install:Uninstall:This software is provided "AS-IS", without any express or implied warranty.
In no event shall the author be held liable for any damages arising from the use of this software.


Have fun.

UPDATE: attachment has been deleted, check newer version in the message below.
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on November 15, 2015, 06:00:24 pm
Since there a new 1.7.0 alpha 2 (http://forums.soldat.pl/index.php?topic=44055.0) with more fixes and a new feature:
Quote
- Modified screenshots to be saved as png instead of bmp
You can test a new alpha version of ScrCnv!

(http://i.imgur.com/8HuBbNm.jpg)


Features and advantages:

This version is compatible with Soldat 1.7.0 alpha 2 only

UPDATE: attachment has been deleted, check newer version in the message below.
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on February 05, 2016, 07:09:55 pm
Version 0.4 [build 757] (06 Feb 2016):
+ Added GUI config
+ Added more placeholders for SmartRenaming feature (see ScrCnv.ini)
- Removed Separate feature (could be done with SmartRenaming now)
% Modified SmartRenaming to create folders structure for custom save paths
% Modified interception method of screenshot files creation (should work faster and more stable now)


See first post for the download link... (http://forums.soldat.pl/index.php?topic=41620.msg503294#msg503294)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on July 14, 2016, 04:18:39 pm
Version 0.4.1 [build 759] (15 Jul 2016):
+ Added compatibility to work with Soldat 1.7.1


See first post for the download link... (http://forums.soldat.pl/index.php?topic=41620.msg503294#msg503294)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: nosejj on July 14, 2016, 08:28:30 pm
Hey, thanks for the update eventually!
Any chance to see this smart deletion and smart naming for demos?
:)
Title: Re: ScrCnv (automatic screenshot converter)
Post by: SyavX on July 22, 2016, 03:47:32 pm
Thanks for your interest, but since there is only one person (hey-hey, it's nosejj :D) who is interested in such a tool (for screens and/or demos), I have a doubt it will ever be updated...
Title: Re: ScrCnv (automatic screenshot converter)
Post by: nosejj on July 23, 2016, 03:32:27 am
Well, alrighty then. :(

I think this is the greatest converter tool ever-made, and seeing as the moment there's been no alternative for the last ~4y and changes of this sort haven't got into the game itself, that's why I asked. :P