xboxscene.org forums

OG Xbox Forums => Official MediaXMenu (MXM) Forum => Dashboard Forums => MXM WIP Beta forum => Topic started by: BenJeremy on February 22, 2004, 09:38:00 AM

Title: Plug-and-play Discussion
Post by: BenJeremy on February 22, 2004, 09:38:00 AM
The spec is here in WORD DOC format.

Please review and add your thoughts here....  <
Title: Plug-and-play Discussion
Post by: flattspott on February 22, 2004, 10:35:00 AM
Reading it now.  <
Title: Plug-and-play Discussion
Post by: flattspott on February 22, 2004, 10:37:00 AM
So when can well expect all this to come to life?  <
Title: Plug-and-play Discussion
Post by: geniusalz on February 22, 2004, 11:19:00 AM
All I can say is, looks good. :)

Are multiple 'attach'ments possible?  I like the timer attachment.

'Append' will also be available for overrides, right?

Also, for the files, 'Required' should be True by default, or just use 'Optional', keeping it false by default.  

And you should incorporate a default module for each skin.  e.g. Raize\MXM_Skin.xsm will be loaded whenever the Raize skin is loaded.  This could be used for skin customization (changing info variables, colors, etc.)  <
Title: Plug-and-play Discussion
Post by: BenJeremy on February 22, 2004, 11:29:00 AM
QUOTE (flattspott @ Feb 22 2004, 02:26 PM)
So when can well expect all this to come to life?

I will be working on it shortly.  <
Title: Plug-and-play Discussion
Post by: BenJeremy on February 24, 2004, 07:57:00 AM
OK... a few things I've got jotted down:

Plug-in scripts will be able to be deleted or enabled/disabled.

Here's a starter list of events:

AutoExec
SkinPreload (Skin selected, Script has access to skin before it's configured)
SkinTimer (May be more than one timer, dunno yet)
SkinLayoutChange (When MXM switches between, say, Title and Menu layouts, this would execute)
Help
System Info

Game Context items (For menu items):
GameLaunch
GameHelp
GameDelete
GameConfigure
<Custom>

KeyEvent

SystemMenuItem (Custom items)

Actions (Added via Actions menu automatically, unless specified not automatic)


Anything else that seems practical? If not, I'll finalize these based on this list.


 <
Title: Plug-and-play Discussion
Post by: flattspott on February 24, 2004, 10:53:00 AM
Sounds neat-o-rific.

So with this SkinPreload (Skin selected, Script has access to skin before it's configured) does this mean we'll be able to for instance, remove the Menu Descriptions from a skin before they're loaded?  <
Title: Plug-and-play Discussion
Post by: -FourDoor- on February 24, 2004, 11:42:00 AM
Sounds like the forecasted great things for actionscripts are now in sight. I definetely like the term "XBOX Script Module".

Having a "standard" as to how actionscripts are made, stored, loaded will only help make it more "user friendly."

Only concern since it appears that we are one step closer, is the auto download from the internet. As more scripts are made, it would only make sense that they are verified to see that there isn't any type of malicious code in there before making them available for autodownload in MXM. My suggestion for autodownloads is to have one main download site, with a mirror site just in case the first site goes down or needs additional bandwidth. Aside from those 2 servers, it should be made clear that actionscripts shouldnt be downloaded from anywhere else. Kind of like an official MXM update/patch site...  <
Title: Plug-and-play Discussion
Post by: flattspott on February 24, 2004, 12:16:00 PM
That does sound like a good Idea  <
Title: Plug-and-play Discussion
Post by: BenJeremy on February 24, 2004, 12:24:00 PM
QUOTE (flattspott @ Feb 24 2004, 02:42 PM)
Sounds neat-o-rific.

So with this SkinPreload (Skin selected, Script has access to skin before it's configured) does this mean we'll be able to for instance, remove the Menu Descriptions from a skin before they're loaded?

Yes, that is the idea. Something to modify the skin before it is initialized.



 <
Title: Plug-and-play Discussion
Post by: BenJeremy on February 24, 2004, 12:33:00 PM
QUOTE (-FourDoor- @ Feb 24 2004, 03:31 PM)
Sounds like the forecasted great things for actionscripts are now in sight. I definetely like the term "XBOX Script Module".

Having a "standard" as to how actionscripts are made, stored, loaded will only help make it more "user friendly."

Only concern since it appears that we are one step closer, is the auto download from the internet. As more scripts are made, it would only make sense that they are verified to see that there isn't any type of malicious code in there before making them available for autodownload in MXM. My suggestion for autodownloads is to have one main download site, with a mirror site just in case the first site goes down or needs additional bandwidth. Aside from those 2 servers, it should be made clear that actionscripts shouldnt be downloaded from anywhere else. Kind of like an official MXM update/patch site...

Yes, it is working towards some sort of web-based capability for script and skin modules.

Currently, I am looking at doing the following:

There will be a "Plugins" folder in the same location as where MXM is executed (unless specified to be elsewhere) and on startup, MXM will scan for two (later, three) types of files: ZSM and ZSK.

ZSM are Zipped Script Modules

ZSK are Zipped SKins

For ZSMs, we will look inside for a main.xsm, which will become a part of the cached plugin scripts xml. Any files specified will be placed into the plugins cache path, in their own directory (for example, with Tetris, you might have a bunch of JPGs and sound files, and even more ActionScript code, since it's an on-demand script)

ZSK files will be properly unzipped to their own skin folder in the skins path, saving people the trouble of how to install new skins.


Later, we'll also handle binary DLL modules, which will be where new features will come into play.

I may have ZIP functionality available soon. I plan on testing out the code with ActionScript first, before integrating the Plug-in system.

Rars are a bit more complicated.... not sure if I want to support them at all; the PD code only handles 2.0, and is horrible, horrible code. It will take a lot of re-writing to make usable in a multithreaded environment. It also only handle unraring, so it's a one-way ticket. The reality is that most skins are probably archived with RAR 3.0, so the support wouldn't do much anyway.  <
Title: Plug-and-play Discussion
Post by: flattspott on February 24, 2004, 12:39:00 PM
Well that 7Zip has UnRar code, maybe it's better or cleaner.  <
Title: Plug-and-play Discussion
Post by: unleashx on February 24, 2004, 12:54:00 PM
QUOTE
ZSK files will be properly unzipped to their own skin folder in the skins path, saving people the trouble of how to install new skins.

Defeats the purpose of having it zipped in the first place if you're going to unzip each and every zipped skin...unless you're going to delete the expanded inactive skin files. -just my two cents.  <
Title: Plug-and-play Discussion
Post by: BenJeremy on February 24, 2004, 01:40:00 PM
QUOTE (unleashx @ Feb 24 2004, 04:43 PM)
QUOTE
ZSK files will be properly unzipped to their own skin folder in the skins path, saving people the trouble of how to install new skins.

Defeats the purpose of having it zipped in the first place if you're going to unzip each and every zipped skin...unless you're going to delete the expanded inactive skin files. -just my two cents.

True.... the trick is to manage things with the right balance. MXM will have some expanded options for the user, and having skins handy would be nice.

I would consider just unzipping a preview file, though, along with storing information, then moving the zipped skin to a "master" skins location.   <
Title: Plug-and-play Discussion
Post by: unleashx on February 24, 2004, 01:50:00 PM
QUOTE (BenJeremy @ Feb 25 2004, 05:29 AM)
I would consider just unzipping a preview file, though, along with storing information, then moving the zipped skin to a "master" skins location.

Better, exactly the way I think it should be implemented.  <
Title: Plug-and-play Discussion
Post by: ub312g0d on February 24, 2004, 07:28:00 PM
I dont mean to sound pessimistic or anything but why cant the zipped extensions just end with *.zip It saves a few seconds when creating the zip files.  How would the preview file be done? Like a screenshot saved as a jpg? Or like dynmically renderining the skin in a preview box.  the latter would be nicer, but possibly overkill as it would require a total unzip of the skin and lots of resources.
Title: Plug-and-play Discussion
Post by: BenJeremy on February 25, 2004, 02:46:00 AM
QUOTE (ub312g0d @ Feb 25 2004, 12:28 AM)
I dont mean to sound pessimistic or anything but why cant the zipped extensions just end with *.zip It saves a few seconds when creating the zip files.  How would the preview file be done? Like a screenshot saved as a jpg? Or like dynmically renderining the skin in a preview box.  the latter would be nicer, but possibly overkill as it would require a total unzip of the skin and lots of resources.

On the extension naming, this would be on purpose, because:
  1. It indicates the file has specific content
  2. It prevents wasting time to unzip and look in ZIP files to see if it's correct
  3. I can check separately for skins and script modules, since those are loaded at different points. Otherwise, I have to rescan the whole directory or cache the results of the first scan.

As for the preview, yes, the preview would be a pre-rendered image file (video or static image) with a name of preview.xxx where 'xxx' is a valid image extension. The preview would likely be a 4:3 or 16:9 ratio rendered at less than quarter resolution (i.e. 320x240) but more than an eighth (160x120)
Title: Plug-and-play Discussion
Post by: ub312g0d on February 25, 2004, 03:49:00 AM
ahhhhhh ok..thanx for the explanation, makes sense. And about having officiail Download servers while I think Its a good idea, I think that people should also beable to add their own dload servers if they so chose. This would be especially handy if one of the 2 official servers got taken permanantly offline or had a name change or the like.
Title: Plug-and-play Discussion
Post by: koldfuzion on February 25, 2004, 06:08:00 AM
QUOTE (unleashx @ Feb 24 2004, 09:43 PM)
QUOTE
ZSK files will be properly unzipped to their own skin folder in the skins path, saving people the trouble of how to install new skins.

Defeats the purpose of having it zipped in the first place if you're going to unzip each and every zipped skin...unless you're going to delete the expanded inactive skin files. -just my two cents.

its much easier to download and install/extract a zip file than it is to download multiple files... or even to maintain the list of file for that plugin/skin that needs to be downloaded.

Rar. i would stay away from it.  new versions of incompatible rar being pushed out on a almost constant basis.  Even UnleashX only supports rar to a certain version.  Avalaunch, I think, went with zip only skins because of this too.


AXS will definitely host them for you and provide whatever you need to get the job done. The "validation" of the plugin would be a necessity (like some have stated) simply because of the power of MXM and its possibility to support a malicious script.   You could put together a "validation group" of the better scripters to check and test.. and i can provide them a way to update the site/list with the new scripts.  As always,  just let me know what you need.



Title: Plug-and-play Discussion
Post by: BenJeremy on February 25, 2004, 04:02:00 PM
Cool, KF.... I just got ZIP support working, and I'm playing around with it. RAR code is such a mess, I'm not going to bother. Non-re-entrant code that would require me to spend a few days rewriting the entire thing - not worth the time for the reasons you stated.

Validation may end up being something like the "Certificate" method - I'm not sure exactly how I want to do this - as MXM is open source, I want to make sure the method is very well thought out.
Title: Plug-and-play Discussion
Post by: flattspott on February 25, 2004, 05:52:00 PM
Well you could just have a master list that could be downloaded via WEBFILEFETCH or whatnot that has the MD5 checksums for all known scripts. Then you can check the scripts you download against this file. Someone could verify the script as non malicious and add the MD5 to the list.
Title: Plug-and-play Discussion
Post by: geniusalz on February 25, 2004, 09:24:00 PM
dry.gif

Only trusted sources should be included as script servers with the official release of mxm.  As for scripts downloaded off anywhere else, they would be the same as self-written scripts, which can be as maliciuos as the user wants.  

Also, suppose someone wants to customize a script to their needs.  That would also be impossible.

Therefore, no MD5 checking is necessary, and the host for autodownload will have verified scripts.
Title: Plug-and-play Discussion
Post by: Kthulu on February 27, 2004, 06:15:00 PM
QUOTE (geniusalz @ Feb 26 2004, 01:24 AM)
I don't get it.  Why would there be any issues? dry.gif

Only trusted sources should be included as script servers with the official release of mxm.  As for scripts downloaded off anywhere else, they would be the same as self-written scripts, which can be as maliciuos as the user wants.  

Also, suppose someone wants to customize a script to their needs.  That would also be impossible.

Therefore, no MD5 checking is necessary, and the host for autodownload will have verified scripts.

i share g-dub's concern there.  no matter what, i want to be able to customize any scripts i download without pain-in-the-arse repercussions.

i fell in love with MXM and actionscripts (forgive the sappiness) because actionscripts gave me a power to customize that no other dash did.  if you centralize control too much, MXM and actionscripts could lose this flexibility/customizability.

the desire to make things 'user friendly' is a virtue (just having the zipped xsm modules goes a long way in that department), but i don't think people who have brains and experience should ever feel held back by newbs and retards.  nothing can be made idiot proof.

another great value i see of actionscripts is this:  if the scene dies or if BJ get's tired of working on it or if BJ gets hit by a bus, MXM has the potential to live on and meet it's users needs through actionscripts.  i would hate for the proper working of scripts in general to be hindered by a website that no longer existed.

now, i'm not saying that having autodownloads and gamesDBs is bad thing, i just hope that they won't be neccessary for MXM and actionscripts to run trouble-free.
Title: Plug-and-play Discussion
Post by: flattspott on February 27, 2004, 06:19:00 PM
Valid point
Title: Plug-and-play Discussion
Post by: koldfuzion on February 28, 2004, 05:54:00 AM
QUOTE
nothing can be made idiot proof


Those round sewer covers are idiot-proof.  Not even an idiot can drop it in the hole it covers.

Thankfully someone was thinking about this one and didnt make them square.
Title: Plug-and-play Discussion
Post by: geniusalz on February 28, 2004, 09:39:00 AM
But the idiot himself CAN drop in, so it's not completely idiot proof
Title: Plug-and-play Discussion
Post by: Kthulu on February 28, 2004, 11:15:00 AM
also, i read a news article years ago where some idiot didn't put the manhole-cover back on flush with the road...a truck ran over one side of it and caused it to flip up into the air and crash through the windshield of the car behind...killing the driver.

...and if some idiot puts them on upside-down, you're in for a good bump when you drive over them...
Title: Plug-and-play Discussion
Post by: koldfuzion on February 28, 2004, 11:30:00 AM
QUOTE (geniusalz @ Feb 28 2004, 07:39 PM)
But the idiot himself CAN drop in, so it's not completely idiot proof

that would require it to be Idiot-Proof²™,  

Would take one idiot to remove the cover, the other to walk over it.
Title: Plug-and-play Discussion
Post by: Taiger on February 28, 2004, 09:59:00 PM
QUOTE (geniusalz @ Feb 26 2004, 09:24 AM)
I don't get it.  Why would there be any issues? dry.gif

Only trusted sources should be included as script servers with the official release of mxm.  As for scripts downloaded off anywhere else, they would be the same as self-written scripts, which can be as maliciuos as the user wants. 

Also, suppose someone wants to customize a script to their needs.  That would also be impossible.

Therefore, no MD5 checking is necessary, and the host for autodownload will have verified scripts.

okay,

I'm not sure if I understand this correct with MD5 checking, would it not be possible to just copy the script to a new directory and modify it to your needs from there, or is it ment that scripts would only be runable from one directory in the next release of MxM ??

The alternative I like the most is is that you would have this one dir where all the scriprts will be stored that commes from MxM update sight that are verifyed by someone. And in MxM you should have something like an option to "Make own script from this code" Then when you select this MxM would copy the script to a "own script dir" where you could make the modifications that you like ...

This "own script dir" would also be where you put your entirely own scripts ...



Or should BJ have to begin with the creation of an Antivirus script :-)