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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-12-24, 01:56 PM   #1
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,087
Downloads: 465
Uploads: 0


Default Ships zones question

Hi,
Long time I wonder why some ships zone box armor are -1 and some are -1,0003…
-1 refer directly to the armor of zone.Cfg file, but -1,0003 ??
Even stock files are set this way, both settings for same ship zon, but GWX for instance seems to have all ships zone box set to -1…
Don’t catch out why -1,0003

If someone could enlighten me…

Fifi is offline   Reply With Quote
Old 11-12-24, 04:36 PM   #2
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,649
Downloads: 137
Uploads: 0


Default

I'd figure it was a mistake on the part of the Zones Editor at the time.
The code for it was probably off a bit?

Most don't know Zones were created in 3D at the time and the export from that 3D program was taken apart by Kashmer to create all the seperate files.

Just my thoughts after all the years.
Jeff-Groves is offline   Reply With Quote
Old 11-13-24, 01:18 AM   #3
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,087
Downloads: 465
Uploads: 0


Default

Thanks Jeff for answering. One thing sure, both values are working anyway

Fifi is offline   Reply With Quote
Old 11-18-24, 02:02 PM   #4
Hebe Vollmaus
Lieutenant
 
Join Date: Jun 2010
Location: Germany
Posts: 269
Downloads: 3
Uploads: 1
Default

Quote:
Originally Posted by Fifi View Post
Hi,
Long time I wonder why some ships zone box armor are -1 and some are -1,0003…
-1 refer directly to the armor of zone.Cfg file, but -1,0003 ??
Even stock files are set this way, both settings for same ship zon, but GWX for instance seems to have all ships zone box set to -1…
Don’t catch out why -1,0003

If someone could enlighten me…
As an example open unmoded SH3v14 NBB_Bismark.zon in S3D.
Change first found Box ArmorLevel from -1,00003 to something else.
Change it back to -1,00003.
Save As file maybe as NBB_Bismark.zon1.zon right next to the original.
Compare both files HEX-values of the ArmorLevel in a HEX-Editor.
The representation has been changed! Original is FF 00 80 BF; the new is FC 00 80 BF.
Hint: S3D will change Positions somewhat, so the found Position in the new saved file is different.

Why is that? Is S3D broken? -- No!
It must have been to do with the Nature of Floating-Point-Arithmetic.
Think of the number Pi, there will never be an exact representation. When you press such a number into only four HEX-bytes, which represents so called System-Single or only Single (as of Single-Precision), or MS calls it Float, it can only be presented by rounding.
So there is some more Hex-values means the same, it depends from the calculation-method you use.

j2c
Hebe Vollmaus is offline   Reply With Quote
Old 11-18-24, 02:20 PM   #5
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 6,087
Downloads: 465
Uploads: 0


Default

Quote:
Originally Posted by Hebe Vollmaus View Post
As an example open unmoded SH3v14 NBB_Bismark.zon in S3D.
Change first found Box ArmorLevel from -1,00003 to something else.
Change it back to -1,00003.
Save As file maybe as NBB_Bismark.zon1.zon right next to the original.
Compare both files HEX-values of the ArmorLevel in a HEX-Editor.
The representation has been changed! Original is FF 00 80 BF; the new is FC 00 80 BF.
Hint: S3D will change Positions somewhat, so the found Position in the new saved file is different.

Why is that? Is S3D broken? -- No!
It must have been to do with the Nature of Floating-Point-Arithmetic.
Think of the number Pi, there will never be an exact representation. When you press such a number into only four HEX-bytes, which represents so called System-Single or only Single (as of Single-Precision), or MS calls it Float, it can only be presented by rounding.
So there is some more Hex-values means the same, it depends from the calculation-method you use.

j2c
Thanks for your information

Fifi is offline   Reply With Quote
Old 11-19-24, 09:44 PM   #6
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,649
Downloads: 137
Uploads: 0


Default

Quote:
Originally Posted by Hebe Vollmaus View Post
As an example open unmoded SH3v14 NBB_Bismark.zon in S3D.
Change first found Box ArmorLevel from -1,00003 to something else.
Change it back to -1,00003.
Save As file maybe as NBB_Bismark.zon1.zon right next to the original.
Compare both files HEX-values of the ArmorLevel in a HEX-Editor.
The representation has been changed! Original is FF 00 80 BF; the new is FC 00 80 BF.
Hint: S3D will change Positions somewhat, so the found Position in the new saved file is different.

Why is that? Is S3D broken? -- No!
It must have been to do with the Nature of Floating-Point-Arithmetic.
Think of the number Pi, there will never be an exact representation. When you press such a number into only four HEX-bytes, which represents so called System-Single or only Single (as of Single-Precision), or MS calls it Float, it can only be presented by rounding.
So there is some more Hex-values means the same, it depends from the calculation-method you use.

j2c
Excellent explanation right there! It's like answereing why there is no true Random Number Generator!
Jeff-Groves is offline   Reply With Quote
Reply


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 01:51 AM.


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