SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-26-11, 07:59 PM   #1
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

7A loads fine for me with your last version.

Would a defined version of the UnderSea gr2 file help you?
  Reply With Quote
Old 10-27-11, 08:35 AM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
7A loads fine for me with your last version.

Would a defined version of the UnderSea gr2 file help you?
I'd be willing to look it over. The problem currently is I have to get rid of the hard-coded items I have. I know where the ArtToolInfo resides and how to read it but I need the app to be dynamic and let the pointers tell it where to read this from. Once I get over this hurdle then the rest should be cake. I have it reading the embedded strings dynamically. Now I'm making it read any data associated with those strings dynamic. This is proving to be a little on the challenging side though.
I've coded in the checking of the file size in bytes and the auto correcting of it. Adding the CRC checker and auto correcting of it also

7A has always loaded fine. It's the IIA and undersea that won't load due to some additional data contained in them that I haven't figured out what the purpose is for yet. Because of my current hard-coded reading of the ArtToolInfo these will always fail. That is why I'm moving to dynamic reading of information. Live and learn.

Last edited by TheDarkWraith; 10-27-11 at 08:47 AM.
TheDarkWraith is offline   Reply With Quote
Old 10-28-11, 07:43 AM   #3
tonschk
Sea Lord
 
Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
Default

Thank you very much TheDarkWraith for this Magnificent Work you are doing
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 10-28-11, 05:42 PM   #4
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by TheDarkWraith View Post
I'd be willing to look it over. The problem currently is I have to get rid of the hard-coded items I have. I know where the ArtToolInfo resides and how to read it but I need the app to be dynamic and let the pointers tell it where to read this from. Once I get over this hurdle then the rest should be cake. I have it reading the embedded strings dynamically. Now I'm making it read any data associated with those strings dynamic. This is proving to be a little on the challenging side though.
I've coded in the checking of the file size in bytes and the auto correcting of it. Adding the CRC checker and auto correcting of it also

7A has always loaded fine. It's the IIA and undersea that won't load due to some additional data contained in them that I haven't figured out what the purpose is for yet. Because of my current hard-coded reading of the ArtToolInfo these will always fail. That is why I'm moving to dynamic reading of information. Live and learn.
SummaryInfo in the Undersea.gr2 is blank.
Appears to be for comments which is probably useless anyway.

IIA has an animation which adds info to the Section 0 stuff as a start.

I'll finish up some things and send you a link.
  Reply With Quote
Old 10-29-11, 08:42 AM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
SummaryInfo in the Undersea.gr2 is blank.
Appears to be for comments which is probably useless anyway.

IIA has an animation which adds info to the Section 0 stuff as a start.

I'll finish up some things and send you a link.


The file size checker/fixer has been coded in.
The CRC-32 checker/fixer has been coded in.

These two items will be checked when the file is first loaded. If either/both are incorrect it will ask if you want to fix each one. The fix will be immediately written to the file
TheDarkWraith is offline   Reply With Quote
Old 10-30-11, 12:41 AM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Recursion can be a powerful thing. It is sometimes very difficult to setup/get correct. This was the case for the reading of the extended data for items. On my plane flight home from Portland, OR I was single stepping through the debugger in Visual Studio trying to get the recursion correct for item's extended data. I finally have it working correctly for the extended data now I had the reading of the item's extended data 'hard-coded' for I knew basically what to expect. This was not acceptable to me because there are probably files that contain more or less in extended data. I needed this to be dynamic and let the file tell me what it has.
I didn't fully understand at first how say GrannyViewer knew how to read everything that it did (and thus was why many things were 'hard-coded'). This took some time to figure out. Now I fully understand Nothing (currently) is hard-coded in the app. It is fully dynamic and it knows what to read from those magical pointers (and some other new pointers that I call data type pointers).
Just because it's fully dynamic doesn't mean it can read everything. If it doesn't 'understand' something (it reads something and the app doesn't know what it read/how to interpret it) then it will fail. This is currently the case with any GR2 file that has animations in it. I have not told the app how to handle animations. The mystery data in undersea and VIIA it doesn't know how to handle either (yet). Those I am still working on

This new version (1.0.322.0) includes the above and also the file size checker and CRC-32 checker. You'll notice new text in the DbgView output for these and also for the ArtToolInfo's extended data (it will look like GrannyViewer shows it because that's how it told me to read it )

New version 1.0.322.0 released. See post #1


Last edited by TheDarkWraith; 10-30-11 at 01:00 AM.
TheDarkWraith is offline   Reply With Quote
Old 10-31-11, 12:10 AM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

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.
TheDarkWraith is offline   Reply With Quote
Old 10-31-11, 02:43 AM   #8
tonschk
Sea Lord
 
Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post

Version 1.0.335.0 released. See post #1.

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

Very Good TheDarkWraith Well done
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 10-29-11, 04:34 AM   #9
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default



__________________


urfisch is offline   Reply With Quote
Old 10-31-11, 05:14 PM   #10
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,153
Downloads: 901
Uploads: 73


Default

Yay , i can open the trees and the undersea rocks . Thats all i need
THE_MASK is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.