xboxscene.org forums

Pages: [1] 2 3 ... 6

Author Topic: Downloadable Content  (Read 2376 times)

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« on: April 28, 2004, 03:38:00 PM »

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-skin...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-skin...mes/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-skin...b4e0002</b>.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-skin...?<b>sid=135</b>

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

Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #1 on: April 28, 2004, 03:53:00 PM »

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

Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Downloadable Content
« Reply #2 on: April 28, 2004, 05:14:00 PM »

short and sweet huh? Just kidding. Sounds good to me  <
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Downloadable Content
« Reply #3 on: April 28, 2004, 07:14:00 PM »

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.  <
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #4 on: April 28, 2004, 08:21:00 PM »

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.

This post has been edited by koldfuzion: Apr 29 2004, 03:31 AM <
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Downloadable Content
« Reply #5 on: April 28, 2004, 08:51:00 PM »

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
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #6 on: May 03, 2004, 09:55:00 PM »

anyone have anything that works yet?


Edited to remove old code

This post has been edited by koldfuzion: May 5 2004, 12:09 PM <
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Downloadable Content
« Reply #7 on: May 04, 2004, 01:48:00 AM »

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.  <
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #8 on: May 04, 2004, 03:02:00 AM »

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
Logged

BLazeD

  • Archived User
  • Full Member
  • *
  • Posts: 152
Downloadable Content
« Reply #9 on: May 04, 2004, 04:35:00 AM »

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?  <
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #10 on: May 04, 2004, 05:34:00 AM »

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?

This post has been edited by koldfuzion: May 4 2004, 12:59 PM <
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #11 on: May 04, 2004, 06:10:00 AM »

Edit, see first post for code

This post has been edited by koldfuzion: May 4 2004, 09:04 PM <
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #12 on: May 04, 2004, 06:16:00 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.

This post has been edited by koldfuzion: May 4 2004, 01:17 PM <
Logged

chilin_dude

  • Archived User
  • Hero Member
  • *
  • Posts: 3068
Downloadable Content
« Reply #13 on: May 04, 2004, 05:18:00 AM »

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?
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Downloadable Content
« Reply #14 on: May 04, 2004, 06:41:00 AM »

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

This post has been edited by koldfuzion: May 4 2004, 02:39 PM <
Logged
Pages: [1] 2 3 ... 6