Jump to content



Photo
- - - - -

How to extract the script from a game

vpx

  • Please log in to reply
8 replies to this topic

#1 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,806 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 13 June 2021 - 08:48 PM

Is there away to extract the Table Script from a game without opening the game


Edited by Outhere, 13 June 2021 - 08:50 PM.


#2 tabascoman77

tabascoman77

    Enthusiast

  • Silver Supporter
  • 211 posts
  • Location:San Jose, CA

  • Flag: United States of America

  • Favorite Pinball: Twilight Zone, Tron Legacy, Black Hole, Elvira & the Party Monsters

Posted 13 June 2021 - 10:05 PM

The only way I can personally think of trying to get in with a resource editor...but, mainly, I just open the game in VPX and copy/paste the script to Notepad so I can edit it that way, all while keeping a copy of the older, working script just in case I break something.


Custom build: Windows 10, i5 6600, Nvidia GTX 970, 16 GB RAM


#3 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 13 June 2021 - 10:41 PM

Is there away to extract the Table Script from a game without opening the game

Devoid of VPX entirely?

Sure

 

7zip
open the VPX file in 7 zip

You will have to strip some extraneous data from the top and prune the endDB call at the bottom, but the script is in gamestg/gamedata

 

the rest seems to be a kind of base64 conversion of the images and sounds and what not

i can load the raw audio, i cant not open the images yet though, cause it isnt really base64 i dont think


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#4 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,806 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 13 June 2021 - 10:49 PM

The only way I can personally think of trying to get in with a resource editor...but, mainly, I just open the game in VPX and copy/paste the script to Notepad so I can edit it that way, all while keeping a copy of the older, working script just in case I break something.

 

After doing some work on the table script the game now causes VP to crash
But I don't think it's the script because I made a VBS file with a good script and it's still not loading - VP still crashes

 

 

Crash report VPX rev192 (a1d98b7)
============
Process: VPinballX.exe
Reason: 0xC0000005 - EXCEPTION_ACCESS_VIOLATION at 0023:005A96B2
Attempt to read from 0x00000038
Thread ID: 0x3C50 [15440]

Call stack
==========
005A96B2 VPinballX.exe (0x00000004 0x00000001 0x032C0BD0 0x032db980)
004BA0AB VPinballX.exe (0x0019E3FC 0x0B50B6E0 0x484BFCE8 0x006d0049)
0054FD22 VPinballX.exe (0x77266339 0x484BFD24 0x00000001 0x00000000)
77272E0C ntdll.dll NtContinue + 0xC (0x484BFD24 0x00000001 0x00000000 0x00000000)
77266339 ntdll.dll LdrInitializeThunk + 0x29 (0x0B50B608 0x03210000 0x0C4C6610 0x00000000)

Environment
===========
Date/time: 13/6/2021, 17:55:50:145
Number of CPUs: 8
Processor type: 586
System: Windows 10 (10.0 19042)

Memory status
=============
Total Reserved: 112480K (109M) bytes
Total Commited: 1178432K (1150M) bytes
Total Free: 2903328K (2835M) bytes
Largest Free: 2095476K (2046M) bytes

Registers
=========
EAX=00000000 EBX=032DB980 ECX=032DB980 EDX=00000000
ESI=484BFDF0 EDI=484BFE08 EBP=00000000 ESP=484BFD98 EIP=77287944
FLG=00010246 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B


Mini dump saved successfully.


Edited by Outhere, 13 June 2021 - 10:52 PM.


#5 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,806 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 13 June 2021 - 11:04 PM

 

Is there away to extract the Table Script from a game without opening the game

Devoid of VPX entirely?

Sure

 

7zip
open the VPX file in 7 zip

You will have to strip some extraneous data from the top and prune the endDB call at the bottom, but the script is in gamestg/gamedata

 

the rest seems to be a kind of base64 conversion of the images and sounds and what not

i can load the raw audio, i cant not open the images yet though, cause it isnt really base64 i dont think

 

That did the trick thank you



#6 stoj

stoj

    Hobbyist

  • Members
  • PipPip
  • 47 posts

  • Flag: Australia

  • Favorite Pinball: acdc

Posted 30 April 2023 - 01:57 PM

I did a little more digging into this and the file format is CFBF which is an old MS technology used for COM objects storage.  It can extracted programatically via a few different open source libraries such as OpenMcdf.

 

I've recently added a usage in ClrVpin if you're keen to see it in action.. it extracts the ROM name from the VPX table's embedded script portion of the file.



#7 Mike DA Spike

Mike DA Spike

    Pinball Fan

  • Platinum Supporter
  • 1,280 posts
  • Location:Hoofddorp

  • Flag: Netherlands

  • Favorite Pinball: Too many to mention

Posted 30 April 2023 - 05:09 PM

Isn't the scripting just vbs scripting ?
And scripting can be extracted via vpinball.exe by using -extractvbs with tablename.
Databasemanager has an inbuild extractor for years to get rom name, author, table version from the vpt or vpx file :drinks: (big thanks to scutters)

Edited by Mike DA Spike, 02 May 2023 - 07:07 AM.

331ddabcc742f0ba74791e946eb0f791.gif Try PinballX Database manager as a replacement of PinballX's game list manager
With special thanks to Scutters 


#8 jarr3

jarr3

    Enthusiast

  • Platinum Supporter
  • 198 posts
  • Location:Frankfurt, Germany

  • Flag: Sweden

  • Favorite Pinball: Medieval Madness

Posted 01 May 2023 - 08:42 PM

I do not know how long this exists, but there is a command line parameter to VPX.exe called -extractVBS [filename] which will do the export for you.

 

See the parameter list:  

 

Attached File  VPX-parameters.png   155.23KB   24 downloads



#9 Mike DA Spike

Mike DA Spike

    Pinball Fan

  • Platinum Supporter
  • 1,280 posts
  • Location:Hoofddorp

  • Flag: Netherlands

  • Favorite Pinball: Too many to mention

Posted 02 May 2023 - 07:08 AM

I do not know how long this exists, but there is a command line parameter to VPX.exe called -extractVBS [filename] which will do the export for you.
 
See the parameter list:  
 
VPX-parameters.png


That's what I tried to say as well .... but your screenshot makes it more clear

331ddabcc742f0ba74791e946eb0f791.gif Try PinballX Database manager as a replacement of PinballX's game list manager
With special thanks to Scutters 






Also tagged with one or more of these keywords: vpx