![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Admiral
![]() |
![]()
While trying to get familiar with cameras.dat, I found a potential CTD reason if cameras.dat is edited with newer S3Ditor Versions (thanks, skywasjer for this great tool!) and if the player uses the Sabotage and Malfuntion - Option of Sh3-Commander (thanks, J.Jones for another great tool):
The Sabotage and Malfuntion-Option uses a file called RandomizedEvents.cfg which contains Hex-Pointers to the data positions in binary files like Cameras.dat. In a case of a sabotage, a binary value which is referred by such a Hex-pointer is changed in order to simulate sabotage. For example, the zoom of the periscopes is restricted to 1x. When editing cameras.dat with a newer version of S3D, the AuthorInfo chunk is 71 bytes longer as is has been when editing with older versions of S3D. This means: All Hex-pointers point to wrong data positions, so that undesired data is changed. This can lead to a CTD (which in fact is perfect sabotage). So if you change cameras.dat values with a newer version of S3D, the pointers in RandomizedEvents.cfg have to be adapted to prevent from unwanted side-effects like CTD in conjunction with sabotage & malfunction. Otherwise your cameras.dat is not compatible with Sabotage and Malfuntion. excuse my bad english! h.sie |
![]() |
![]() |
![]() |
#2 |
Old Gang
|
![]()
__________________
To each his own |
![]() |
![]() |
![]() |
#3 |
Torpedoman
![]() Join Date: Jun 2003
Location: Vancouver, BC, Canada
Posts: 118
Downloads: 58
Uploads: 0
|
![]()
Bingo! I've been trying to wrap my head around this CTD problem I've been having for days.
I've editted my cameras.dat recently and havn't been able to start a career at all, and have been trying to narrow the problem down for some time. Just a question: what is considered to be a "newer" version of SH3editor? (mine is beta 0.8.2, is that too new?)
__________________
...Wir alle leben auf einem gelben Unterseeboot... |
![]() |
![]() |
![]() |
#4 |
Watch Officer
![]() Join Date: Jan 2007
Posts: 339
Downloads: 76
Uploads: 4
|
![]()
If only we had a program that didn't rely on hex locations for this sort of thing... Thanks for the heads up. Maybe you could release a fixed random events file for Commander to resolve this issue for those that experience it? I'm away from my desktop for the week or I'd do it.
|
![]() |
![]() |
![]() |
#5 |
Torpedoman
![]() Join Date: Jun 2003
Location: Vancouver, BC, Canada
Posts: 118
Downloads: 58
Uploads: 0
|
![]()
Yes, so; would editing out all the sections in the randomevents.cfg file that edits the cameras.dat fix this problem?
Would this cause any more problems?
__________________
...Wir alle leben auf einem gelben Unterseeboot... |
![]() |
![]() |
![]() |
#6 |
Watch Officer
![]() Join Date: Jan 2007
Posts: 339
Downloads: 76
Uploads: 4
|
![]()
I think that would just remove the sabotage of any camera views. I was thinking more along the lines of adjusting the hex coordinates.
|
![]() |
![]() |
![]() |
#7 | |
Navy Seal
![]() Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
|
![]() Quote:
![]() Yes, editing the following game files (beyond just changing existing values) may result in CTDs when the malfunctions/sabotage option is selected, due to changed hex offsets: AI_Sensors.dat GUNS_SUB.sim Cameras.dat Sensors.sim Sensors.dat NSS_Uboat7b.sim NSS_Uboat7c.sim NSS_Uboat9b.sim NSS_Uboat9c.sim NSS_Uboat9d2.sim NSS_Uboat21.sim If editing these files and unsure of the impact, test both with and without the malfunctions/sabotage option selected. If the offsets have changed, then simply update them in ..\SH3 Commander\Cfg\Randomised events.cfg. Mind you, in over four years only modified Cameras.dat and Sensors.dat have ever created problems. Not that simple for reasons I've expressed many times elsewhere. But I remember you spouting about writing such a program over a year ago - can you pls provide a link to it? Last edited by JScones; 10-22-09 at 03:07 AM. |
|
![]() |
![]() |
![]() |
#8 |
Admiral
![]() |
![]()
i use a hex editor to copy the first two chunks of an older and Sabotage-compatible cameras.dat (e.g. from GWX-Open Hatch) into my new tweaked cameras.dat. this eliminates the byte-offset and ensures compatibility.
|
![]() |
![]() |
![]() |
#9 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Hmm? I did not change anything to the header-code in the last releases, so it should behave the same as before. Although it writes out the assembly title string (but I don't recall this has changed). What difference did you specifically find? (I have no idea, don't have anything installed to check)
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
![]() |
![]() |
![]() |
#10 |
Admiral
![]() |
![]()
Hi skywasjer,
In cameras.dat from GWX-OpenHatch, for example, the first _Dummy_Cam_UZO section starts at Hex-Position 0xB8. This file is compatible to Sabotage & Malfunction, or, more precisely, it is compatible to the RandomizedEvents.cfg which comes with the SH3-Commander Files for GWX3.0. After editing this file with S3D, the first _Dummy_Cam_UZO section now starts at Hex-Position 0xFF. All following data is shifted about 0xFF - 0xB8 = 0x47 Bytes. This file no more is compatible to Sabotage & Malfunction. Moreover, it's a potential CTD cause if used together with Sabotage & Malfunction. But it could be made compatible by adapting RandomizedEvents.cfg accordingly. It seems that the original cameras.dat from GWX-OpenHatch unfortunately has not been edited with S3D....... Greetings, H.sie |
![]() |
![]() |
![]() |
|
|