Help - Search - Members - Calendar
Full Version: Downloadable Content
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official MediaXMenu (MXM) Forum > MXM WIP Beta forum
Pages: 1, 2
koldfuzion
Going to keep this short and sweet. But not to forget some huge props to flattspott, for putting mucho time into the data this DB provides and also to Blazed for hosting the videos. (of course BJ and UnleashX for enabling us, yes both dashboards will be using this.)

Maybe at a later date we can provide mini-game cover image and ESRB image? will think about that.

while not 100% complete from the web-user viewpoint. Game Preview video download is 100% ready for MXM Actionscripting adn while I was planning to do it myself, it wouldnt be right to horde the information.

First, the web-view of the games database. http://www.xbox-skins.net/games/index.php

So lets get started.

Big question---> How?

You can get the info needed two ways. And you will need to get this data either once, if using the full database, or each time for each game based on the HEXID

1. Full Database http://www.xbox-skins.net/games/gamesdb.xml

2. Using the HexID of the game to check for the single item xml and pulling only that xml data. ie http://www.xbox-skins.net/games/xml/4b4e0002.xml for Airforce Delta Storm.

Then you only need to determine if the video is available, if you want it , and how to handle it. You then send a video request to the website and work the file and possible cookie that is returned.

in the actionscripts, you send the video request using http://www.xbox-skins.net/games/sendvid.php?sid=135

XML Data:
The sid in the url is the VidID value in the XML.

Video : 0=No Video Download, 1=WMV, 2=XMV

VC= Video Compression: 0=No Compression, 1=RAR, 2=ZIP


Retrieve the data:

Key points to check for are:
1. is the game in the DB, or single XML available?
2. is video available?
3. if video is available, how does it need to be handled? (RAR, ZIP, WMV, XMV)?

And all additinal info in the XML can be displayed, or not.

Keep in mind. Video downloads may or may-not be restricted to a certain download count. Much like the way AXS does the skins now.

When that download count is reached, a cookie will be sent so you can display that the limit has been reached, and how long before downloading can resume. (this might still need some work from BJ) Use the webdownload and click on 12 links or so)

The cookie you need to look for is named TimeLeft and its value will read something like :

"Everyone is limited to 10 Downloads in 24 hours. You have 2 hours 34minutes and 12 seconds to wait before downloads are re-enabled"


Not too short, and hopefully not too confusing. If it is confusing, let me know and i will clarify.

------------------------------------------------------------------------------------------------

user posted image

Current Working code (except i have the filefetches rem'd for now till i get the thumbs and covers uploaded and renamed.

Call from context, it makes no self references so you can name whatever you want to.


kudos to Jezz for the loaddialog from xml he used in the IPDialog script. Its awesome code and was used extensively with modification. Made the script build go extremely fast.



CODE




:TOP
SET _contentprogress 200
;##############  CHECK FOR DIALOG XMLs CREATE IF NOT FOUND
SETFUNC XCheck FILEEXISTS E:\UDATA\00004321\content.xml
IF# %XCheck% == 1 GOTO NETWORKCHECK
XMLCreate ContentDLG Content
XMLSetValue ContentDLG !^pos~t 100
XMLSetValue ContentDLG !^pos~l 120
XMLSetValue ContentDLG !^pos~w 400
XMLSetValue ContentDLG !^pos~h 220
XMLSetValue ContentDLG !.control:0~type text
XMLSetValue ContentDLG !.control:0~ctrlid 902
XMLSetValue ContentDLG !.control:0^rect~t 10
XMLSetValue ContentDLG !.control:0^rect~b 125
XMLSetValue ContentDLG !.control:0^rect~l 10
XMLSetValue ContentDLG !.control:0^rect~r 395
XMLSetValue ContentDLG !.control:0^text "Only Press the Button 1 time!$eol$Download time depends on file size.$eol$You will be notified of completion."
XMLSetValue ContentDLG !.control:1~type button
XMLSetValue ContentDLG !.control:1~ctrlid 201
XMLSetValue ContentDLG !.control:1^rect~t 128
XMLSetValue ContentDLG !.control:1^rect~b 155
XMLSetValue ContentDLG !.control:1^rect~l 60
XMLSetValue ContentDLG !.control:1^rect~r 130
XMLSetValue ContentDLG !.control:1^text "All"
XMLSetValue ContentDLG !.control:2~type button
XMLSetValue ContentDLG !.control:2~ctrlid 202
XMLSetValue ContentDLG !.control:2^rect~t 128
XMLSetValue ContentDLG !.control:2^rect~b 155
XMLSetValue ContentDLG !.control:2^rect~l 160
XMLSetValue ContentDLG !.control:2^rect~r 240
XMLSetValue ContentDLG !.control:2^text "Video"
XMLSetValue ContentDLG !.control:3~type button
XMLSetValue ContentDLG !.control:3~ctrlid 203
XMLSetValue ContentDLG !.control:3^rect~t 128
XMLSetValue ContentDLG !.control:3^rect~b 155
XMLSetValue ContentDLG !.control:3^rect~l 270
XMLSetValue ContentDLG !.control:3^rect~r 340
XMLSetValue ContentDLG !.control:3^text "Thumb"
XMLSetValue ContentDLG !.control:4~type button
XMLSetValue ContentDLG !.control:4~ctrlid 204
XMLSetValue ContentDLG !.control:4^rect~t 170
XMLSetValue ContentDLG !.control:4^rect~b 195
XMLSetValue ContentDLG !.control:4^rect~l 60
XMLSetValue ContentDLG !.control:4^rect~r 130
XMLSetValue ContentDLG !.control:4^text "Cover"
XMLSetValue ContentDLG !.control:5~type button
XMLSetValue ContentDLG !.control:5~ctrlid 205
XMLSetValue ContentDLG !.control:5^rect~t 170
XMLSetValue ContentDLG !.control:5^rect~b 195
XMLSetValue ContentDLG !.control:5^rect~l 160
XMLSetValue ContentDLG !.control:5^rect~r 240
XMLSetValue ContentDLG !.control:5^text "ESRB"
XMLSetValue ContentDLG !.control:6~type button
XMLSetValue ContentDLG !.control:6~ctrlid 206
XMLSetValue ContentDLG !.control:6^rect~t 170
XMLSetValue ContentDLG !.control:6^rect~b 195
XMLSetValue ContentDLG !.control:6^rect~l 270
XMLSetValue ContentDLG !.control:6^rect~r 340
XMLSetValue ContentDLG !.control:6^text "QUIT"
XMLSetValue ContentDLG !^timer 2000
XMLSave ContentDLG E:\UDATA\00004321\content.xml
XMLClose ContentDLG

XMLCreate ContentListDLG ContentList
XMLSetValue ContentListDLG !^pos~t 100
XMLSetValue ContentListDLG !^pos~l 120
XMLSetValue ContentListDLG !^pos~w 400
XMLSetValue ContentListDLG !^pos~h 220
XMLSetValue ContentListDLG !.control:0~type text
XMLSetValue ContentListDLG !.control:0~ctrlid 100
XMLSetValue ContentListDLG !.control:0^rect~t 10
XMLSetValue ContentListDLG !.control:0^rect~b 35
XMLSetValue ContentListDLG !.control:0^rect~l 10
XMLSetValue ContentListDLG !.control:0^rect~r 395
XMLSetValue ContentListDLG !.control:0^text "Select Title to Download Content:"
XMLSetValue ContentListDLG !.control:1~type ListBox
XMLSetValue ContentListDLG !.control:1~ctrlid 101
XMLSetValue ContentListDLG !.control:1^rect~t 40
XMLSetValue ContentListDLG !.control:1^rect~b 170
XMLSetValue ContentListDLG !.control:1^rect~l 10
XMLSetValue ContentListDLG !.control:1^rect~r 390
XMLSetValue ContentListDLG !.control:1^Mode "List"
XMLSetValue ContentListDLG !.control:1.Item:0^Text
XMLSetValue ContentListDLG !.control:2~type button
XMLSetValue ContentListDLG !.control:2~ctrlid 102
XMLSetValue ContentListDLG !.control:2^rect~t 180
XMLSetValue ContentListDLG !.control:2^rect~b 210
XMLSetValue ContentListDLG !.control:2^rect~l 20
XMLSetValue ContentListDLG !.control:2^rect~r 160
XMLSetValue ContentListDLG !.control:2^text "Download"
XMLSetValue ContentListDLG !.control:3~type button
XMLSetValue ContentListDLG !.control:3~ctrlid 103
XMLSetValue ContentListDLG !.control:3^rect~t 180
XMLSetValue ContentListDLG !.control:3^rect~b 210
XMLSetValue ContentListDLG !.control:3^rect~l 170
XMLSetValue ContentListDLG !.control:3^rect~r 270
XMLSetValue ContentListDLG !.control:3^text "HELP"
XMLSetValue ContentListDLG !.control:4~type button
XMLSetValue ContentListDLG !.control:4~ctrlid 104
XMLSetValue ContentListDLG !.control:4^rect~t 180
XMLSetValue ContentListDLG !.control:4^rect~b 210
XMLSetValue ContentListDLG !.control:4^rect~l 280
XMLSetValue ContentListDLG !.control:4^rect~r 370
XMLSetValue ContentListDLG !.control:4^text "CLOSE"
XMLSetValue ContentListDLG !.control:4^exitcode 1
XMLSetValue ContentListDLG !^timer 2000
XMLSave ContentListDLG E:\UDATA\00004321\contentlist.xml
XMLClose ContentListDLG

:NETWORKCHECK
SET _GETALL 0
;######################### Network  Check #########################
SETFUNC GETSTATIC RIGHT 7 $IP$  ; Check for STATIC in IP value
SETFUNC GETDHCP RIGHT 5 $IP$  ; Check for DHCP in IP value
IF "%GETDHCP%" #^ "DHCP" GOTO GETHEX;check if static or not
IF "%GETDHCP%" #^ "atic" GOTO GETHEX;check if static or not
MSGBOX "Your network cable is currently unplugged,$eol$ or your configuration is invalid..$eol$$eol$Try again later."
GOTO QUIT

;######################### GET GAME HEX ID #########################
:GETHEX
SETFUNC nDEC XBEID %_GameExe%
SETFUNC HexID CvtToBase 16 8 "%nDEC%"
SETFUNC HexID RIGHT 8 %HexID%

IF "%HexID%" == "00000000" GOTO HOMEBREW
IF "%HexID%" == "ffff051f" GOTO HOMEBREW
GOTO NOTHOMEBREW

############################## HOMEBREW #######################################
:HOMEBREW
SET ISHB 1
OnEvent EventHandlerHB
MSGBOX "Getting Data : Please Wait" 0 3000

SET _contentprogress 0
GOSUB PROGRESS

;#########Check XML and XML FileSize
SETFUNC XCheck FILEEXISTS Z:\homebrew.xml
IF# %XCheck% == 1 GOTO XMLCONTHB
WEBFILEFETCH z:\homebrew.xml http://www.xbox-skins.net/games/homebrew.xml
SET _contentprogress 10
GOSUB PROGRESS

:XMLCONTHB
SETFUNC XTS FILESIZE z:\homebrew.xml
IF# %XTS% == 0 GOTO SKIPXMLHB

;#####  ReadXML
SET _contentprogress 20
GOSUB PROGRESS
XMLOPEN vidshbXML z:\homebrew.xml
XMLSetNodePtr vidshbXML !
XMLGetElementCount vidshbXML Count
For X = 0 to %Count%
XMLGetValue vidshbXML nTitlehb%X% !.XBG:%X%.Title
XMLGetValue vidshbXML nHexIDhb%X% !.XBG:%X%.HexID
XMLGetValue vidshbXML nVidIDhb%X% !.XBG:%X%.VidID
XMLGetValue vidshbXML nVideohb%X% !.XBG:%X%.VIDEO
XMLGetValue vidshbXML nVChb%X% !.XBG:%X%.VC
XMLGetValue vidshbXML nESRBhb%X% !.XBG:%X%.ESRB
XMLGetValue vidshbXML nCoverxhb%X% !.XBG:%X%.Cover
XMLGetValue vidshbXML nThumbxhb%X% !.XBG:%X%.Thumb
Next
XMLClose vidshbXML

SET _contentprogress 30
GOSUB PROGRESS

set DialogName "ContentListDialog"
LoadDialogFromFile ContentListDialog E:\UDATA\00004321\contentlist.xml
For Item = 0 to %Count%
 Set @ContentListDialog.Control?CtrlID=101.Item:%Item%^Text "%nTitlehb{Item}%"
Next
ExecuteUIOBject ContentListDialog
QUIT

:EventHandlerHB
SWITCH %UITriggerID%
CASE 101
    If "%@ContentListDialog.Control?CtrlID=101.Item:{UIParam1}.Selected%" == "True" Then
       Set nTitle "%nTitlehb{UIParam1}%"
       Set nHexID "%nHexIDhb{UIParam1}%"
       Set nVidID "%nVidIDhb{UIParam1}%"
       Set nVideo "%nVideohb{UIParam1}%"
       Set nVC "%nVChb{UIParam1}%"
       Set nESRB "%nESRBhb{UIParam1}%"
       Set nCoverx "%nCoverxhb{UIParam1}%"
       Set nThumbx "%nThumbxhb{UIParam1}%"
    EndIf
ENDCASE
CASE 102
 XMLCreate DLXML GDBASE
 XMLSetValue DLXML !.XBG:0~Title %nTitle%
 XMLSetValue DLXML !.XBG:0~HexID %nHexID%
 XMLSetValue DLXML !.XBG:0~VidID %nVidID%
 XMLSetValue DLXML !.XBG:0~Video %nVideo%
 XMLSetValue DLXML !.XBG:0~ESRB %nESRB%
 XMLSetValue DLXML !.XBG:0~Cover %nCoverx%
 XMLSetValue DLXML !.XBG:0~Thumb %nThumbx%
 XMLSave DLXML z:\%nHexID%.xml
 XMLClose DLXML
 SET HexID %nHexID%
 GOTO NOTHOMEBREW
ENDCASE
CASE 103
MSGBOX " Yea, You REALLY need HELP!"
ENDCASE
CASE 104
QUIT
GOTO QUIT
ENDCASE
DEFAULT
ENDCASE
ENDSWITCH
RETURN
QUIT

:SKIPXMLHB
QUIT
;#################################### REGULAR TITLE #################################
:NOTHOMEBREW
SET _contentprogress 40
GOSUB PROGRESS
OnEvent EventHandler ContentDialog
set DialogName "ContentDialog"
LoadDialogFromFile ContentDialog E:\UDATA\00004321\content.xml
XMLSetValue ContentDialog !.Control:0.text "Only Press the Button 1 time!$eol$Download time depends on file size.$eol$You will be notified of completion."
ExecuteUIOBject ContentDialog
IF# %ISHB == 1 THEN
CloseUIOBject "ContentListDialog"
ENDIF
QUIT

:EventHandler
SWITCH %UITriggerID%
CASE 201
 IF %DialogName% == "ContentDialog" THEN
   SET _GETALL 1
GOTO GETVID
 ENDIF
ENDCASE
CASE 202
 IF %DialogName% == "ContentDialog" THEN
   GOTO GETVID
 ENDIF
ENDCASE
CASE 203
 IF %DialogName% == "ContentDialog" THEN
   GOTO GETTHUMB
 ENDIF
ENDCASE
CASE 204
 IF %DialogName% == "ContentDialog" THEN
   GOTO GETCOVER
 ENDIF
ENDCASE
CASE 205
 IF %DialogName% == "ContentDialog" THEN
   GOTO GETESRB
 ENDIF
ENDCASE
CASE 206
 IF %DialogName% == "ContentDialog" THEN
 GOTO QUIT
 ENDIF
ENDCASE
DEFAULT
ENDCASE
ENDSWITCH
RETURN
QUIT

IF %HBOK% == "1" GOTO ISHOMEBREW
;######################### VIDEO #########################
:GETVID

SET _contentprogress 50
GOSUB PROGRESS

GOSUB XMLCHECK
IF# %XTS% == 0 THEN
SET nVidID ""
SET nVideo ""
SET nVC ""
SET nThumbx 0
SET nCoverx 0
SET nESRB 0
SET
GOTO GOTVALS
ELSE
GOTO GOODXML
ENDIF

:GOODXML
XMLOPEN vidsXML z:\%HexID%.xml
XMLGetValue vidsXML nVidID !.XBG:0.VidID
XMLGetValue vidsXML nVideo !.XBG:0.VIDEO
XMLGetValue vidsXML nVC !.XBG:0.VC
XMLGetValue vidsXML nESRB !.XBG:0.ESRB
XMLGetValue vidsXML nCoverx !.XBG:0.Cover
XMLGetValue vidsXML nThumbx !.XBG:0.Thumb
XMLClose vidsXML

:GOTVALS
if "%nVC%" == "1"  GOTO RAR
if "%nVC%" == "2"  GOTO ZIP
if "%nVideo%" == "2"  GOTO XMV
if "%nVidID%" == ""  GOTO NOVID

:ISHOMEBREW
XMLSetValue ContentDialog !.Control:0.text "$eol$Downloading Video"

SET _contentprogress 55
GOSUB PROGRESS

WEBFILEFETCH %_GameDir%\MXM_SS.wmv "http://www.xbox-skins.net/games/sendvid.php?sid=%nVidID%"
MSGBOX "Video Downloaded" 0 2000

SET _contentprogress 60
GOSUB PROGRESS

IF# %_GETALL% == 1 GOTO GETTHUMB
GOTO QUIT

:RAR;######################### HANDLE RAR FORMAT
GOTO SKIPRAR  ;#########REMOVE WHEN RAR SUPPORT ADDED
XMLSetValue ContentDialog !.Control:0.text "$eol$Downloading Video"
WEBFILEFETCH z:\%HexID%.rar "http://www.xbox-skins.net/games/sendvid.php?sid=%nVidID%"
MSGBOX "Video Downloaded$eol$ Uncomressing RAR Archive" 0 2000
OpenRar COMPVIDRAR z:\%HexID%.rar
UnRarFile COMPVIDRAR 0 z:\%HexID%.wmv
CloseRar COMPVIDRAR

SETFUNC XCheck FILEEXISTS Z:\%HexID%.wmv
IF# %XCheck% == 0 GOTO RARBAD
SETFUNC XTS FILESIZE Z:\%HexID%.wmv
IF# %XTS% == 0 THEN
DELETE Z:\%HexID%.wmv
MSGBOX "Video Download Failed" 0 5000
ELSE
COPY Z:\%HexID%.wmv  %_GameDir%\MXM_SS.WMV
DELETE Z:\%HexID%.wmv
DELETE Z:\rar%HexID%.rar
MSGBOX "Video Downloaded" 0 2000
ENDIF

:RARBAD
MSGBOX "Failed to Uncompress RAR Archive" 0 5000

:SKIPRAR;############### REMOVE SKIP ONCE RAR SUPPORT INCLUDED
MSGBOX "RAR Archives Not Yet Supported" 0 5000
IF# %_GETALL% == 1 GOTO GETTHUMB
GOTO QUIT

:ZIP;######################### HANDLE ZIP FORMAT
MSGBOX "Zip Files Not Yet Supported" 0 5000
IF# %_GETALL% == 1 GOTO GETTHUMB
GOTO QUIT

:NOVID;######################### NO VIDEO AVAIL
If# %_GETALL% == 1 THEN
GOTO GVIDC
ELSE
GOTO BVIDA
GOTO QUIT

:BVIDA
XMLSetValue ContentDialog !.Control:0.text "$eol$Video Not Available$eol$ Press X To Request Video for this Title$eol$Press A to Quit"
Input
If %_GP_X% == "1" GOTO VDR
If %_GP_A% == "1" GOTO QUIT
GOTO BVIDA

:GVIDC
XMLSetValue ContentDialog !.Control:0.text "$eol$Video Not Available$eol$ Press X To Request Video for this Title$eol$Press A to continue without request."
Input
If %_GP_X% == "1" GOTO VDR
If %_GP_A% == "1" GOTO GETTHUMB
GOTO GVIDC

:XMV;######################### CANT DO XMV YET
IF# %_GETALL% == 1 THEN
XMLSetValue ContentDialog !.Control:0.text "Only a XMV file is currently available$eol$Press X to Request a WMV Video for this title.$eol$Press A to continue without request."
Input
If %_GP_X% == "1" GOTO VDR
If %_GP_A% == "1" GOTO GETTHUMB
If %_GP_BLACK% == "1" GOTO QUIT
ELSE
XMLSetValue ContentDialog !.Control:0.text "Only a XMV file is currently available$eol$Press X to Request a WMV Video for this title.$eol$Press A to Quit"
Input
If %_GP_X% == "1" GOTO VDR
If %_GP_A% == "1" GOTO QUIT
If %_GP_BLACK% == "1" GOTO QUIT
ENDIF
GOTO XMV

;######################### VIDEOREQUEST #########################
:VDR
SETFUNC nsize FILESIZE %_GameExe%
SETFUNC nTitle XBETITLE %_GameExe%
SETFUNC nTitle REPLACE " " "+" %nTitle%
SETFUNC nTitle REPLACE ":" "" %nTitle%
SETFUNC nTitle REPLACE "!" "" %nTitle%
SETFUNC nTitle REPLACE "'" "" %nTitle%
SETFUNC nTitle REPLACE "@" "" %nTitle%
XMLSetValue ContentDialog !.Control:0.text "$eol$Sending Request$eol$"
WEBFILEFETCH z:\request.xml "http://www.xbox-skins.net/games/request.php?t=%nTitle%&h=%HexID%&f=wmv&s=%nsize%"
XMLOPEN vidsR z:\request.xml
XMLGetValue vidsR xrequest1 !.XBR:0.RESULT1
XMLGetValue vidsR xrequest2 !.XBR:0.RESULT2
XMLClose vidsR
MSGBOX "%xrequest1%$eol$%xrequest2%" 0 5000

SET _contentprogress 65
GOSUB PROGRESS

IF# %_GETALL% == 1 THEN
GOTO GETTHUMB
ELSE
GOTO QUIT
ENDIF
;######################### THUMB #########################
:GETTHUMB
SET _contentprogress 70
GOSUB PROGRESS
GOSUB XMLCHECK
XMLOPEN vidsXML z:\%HexID%.xml
XMLGetValue vidsXML nThumb !.XBG:0.THUMB
XMLClose vidsXML
IF "%nThumb%" == "" THEN
MSGBOX "Thumbnail Not Available" 0 5000
GOTO SKIPTHUMB
ELSE
XMLSetValue ContentDialog !.Control:0.text "$eol$Downloading Thumbnail"
WEBFILEFETCH z:\MXM_THUMB%HexID%.png "http://www.xbox-skins.net/games/thumbs/%HexID%.png"
ENDIF
SETFUNC XTS FILESIZE z:\MXM_THUMB%HexID%.png
IF# %XTS% == 0 THEN
DELETE z:\MXM_THUMB%HexID%.png
MSGBOX "Thumbnail Download Failed" 0 5000
ELSE
COPY z:\MXM_THUMB%HexID%.png  %_GameDir%\MXM_THUMB.png
DELETE z:\MXM_THUMB%HexID%.png
MSGBOX "Thumbnail Downloaded" 0 2000
ENDIF
SET _contentprogress 75
GOSUB PROGRESS
:SKIPTHUMB
IF# %_GETALL% == 1 GOTO GETCOVER
GOTO QUIT

;######################### COVER #########################
:GETCOVER
SET _contentprogress 80
GOSUB PROGRESS
GOSUB XMLCHECK
XMLOPEN vidsXML z:\%HexID%.xml
XMLGetValue vidsXML nCover !.XBG:0.Cover
XMLClose vidsXML
IF "%nCover%" == "" THEN
MSGBOX "$eol$Cover Not Available" 0 5000
GOTO SKIPCOVER
ELSE
XMLSetValue ContentDialog !.Control:0.text "$eol$Downloading Cover"
WEBFILEFETCH z:\MXM_Cover%HexID%.jpg "http://www.xbox-skins.net/games/covers/%HexID%.jpg"
ENDIF
SETFUNC XTS FILESIZE z:\MXM_Cover%HexID%.jpg
IF# %XTS% == 0 THEN
DELETE z:\MXM_Cover%HexID%.jpg
MSGBOX "Cover Download Failed" 0 5000
ELSE
COPY z:\MXM_Cover%HexID%.jpg  %_GameDir%\MXM_Cover.jpg
DELETE z:\MXM_Cover%HexID%.jpg
MSGBOX "Cover Downloaded" 0 2000
ENDIF
SET _contentprogress 85
GOSUB PROGRESS
:SKIPCOVER
IF# %_GETALL% == 1 GOTO GETESRB
GOTO QUIT

;######################### ESRB #########################
:GETESRB
SET _contentprogress 95
GOSUB PROGRESS

GOSUB XMLCHECK
XMLOPEN vidsXML z:\%HexID%.xml
XMLGetValue vidsXML nESRB !.XBG:0.ESRB
XMLClose vidsXML
XMLSetValue ContentDialog !.Control:0.text "$eol$Downloading ESRB Icon"
WEBFILEFETCH z:\MXM_ESRB%HexID%.jpg "http://www.xbox-skins.net/games/esrb/%nESRB%.jpg"
SETFUNC XTS FILESIZE z:\MXM_ESRB%HexID%.jpg
IF# %XTS% == 0 THEN
DELETE z:\MXM_ESRB%HexID%.jpg
MSGBOX "ESRB Download Failed" 0 5000
ELSE
COPY z:\MXM_ESRB%HexID%.jpg  %_GameDir%\MXM_ESRB.jpg
DELETE z:\MXM_ESRB%HexID%.jpg
MSGBOX "ESRB Downloaded" 0 2000

SET _contentprogress 100
GOSUB PROGRESS

ENDIF
GOTO QUIT

;######################### XMLCHECK #########################
:XMLCHECK
SETFUNC XCheck FILEEXISTS Z:\%HexID%.xml
IF# %XCheck% == 1 GOTO XMLCONT
XMLSetValue ContentDialog !.Control:0.text "DO NOT PRESS A BUTTON$eol$$eol$Checking Availablitity."
WEBFILEFETCH z:\%HexID%.xml http://www.xbox-skins.net/games/xml/%HexID%.xml
:XMLCONT
SETFUNC XTS FILESIZE Z:\%HexID%.xml
IF# %XTS% == 0 THEN
IF# %FCHECKED% == 1 THEN
GOTO SKIPXML
ENDIF
ADD FCHECKED 1
XMLSetValue ContentDialog !.Control:0.text "This Title is not listed.$eol$Press X to Request a Video,Thumb,Cover.$eol$Press A to Quit"
Input
If %_GP_X% == "1" GOTO VDR
If %_GP_A% == "1" GOTO QUIT
If %_GP_BLACK% == "1" GOTO QUIT
QUIT
ENDIF
:SKIPXML
RETURN

;#######################################################
:PROGRESS
BeginDraw UseCurrent
Box 270 330 %_contentprogress% 30 RED BLACK
EndDraw
RETURN

;######################### QUIT #########################
:QUIT
SetFunc File FileExists Z:\%HexID%.xml
If# %File% == 1 Then
DELETE Z:\%HexID%.xml
EndIf
SetFunc File FileExists Z:\homebrew.xml
If# %File% == 1 Then
DELETE Z:\homebrew.xml
EndIf

QUIT

koldfuzion
also... if you can master this, then skin downloading and actionscript downloading will be just as easy wink.gif

flattspott
short and sweet huh? Just kidding. Sounds good to me
geniusalz
Definitely sweet. Are all the preview videos up? I was thinking of redoing some of them. These are my thoughts on what the videos should be like:
-All in-game footage. Prefereably some action, or scenes cut and pasted together. Should show no titles (game name, dev name) or intro.
-No audio, because it sounds weird scrolling through.
-Low bitrate, about 300 kbits > Smoother scrolling


Besides that, I was thinking about a system where scripts could request files. e.g. skins for (originally) no-resource games, sound effects, etc

So you could let scripters upload files, and then put URLs in the script to download those optional files.
koldfuzion
QUOTE
Are all the preview videos up? I was thinking of redoing some of them

For the games listed, 99.9% have videos. I havent looked at every one of them. I know some, if not a large percentage of the ones BloodyMary uploaded to the site are ones that i did and I have been pushing a lot of new videos there too.

I too would and will replace a lot of the videos over time, I just dont have the time to sit in front of the PC and do video after video.

QUOTE
These are my thoughts on what the videos should be like:
-All in-game footage. Prefereably some action, or scenes cut and pasted together. Should show no titles (game name, dev name) or intro.
-No audio, because it sounds weird scrolling through.
-Low bitrate, about 300 kbits > Smoother scrolling


I capture and encode straight from the game, so that the quality isnt lost and most of the latest ones i have done look like this one

a quick 1-2 second title screen with gameplay. WMV8 encoded at 500kb, the 500 just look way better than the 384 did. Think the difference between 500 and 384 justifies redoing them?

I think if you dont give the title screen... it might be hard to tell what video is for what game, or if you never named it right to begin with.. what game it might be.

Audio, i think should be left in. Just so its available to those that dont use music. I <usemusic>True</usemusic> in my MXM.XML because i prefer to listen to my soundtracks and only suspend music in my skins for intro/outro videos(so the video audio can be heard).


Anyone else any thoughts? Anyone else willing to help in the video creations?

QUOTE
Besides that, I was thinking about a system where scripts could request files. e.g. skins for (originally) no-resource games, sound effects, etc

So you could let scripters upload files, and then put URLs in the script to download those optional files.


Shouldnt be too hard to set up at all, xml output to list the files and url. sure.
geniusalz
500 seems ok. As for the game title screen, that's like a pet peeve of mine. Don't really like it, because the game name is there anyway when you're scrolling through your list. But I guess it's fine, because who am I to tell you how to make them when you're the one making them smile.gif
koldfuzion
anyone have anything that works yet?


Edited to remove old code
flattspott
I don't know for sure but you really should make it a point to try and read both the ActionScript Readme and the Change Log. Not trying to be mean spirited or anything like that. It's just that BJ revamped the webfile fetch in the 1197 build.

QUOTE
[*] Updated HTTP client to support Cookies and HTTP 1.x protocol.
    - Enhanced WebFileFetch command:
    - WebFileFetch <LocalFile> <URL> [<VarToHoldNewfilepath>|.|""] [<VarToHoldResult>]
    - Allows redirect headers (302 result code) to change the filename (remains in specified path, however) if a var name is specified.
    - <VarToHoldResult> will return the result code, too. This will be implmentd in other commands as well.


Maybe that has sonething to do with why it's giving you probems.
koldfuzion
well, understandable to state, but i did read it. over and over, tried numerous ways of doing it, im just not getting the results returned. Yes, i tried the new var after the url too. I either get a lockup, or nothing.

Once i run the script I may or may not be able to navigate the main menu again even though i can quit the script and reboot with the controller... weird.


Nice try though, thank you for taking the time to provide a working sample. smile.gif
BLazeD
QUOTE (koldfuzion @ May 4 2004, 04:44 PM)
anyone have anything that works yet?


Im trying the following code, but having no luck, the xml will download fine from the AXS url, but i get a 404 from xbox-skins even though the url is fine in IE.(wierd)

Anyone see whats wrong? All three webfilefetch urls are valid urls.


Could it be server settings, or the fact I switched servers?
koldfuzion
hold on, my dumb ass is a wip behind.. just noticed im still using 1172 and not 1197. Thanks flattspot, you were helpful after all, image that.

getting the XML AND the rar using the sendvid.php? work fine now.

the xml and vid get from xbox-skins is fine now too.

I feel like an ass now, but when do i not?
koldfuzion
Edit, see first post for code
koldfuzion
Blazed, you want to put the game covers in the same general location too? They are just mini ones like you see on walmart.com.

I can add code to the admin to handle them but i will need a directory to put them in. im thinking "covers" in the same location as the "XML" folder

329 are 15 mb so far. I think it would be easier to see whats missing if they could be compared against the same list.
chilin_dude
biggrin.gif beerchug.gif
Great progress Koldfuzion, how about adding thumbnails to it as well? And how about instead of just listing the age rating an icon for the age rating?
koldfuzion
for the web listing, we got away from icons and the soon to be sent code doesnt even shot the values unless you do a mouseover of the "+" sign that is shown on the webpage. This is only to show you that the value or content exists, the real work should be done by the scripts, web side, the user should just be clicking the download links.

Eventually, the scripts will download the videos, download the covers and the ESRB graphic and dump them all into the game directory.

If the skins are set to use resource calls using basenames , then no one will be forced the reboot to see the content immediately in the skins that support all three.

Edit: What would the source be for the thumbnails? I suppose the larger walmart.com cover images could be cropped to a decent thumb, but who is gonna do it? It was a pain just to get the 329 mini covers (i definitely thank adobe for adding actions to photoshop 7, saved me an butt-load of time but was still a lengthy process.)

um, friendly sarcasm aside. Thanks for pointing me to my error flattspott. Its great to see this stuff work, even though it still has a way to go. On your skinfix script to use basenames, you are including the in the script the thumbs/covers basenames too?

BJ, a little concern about a user choosing "download videos" on the context menu more than once before final execution. Maybe a function to disable controller input for a specific time, and/or timeout?


msgbox "Controller input will disabled during video download, press a button to continue, black to quit"

CNTLRLOCK 20000 <<- Lock controller input with time to wait, follow
Webfilefetch var path result <<- get file if bad result immediately unlock (i havent played with the results yet, so i dont know what im talking about)
If result == "404" GOTO Unlock
CNTLRUNLOCK
GOTO File cleanup

:Unlock
CNTRLUNLOCK
GOTO QUIT
koldfuzion
What are the possibilities of using actiondraw to provide progress on content download??

I could send the filesizes, but how to send the value first and how to use in MXM to display? I think it would be a very nice touch...and very progress informative.
chilin_dude
Well about the thumbnails, just get everyone here to upload all their own ones biggrin.gif
flattspott
QUOTE
I think flattspot said there was some problems with the rename command, does this affect copy/delete too?


Yes I did say that, copy/delete work off and on too. It's like they don't like variables or something.

QUOTE
Currently just downloads wmv and saves to Z, i have to get to work or i would work on it more.


Why not just save it to %_GameDir%.?


QUOTE
On your skinfix script to use basenames, you are including the in the script the thumbs/covers basenames too?


Nah, didn't think about that, it shouldn't be an issue to add it though.

QUOTE
BJ, a little concern about a user choosing "download videos" on the context menu more than once before final execution. Maybe a function to disable controller input for a specific time, and/or timeout?

msgbox "Controller input will disabled during video download, press a button to continue, black to quit"


How about just doing this, MsgBox "Do NOT press any buttons" ?
flattspott
QUOTE
What are the possibilities of using actiondraw to provide progress on content download??

I could send the filesizes, but how to send the value first and how to use in MXM to display? I think it would be a very nice touch...and very progress informativ


That would be cool. Unfortunatly at the moment, like you said basically it not gonaa happen right away.

But you could have some scripts scan the menu for what videos they need. Then download them all at one, or a least the limit. Then you could have progress bar of sorts that is upated ofter each download finishes.
koldfuzion
QUOTE
How about just doing this, MsgBox "Do NOT press any buttons" ?


because even though you tell them not to, they might accidentally, ive done it myself and i end up with a subsequent followup download.

QUOTE
Why not just save it to %_GameDir%.?


For uncompressed WMV files I will. For compressed I think it might be cleaner and safer to work from the Z dir.. since you can delete everything and it really doesnt matter. This was just an intial test script to make sure it all worked and plan it out. I still need to first add a check for xml-get results to ensure the xml was downloaded (that it existed). I havent done a lot of file fetching so Im still learning it and need to see the result var and how to handle a file not found error.

QUOTE
Well about the thumbnails, just get everyone here to upload all their own ones


Might be the good solution. I have a lot in the thumbs on AXS that i used for compilation disks... those are about 260x191. You're right though, those should probably be added.

I would like to see someone volunteer to make Covers for homebrew stuff to be included with the regular game covers. (using the same style as a game cover)

The download script should probably offer options, download video only, download thumb only, download esrb only, download all etc... maybe done through radio or checkboxes with the new form ui.

I did post the beginning script and asked for contributions so everyone can provide thier 2 cents and make it right from the start. Trying to make sure something isnt overlooked and its the best it can be. I'll work off any changes/additions that are posted.

chilin_dude
well there are a few covers for homebrew stuff already on
http://covers.boob.co.uk/
And a few others have been posted before... If you get a list of the ones that haven't yet been done then I'll make ones for them.

As for the thumbnails - it shouldn't be too hard to create a script to dump all the thumbnails to a folder where we can then upload them to a site for you should it?
koldfuzion
nice link chilin_dude, definitely to be used.

I will post a link later today so the covers i have can be checked for those willing to grab what is missing. Yes, a upload form could be done to allow the dumping of the covers/thumbs.

Like I said, I only hit walmart.com, never made it to amazon or any other site to search for covers.

Need to add an internet check to the script too.. so if the xbox ip is 0.0.0.0 the script is killed right away.
chilin_dude
Well I'll definately help out with covers and whatnot (thumbs laugh.gif )
because thats the only way i can really help as I'm too stupid for the rest laugh.gif
BLazeD
QUOTE (koldfuzion @ May 5 2004, 01:05 AM)
Blazed, you want to put the game covers in the same general location too? They are just mini ones like you see on walmart.com.

I can add code to the admin to handle them but i will need a directory to put them in. im thinking "covers" in the same location as the "XML" folder

329 are 15 mb so far. I think it would be easier to see whats missing if they could be compared against the same list.

Sounds good to me

Just send me an email and I will add them all ASAP
koldfuzion
will do, the script went very fast so far.. just need to work the rar and unzip stuff for it to be completed.

wmv, cover and thumb will save to the game directory.

i still think its better to use z: for rar/zip operations.

See the FIRST POST for the code and required xml, props again to Jezz for the dialog code he used.

Now i got lots of php to write, email on the way Blazed.

koldfuzion
I almost forgot the ESRB Button and icons, plus I made a mistake that screwed the script. So if you got it before now, you need to update both files.


almost there.. time for a quick bite, an email and some php.


Edit: Here are the mini covers i have so far. I havent touched the homebrew/apps yet.

chilin_dude, you can always upload the thumbs to the ftp. single zip if you want.
(anonymous access : ftp.allxboxskins.com can write to the incoming dir, wont see anything listed though)


Edit 2: Added a video request function (see very first post in thread). So if a XMV is provided, a WMV video can be requested from the dash. Will add this so any video missing can also be requested but I first need to make the php to pull the url data in and add to the yet uncreated table to list the requests. I will set this up on AXS for testing, and if it works right, convert to the xbox-skins code.

koldfuzion
updated the code in the very first post.

The video request url points to axs right, but the code there works fine, so it might be wise to adapt the code to all possible requests.

Title, hexid, request type and xbe size are the only things saved.

I'll move it over to xbox-skin.net soon, i have other code i need to finish before i send blazed another update.

Request posting
koldfuzion
heheh i feel like im talking to myself smile.gif

Changed back to using the Z drive for the Thumb and Cover as a temp locations. Wmv and esrb download will go straight to the game directory.

Why? because if a thumb or cover doesnt exist on the webserver a #hexid#.jpg still gets created with 0 (zero) filesize. Not too big a deal, it can be checked for, but it CANT be deleted until you reboot and delete it yourself.

So if oyu use the Z drive, you can check filesize before you copy and you dont run the risk of messing up your menu.... and it will stop it in its tracks.

BJ, how can i check if a remote file exists before attempting to save to a null file that cant be deleted??

for this.. an easy fix is just to add the thumb/cover as another database field in the xml (just a 1 or 0 depending on its existance, hex value for filename), so if the xml is zero byte, then i can work around it.

first post code updated. works rather nicely.. but i did run into the delete bug smile.gif
chilin_dude
Wel I'm wanting to try this out, but I don't get the first bit, add tothe context menu, whereabouts do we add it in there?
koldfuzion
in your MXM.XML find a nice spot and put this whole block (edit the path to what you need)

<Context>
<Item Name="Content Download">
<Mode>HD</Mode>
<Action>CallFile C:\mxmscripts\getvid.xas</Action>
</Item>
</Context>


Once you have the MXM.XMl edited, the content.xml file in the same dir as MXM and the script in the place you specified just go to a game, press Y, select game options and choose "Content Download".



All the covers will be going up real soon. Should have the dash to web requests completed soon too.
geniusalz
QUOTE (flattspott @ May 4 2004, 10:53 AM)
How about just doing this, MsgBox "Do NOT press any buttons" ?

There is an issue with 'focus' for scripts called from context menus, like I said earlier (with the tiny prev. vid download script I made)

BJ, could you look into it?
flattspott
QUOTE
There is an issue with 'focus' for scripts called from context menus, like I said earlier (with the tiny prev. vid download script I made)


Ok then how about just using something like this?

BeginDraw
Text 320 240 Center "Do NOT press any buttons or you'll kill your Xbox"
EndDraw
koldfuzion
hey flattspott... where you at with the xml? we could just post what you already have and go from there.

Im reluctant to add any titles that are in your range because i dont want to duplicate work. Except new ones that come out, im manually adding them.

If you want to, you can send me what you have now, and just do it web-based from then on.


Edit: Im also going to add the content.xml to the script. Do a check in the same location as the pref.xml for MXM and if it doesnt exist, write it out. It will take away any user setup, especially if the script is included in one of the releases.


Finish this up.. and I can get to work on the Actionscript market.. Like geniusalz proposed. script writers will be able to create, distribute and update scripts with thier own source control and versioning.

btw.. the update from-dash-to-web worked great using existing filefetch which in a way.. was a step toward the high-score list for games, add the security and its just begging people to play for the #1 spot.





chilin_dude
Yeah when you going to do it flatt wink.gif
Only messing I know it takes a while!!!
BTW KF thanks alot for the pms you sent me, I had a play around for a while and I think I understand just about all of it and have got about finding which games down't have preview vids there, one question though - I don't get how you ul thumbs unsure.gif
BenJeremy
Scripts are all currently queued up in a single thread.

This will change soon, however, when Plug-n-play becomes fully integrated.

You will be able to specify whether or not an app requires UI interaction; in the case of context, menus, I will have to consider that.... the best bet, as flattspott has said, is to post a message box up while doing your thing. Capturing input would be enough to prevent any issues. I may look into a way of notifying MXM that you want to suspend the UI while operating, though.

I worked on a little bit of code today... maybe a bit more this afternoon and tonight. I really need to get a new WIP out so you guys can hammer on the optimized interpreter. wink.gif Meanwhile, I'm adding a bunch of code to handle various things.

One thing I'm adding is memory buffers for byte-by-byte access to files, as well as "handled" searches (if you don't specify a handle for the search, it becomes "GlobalSearch", so old scripts will still work with the new methods.)

I've been fleshing out the PnP White Paper, too... more ideas, refining the whole scheme. Once I'm satisfied it's solid, I'll start implimenting it - which is why this next WIP release should be carefully looked at, including the updated White Paper when I get it uploaded tonight. I really will need feedback on it.

koldfuzion
1. The pulldown box to the left chooses what you are uploading. Cover or Thumb.

2. The browse button lets you locate the jpg to be uploaded.

3. The UL button is to start the upload.

It will post it using the hex value of the title...and all that is automatic.

A popup will appear saying something like "d3f45434.jpg was uploaded to the covers" or if hex is 0 or null, it will tell you hells no...of sorts.

Sorry if its confusing.. very limited on space so i dont show the filename you selected.

Glad you were able to read through the pm's. I know it was a lot to get at once..but its a lot to explain too.


chilin_dude
QUOTE
2. The browse button lets you locate the jpg to be uploaded.

This was the bit I am stuck on, I can't find the browse button :S
I'm sure its just me wink.gif
QUOTE
It will post it using the hex value of the title...and all that is automatic.

A popup will appear saying something like "d3f45434.jpg was uploaded to the covers" or if hex is 0 or null, it will tell you hells no...of sorts.

Yeah I thought so, thats a decent way to do it biggrin.gif
QUOTE
Sorry if its confusing.. very limited on space so i dont show the filename you selected.

Glad you were able to read through the pm's. I know it was a lot to get at once..but its a lot to explain too.

Nah, it was a very thourough pm, so even I could understand it fully, I just copied it all into word and printed it so it was easier to read laugh.gif

Glad to see you're doing some decent work BJ!!!
koldfuzion
what browser are you using?
flattspott
QUOTE
I've been fleshing out the PnP White Paper, too... more ideas, refining the whole scheme. Once I'm satisfied it's solid, I'll start implimenting it - which is why this next WIP release should be carefully looked at, including the updated White Paper when I get it uploaded tonight. I really will need feedback on it.


Don't worry about getting feedback, you'll get it smile.gif

QUOTE
what browser are you using?


Mozilla Firefox, you? ... jk
koldfuzion
the script has been updated to require only one file. flattspott built in the content.xml so if it doesnt exist, it will be created in the mxm folder on E.

it needs to be optimized. The area for zip/rar handling is there and i cant think of anything else it needs besides those two.
chilin_dude
The post has served its needs wink.gif
flattspott
finally got around to testing it out, downloaded the GTA3 vid. It was slow for me (dialup) but it worked nonetheless
koldfuzion
Maybe BJ can optimise it a little more to help out your dialup? laugh.gif

You never mentioned the delete bug.. so im assuming its fixed. I can wait to try out the new WIP once i get home.
BenJeremy
QUOTE (koldfuzion @ May 7 2004, 03:03 PM)
Maybe BJ can optimise it a little more to help out your dialup? laugh.gif

You never mentioned the delete bug.. so im assuming its fixed. I can wait to try out the new WIP once i get home.

The delete bug has been fixed. I refered to it as the "404 issue" - when erroring out of a download, it didn't close the file. Now I close and delete it.
flattspott
QUOTE
Maybe BJ can optimise it a little more to help out your dialup?


I don't find that very funny Mr BroadBand.

It isn't really all that bad seeing how MXM gets it at the same speed as my pc would. Only difference that MXM doesn't give you any progross info.

Also, I guess I was wrong about there not being a Ninja Gaiden video. I just used this script to get it.

BLazeD
It is one cool piece of work I must say, and the request feature is a great idea too!
koldfuzion
Doesnt do anything for me now, dialog comes up be nothing else happens and i cant even quit the script. I have to reboot the box.
BenJeremy
QUOTE (koldfuzion @ May 7 2004, 05:06 PM)
Doesnt do anything for me now, dialog comes up be nothing else happens and i cant even quit the script. I have to reboot the box.

Hrm.... looks like I have some things to fix.

Don't know what might have happened to the input. Strange indeed.
koldfuzion
Yea, it wont do anything at all.

Can anyone else verify this?

the script has a pretty good update now too,esrb, thumbs, covers and videos all downloadable now. (no thumbs on the site though) . link is in first post.
flattspott
I was gonna mention it when you posted

QUOTE
I can wait to try out the new WIP once i get home.


But you seemed so excited.

And yes this did happen to me to. I just went back to 1172 build.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.