FAQ Search
Memberlist Usergroups
Profile
  Forum Statistics Register
 Log in to check your private messages
Log in to check your private messages
Moonpod Homepage Starscape Information Mr. Robot Information Free Game Downloads Starscape Highscore Table
Starscape unpacking tool
Goto page 1, 2  Next
Post new topic   Reply to topic    Discussion Pod Forum Index -> Starscape View previous topic :: View next topic  
 Author
Message
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Tue Aug 29, 2006 1:55 pm    Post subject: Starscape unpacking tool Reply with quote

Still very alpha as yet, but I'm slowly improving it.

Current features:
- can list or unpack contents of starscape.00*
- can generate index files (only useful for debugging at the moment, but will be part of the repacking process later, between getting moon_pack() working and fully deciphering the file format)

To use it, simply running 'moonpak' with no arguments will drop you into an interactive shell, and you can type '?' for some help. Note that although the pack command is listed, it is not yet implemented and any attempt to use it will do nothing.

You can also use it non-interactively by passing in on the command line the commands you would have entered in interactive mode; thus, the following invocations are identical:
Quote:
$ moonpak i index.000 l starscape.000 u starscape.000
(lots of output snipped)
Quote:
$ moonpak
(moonpak) i index.000
Index file set to 'index.000'
(moonpak) l starscape.000
(lots of output snipped)
(moonpak) u starscape.000
(lots of output snipped)
(moonpak) q


You can find it here. Source code is included and should build in any ANSI C99 and POSIX compatible C compiler.

(Disclaimer: this is not supported by Moonpod, I'm not affiliated with them, if it doesn't work bug me and not them, if it blows up your computer/corrupts your Starscape install/eats your liver it's not my fault, back up Starscape before proceeding, etc, etc)


Last edited by ToxicFrog on Wed Aug 30, 2006 3:56 am; edited 1 time in total
Back to top
View user's profile
Fost
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 3734



PostPosted: Tue Aug 29, 2006 2:05 pm    Post subject: Reply with quote

Wow, even we don't have an unpacker Shocked
Back to top
View user's profile Visit poster's website
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Tue Aug 29, 2006 3:19 pm    Post subject: Reply with quote

But...you're the developers!
*head explodey*
Back to top
View user's profile
Fost
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 3734



PostPosted: Tue Aug 29, 2006 3:23 pm    Post subject: Reply with quote

Yeah, but we have all the source data anyway, so we only ever need to pack it.

Oh, the game can obviously read that in - but we don't have any kind of stand alone tool for it.
Back to top
View user's profile Visit poster's website
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Tue Aug 29, 2006 3:43 pm    Post subject: Reply with quote

Aah, good point. Well, I hope to have a packer as well at some point, although it'll take some more reverse engineering (and writing a windows implementation of ftw()) before it'll be as flexible as I'd like.

I don't suppose I could talk you into publishing file format specifications?
Back to top
View user's profile
Fost
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 3734



PostPosted: Tue Aug 29, 2006 4:08 pm    Post subject: Reply with quote

ToxicFrog wrote:
I don't suppose I could talk you into publishing file format specifications?

Sorry, we've been over this a bazillion times and currently we do not want to get into modding Starscape. I know the will is there amongst the community, but the tools even we have are not capable of supporting modding in any way I believe to be remotely interesting or even easy. We just believe that if we release the tools, nothing interesting will come of it, it will be a huge dissapointment, and it will generate lots of questions that we don't have the time to answer, and which don't have particularly good answers for the modding community.

We have always said - do something well or not at all. In this instance, it's more accurate to say - Don't do something attrociously badly.
Back to top
View user's profile Visit poster's website
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Tue Aug 29, 2006 4:32 pm    Post subject: Reply with quote

Alright then, I'll just have to keep reverse engineering all the file formats myself. Smile
Calling files full of binary data ".txt" is just mean, though. Razz
Back to top
View user's profile
Fost
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 3734



PostPosted: Tue Aug 29, 2006 4:43 pm    Post subject: Reply with quote

Well, if you want to do that as a programming excercise, knock yourself out!

If this was something people wanted support for, then it would be within our power to do it (which would also save you the effort of reverse engineering our file formats, which are probably only obfuscated by virtue of being ****!). Just seems pointless and rubbish to me if there's nothing exciting you can do with it.

Let me think - minimum we'd need is the ability to recognise the files had been modded and invalidate the highscores system, and a tutorial on compiling a pak file and anything that was in it.

I'm not sure anyone is going to be excited by the 'pink ship mod' though. Wink Still, if a lot of people wanted it...

Anyone else for this? Or would prefer effort to be expended making something more changeable?
Back to top
View user's profile Visit poster's website
Weeble
Starscape Jedi
Starscape Jedi


Joined: 25 Apr 2003
Posts: 1143
Location: Glasgow, Scotland



PostPosted: Tue Aug 29, 2006 5:56 pm    Post subject: Reply with quote

The only thing I'd be interested in modding would be the interface for the HUD and menus and stuff, and from your description I seriously doubt I would have any hair left by the time I finis-- err... by the time I gave up.
Back to top
View user's profile Visit poster's website MSN Messenger
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Tue Aug 29, 2006 7:39 pm    Post subject: Reply with quote

Well, based on my rummaging around you'd be able to change the appearance of the buttons and suchlike, but not, I think, their placement - and adding and removing functionality would be right out.

All I want to do is swap around the color schemes on the drive trails and shield bubbles; I'm not doing anything ambitious. But it is looking like apparance mods - graphics, sounds, conversation text, and so forth - is all that's going to be possible. And it is true that most people are more interested in new gameplay than in a new color scheme for you ship's engines.

The txt format is eating my brain. I've got part of the spr format cracked, though.
...I think.
Back to top
View user's profile
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Wed Aug 30, 2006 3:56 am    Post subject: Reply with quote

New version up; first post edited to reflect this.
Back to top
View user's profile
Fost
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 3734



PostPosted: Wed Aug 30, 2006 4:28 pm    Post subject: Reply with quote

Further to this: I was just talking to someone via email regarding this thread, who has already reverse engineered the text format in Starscape (Incidentally, I'm not sure that helps anyway, as they may be compiled into another file, and they are just source we should have deleted or something - I forget...)

Anyway, I have to point out that we would probably want to lock this thread and delete the tool link if it got that far OR switch off the highscore table, which it would invalidate.

I'm now thinking that what we need to do is put a safeguard into the highscores system with 1.6 (This is the only reason that anything is unreadable anyway), so modified files break the highscores. I'm not sure how this will be possible, but I'll have a think. I'd also be happy to write a tutorial about using the files, and provide some source data. I'd hesitate to call it a modding pack, more of a hacking pack.

Then it would be possible to release the sprite packer. So if people wanted to draw beards on Bud then they could knock themselves out Smile

We still think that it's a total waste of time, but at least it would settle the matter once and for all. (Although I predict there will be more questions than answers Sad )

Depends if we can think of a suitable way to safeguard the highscores system, and whether or not Mark has the time with 1.6...
Back to top
View user's profile Visit poster's website
ToxicFrog



Joined: 29 Aug 2006
Posts: 11
Location: Canada



PostPosted: Wed Aug 30, 2006 7:03 pm    Post subject: Reply with quote

Fost wrote:
Further to this: I was just talking to someone via email regarding this thread, who has already reverse engineered the text format in Starscape (Incidentally, I'm not sure that helps anyway, as they may be compiled into another file, and they are just source we should have deleted or something - I forget...)

Well, if they're source it's just matter of writing a compiler for them, yes? Smile

Quote:
Anyway, I have to point out that we would probably want to lock this thread and delete the tool link if it got that far OR switch off the highscore table, which it would invalidate.

That would make me very sad. Especially since, if you're correct about not being able to make anything but superficial changes to the game's appearance with editing the code, nothing someone could do with this would give them an advantage anyways.
I think.

Quote:
I'm now thinking that what we need to do is put a safeguard into the highscores system with 1.6 (This is the only reason that anything is unreadable anyway), so modified files break the highscores. I'm not sure how this will be possible, but I'll have a think.

Checksums. The server knows the md5sum (or sha1sum or crc32 or whatever hashing algorithm you want to use) of the correct starscape.000 and starscape.001 files. The client calculates its own on startup. When told to upload scores, the server compares the checksums presented by the client against the ones known by the server, and rejects the scores if they don't match.
A checksum for starscape.exe could also be added to help curb cheating by modifying it to fake the checksums, but anyone with sufficient skill to do that can probably get it to fake its own checksum as well (or just abuse ettercap to rewrite the data in transit or something), so there comes a point where this goes past prudence, right through paranoia and into overkill. Razz
Of course, this means (see above) that even simple graphical mods like my swapping around of engine and shield colors will invalidate one's scores. But then again, I have no interest in publishing my scores; they're too embarrasing.

Quote:
I'd also be happy to write a tutorial about using the files, and provide some source data. I'd hesitate to call it a modding pack, more of a hacking pack.

That would be wonderful! And the nice thing about a hacking pack is that with enough time, the hackers can write the tools to turn it into a modding pack as well. Smile

Quote:
Then it would be possible to release the sprite packer. So if people wanted to draw beards on Bud then they could knock themselves out Smile

That would also be most excellent -- although at the moment I'm more focussed on having a sprite unpacker so I can tell what I'm looking at.

Quote:
We still think that it's a total waste of time, but at least it would settle the matter once and for all. (Although I predict there will be more questions than answers Sad )

I could volunteer to wander around applying Rich, Chunky Volts (tm) to people asking stupid questions?
Back to top
View user's profile
Weeble
Starscape Jedi
Starscape Jedi


Joined: 25 Apr 2003
Posts: 1143
Location: Glasgow, Scotland



PostPosted: Wed Aug 30, 2006 8:51 pm    Post subject: Reply with quote

Are there any good technical ways to secure a highscore system when the client is fundamentally untrustable? Even if you go to the extreme of always recording replays, (which I'd imagine is completely infeasible for regular games of Starscape) uploading them (ouch, that's a horrible bandwidth cost just to upload a high-score) and testing them for integrity (which I'd imagine is completely infeasible in terms of server processing), you are still vulnerable to save-states, map-hacks and bots. And you can't trust an untrusted client to verify itself. In the extreme case it could run a "good" copy in a virtual machine and pass all verification through to it.
Back to top
View user's profile Visit poster's website MSN Messenger
Fost
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 3734



PostPosted: Wed Aug 30, 2006 10:11 pm    Post subject: Reply with quote

ToxicFrog wrote:
I think.

No, that's wrong.

ToxicFrog wrote:
Checksums.

It would probably be something like that. The check isn't really the hard part, it's switching off all the game code, and dealing with saving and loading, and all the stuff associated with that in the front end without breaking it all. This game was not designed to be modded, so ANYTHING you do to it, usually ends up breaking a load of other stuff. Hence in order for us to put this you have to deal with changing a working app, not just some pie in the sky technical excercise. Still it will be worth it so that people can mess around with it, realise it's a waste of time, and then hopefully stop bothering us Wink

ToxicFrog wrote:
Well, if they're source it's just matter of writing a compiler for them, yes?

No, I mean, I think they may be garbage. Possibly the only ones that are the same as the real thing are the conversation files. It would mean wading through Goober's code to find out how it works, which would be pointless since it works for us, and if we do this with 1.6 then we'll have to release our batch file apps anyway.

ToxicFrog wrote:
And the nice thing about a hacking pack is that with enough time, the hackers can write the tools to turn it into a modding pack as well. Smile

I don't see how, but if anyone wants to waste their time trying I'm not going to stop them. Starscape is not designed to be modded - I've attempted to mod it, it breaks, because it is not data driven. I've covered this before, and if we could turn back time and do it again we'd change it, but that's life...

Weeble wrote:
Are there any good technical ways to secure a highscore system when the client is fundamentally untrustable?

Mr. Robot uploads far more than Starscape, and does it in game. The server can check what is physically possible at that point in the game for starters, but we've moded to a multiple-medals based system - kind of like xbox arcade achievement points but based around loads of small medals. Whilst you could theoretically hack the game and work out what the maximum is, you wouldn't be able to go beyond that.

Other than that, the best thing you can do is use public-private keys, so only the server can decrypt the info, and use code-mangling to stop memory editors (although they aren't much use anyway with a medals based system).
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Discussion Pod Forum Index -> Starscape All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group