MODULE: GameSetup v1.00 - Modify game setup in-game.

Started by SSH, Fri 27/03/2009 12:36:57

Previous topic - Next topic

SSH

Ever wanted to change from full-screen to windowed or 2x filter to 3x filter in-game? Well, now you can with GameSetup!

There are two components: a module which you include in your AGS project and call its functions in order to manipulate the settings and a VBScript file which you run instead of your game exe in your final game that you distribute. The VBScript allows the AGS game to quit, restart with the new settings and restore the game to where it was before.

Download the module, VBScript and an example game
Read the module's documentation
12

monkey0506

This is really good. I have a question though. I've never worked with VBScript, but does Windows require it to have the VBS extension to recognize the file? If not, could the file be named as an EXE to mask what it really is and then the actual EXE renamed as well?

I was just thinking it might be confusing for the end-user having to use the VBS instead of the EXE. Sure you could put it in the documentation, but who the heck reads that anyway? :=

Another possibility would be that if there's a way for the game to tell if it was run from the VBS or not the game author could just disable the functionality with an in-game message that "You must run the runAGSgame.vbs file to use these features!"

All in all this is great. One other question: How does the module handle RunAGSGame? Is there any possibility the module could be fed specific parameters to modify the acsetup.cfg and then instead of reloading this game, load a different game?

GarageGothic

#2
Great work, SSH - it's always annoyed me that RunAGSGame didn't re-initialize the viewport (the problem I ran into when trying to create similar in-game options), but as always you've found a workaround.

monkey: Without having tested it, I'm guessing you could use a Vbs to Exe converter. The question is whether or not the script is able execute files that don't have the .exe extension. If so, you could rename your game .exe to .dat or similar and the converted vbs would be the main executable.

Now, all we need to complete the package is a fully customizable configuration utility to replace winsetup.exe, with the additional option of writing custom keys to the .cfg file

Shane 'ProgZmax' Stevens

#3
If I'm reading this right, SSH, your example game doesn't work.  I tried resizing both ways (to and from fullscreen) and when I click okay it just shuts down the game completely.  The next time I opened it it was in the proper mode, but I really can't see the point of this if it doesn't actually change AGS's screen mode behavior?  I notice it creates a restart.tmp file which seems to have a pretty obvious purpose, but the engine doesn't actually restart for me.  There are some other issues I didn't think you could work around yet, either, like how AGS saves the window/fullscreen data as part of the savegame and you can't switch between one or the other without invalidating the save.  I can see the windowed scaling modes working, though, since you could just save the game state, change winsetup, then close and re-launch the game and reload that save (which I'm assuming is what you're doing here).

SSH

Did you launch the game by running the VBS, Progz? Or the exe?

As far as invalid savegames, I think that now that the 320/640 mode switch no longer exists and its just filters, then the savegame is compatible between them
12

Dualnames

Quote from: SSH on Fri 27/03/2009 12:36:57
Ever wanted to change from full-screen to windowed or 2x filter to 3x filter in-game? Well, now you can with GameSetup!

There are two components: a module which you include in your AGS project and call its functions in order to manipulate the settings and a VBScript file which you run instead of your game exe in your final game that you distribute. The VBScript allows the AGS game to quit, restart with the new settings and restore the game to where it was before.

Download the module, VBScript and an example game
Read the module's documentation


Marry me..  :), man this stuff is superb!!, now wondering (I've only worked on windows), but will using this stuff make the game unavailable to linux and mac? Or they will just not have that option(to change from full screen to windowed)?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk