PDA

View Full Version : Ships zones question


Fifi
11-12-24, 01:56 PM
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 ?? :hmmm:
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…

:Kaleun_Salute:

Jeff-Groves
11-12-24, 04:36 PM
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.

Fifi
11-13-24, 01:18 AM
Thanks Jeff for answering. One thing sure, both values are working anyway :)

:Kaleun_Salute:

Hebe Vollmaus
11-18-24, 02:02 PM
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 ?? :hmmm:
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

Fifi
11-18-24, 02:20 PM
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 :up:

:Kaleun_Salute:

Jeff-Groves
11-19-24, 09:44 PM
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!
:salute: