Outpost Universe Forums

Projects & Development => Projects => Other Projects => Topic started by: TH300 on November 06, 2010, 06:30:43 PM

Title: Screenshot Utility 2
Post by: TH300 on November 06, 2010, 06:30:43 PM
Know the moments when you play Outpost2 and think "this scene is so amazing, I'd like to share it with the whole community" and in the next moment the scene has changed? Or maybe you just want to show off your uber armies pwning the retarded ai? Or you want to promote your new mission? Taking screenshots can be a pain if you don't have the right tool. For this reason I made the Screenshot Utility 2 (in reference to the program I posted years ago). Screenshot Utility 2 is a mere mod for Outpost2 that can be loaded automatically and will create a screenshot with only one key pressed.

You can either download the compiled dll here (http://th300.outpostuniverse.net/files/SSUtil2-20120415.zip) or download the source files from svn or git (git outdated).

And here is how to use it (excerpt from the README file):

Installing

Make sure, you have Outpost2-1.3.5Beta2 installed.
In your Outpost2 directory create a new subdirectory called "SSUtil2". Copy "SSUtil2.dll" to it or create a link. In Outpost2.ini add the following at the bottom:
-----
[SSUtil2]
Dll="SSUtil2\SSUtil2.dll"
-----
and change the LoadAddons value in [Game] to something like LoadAddons="... SSUtil2".


How to use

In an Outpost2 game just press "s" (changed to "PRINT SCREEN" in all current releases) and the current screen will be saved to a file in the "screenshots" subdirectory of the Outpost2 installation directory.
(In r841 this will only work if the chat-line is not active. The current version doesn't have this limitation)

IMPORTANT: If your keyboard doesn't have the "PRINT SCREEN" key and  ssutil2 doesn't work for you, configure a different key.
Title: Screenshot Utility 2
Post by: Flashy on November 06, 2010, 06:36:32 PM
Thanks, it will help me a lot. It doesn't disturb mulitplayer games if you're the only one using it, right?
Title: Screenshot Utility 2
Post by: TH300 on November 06, 2010, 06:53:30 PM
It only hooks into Outpost2's user interface. Thus I am confident, that none of the gameplay elements will be effected. All it could do is cause some lag when taking a screenshot. This is because the screen has to be copied to a buffer and the game loop is blocked while this is happening. But this doesn't take long and compression/saving of the image is done in a separate thread.

But still, if you encounter problems in that direction, let me know.
Title: Screenshot Utility 2
Post by: Flashy on November 19, 2010, 06:35:36 PM
When I tryed to open the Storage (garage) using the hotkey, it was blocked by the screenshot key.
Title: Screenshot Utility 2
Post by: Arklon on November 19, 2010, 09:21:55 PM
Yeah, why not use good ol' Print Screen or F12 like a lot of games with built-in screenshot functionality do?
Title: Screenshot Utility 2
Post by: CK9 on November 20, 2010, 01:53:27 AM
might want to refrwsh yourself on the hotkey list, lol
Title: Screenshot Utility 2
Post by: Sirbomber on November 20, 2010, 09:25:41 AM
Have it use F13.  :P  
Title: Screenshot Utility 2
Post by: CK9 on November 20, 2010, 01:38:29 PM
no, Alt+F4

lol, I wonder how many people fall for that per day...
Title: Screenshot Utility 2
Post by: TH300 on November 21, 2010, 10:47:33 PM
Alright, I understand the issue and I'm going to fix it. That could just take some time, because I got other things to do. Two weeks probably.
Title: Screenshot Utility 2
Post by: BlackBox on November 22, 2010, 05:34:57 PM
Even more ideally allowing the user to bind it to any key/scancode of their choice would be nice (even if it's through having to specify the raw scancode of the given key in a config file or similar, that is better than something being hardcoded).
Title: Screenshot Utility 2
Post by: TH300 on December 04, 2010, 06:04:23 AM
Quote
Even more ideally allowing the user to bind it to any key/scancode of their choice would be nice (even if it's through having to specify the raw scancode of the given key in a config file or similar, that is better than something being hardcoded).
I agree with you. Hardcoding something is always bad, but also simpler. Now, I added an Outpost2.ini option for changing the key and changed the default to PRINT SCREEN. This shouldn't conflict with anything else in Outpost2.

The option is documented in the README file among all other options.

If you want anything else de-hardcoded, let me know.
Title: Screenshot Utility 2
Post by: TH300 on October 06, 2011, 05:35:48 PM
A new release is there with improvements and new features:The info that is saved to a file includes:
Title: Screenshot Utility 2
Post by: Hooman on October 06, 2011, 11:03:57 PM
Hmm, nice update. Good idea to save that extra information.
 
Title: Screenshot Utility 2
Post by: TH300 on October 08, 2011, 01:34:11 AM
There seems to be a bug either in SSUtil2 or in Outpost2 that may prevent the mod from being loaded. Spikerocks reported that to me and I wasn't able to resolve this issue. I'd appreciate if people could test the mod and tell me if it works for them.

Spike added the lines to outpost2.ini as I described it and as it worked for me. When he starts Outpost2 there is no error message (which would appear, for example, if the path to the dll was wrong). But the mod isn't actually working and when he starts op2 from the cmd prompt the debug output that ought to be there (stdout), even if initialization of the mod failed, isn't actually there.

Maybe Hooman (or someone else with a deeper understanding of how the mod loader works) can help?
Title: Screenshot Utility 2
Post by: Hooman on October 08, 2011, 03:07:46 AM
My first thought is maybe a different copy of the game is being run than the add-on was installed for.

My second thought is case sensitivity for the strings in the ini file. It's been a while, so I don't remember if those strings are actually case sensitive, but that does tend to be the default behavior, and I doubt I would have changed it. In particular, the LoadAddons string seems like a likely culprit.

Edit: And a third thought, is the game must be of a new enough version to support the module loading. Putting those settings in an ini file won't do anything if the game code doesn't go looking for them. I would imagine most people are using the most recent version from the website, so this probably isn't the issue.
 
Title: Screenshot Utility 2
Post by: Drakur on February 11, 2012, 02:02:42 AM
I know that this thread is a few months old, but I was trying out the screenie program and had the same problem described above.  It didn't seem to want to run.  I tried running from the command prompt using the /loadmod option (used for Netfix in previous iterations) and it actually crashed the program before it could fully open.

I was wondering if it was an OS issue?

Edit: Tried it on a Windows 2k Virtual Machine I have...still no dice.  It doesn't crash, but it doesn't run either.  And I have the cases matched specifically in the LoadAddons string as well as the entry added telling the game where the DLL is.
Title: Screenshot Utility 2
Post by: TH300 on March 04, 2012, 09:13:21 PM
Thanks for the bug report. I am currently lacking the time to fix this issue. I don't even know what causes it. If you want to help me fix it, you should come on xmpp when both of us have some time. (in about two weeks should fit)
Title: Screenshot Utility 2
Post by: TH300 on April 15, 2012, 06:22:04 PM
I made a new version which writes a log file to the Outpost 2 directory.

I also committed everything to svn which is now up to date again.