Archive: global register/gmegabuf load/saver ape


4th February 2005 01:53 UTC

global register/gmegabuf load/saver ape
This is just a beta so don't release it everywhere please!!!

Its under Misc and is called 'Global Variable Manager' and contains an n=0 superscope for doing global variable code as well as load/save functionality which can be controlled by code or set to 'load once', 'load every frame' or 'none'.

One feature I would like to add is the ability to expand the code boxes to fill the whole editor pane with min/max type buttons... would this be something that would be appreciated? I just want to know if anyone else would use it before I go adding it in.

It comes with help on how to use it (which may be poor since I wrote it quite quickly). Feedback on this would be appreciated. (If someone else wants to write a help be my guest... if its good it will save me one more little job)

There is a preset included demonstrating load/save settings buttons on an interactive menu.

Any good suggestions will be considered if they are feasible. If you can setup crash conditions then let me know... if it crashes and you think its the ape... and can't recreate that then don't bother since it won't help.

Enjoy!

EDIT: One thing to note is that the save dialog is only for setting the file name and not the path. The path is always the base avs directory to ensure maximum compatibility. If you want to use subdirectories you can hack it by using subdir\filename.gvm as the filename. Right now the extension isn't heavily enforced. If you think it should be (i.e. if you specify no or a wrong extension it should add .gvm for you) then let me know.


4th February 2005 14:50 UTC

beta 2:

changes:

* added blank code compile for compatibility with eeltrans code logging

* added version resource

* fixed bug where load/save wasn't working on first load


5th February 2005 04:57 UTC

sorry to post so many new versions an create a monologue of a thread...

beta 3:

* added code box 'maximise/minimise' feature

* some minor tweaking

the zip includes the demo preset again so that you dont have to download the previous files above.


5th February 2005 05:12 UTC

I'm at uni, so I'll test it out when I get home. I assume that missed call on my mobile was you calling to brag about finishing the beta version of the APE eh? ;)


9th February 2005 16:38 UTC

I can't believe the pathetic level of feedback this got considering how many different people have asked for it over the past months since megabuf was introduced.

Anyway... I'm going to polish it up and release it on deviantart with the sample preset. I'm at work at the moment but will post the release candidate up here when finished so it can sit here for a couple of days and you get a chance to find bugs and request features before I bang it out v1.0


9th February 2005 18:02 UTC

the problem is that after repeatedly saying "it is not possible with the current sdk" and "avs wont get updated" ppl might have given up the hope for such an ape
not everyone has one of those presets in store now you know? :)


9th February 2005 19:44 UTC

just when seeing it working, i realised that it has really much potential, especially with saving/loading :) will save me quite some time.


10th February 2005 13:30 UTC

im terribly sorry J, I saw this post a few days ago and got terribly excited about it, but didnt have time to have a look or reply.

People should realise just how useful this could be for things like storing vertex coordinates for complex 3d shapes, etc etc.

Ill try it out next time i get time for avs.

Thanks alot!


12th February 2005 16:39 UTC

Here is the release candidate (2). Contains improvements suggested by PAK and some optimisations.

Strain it, small suggestions will be taken. One obvious inadequacy is using the common dialog box for the save as it is a little misleading. I may build a new save dialog for it... I'm not particularly motivated to as it would involve a lot of 'boring' programming, if there are a lot of complaints about this then I will build a new one for a 'version 2'.

Sample preset now auto loads last saved settings when started.


13th February 2005 12:45 UTC

will check it out and give you some feedback


14th February 2005 13:52 UTC

I checked it out, the expand is much nicer when it covers the load/save stuff. Regarding the filename of the load/save... couldnt there be a default? I was thinking you could use the filename of the preset with a different extension, but that wouldnt work until the person saves their preset. It just seems that 95% of the time a default save/load path would be fine so it would be worth making one.


14th February 2005 14:24 UTC

syncing stuff with this baby is so darn good, i never will want to go back to global SCC coding (publishing okay, but experimenting with that HUGE box...wooow)!


14th February 2005 19:18 UTC

there is a default when you press ...

but there is no consitent way of generating a unque name per preset that i can think of. I'm not good enough at hijacking avs... besides I don't particularly want to start using what are essenstially ugly hacks.


15th February 2005 14:23 UTC

Originally posted by jheriko
...there is no consitent way of generating a unque name per preset that i can think of...
Well, okay, but there definately IS one, its just whether or not you can be bothered to find one.

15th February 2005 17:45 UTC

Every possible way requires for me to get some uniqueness out of a preset... i.e. its filename. which i can't get without ugly hax. even then it would be a large task... involving me learning as I go = buggy code.

I don't mean to be laming out I really don't. I'll try to think of something good.

I could do untitled1, untitled2 etc... but that has obvious setbacks attached...


17th February 2005 18:17 UTC

Good unique identifiers:

The time and date
The MAC address of your network card
Your windows registration number
Your PC's serial/case number

It doesnt have to be a pretty name, its just a default that is unique


20th February 2005 14:29 UTC

he needs something that is unique per preset
i dont think that is possible though :(
you could find out the preset's name and location and hash the whole .avs file maybe

or you simply write to the preset's config ;) (saveconfig/loadconfig stuff)


20th February 2005 14:46 UTC

Generate a random number when the APE object is first created and store it from then on?


20th February 2005 15:15 UTC

Originally posted by UnConeD
Generate a random number when the APE object is first created and store it from then on?
Thats what I meant, you just generate it when the APE instance is created then dump it in the save path edit box, the user can change it if they want.

21st February 2005 02:10 UTC

/vote random numbers from 0..9A..Za..z


24th February 2005 23:34 UTC

I totaly forgot about this ape till today. And wouldnt you know it, i found a bug. No, the bug found me i gues. The ape just doesnt want to work for me. When i want to save the file, winamp crashes :/. Other than that, its a great ape ;).


2nd March 2005 13:46 UTC

random numbers sounds good

fsk, any chance you could replicate the crash and give me the setup?


2nd March 2005 13:52 UTC

sure i can replicate it, it happens every time i want to save the file (press the save button in the browse dialog).
setup?
empty preset no code anywhere just the ape
windows xp

cant think of any other info you might find usefull:/


2nd March 2005 13:54 UTC

hmmm... oh well.. i'll do my best to try to figure it out... its probably going to be a problem in the save config


23rd March 2005 13:56 UTC

Here is v1.0 of the gmegabuf saver ape. (touchwood) It won't crash anymore, the save box is gone... you now just have to type the path in. It produces an ugly long random filename from all the bits of your system date/time and some extra randomness added by querying the performance counter and making some chars from that. It should be 'unique' enough for purposes. If anyone can give me an easy API to get a mac address for an attached network card, I'll stick that into it too somehow.

If it still crashes for anyone email me at jheriko@gmail.com, if there are enough problems/feature requests I'll make a 1.1 release.

It uses a version resource so there shouldn't be any distribution problems if you make good NSIS scripts.


23rd March 2005 20:05 UTC

ignore the above here is a better one. the version resource in that compile is wrong :(

great how i have a bug already. here is the real 1.0 with matching resource in an installer.


23rd March 2005 23:03 UTC

what do you need all that randomness for? o_O
wont a simple srand/rand do?


24th March 2005 11:56 UTC

'how unique' is rand?


25th March 2005 17:20 UTC

generate random number, check if the file exists and if it does, generate a new one... that should do
you can't guarantee unique file names anyway