![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
10-31-11, 12:10 AM
|
#1 |
|
Black Magic
![]() |
Version 1.0.335.0 released. See post #1.
This version fixes the offsets reported wrong in the FileHeader and InfoHeader debug output. Fixed bug in the extendeddata recursion function where if an item had no subitems you would get an exception. More error checking added in this version. As a result of some of this I somehow totally overlooked not reading ALL the pointers for section 0. All this time I thought I was reading them all but the error checker told me differently. When I did the math it was quite evident that I've been overlooking pointers in section 0. I will be looking into what these 'new' pointers do now. This version will now read just about any GR2 file in SH5 (except for Undersea). That means it will now read the VIIA sub I know why Undersea will not read and it's because I found a small part of hard-coded reading of ArtToolInfo:ExtendedData in the app. I will fix this in the next version I was able to open air units, sub units, land units, and files in the \data\Library folder.If you find a file that will not open please let me know (except for \data\Library\Undersea.gr2) When looking over the Debug output if you see any offsets (or actual file positions) or values that look suspicious/strange let me know. I hope I've corrected all the errors in those. If you can, compare random items in the Debug output to the actual file and see if they match or not. Next version I hope to have the ability to change just about anything in the extendeddata of an item coded in. I also hope to have coded in the ability to adjust properties of items also (position, rotation, color, etc.) If I have time and haven't coded in too much (I don't like to add too much to each version) I'll start working on the exporter so you can rip whatever you want from the GR2 file. I plan on making the exporter rip to OBJ format for now. I plan on adding Microsoft's X format to it in time. Additional formats might happen depending on the information available on them (so I know how to make the format).
Last edited by TheDarkWraith; 10-31-11 at 12:33 AM. |
|
|
10-31-11, 02:43 AM
|
#2 | |
|
Sea Lord
![]() Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
|
Quote:
TheDarkWraith Well done
__________________
What we do in life echoes in Eternity |
|
|
|
10-31-11, 12:17 PM
|
#3 |
|
Black Magic
![]() |
v1.0.342.0 released. See post #1
This version removed the hard-coded reading of some items in the ArtToolInfo:ExtendedData. Now the file tells it what to read based on the pointers. As a result of this the Undersea.gr2 file can now be read |
|
|
10-31-11, 03:34 PM
|
#4 |
|
Black Magic
![]() |
Was single stepping the guns_radars_01.GR2 file in the Visual Studio debugger and noticed something interesting. It is a special GR2 file (pointers come before data) but it doesn't want to follow the 'rules' that these type of files have followed in the past (NSS_Undine for example). Now I have to figure out what makes the rules change and why
Maybe someone might know the answer to this? Beuhler? ![]() Normally in these type of files (these 'special' GR2 files) you have a pointer to say a model. That pointer then references a table (think of it as a virtual function table in exe files). The table points it to where the actual model is. This one doesn't want to use the table - it wants to go straight to the model..... In normal GR2 files when you have a pointer to something (say a model) it points to the actual item. There is no table or indirect pointer for it. |
|
|
10-31-11, 04:22 PM
|
#5 |
|
Black Magic
![]() |
didn't take as long as I thought to figure out the above problem.
There are two 'rules' (so far) to special GR2 files (pointers before data): - if section 0's unknown2 is 0x0 then the pointer to the model will access the pointer table (think of it as v-table in exe files) - if section 0's unknown2 > 0x0 then the pointer to the model points to the model (acts like a normal GR2 file in this regard) I wonder what other interesting little things like this will rear their ugly head ![]() Version 1.0.348.0 released. See post #1. You should be able to open ANY SH5 GR2 file now. Let me know if you come across one that won't open
|
|
|
10-31-11, 04:42 PM
|
#6 |
|
Chief
![]() Join Date: Jan 2008
Posts: 319
Downloads: 81
Uploads: 0
|
Impressive sir, i hope there wont be to much of those "exceptions" you encountered. (Must be a nightmare to treat)
__________________
-Fighting is a lifestyle-
|
|
|
10-31-11, 04:44 PM
|
#7 |
|
Lieutenant
![]() Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 73
Uploads: 0
|
That's just awesome progress! Well done!
As of problems: I cannot open \data\Characters\CharacterBodyParts.gr2 due to errors in section 0 endpointersfileoffset being not equal to filesizeinbytes. When I try to open NSS_Uboat*.gr2 files - the EVEI gives me a lot of Code:
Exception C:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat2a\NSS_Uboat2a.GR2 closed ********* Exception while presenting Exception is ***1054;***1096;***1080;***1073;***1082;***1072; ***1074; ***1087;***1088;***1080;***1083;***1086;***1078;***1077;***1085;***1080;***1080;. -2005530516 (D3DERR_INVALIDCALL) ***1074; Microsoft.DirectX.Direct3D.Device.BeginScene() ***1074; TheDarkWraith.SilentHunter5.Graphics.Render() ********* ... None of the animations' gr2s can be opened either due to skeleton's data absence, but I recon - animations are thing of the future as of yet. When I open 'waypoints' files - I see nothing but no errors either, though I guess this is normal. I am still hoping to create fully functioning crew and it appears that only you can make it possible, TDW, thanks for all your hard work. Last edited by Vanilla; 10-31-11 at 04:54 PM. |
|
|
10-31-11, 07:25 PM
|
#8 | |
|
Black Magic
![]() |
Quote:
As far as the waypoint files you need to turn the bones on. They have no models or meshes, they are strictly bones The animation ones made me laugh when I just tried to open one up. Of course it has no skeleton, it's all animation data. At least my error checker is working as programmed. I'll correct this. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
