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 02-21-13, 10:41 AM   #1
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Well, tested primarily on uboat7b_ai gr2, but will test some more on various files today.

So, as I mentioned before, now I cannot rename the bones/meshes via hex editor en-mass and then open the file with GR2 Editor/Viewer and change the checksum error, fix it and it's all awesome.

In light of that, as I assumed that it breaks the chains when I edit with hex, I decided to rename via app itself. Unfortunately, it does not work either. The app gives 2 variations of error:
1) There are broken chains in section 0, so no opening the file
2) can't find bone bindings, so no opening the file

Steps to reproduce:
1) open NSS_Uboat7b_AI. GR2 with the app.
2) rename 1-2 bones or meshes.
3) save the gr2 (doesn't matter if you save with the same name or "Save As..."
4) close the file
5) attempt to open the above saved file.

Rename of 1 bone (Model), the top bone, sometimes works. But not when trying to rename the rest of them.
Targor Avelany is offline   Reply With Quote
Old 02-21-13, 11:21 AM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
Well, tested primarily on uboat7b_ai gr2, but will test some more on various files today.

So, as I mentioned before, now I cannot rename the bones/meshes via hex editor en-mass and then open the file with GR2 Editor/Viewer and change the checksum error, fix it and it's all awesome.

In light of that, as I assumed that it breaks the chains when I edit with hex, I decided to rename via app itself. Unfortunately, it does not work either. The app gives 2 variations of error:
1) There are broken chains in section 0, so no opening the file
2) can't find bone bindings, so no opening the file

Steps to reproduce:
1) open NSS_Uboat7b_AI. GR2 with the app.
2) rename 1-2 bones or meshes.
3) save the gr2 (doesn't matter if you save with the same name or "Save As..."
4) close the file
5) attempt to open the above saved file.

Rename of 1 bone (Model), the top bone, sometimes works. But not when trying to rename the rest of them.
I will follow your above to try and simulate the problem now

v1.1.339.1 released. See post #1

- fixes bug where duplicate data could possibly not be updated correctly
- linked list now correctly handles removing the main object of duplicates
- Essential embedded strings now displays only the missing strings to be added to the GR2 file when asking if user wants to add them
TheDarkWraith is offline   Reply With Quote
Old 02-21-13, 11:38 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Just tried v1.1.339.1 and everything works excellent. I was able to rename any number of meshes or bones without error. Saved and reloaded with no problems either. Probably the bugs I just fixed with the new version fixed the problem

You should still be able to edit the names with hex editor. As long as you don't change the number of characters in the name with the hex editor the app will have no problem with them
TheDarkWraith is offline   Reply With Quote
Old 02-21-13, 11:56 AM   #4
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Just tried v1.1.339.1 and everything works excellent. I was able to rename any number of meshes or bones without error. Saved and reloaded with no problems either. Probably the bugs I just fixed with the new version fixed the problem

You should still be able to edit the names with hex editor. As long as you don't change the number of characters in the name with the hex editor the app will have no problem with them
WOOOOT!!!!!!!!!!!!

Will test as soon as I get home today!
Targor Avelany is offline   Reply With Quote
Old 02-21-13, 07:19 PM   #5
V13dweller
Grey Wolf
 
Join Date: Dec 2012
Location: Perth, Western Australia
Posts: 768
Downloads: 103
Uploads: 2
Default

In your update, did you allow aircraft to be edited?
V13dweller is offline   Reply With Quote
Old 02-21-13, 07:46 PM   #6
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

not quiet sure if I am doing something wrong or missing something:

this is an attempt to open a file, which was saved after editing from NSS_Uboat7b to NSS_Uboat9b via hex editor en-mass.



Targor Avelany is offline   Reply With Quote
Old 02-21-13, 08:50 PM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
not quiet sure if I am doing something wrong or missing something:

this is an attempt to open a file, which was saved after editing from NSS_Uboat7b to NSS_Uboat9b via hex editor en-mass.
sounds like you changed the number of characters in one of the strings. You cannot simply add null characters (0x0) to take up space for a shorter name, the app will balk at that depending on:
- if pointers come before data the app knows that all strings have only 1 null character (0x0)
- if pointers come after data then the number of null characters are the number required to get to the alignment boundary (most in section 0 [where the strings are] are 0x4 (0x...0, 0x...4, 0x...8, 0x...C). If the alignment is 0x4 and the app reads 4 null characters and cannot find a pointer referencing it then it will throw an error (this is only true if the string doesn't end on an alignment boundary - if the string ends on an alignment boundary then the app will expect to read alignment number of null characters).

If the name was Test and alignment is 0x4 then the app is looking for:
Test00000000 (Test of course would be in hex numbers)

If the name was Test2 and alignment is 0x4 then the app is looking for:
Test2000000 (Test2 of course would be in hex numbers)

Try loading the stock 7b GR2 file to ensure you can load it without problems. I can load it without error using 1.1.339.1. I can also rename bones and meshes without error.
TheDarkWraith 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:40 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.