Page 1 of 1

Ammo and weapons file data? Sourcer?

Posted: Thu May 02, 2002 5:32 am
by Mentis
Hi,

I've played U7 and SI for ages in my youth and wandered upon this great project of yours. Being a programmer, I could not resist and had a look through the code... Looks okay I guess ;-)

I noticed (in the code & the faq) the ammo and weapons data files have not been deciphered fully yet (nor some of the other files). So I did some scanning - haven't found much yet...

In the ammo.dat the 8th byte I have partly figured out. Bit 6 (2^6) seems to represent if the ammo should explode on impact (only set for burst arrows [shape 554]). Bit 5-4 are always 11 for spells and always 10 for returning throwable weapons. Don't know what 01 and 00 mean...

The "type2" (byte 5 and 6) seem to represent what should be fired instead of this ammo. For example, for a cannon [702], and why is it in this list?] it is a cannonball [703]. And for light spells [70, 74] it is the glimmer spell [566]. Others don't use it.

Okay - so that is not that much or useful. I was wondering if anyone has attemted a sourcer or ida disassembly, of the U7.exe file for example? Or a bochs debug?

Before I spent several weeks locked behind my computer trying to make sense of the output - I thought I'd ask :-)

Mentis.

Re: Ammo and weapons file data? Sourcer?

Posted: Thu May 02, 2002 6:14 am
by Mentis
Hi again,

I tried an IDA disassemble - which is actually readable (for example, IDA correctly names C library calls like fopen and fread etc. - which could speed up the search; sourcer doesn't seem to do that)...

A well, maybe I'll give it a try - if I can find where the program opens ammo.dat for example and where it stores the data read; I'll be one my way to hack that file completely!

Okay - so shoot me in the leg if this has been tried before...

Mentis.

Re: Ammo and weapons file data? Sourcer?

Posted: Thu May 02, 2002 7:08 am
by wjp
I'm pretty sure Jeff has already decoded most (if not all) of these files, but is waiting until the post-1.0 overhaul of the combat system before implementing them fully.

Re: Ammo and weapons file data? Sourcer?

Posted: Thu May 02, 2002 9:07 pm
by Mentis
Okay, if there's nothing more to search in those files - I won't waste my time...

I assumed info was missing because a lot of data is not stored in the shapeinf.cc and monstinf.cc when it is read from game files. With question marks next to it and all

Maybe I should have checked the CVS source instead of the .98rc1 :-)

If there is something I _could_ find out for the project using a tool like IDA, just let me know - I'm having fun with it, so I would not mind digging for some information.

Later.

Mentis

Re: Ammo and weapons file data? Sourcer?

Posted: Fri May 03, 2002 4:01 am
by Armchair_Avatar
If you enjoy reverse-engineering old DOS games, you might want to take a look at the xu4 project:
http://xu4.sourceforge.net/

They've already figured out most of the U4 data files, but I think there are a few things they don't know yet.