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, 08:50 PM   #1846
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
Old 02-21-13, 09:04 PM   #1847
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

hmm. Strange. I guess I was messing it up somewhere, because this time it worked. Everything the same, even replacing the same way.

meh at me

Well, will be testing more later.
Targor Avelany is offline   Reply With Quote
Old 02-21-13, 09:29 PM   #1848
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
hmm. Strange. I guess I was messing it up somewhere, because this time it worked. Everything the same, even replacing the same way.

meh at me

Well, will be testing more later.
Sounds good. Let me know of any problems

I'm working on the next big thing for the app now
TheDarkWraith is offline   Reply With Quote
Old 02-21-13, 11:38 PM   #1849
Kaicokid
Watch
 
Join Date: Dec 2009
Posts: 20
Downloads: 91
Uploads: 0
Default

For a DarkWraith you have a very bright uniform. Maybe that's why I found it a bit of a shock. Never mind you'll soon reach vice admiral. That will sound even better !!
Kaicokid is offline   Reply With Quote
Old 02-22-13, 02:20 AM   #1850
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

ok, a quick question:

what style the .obj files should be in order to add subset meshes to gr2? The reason I'm asking is because when I'm attempting to add meshes the app comes up with this error:

Targor Avelany is offline   Reply With Quote
Old 02-22-13, 04:24 AM   #1851
V13dweller
Grey Wolf
 
Join Date: Dec 2012
Location: Perth, Western Australia
Posts: 768
Downloads: 103
Uploads: 2
Default

Once again, I get an error trying to edit aircraft, just opening the GR2 causes this.
********* Section 0's mixed values count was found to be 45 vice 0.
Please forward file and error to TheDarkWraith @ Subsim.com for review *********
This is very annoying because I just want to add more nodes to the JU-290 so it is actually useful, because it currently only has 2 bomb nodes, and in real life it could carry 30 100 Kg bombs.
V13dweller is offline   Reply With Quote
Old 02-22-13, 10:11 AM   #1852
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
ok, a quick question:

what style the .obj files should be in order to add subset meshes to gr2? The reason I'm asking is because when I'm attempting to add meshes the app comes up with this error:

Just regular OBJ format. Post a link to the OBJ file you were trying to import along with step-by-step of what you were doing so I can try and reproduce the error in Visual Studio's debugger.

Quote:
Originally Posted by V13dweller View Post
Once again, I get an error trying to edit aircraft, just opening the GR2 causes this.
********* Section 0's mixed values count was found to be 45 vice 0.
Please forward file and error to TheDarkWraith @ Subsim.com for review *********
This is very annoying because I just want to add more nodes to the JU-290 so it is actually useful, because it currently only has 2 bomb nodes, and in real life it could carry 30 100 Kg bombs.
I haven't figured out what these mixed values are in section 0 yet. I believe that GR2 file has trackgroups and animations also so it might be awhile before the restrictions I put on the app about them are lifted. Reason being I found I wasn't reading everything from the file in regards to them. If I don't read something then I can't write it. If I don't write everything to the file it becomes corrupt.
TheDarkWraith is offline   Reply With Quote
Old 02-22-13, 12:46 PM   #1853
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Created a copy of the CMD_small_boat so I could 'play' with it. Did some playing with it with new version I'm working on. What is new in it?




Last edited by TheDarkWraith; 02-22-13 at 01:22 PM.
TheDarkWraith is offline   Reply With Quote
Old 02-22-13, 02:44 PM   #1854
silentmichal
Frogman
 
Join Date: Aug 2011
Location: Poland, my homeland.
Posts: 304
Downloads: 241
Uploads: 0
Default

Hi TDW!

I'm glad that you're on . O have a question: how to duplicate GR2 files, and make it visible ingame? For eg, I have 2 files: QR1_Room.gr2 and silentmichals_objects.gr2. And I want to join this files - using PRT files / LNX files. I made it with engine room - no problems, because there was a PRT file. But QR1_Room hasn't got own PRT file, so I created it, but game doesnt' see it! So, my main question is: How to "tell" game, that it must see my created PRT file? I hope you know it .


Best regards, Micha³.


EDIT


I found big bug, when I load file "Room_QR1.gr2" from my mod (silentmichal's interior mod 1.2.1), I have this:


__________________
Dining place in Silent Hunter 5? NOW it's possible ! My graphics mod available here:
http://www.subsim.com/radioroom/showthread.php?t=200862

Last edited by silentmichal; 02-22-13 at 03:09 PM.
silentmichal is offline   Reply With Quote
Old 02-22-13, 04:03 PM   #1855
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

ah yes, Room_QR1 was the odd ball. I was trying to remember which one defined DiffuseColor0 as 3 floats instead of 3 bytes. Now I have to figure out how to account for this
TheDarkWraith is offline   Reply With Quote
Old 02-22-13, 04:09 PM   #1856
silentmichal
Frogman
 
Join Date: Aug 2011
Location: Poland, my homeland.
Posts: 304
Downloads: 241
Uploads: 0
Default

And what about duplicating GR2 files?
__________________
Dining place in Silent Hunter 5? NOW it's possible ! My graphics mod available here:
http://www.subsim.com/radioroom/showthread.php?t=200862
silentmichal is offline   Reply With Quote
Old 02-22-13, 04:12 PM   #1857
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by silentmichal View Post
And what about duplicating GR2 files?
It's easily done. Follow the file structure of the diesel room. You have to tell where to find the PRT in one of the other files.
TheDarkWraith is offline   Reply With Quote
Old 02-22-13, 04:15 PM   #1858
silentmichal
Frogman
 
Join Date: Aug 2011
Location: Poland, my homeland.
Posts: 304
Downloads: 241
Uploads: 0
Quote:
Originally Posted by TheDarkWraith View Post
It's easily done. Follow the file structure of the diesel room. You have to tell where to find the PRT in one of the other files.

So, can I add "......MergeCtrl.........[text].....data/Submarine/Common/Rooms/QR1_Room.PRT" into DER_Room.PRT file?
__________________
Dining place in Silent Hunter 5? NOW it's possible ! My graphics mod available here:
http://www.subsim.com/radioroom/showthread.php?t=200862

Last edited by silentmichal; 02-22-13 at 04:37 PM.
silentmichal is offline   Reply With Quote
Old 02-22-13, 06:31 PM   #1859
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.1.343.1 released. See post #1

This version fixes the problem that silentmichal found.

The problem was due to DiffuseColor0 can be either a granny_real32, granny_uint8, or an uint8. I had it hard coded to uint8. Thus I had to change the app to make this value be generic (object) and cast it to the correct type when needed.

TheDarkWraith is offline   Reply With Quote
Old 02-22-13, 06:37 PM   #1860
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
v1.1.343.1 released. See post #1

This version fixes the problem that silentmichal found.

The problem was due to DiffuseColor0 can be either a granny_real32, granny_uint8, or an uint8. I had it hard coded to uint8. Thus I had to change the app to make this value be generic (object) and cast it to the correct type when needed.

I alsmost want to skip my judo class tonight and just mess around with my meshes and gr2 files!!!!
Targor Avelany 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:48 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.