Author Topic: MODULE: A.S.S - Another Savegames with Screenshots module [updated to v1.5]  (Read 16451 times)

Hey great job !

I was wondering if it is possible to add DATE and TIME to be SAVED with the name too ?



Also i found i bug, if you press F5 over and over again, it captures screen with SAVE gui and it makes some strange effect in the saved screen. Easy fixable thou.

hedgefield

  • Oh snap!
    • hedgefield worked on one or more games that won an AGS Award!
    •  
    • hedgefield worked on one or more games that was nominated for an AGS Award!
Your wish is my command! I updated the module to fix that bug (good looking out), and added support for saving the date and time the savegame was made.
It is currently formatted as savegame name - dd/mm/yyyy hh:mm, but you can modify that if you want. The code is under the btnSaveOK_OnClick section in ASScode.txt. You may also want to resize the GUI first if you're going to use that feature since it's currently not wide enough to contain all those numbers ;)

To activate the feature, put SL_DATETIME = true; in your gamestart function. See first post for the updated download link.

Holy ravioli - that was fast !
BIG THANKS !!!

Hi

My AGS 3.2.0 will not import gSave.guf and gLoad.guf.. says property locked and says it may require later version... and with 3.1.2

steptoe
« Last Edit: 11 Nov 2011, 17:36 by steptoe »
It's not over until the fat lady sings..

hedgefield

  • Oh snap!
    • hedgefield worked on one or more games that won an AGS Award!
    •  
    • hedgefield worked on one or more games that was nominated for an AGS Award!
I don't think I've ever seen version 3.2.0.. or did you mean 3.0.2? But it could be that older versions of AGS have a problem with newly exported GUIs. I use 3.2.1, is it possible for you to upgrade to that? It would probably fix your problem.

Hi

I changed over computer that had both the above AGS versions... Have now downloaded 3.2.1 and it now imports..

 :=
It's not over until the fat lady sings..

I was wondering if it was possible to change the size of the snapshot image that is created on the gui?
I resized it and looked though the code but did not see an a place to do that.

Also would it be possible to instead of text with the name of the game on the load menu
to have multiple screen shots and limit the amount of saves? I know you can limit
the amount of saves seen that in code but what about the multiple screen shot
on one load gui?

Thanks

hedgefield

  • Oh snap!
    • hedgefield worked on one or more games that won an AGS Award!
    •  
    • hedgefield worked on one or more games that was nominated for an AGS Award!
Hi James, you mean you resized the screenshot button on the GUI but the image is still small? If you go into ASS.asc, at the top you should see two variables, SL_WIDTH and SL_HEIGHT. This is the size of the screenshot. Just change them to the new dimensions of the button. It doesn't have to be a proper resolution like 320x240 but just make sure to keep the aspect ratio the same (4:3) or the screenshot might stretch.

If you go even higher than 320x240, you might also want to scroll down to the game_start section in ASS.asc and increase the values for game.screenshot_width & game.screenshot_height. This is the resolution of the screenshot saved in the savegame, not the size at which it is rendered on the GUI.

As for the screenshots grid, it could certainly be done. I remember making one a long time ago, but I don't remember exactly how to do it. I suppose it would involve loading all the screenshots for the savegames at once instead of waiting on one to be selected from the list.

And if you want to cap the total number of saveslots, look in the btnSaveOK_OnClick function in your globalscript for the line
if (totalsaves < 50) {
and change 50 to whichever number of saveslots you want.

How silly of me.

I went and looked in the scripting I copied and pasted into the main global file but forgot about the entire script file I imported.
that explains why I couldnt find what I was looking for. God don't you hate it when you do stupid stuff like that lol.

thanks for the help think ill be able to get it now.

It Works! Thanks!
_______________________________________ ____________________

Hi, sorry to bother you. I don't know how but I've used your module to break my game ???

I installed it exactly as it says in the readme, but didn't delete the default save menu if that makes a difference. I ran the debug and saved/loaded to try it out, which worked, but then the game crashed when I quit using the in-game quit button that had always worked before.

Things got worse when I tried to compile and then run from the game setup - it crashes on restoring a save with a fatal exception:
Quote from: ags
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0041DBD1 ; program pointer is +2051, ACI version 3.3.0.1162, gtags (6,3)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

I deleted the default save menus hoping that would help, no dice.

After this I tried completely deleting the module, GUIs, global script section and adding the originals menus in, but I then get errors similar to these:


Any help would be much appreciated, otherwise my last backup was annoyingly long ago, I'll have to redo quite a lot.

hedgefield

  • Oh snap!
    • hedgefield worked on one or more games that won an AGS Award!
    •  
    • hedgefield worked on one or more games that was nominated for an AGS Award!
Oof that sounds gnarly!

The only thing I can think of right now is that you didn't specify the right sprite slot for the screenshot preview and now it's trying to delete a sprite that doesn't exist. But if you removed those bits of code I don't know why it would still throw that error. What does line 342 say?

Other than that maybe something changed in the saving system since 3.1.2, I haven't really used AGS since then, at least not with this plugin, so could be that something in the code has been deprecated.

Oof that sounds gnarly!

The only thing I can think of right now is that you didn't specify the right sprite slot for the screenshot preview and now it's trying to delete a sprite that doesn't exist. But if you removed those bits of code I don't know why it would still throw that error. What does line 342 say?

Other than that maybe something changed in the saving system since 3.1.2, I haven't really used AGS since then, at least not with this plugin, so could be that something in the code has been deprecated.

Yeah my hopes are not high, I did remove everything completely but it still generated the errors x.x
Line 342 is actually just the 'quitgame' line in this:

Code: Adventure Game Studio
  1. function btnQuit_OnClick(GUIControl *control, MouseButton button)
  2. {
  3.   gPanel.Visible = false;
  4.   Wait(1);
  5.   QuitGame(1);
  6.   gPanel.Visible = true;
  7.   gIconbar.Visible = false;
  8.   mouse.UseModeGraphic(eModePointer);
  9. }
  10.  

It crashed when I tried to quit after restoring a save... yep. Thanks for the help by the way! Not your fault I wasn't smart enough to back up :)

Edit: I should add that I actually tried creating a sprite 195 (which was the next number in line for my sprite numbers). The next time I tried the error just read 196, and so on. I guess its trying to delete the sprite created as the screenshot?
« Last Edit: 13 Sep 2014, 11:44 by formica »

hedgefield

  • Oh snap!
    • hedgefield worked on one or more games that won an AGS Award!
    •  
    • hedgefield worked on one or more games that was nominated for an AGS Award!
Oh that's weird. The screenshot sprite should be referencing a fixed sprite number, so I don't know why the game keeps looking for the last number in the sequence + 1...

Looks like the Quit game function is cleaning up the sprites and causing the errors you're seeing, but why that is I don't dare say. Sorry I can't be more helpful! :undecided: Maybe some other sourcecode whizz knows why this would be happening but if you removed all traces of this module I don't see why it would still be throwing errors.

Best of luck anyway!

No worries, thanks for trying:P

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Formica I'm not sure how familiar you are with AGS, but I smell something fishy with the way you (or the module) manages sprites.

Apparently AGS crashes at "quitgame" time because there is still a sprite floating around, and that's usually the sign of a DynamicSprite not properly deleted, or deleted too early! It should be automated, but I suggest you try calling ".Delete()" on every DynamicSprite you created manually in your script.

Are you sure you removed everything from the module? For example, are you sure you also removed the function in charge of deleting the snapshot sprite? Maybe it's still there, trying to delete it when it doesn't actually exist anymore.
 

@Monsieur OUXX

This sounds like another occurance of this bug:
http://www.adventuregamestudio.co.uk/forums/index.php?issue=362.0
http://www.adventuregamestudio.co.uk/forums/index.php?topic=47064.0
But I guess you may know this already.

I think it is possible to fix by cleaning up everything before calling QuitGame; problem is, however, that this won't work if player closed the game window by clicking on X button, or hit "Alt + X".

The AGS is clearly lacking "on_exit" event handler...
« Last Edit: 15 Oct 2014, 00:25 by Crimson Wizard »

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
This sounds like another occurance of this bug: (...)

The AGS is clearly lacking "on_exit" event handler...

Thanks for the info! I never had that issue :) Probably it's because I'm old school and always click on my own internal "quit" button ;) Old reflexes from Windows 3.11 ;)
If I didn't know you and other C++ wizards are so busy already (and even officially retired ;) ), I'd say: "Let's add that event to The AGS!" :D
 

If I didn't know you and other C++ wizards are so busy already (and even officially retired ;) ), I'd say: "Let's add that event to The AGS!" :D
Actually I was thinking about adding it myself. This should not be too hard to do... or so I hope.

Hey! Sorry it took me forever to reply to this. I know very little about AGS so I can't say, but I did scour the code and remove everything so I guess it is the problem Crimson Wizard is talking about? I ended up rolling back, which wasn't as bad as I thought it would be at all. Out of curiousity I tried the module again, and this time got it working completely fine on the same game, though I'm sure my bad quitting habits persist.

Thanks hedgefield for the cool module!