Page 1 of 1

Railroad Tycoon 3 3dp models

Posted: Thu Feb 05, 2009 10:00 pm
by Mr.Mouse
Here's a script I wrote to extract stuff from RT3's PK4 files:

Code: Select all

Get Version Long 0 ;
Get FileNum Long 0 ;
Savepos Start 0 ;
Set Jump Long FileNum ;
Math Jump *= 74 ;
Math Jump += Start ;
For T = 1 To FileNum ;
Get ID Long 0 ;
Get FileSize Long 0 ;
Get FileROffset Long 0 ;
Get Unknown Int 0 ;
GetDString FileName 60 0 ;
Math FileROffset += Jump ;
Log FileName FileROffset FileSize 0 0 ;
Next T ;
I've attached a file that is a 3d-model. (in the zip are unrelated dds and wav files).

Perhaps someone can take a look.
example.JPG

Re: Railroad Tycoon 3 3dp models

Posted: Sat Mar 21, 2009 7:57 am
by Karpati
I added the .3dp and the .pk4/.3dp loader modules to V4.40 and I released the 3D Object Converter v4.40 update.

You can update your installed application (version>=4.0) quickly and easily using the auto-update function (Help/Check for updates).

Re: Railroad Tycoon 3 3dp models

Posted: Sat Mar 21, 2009 10:09 am
by Mr.Mouse
Great work, Karpati ! :ninja:

Re: Railroad Tycoon 3 3dp models

Posted: Wed Apr 29, 2009 10:49 am
by shekofte
hello Boss , excuse me that i have very banal question here !
please guide me how should i apply this script ?
because this is the first time i use such scripts , i guess it is not .bms because it has " ; "
I realy appreciate if you spend your time for answering to me ! thanks a lot .

Re: Railroad Tycoon 3 3dp models

Posted: Wed Apr 29, 2009 12:21 pm
by Mr.Mouse
You can use the script. Save the text as a text file (.txt).
In MultiEx Commander go to 'Tools' and select the Custom MexScript option. Then point to the .txt file. Then point to the archive to open. Done.

Re: Railroad Tycoon 3 3dp models

Posted: Sun Aug 26, 2018 7:19 am
by EvilWar
Mr.Mouse wrote:Here's a script I wrote to extract stuff from RT3's PK4 files:

Code: Select all

Get Version Long 0 ;
Get FileNum Long 0 ;
Savepos Start 0 ;
Set Jump Long FileNum ;
Math Jump *= 74 ;
Math Jump += Start ;
For T = 1 To FileNum ;
Get ID Long 0 ;
Get FileSize Long 0 ;
Get FileROffset Long 0 ;
Get Unknown Int 0 ;
GetDString FileName 60 0 ;
Math FileROffset += Jump ;
Log FileName FileROffset FileSize 0 0 ;
Next T ;
Your script has a error: First symbol of FileName is lost.
Correct script:

Code: Select all

Get Version Long 0 ;
Get FileNum Long 0 ;
Savepos Start 0 ;
Set Jump Long FileNum ;
Math Jump *= 74 ;
Math Jump += Start ;
For T = 1 To FileNum ;
Get ID Long 0 ;
Get FileSize Long 0 ;
Get FileROffset Long 0 ;
Get Unknown Byte 0 ;
GetDString FileName 61 0 ;
Math FileROffset += Jump ;
Log FileName FileROffset FileSize 0 0 ;
Next T ;