Stiebler
05-17-12, 06:11 AM
I have made this post only for general interest.
As players will have discovered, if you return to a base which was not the home-base (HB), you cannot alter equipment and when you return to sea you have a patrol grid of NULL.
The NULL grid has always been an irritation, because I like to start a patrol in Kiel in 1939, move to Wilhelmshaven until 1940, then return to Kiel. Other players like to patrol from Penang, or switch bases in the Mediterranean. And docking with a U-tanker at sea always resulted in a NULL grid being assigned when you started a new patrol, until H.sie and I created the pseudo-docking concept in code.
Therefore I have been trying to discover a method to assign a random patrol grid, when the original grid was NULL, based on location, U-boat type and year.
I discovered that the devs intended that a stop in a port-not-home-base (PNHB) should be temporary. Perhaps for fuel and repairs before a return to home-base. The NULL grid was *not* a bug - it was an intention. For example, file patrols_0.cfg is read in order to start a new patrol from a home-base, but the older patrols.cfg (last patrol) is used when starting from a PNHB. This original intention explains a lot, and in particular why the pointers that function for a patrol from a home base do not function for a patrol from a PNHB!
In the end, I have managed to write a code patch that provides new, random, patrol grids for a start from a PNHB. Unfortunately, the patch suffers from one serious defect: if you save the game in mid-patrol, and reload it, you start all over again with another NULL grid - or rather, with my new patch, with a *different* random assigned new grid. Unfortunately, there is no way of saving grid data from one game-save to another, unless it is saved in 'mysavegame.psc' in folder 'My Documents\sh3\data\cfg\etc'. And to provide the new grid area here requires knowledge of the scrambled pointers in order to set the information for saving!
It is unlikely that I shall release my new code. My old mod 'SH3Patrol' (provided with the NYGM supermod) provides a much more secure way of assigning new patrol grids. You sail out from the PNHB with a NULL grid, save the game, alter the saved game with SH3Patrol, and reload it. Problem solved, and from a much larger range of random grids.
Stiebler.
As players will have discovered, if you return to a base which was not the home-base (HB), you cannot alter equipment and when you return to sea you have a patrol grid of NULL.
The NULL grid has always been an irritation, because I like to start a patrol in Kiel in 1939, move to Wilhelmshaven until 1940, then return to Kiel. Other players like to patrol from Penang, or switch bases in the Mediterranean. And docking with a U-tanker at sea always resulted in a NULL grid being assigned when you started a new patrol, until H.sie and I created the pseudo-docking concept in code.
Therefore I have been trying to discover a method to assign a random patrol grid, when the original grid was NULL, based on location, U-boat type and year.
I discovered that the devs intended that a stop in a port-not-home-base (PNHB) should be temporary. Perhaps for fuel and repairs before a return to home-base. The NULL grid was *not* a bug - it was an intention. For example, file patrols_0.cfg is read in order to start a new patrol from a home-base, but the older patrols.cfg (last patrol) is used when starting from a PNHB. This original intention explains a lot, and in particular why the pointers that function for a patrol from a home base do not function for a patrol from a PNHB!
In the end, I have managed to write a code patch that provides new, random, patrol grids for a start from a PNHB. Unfortunately, the patch suffers from one serious defect: if you save the game in mid-patrol, and reload it, you start all over again with another NULL grid - or rather, with my new patch, with a *different* random assigned new grid. Unfortunately, there is no way of saving grid data from one game-save to another, unless it is saved in 'mysavegame.psc' in folder 'My Documents\sh3\data\cfg\etc'. And to provide the new grid area here requires knowledge of the scrambled pointers in order to set the information for saving!
It is unlikely that I shall release my new code. My old mod 'SH3Patrol' (provided with the NYGM supermod) provides a much more secure way of assigning new patrol grids. You sail out from the PNHB with a NULL grid, save the game, alter the saved game with SH3Patrol, and reload it. Problem solved, and from a much larger range of random grids.
Stiebler.