Page 3 of 4

PostPosted: Fri Jun 05, 2009 3:22 pm
by Imari
Yes, don't blame Lyberodggy for the thumbnail system. I added the thumbnails system. Everything that Lyberodggy made actually worked. :P

PostPosted: Fri Jun 05, 2009 6:19 pm
by mercedes
Another thing u may, or may not want to try;
This is an interface I had in mind~ It would consist of only 2 Frames--Main Frame and Thumbnail Frame~

When exiting the game, the user would be taken to the MAIN frame-There would have to be an EXIT on each frame or MAIN MENU. Only 1, where you could save-data/inventory ect--on Exit

The Main frame where you see;

LOAD--Would take u to thumbnail frame where user can choose the latest thumbnail/frame.--Up pops a box--one you draw.
On it;
Do you wish to Load the game? Cancel and OK--All actions go here.
Therefore each thumbnail would only load that frame--

SAVE--Only here could the user save his game. He would physically have to press this..A box would come up--One that is drawn--
On it;
Do u wish to save? OK--From this point when they left the frame they left hitting EXIT--it would save it here too.
Also, when they hit OK, it could take them back to MainFrame to Exit--or the Thumbnail frame, so it would recall just that frame--in the OK button. It would have an EXIT button on this frame too..

The thumbnail would have to be saved as well, therefore its present when they start game again.
All other thumbnails would be invisible.

RESUME--This would only be used for going back to the last visited, in other words, only with a PAUSE button on each frame.

EXIT--This would physically exit the game--No option to LOAD nor SAVE.

I hope this makes sense..:?

In my mind it sounded a bit simpler..yet i think it could be effective..I must have said thumbnail 700 times..and i'm not sure, but i feel like I'm forgetting something..
What do u guys think...?

Keeping in mind, I'm not totally sure, what all transpired.. in this thread..

PostPosted: Fri Jun 05, 2009 7:39 pm
by juhuwoorps
if you have a custom inventory, it would be easy to create a save-point.
you just have to save the variables. this could be a save to resume, as Mercedes said.
but save points?...
it would be nice if reneuend could post a tutorial how to use ini-files!
perhaps we find together an easy way to built a custom save/load system :)

PostPosted: Sat Jun 06, 2009 2:31 am
by reneuend
I'm offsite, but when I get back home on Monday, I'll explain how it works...if Lyberodoggy doesn't beat me to it!

PostPosted: Sat Jun 06, 2009 9:49 am
by Lyberodoggy
Ok, here it goes :P
You have mainly two commands:


From here, there's a new concept of the technique that is used in the first page of this post
So, all you have to do is create a procedure that saves everything you need to load a game into this INI.

So, first of all you save the frame
instead of picking up an index for the frame, we 'll pick up an index for our saved game. Let's say it's saved game no.1, the index will be 1
in the first row let's store the frame

Code: Select all
Action.WriteINI "savedgames.ini",savedgameindex,1,frametosave

Now for the items (default inventory):
Code: Select all
For Each X in InventoryItemObject
Action.WriteINI "savedgames.ini",savedgameindex,2,I
For counter=1 to I
Action.WriteINI "savedgames.ini",savedgameindex,counter+2,ItemArray(counter)

And finally for vars:
Code: Select all
Action.WriteINI "savedgames.ini",savedgameindex,counter+3,WindowObject.Variables.Count
For i = 1 To WindowObject.Variables.Count
Action.WriteINI "savedgames.ini",savedgameindex,counter+3+i,WindowObject.Variables.Item(i).Name+" "+cstr(WindowObject.Variables.Item(i).Value)
Action.WriteINI "savedgames.ini",savedgameindex,counter+4+WindowObject.Variables.Count,WindowObject.VariablesVariant.Count
For i = 1 To WindowObject.VariablesVariant.Count
Action.WriteINI "savedgames.ini",savedgameindex,counter+4+WindowObject.Variables.Count+i,WindowObject.VariablesVariant.Item(i).Name+" "+WindowObject.VariablesVariant.Item(i).Value

Well that's for saving. The loading code is easily figured out. For items, variables and variants you first read how many of them exist, then create a for loop to retrieve them

PostPosted: Tue Jun 09, 2009 10:48 pm
by reneuend
I just wanted yall to know that I haven't given up on this. Actually, I'm almost finished with the first draft. I just have ONE issue to iron out and seems simple, but I can't find the problem: The Integer variables aren't getting populated on the Load option. :?

I built this so you can have unlimited Saved Games.

To Do:
-Add Game Deletion
-Add inputbox for Caption (optional)
-Allow option for Auto-Saves
(would be a plugin option on the frame properties)

PostPosted: Wed Jun 10, 2009 5:07 am
by reneuend
I can't find the issue with the ReadINI and the integers. I've loaded my project code, plugin file, and OCX file in one ZIP file.

The subroutine to look at is in the plugin: AM_LoadGameHotspot()

A sample INI file looks like this:
1=Page 1
1=The Forest

Thanks for anyone willing to look a this! :)

PostPosted: Wed Jun 10, 2009 9:28 am
by Lyberodoggy
Lyberodoggy wrote:To load integer variables from the string variables that are delimited in the INI you need to use ConvertToNumber

I saw you had it... well your mistake is this: You didn't split the text with the delimeter inside the INI.

Code: Select all
    For i = 1 To WindowObject.Variables.Count
      WindowObject.Variables.Item(i).Value= ConvertToNumber(IntArray(1))
      MsgBox "Int = " & WindowObject.Variables.Item(i).Value   

I 'd also strongly recommend that you removed the gamecount variable and stored it only in an INI because, each time a game is loaded, if it's not the newest one it's gonna cause the game to see less saved games (because of the stored gamecount var being lower in older files)

PostPosted: Wed Jun 10, 2009 1:06 pm
by reneuend
Thanks Lyberodoggy! :)

The gamecount is just the number of savedgame files. Along with several other vars, this doesn't need to be in the INI at all, so when I get this working, I'm going to exclude it.

(edit) It's working!!! Lyberodoggy saved me again! 8)

:?: Who is willing to do some testing for me?

Once I clean up the code and it passes testing, then I will add the other planned features.

PostPosted: Wed Jun 10, 2009 3:53 pm
by juhuwoorps
I'm willed to test it for you!

PostPosted: Wed Jun 10, 2009 4:12 pm
by reneuend
Thanks juhuwoorps! :)

I'm finishing up the code now and will PM you with a link to the package when I have it finished.

If anyone else is interested in testing, just let me know!

PostPosted: Fri Jun 12, 2009 2:32 pm
by Imari
So many improvments to AM all at once! Whoo-hoo!!

I'd love to test it, reneuend, but I can't do it until after this weekend, sorry.

PostPosted: Fri Jun 12, 2009 3:01 pm
by ShadowHunter
Hi Reneuned,

Sign me up... I'm looking forward to try it :wink:

With best regards,


PostPosted: Fri Jun 12, 2009 4:16 pm
by reneuend
I'm probably going to release the first version of this plugin soon. I have all the fixes finished from 2 of 3 testers that have responded. The only thing that I really lack is a good demo to go with the plugin. I'll try to release it in the next few days.

The 'Breath' project is starting to pick up, so I need to redirect my time to them. Also, I have my 'Shayne' project to get back too! And a few other promises I've made to people. :)

(edit) I wrote up a script for a demo this evening. I'll spend this week building a small demo and get this plugin released at the end of the month...because I know yall are dying to use it! :)

(edit) I've been working really hard on the demo for this. It's taking me so long because I am playing with Anim Studio Debut 6. I think it's going to be a pretty funny least that's what I'm aiming for. Give me another week or 2! Pleeeeease!

This is WAY overdue! :shock:
My new contract has really taken up my free time. My solution with this is to do to be more realistic with what I had planned for the demo, reduce the amount of complexity, and just get it done. I had an animated cursor that stopped working when I returned to work on it. Instead of trying to figure it out, I'm going to pull it (I get an error that says the files are missing, when I reality they are there).

Good news. I fixed the animated cursor issue. There are some KeyGuard 4 commands that require the "GetPath" call and others that don't. I got a lot done on the demo today, but there are a lot of animations in this.

Where can I get the project or code

PostPosted: Mon Jan 04, 2010 10:17 pm
by gposchman
I am new to AM and I would prefer to use a custom save and load for my game. I followed the thread and I was wondering if there is a project I can download or is there a place I can find the tutorial completed?

Thanks in advance.


PostPosted: Tue Jan 05, 2010 3:20 am
by reneuend
Hi g'man,

I finished the plugin and have been in the process of building a game that shows how to use it. As a contract developer who travels several hours a day, I don't always have much time to work on my projects. :?

I'll try to finish it in the next 30 days, unless you'd like an early unfinished edition!

There is also one suggested enhancement from Lyberodoggy that I would like to add.

Thanks for your interest.

PostPosted: Tue Jan 05, 2010 9:20 am
by Vairon
Reneuend is great news! :D
It is a breakthrough for the development games on AM and I think you're doing a great job.
I am eager to see the results.

Custom load box

PostPosted: Tue Jan 05, 2010 6:40 pm
by gposchman
Hi reneuend,

I am actually in development on my game (Currently unemployed) and I am working on a custom opening page and I am ready to implement, so if you have an unfinished edition of the plugin plus notes on the enhancement and what needs to be done, I would be happy to take it on and I will publish the game I am working on with a level completed and documentation so people will know how to use it.


PostPosted: Wed Jan 06, 2010 12:38 am
by reneuend
Thanks for the support Vairon and Gman.

Give me a little time to build the documentation. I'll post an early release for everyone.

If when using it, you have any suggestions on improvements, please let me know.

I'm not completely satisfied with it, but I'm not sure what the best way is to present it so its easy to use and still versatile. I'm thinking maybe I should build more subroutines that folks can use to allow more customization.

PostPosted: Thu Aug 19, 2010 7:28 pm
by JasonMc
Ok, good news, bad news.

Good news is, I made it possible for there to be a list of saved games on the save screen!

The bad news is...I cannot figure out for the life of me what is wrong with the load. I started using Lybero's updated variables saving code (from towards the bottom of page one). However, I know there has to be SOME way to load that, other than what was there. The indexes changed, after all.

Anyhow, here is my save code, which appears to be working perfectly. I have this plugged into my global procedures, as I use it for autosaving.

Code: Select all
If frametosave="menu" Then frametosave="1.1.1"
For Each X in InventoryItemObject
Action.WriteINI filename+".agent",1,I,A
For i = 1 To WindowObject.Variables.Count
Action.WriteINI filename+".agent",2,i,WindowObject.Variables.Item(i).Name
Action.WriteINI filename+".agent",3,i,WindowObject.Variables.Item(i).Value
For i = 1 To WindowObject.VariablesVariant.Count
Action.WriteINI filename+".agent",4,i,WindowObject.VariablesVariant.Item(i).Name
Action.WriteINI filename+".agent",5,i,WindowObject.VariablesVariant.Item(i).Value
Action.WriteINI filename+".agent",6,i,frametosave
End Sub

Here is the load button procedure. What is wrong with it?

Code: Select all
For I=2 to 50
If HasItem(cstr(savedinventoryitem))=False Then
Action.AddItem cstr(savedinventoryitem)
End If
For C=1 to 50
UnloadControl FileBoxObject(2)
UnloadControl TextBoxObject(3)
Action.GoToFrame Action.ReadINI(filenamefull,6,1)

Additionally, if anyone knows how to delete an INI file from that file list in VBScript, that would be cool. If not, no prob.

PostPosted: Mon Aug 23, 2010 2:14 am
by Lyberodoggy
The only thing I suspect to be wrong is this: the readINI command looks for the file inside the external folder. it's 4:14 am here so I can't really look into it right now, but I 'll try to figure it out

PostPosted: Mon Aug 23, 2010 5:56 am
by JasonMc
That's where I parked the .agent files, so that shouldn't be an issue. Although I've been having this odd little glitch where the filebox tends to go to whatever path I last navigated to on the "Add New Frames..." weird is that? Anyhow, it listed the files right, so I don't suspect that it has the wrong path.

One thing I did think of just now is, could the problem be that I call .path and NOT .filename?

Anyway, I have a webmastering job atm, so I can't exactly explore it either right now. Anyone who can take a look any time soon, you would have my gratitude. :)

PostPosted: Mon Aug 23, 2010 10:40 pm
by Lyberodoggy
You could try reading from Getpath(4)+filenamefull
If I remember correctly 4 is the external folder.

PostPosted: Sat Jan 08, 2011 9:15 pm
by reneuend
Has it really been 2 years! :oops:

I have this plugin working in Windows 7 now. It was very hard to read my code. I hope to have something available soon.

PostPosted: Sun Jan 09, 2011 12:28 am
by Mystery
Hehe, time flies fast :P

Great news that you'll have something available soon :D

PostPosted: Sun Jan 09, 2011 10:43 pm
by Lyberodoggy
:O two years huh?

PostPosted: Sun Jan 09, 2011 10:44 pm
by Mystery
Lol :lol:
Nice to see you Doggy :D

PostPosted: Sun Jan 09, 2011 10:53 pm
by Lyberodoggy
:) nice to see you guys too.

PostPosted: Sun Jan 09, 2011 11:13 pm
by reneuend
Yeah :oops:

I don't know how time slipped by like this, but I guess it just does.

Great to hear from you again Doggy!

PostPosted: Thu May 19, 2011 11:49 am
by Adpist
Hi there !

First of all, thanks for this thread =)

I manage to create custom save and load functions using parts of your scripts, And i have found an issue, and i really don't know how to fix it.

I save all items in inventory when user click save button.
When i load them, i can add items to player's inventory, everything is fine with this part. The problem is that if i save the game, take a new item in inventory, and load previous save ( before taking item ), I can't take the item anymore ( which is somekind of normal, i guess ).

So there is my question : Is it possible to have acces to the list of items present not only in inventory, but in all the differents frames ( or their hotspots ) to enable / disable item picking according to the saved game state

i see a way to do it but i need access to all game's items, or to be able to check if hotspot gives an item and disable it if item is in inventory.

I want to add that as if you have a welcome documentation, there are some parts missing in the AM's doc ( like how to access to hotspot position ? hide TextBoxObject borders ? etc... )

I post this here because my save/load functions are really similar to the ones mentionned in this thread.

Thans for your answers.