The Forum is up for sale: XeNTaX Forum looking for new owner

writing a .bms for a frreware 3d game: magic pets

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by Mr.Mouse »

The null-terminated filenames have extremely easy encryption. Remember that filenames usually have the structure: name.ext
So clearly,

Code: Select all

C4 E1 F4 E1 AF C5 E6 E5 E3 F4 F3 AF C2 EC EF EF E4 F3 AF C2 EC EF EF E4 AE E4 E4 F3 00
is one filename. The last 4 characters: AE E4 E4 F3 are then the dot + extension. A dot (.) = 2E hex. Here it is AE. The difference is 80 hex (128 dec). Could it be that simple? Yes it is:

Code: Select all

Data/Efects/Bloods/Blood.dds
Simply subtract 128 from each byte and you get the correct ASCII code for the filename. LOL!

:)
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

thanks DR Mike
it was like honey :lick:
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

i will to decompress the archives of this online game , gratitude for your help !
http://hp.wildgames.com/games/puppy-luv
i uploaded one of its archive !
3DProps.rar
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

the archives of these two games are similar : ( .grp format )
http://www.gametop.com/download-free-games/star-sword/
http://www.gametop.com/download-free-ga ... dly-stars/

first i assumed the structure is simple , but when i tried to figure how the file directories are formed , i can't discover any rule for it !
and this is my last effort :

game : DeadlyStars

Code: Select all

goto 49
for i = 0 < 1286
get pad long

if pad < 3
get pad long
GetDString folder pad
get pad long
if pad == 0
get pad long
if pad == 1
set pad 14
Elif pad == 2
set pad 14
Elif pad == 4
set pad 26
Elif pad == 18
set pad 15
Elif pad == 5
set pad 14
else
set pad 18
endif
GetDString folder pad
endif
get pad long
endif

GetDString NAME pad
get off long
get size long
log NAME off size
next i
output :

Code: Select all

  0256b0b7 617        panter lazer.x
  0256b320 16512      powerbull lazer.dds
  0256f3a0 622        powerbull lazer.x
  0256f60e 16512      rocets.dds
  0257368e 4224       rocetsnuke.dds
  0257470e 3102       rocket1.x
  0257532c 4876       rocket2.x
  02576638 9032       rocket3.x
  02578980 1110       rocket_small.x
  02578dd6 16512      scorpion lazer.dds
  0257ce56 612        scorpion lazer.x
  0257d0ba 2600       swarm.x
  0257dae2 4224       termit lazer.dds
  0257eb62 637        termit lazer.x
  0257eddf 75         bomb.lbm
  0257ee2a 89         boss1 lazer.lbm
  0257ee83 83         boss3 lazer.lbm
  0257eed6 83         boss4 lazer.lbm
  0257ef29 89         bullet rose.lbm
  0257ef82 86         crab lazer.lbm
  0257efd8 85         discharge.lbm
  0257f02d 87         laser blue.lbm
  0257f084 89         laser green.lbm
  0257f0dd 85         laser red.lbm
  0257f132 88         lazer1_mod1.lbm
  0257f18a 88         lazer1_mod2.lbm
  0257f1e2 88         lazer1_mod3.lbm
  0257f23a 88         lazer1_mod4.lbm
  0257f292 88         lazer1_mod5.lbm
  0257f2ea 88         lazer2_mod1.lbm
  0257f342 88         lazer2_mod2.lbm
  0257f39a 88         lazer2_mod3.lbm
  0257f3f2 88         lazer2_mod4.lbm
  0257f44a 88         lazer2_mod5.lbm
  0257f4a2 88         lazer3_mod1.lbm
  0257f4fa 88         lazer3_mod2.lbm
  0257f552 88         lazer3_mod3.lbm
  0257f5aa 88         lazer3_mod4.lbm
  0257f602 88         lazer3_mod5.lbm
  0257f65a 88         lazer4_mod1.lbm
  0257f6b2 88         lazer4_mod2.lbm
  0257f70a 88         lazer4_mod3.lbm
  0257f762 88         lazer4_mod4.lbm
  0257f7ba 88         lazer4_mod5.lbm
  0257f812 88         lazer5_mod1.lbm
  0257f86a 88         lazer5_mod2.lbm
  0257f8c2 88         lazer5_mod3.lbm
  0257f91a 88         lazer5_mod4.lbm
  0257f972 88         lazer5_mod5.lbm
  0257f9ca 82         nuke.lbm
  0257fa1c 88         panter lazer.lbm
  0257fa74 91         powerbull lazer.lbm
  0257facf 58         rocket1.lbm
  0257fb09 58         rocket2.lbm
  0257fb43 81         rocket3.lbm
  0257fb94 68         rocket_small.lbm
  0257fbd8 90         scorpion lazer.lbm
  0257fc32 61         swarm.lbm
  0257fc6f 88         termit lazer.lbm
  0257fcc7 686        long laser.x
  0257ff75 4224       long_lazer.dds
  02580ff5 106        long laser.lbm
  0258105f 225        comet.lbm

- 1286 files found in 2 seconds

D:\quickbms>
I get a really bad headache on this enigma :fury:
I am very eager to know , how do you will write a script for this satanic format ?
i attached the "DeadlyStars" table index !
thanks for dedication of your valuable time !
You do not have the required permissions to view the files attached to this post.
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by Mr.Mouse »

Hey , shekofte, you wrote that BMS yourself? Nice! :)
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

yes sure , so far , you thought i am dullard ? :frizzy:
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by Mr.Mouse »

Haha, no, but not many people can do that, so good job! :D :]
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

I wrote a 010 editor binary template that highlight variables in different colors , so that you can explore the structure easily !
as you see my script will checkmate after reading 1287 records !
where is my mistake ?
(this 40 mb archive is causes of obsession ! )

Code: Select all

local unsigned int i;
local unsigned int y=18;
struct folder {
uchar name[x];
};
struct pad {
uchar row[y];
};
FSeek(49);
for (i=0;i<1287
;++i){
SetColor(0x000000 , 0xb0ff00 );
unsigned int x;

if(x<3){
SetColor(0x000000 , 0xa000ff );
unsigned int x;
SetColor(0x000000 , 0xffe000 );
folder root;
SetColor(0x000000 , 0xffffff );
unsigned int x;

if(x==0){
SetColor(0x000000 , 0xff00ff );
unsigned int x;

if(x==1)y=14;
else if(x==5)y=14;
else if(x==2)y=14;
else if(x==18)y=15;
else if(x==4)y=26;
else
y =18;

SetColor(0x000000 , 0xffff00 );

pad sub;
}
SetColor(0x000000 , 0xa000ff );
unsigned int x;
}

SetColor(0x000000 , 0xdfa000 );
folder path;
SetColor(0x000000 , 0x00d0ff );
unsigned int offset;
SetColor(0x000000 , 0x00ffd0 );
unsigned int size;
}
You do not have the required permissions to view the files attached to this post.
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

other games that developed by programmer of this game : Star Defender
http://www.mobygames.com/developer/shee ... Id,308059/
Star Defender has a more entice style ! :furious:
http://www.awem.com/star-defender-4.html
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

the following is the quickbms script for Star Defender:

Code: Select all

# script for QuickBMS http://aluigi.org/papers.htm#quickbms

get VER short
get FILES long
for i = 0 < FILES
    get NAMESZ short
    filexor 0xcd
    getdstring NAME NAMESZ
    get OFFSET long
    get SIZE long
    filexor ""
    log NAME OFFSET SIZE
next i
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

VIVA Luigi
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

and the following is the quickbms script for the other 2 games you linked: DeadlyStars and StarSword

Code: Select all

# DeadlyStars, StarSword and possibly other GameTop/GameTeam/Media Contact LLC games with the GRP extension
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

set PATH string ""
get VER long
callfunction extract

startfunction extract
    get NAMESZ long
    getdstring NAME NAMESZ
    string PATH += NAME
    string PATH += /

    get FILES long
    for i = 0 < FILES
        get NAMESZ long
        getdstring NAME NAMESZ
        get OFFSET long
        get SIZE long

        set FULLNAME string PATH
        string FULLNAME += NAME
        log FULLNAME OFFSET SIZE
    next i

    get FOLDERS long
    for i = 0 < FOLDERS
        callfunction extract
    next i
endfunction
Last edited by aluigi on Mon Dec 28, 2009 10:22 pm, edited 1 time in total.
User avatar
shekofte
mega-veteran
mega-veteran
Posts: 221
Joined: Sun Jan 18, 2009 1:45 pm
Location: Sagittarius
Has thanked: 299 times
Been thanked: 20 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by shekofte »

thanks Luigi you are a real nobleman , this script is very informative for me ...
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by Mr.Mouse »

I would just like to applaud Aluigi for the efforts he puts into his work. Keep it up! Once I could produce many scripts, sadly those days are gone now. :(
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: writing a .bms for a frreware 3d game: magic pets

Post by aluigi »

sadly those days are gone now
unfortunately that's normal for anyone.
that's why is necessary to "knuckle down" in the moments when this is possible (with the help of time and interest) because the future is ever uncertain...
Post Reply