Log in

View Full Version : SH3 Commander: hardcoded UI values?


RoaldLarsen
04-25-07, 12:01 PM
I have been using SH3 Commander for 3 months, and I think it is wonderful. Until this week, I had only one minor problem with it, but that was cosmetic only: when using realistic crew transfers, the message announcing the need to replace a crew member always seemed to use the English rank, even though I was using German rank translations.

Now I have run across something that actually gets in the way of desired gameplay. According to uboat.net, U-69, a type VIIC, became a front boat in 7th Flotilla on Feb. 1, 1941. This was the first submarine command for her captain. I wished to emulate this, by starting a career in 7th Flotilla at the start of 1941 in a type VIIC.

I made sure that "SH3 Options | Career Options | Use historic U-boat availability dates" was checked.
I edited "SH3 Commander\Cfg\U-boat availability.cfg" to set 904_Month1=1 in the section [SUBMARINE1]
I even edited SilentHUnterIII\data\Cfg\Flotilla.cfg (by use of the static settings file) to make Month22=1, then checked the Flotilla.cfg file after a load to make sure that the change had been applied.

When I started SH3 Commander, I selected "Set up for a new career". I typed in a name, selected year 1941, month 1, and 7th Flotilla. When I tried to select a u-boat type, the only choice available was VIIB. It is not until 1941/06 that VIIC is an available choice. If I proceed to start the career in SH3, I get a type VIIB, though a type VIIC is available as an upgrade, but for something like 3000 reknown points.

As an experiment, I edited "SH3 Commander\Cfg\U-boat availability.cfg" so that 904_Month1 was set to 10, and ran through the same steps as above. Once again, type VIIC became available in the SH3Cmndr UI in June '41. If I turn off "Use historic U-boat availability dates", a type VIIB is the only option no matter what date I choose when setting up career start in 7th Flotilla.

It seems that, even though SH3 Commander allows you to tweak many things in SH3, it doesn't apply some of these tweaks to its own user interface.

One probably relevant observation: when playing around with availability dates, I would sometimes get an error diaog with the message "Invalid argument to date encode" while running the attempts described above. This would occur when restoring SH3Cmndr after exiting from SH3 after running SH3 from the "Set up for new career" screen.

If I set the u-boat availabilty in SH3Cmndr, then start up SH3 from outside SH3Cmndr, I can start a career in a type VIIC in January 41, but I have to use the stock crew.

I know I could get a type VIIC with a SH3Cmndr "realistic" crew quite quickly by starting a career in a type VIIB, running a very short first patrol, hacking the reknown in the patrol files, and then upgrading before my second patrol.

My questions are:
0) Am I doing something wrong?
1) Is there a more elegant way to start a career in a type VIIC in early 1941 in 7th Flotilla, which retains the SH3Cmndr "realistic" crew?
2) Am I right that the availability of sub types for new careers in SH3Cmndr is hardcoded into the interface?
3) If I'm not right about this being hardcoded, what do I need to do to start a new career through SH3Cmndr in a type VIIC in early 1941 in 7th Flotilla?
4) If the career start sub type availability, (and the rank displayed in messages about crew transfers) IS hardcoded, is there any chance of SH3 Commander being upgraded to use the data from its configuration files to affect its own UI?

JScones
04-27-07, 11:06 PM
I have been using SH3 Commander for 3 months, and I think it is wonderful. Until this week, I had only one minor problem with it, but that was cosmetic only: when using realistic crew transfers, the message announcing the need to replace a crew member always seemed to use the English rank, even though I was using German rank translations.
Then you have an installation problem as SH3Cmdr will ALWAYS use the chosen in-game rank labels.

Now I have run across something that actually gets in the way of desired gameplay. According to uboat.net, U-69, a type VIIC, became a front boat in 7th Flotilla on Feb. 1, 1941. This was the first submarine command for her captain. I wished to emulate this, by starting a career in 7th Flotilla at the start of 1941 in a type VIIC.

I made sure that "SH3 Options | Career Options | Use historic U-boat availability dates" was checked.
Good.

I edited "SH3 Commander\Cfg\U-boat availability.cfg" to set 904_Month1=1 in the section [SUBMARINE1]
I even edited SilentHUnterIII\data\Cfg\Flotilla.cfg (by use of the static settings file) to make Month22=1, then checked the Flotilla.cfg file after a load to make sure that the change had been applied.
Why????? With the above option checked you WILL get a VIIC in 7 Flot as early as Aug 1940, no changes required. SH3Cmdr file settings:

904_Name1=VIIC
904_Month1=8
904_Year1=1940
That is, August 1940. Associated screen shot just to really prove this fact...
http://img410.imageshack.us/img410/5826/image1bw1.jpg

No need to change anything.

It seems that, even though SH3 Commander allows you to tweak many things in SH3, it doesn't apply some of these tweaks to its own user interface.
It seems that user is incorrectly blaming hammer for breaking nails. ;)

One probably relevant observation: when playing around with availability dates, I would sometimes get an error diaog with the message "Invalid argument to date encode" while running the attempts described above. This would occur when restoring SH3Cmndr after exiting from SH3 after running SH3 from the "Set up for new career" screen.
Obviously you are not entering correct values.

If I set the u-boat availabilty in SH3Cmndr, then start up SH3 from outside SH3Cmndr, I can start a career in a type VIIC in January 41, but I have to use the stock crew.

My questions are:
0) Am I doing something wrong?
1) Is there a more elegant way to start a career in a type VIIC in early 1941 in 7th Flotilla, which retains the SH3Cmndr "realistic" crew?
2) Am I right that the availability of sub types for new careers in SH3Cmndr is hardcoded into the interface?
3) If I'm not right about this being hardcoded, what do I need to do to start a new career through SH3Cmndr in a type VIIC in early 1941 in 7th Flotilla?
4) If the career start sub type availability, (and the rank displayed in messages about crew transfers) IS hardcoded, is there any chance of SH3 Commander being upgraded to use the data from its configuration files to affect its own UI?
0) Most definately!
1) See screenshot, which is running SH3Cmdr "out of the box"
2) Most definately NOT!
3) See screenshot, which is running SH3Cmdr "out of the box"
4) Not necessary, see above screenshot, which is running SH3Cmdr "out of the box"

I don't know what you've done wrong (most likely a failure to rollback before tweaking though), but it seems you have really screwed up your installation of SH3Cmdr if not your installation of SH3. You may like to start everything again from scratch.

RoaldLarsen
04-30-07, 02:59 AM
Jason,

Thank you for your reply.

I am sorry if my remarks have caused you to feel that you need to defend your excellent product from unjustified calumnies. That was certainly not my intent.

I would hope that you and other readers would infer from my first, third and fourth questions (espcially the first question being first) that I felt that user error of some form on my part was the most likely cause of the phenomena I described.

...when using realistic crew transfers, the message announcing the need to replace a crew member always seemed to use the English rank, even though I was using German rank translations.
Then you have an installation problem...

The original install seeemed to run cleanly. Perhaps I have corrupted it somehow with subsequent tweaking. I decided to take your advice and reinstall SH3 Commander.

I uninstalled SH3 Commander (rollback, backed up the changed .ini and Cfg files, ran uninstall, deleted the .ini file) and reinstalled SH3 Commander. I figure this should give me an "out of the box" version of SH3 Commander.

I tested both the display of rank labels in a number of circumstances, and the availability of types of subs to Flotillas over a number of dates, all without first changing any SH3 Commander files.

Unfortunately, the display-of-rank-labels problem remains the same. The behaviour regarding availability of type VIIC subs seems to be fixed. I no longer get the error dialog, and I get the VIIC and other sub types on the dates indicated in "U-boat availability.cfg".


It seems that, even though SH3 Commander allows you to tweak many things in SH3, it doesn't apply some of these tweaks to its own user interface.
It seems that user is incorrectly blaming hammer for breaking nails.

You are right. I was incorrectly blaming the hammer. This is, as you assert, not a matter of hard-coded values in the UI.

I will now attempt to rectify my error by trying to blame the hammer correctly.

SH3Cmdr will ALWAYS use the chosen in-game rank labels.

This statement does not seem to be entirely accurate.

The incorrect language for rank labels seems to be a matter of the UI taking values from the file "SilentHunterIII\data\Menu\en_menu.txt" when that file is not in a state that reflects the user's selection of "German" for "SH3 Options"|"Text Settings"|"Rank translations".

This occurs in at least two circumstances:

1) In the event that a user is using English as the text language in SH3, but has selected the use of German rank labels in SH3 Commander, and the user does a rollback, the rank labels displayed in SH3 Commander before SH3 is next launched will not be German unless the user edits SH3's original English menu file to insert German rank labels. This is because the rollback replaces the modified "SilentHunterIII\data\Menu\en_menu.txt", that contains the German ranks, with the original version of the file, that contains English ranks.

2) In the case that a user is using English as the text language in SH3, but has selected the use of German ranks labels in SH3 Commander, the message to replace a crewman does not use the selected German ranks unless the user edits SH3's original English menu file to insert German rank labels. This appears to be because when the user clicks "Launch SH3!" in SH3Cmdr, it rolls back the rank changes to "SilentHunterIII\data\Menu\en_menu.txt", then generates the message, if required, about the need to replace the crewman, then copies the German ranks back to the menu file.

Have I got this right, or am I still off base?


Now I have run across something that actually gets in the way of desired gameplay. According to uboat.net, U-69, a type VIIC, became a front boat in 7th Flotilla on Feb. 1, 1941. This was the first submarine command for her captain. I wished to emulate this, by starting a career in 7th Flotilla at the start of 1941 in a type VIIC.

I made sure that "SH3 Options | Career Options | Use historic U-boat availability dates" was checked....

... With the above option checked you WILL get a VIIC in 7 Flot as early as Aug 1940, no changes required. SH3Cmdr file settings:

904_Name1=VIIC
904_Month1=8
904_Year1=1940
That is, August 1940. Associated screen shot just to really prove this fact...
http://img410.imageshack.us/img410/5826/image1bw1.jpg

No need to change anything.


You are absolutely correct, of course. This worked exactly as you described. I'll do some more testing to see what edits I did to SH3Cmdr's .cfg files to cause the problem.

I had changed the dates in "U-boat availability.cfg" because the ones in the out-of-the box file didn't seem to match with my research of when types became front boats. For instance, I haven't found a reference to a type VIIC operational as a front boat in 7th Flotilla until February, 1941. Perhaps I have missed something. Are the dates in "U-boat availability.cfg" intended to reflect front boat status, or do they include boats undergoing training?


One probably relevant observation: when playing around with availability dates, I would sometimes get an error diaog with the message "Invalid argument to date encode" while running the attempts described above. This would occur when restoring SH3Cmndr after exiting from SH3 after running SH3 from the "Set up for new career" screen.
Obviously you are not entering correct values.


Well, obviously, the UI cannot let me enter an invalid argument to date encode, as the spin boxes only generate valid dates. I assume, therefore that it is a date being read out of a .cfg file that is causing the problem. Any idea what files it reads dates from? "U-boat availability.cfg" seems like an obvious one. Any others? And is the argument invalid because it is out of a valid range, or because it is incorrectly formatted?

Finally, is there any way to start a career from SH3 Commander on a date prior to September 1, 1939?

Thanks for your help and attention.

RoaldLarsen
05-01-07, 12:18 AM
Now I have run across something that actually gets in the way of desired gameplay. According to uboat.net, U-69, a type VIIC, became a front boat in 7th Flotilla on Feb. 1, 1941. This was the first submarine command for her captain. I wished to emulate this, by starting a career in 7th Flotilla at the start of 1941 in a type VIIC.

I made sure that "SH3 Options | Career Options | Use historic U-boat availability dates" was checked.
I edited "SH3 Commander\Cfg\U-boat availability.cfg" to set 904_Month1=1 in the section [SUBMARINE1]
...

When I started SH3 Commander, I selected "Set up for a new career". I typed in a name, selected year 1941, month 1, and 7th Flotilla. When I tried to select a u-boat type, the only choice available was VIIB. It is not until 1941/06 that VIIC is an available choice.

I think I now know what was causing this problem. SH3Cmdr was not handling comments appended to lines defining values.


904_Name1=VIIC
904_Month1=1
; includes 1 month training
904_Year1=1941

The example above works without incident. What I had was as follows.


904_Name1=VIIC
904_Month1=1 ; includes 1 month training

904_Year1=1941


SH3Cmdr won't handle this.

What are the intended rules regarding comments appended to lines? I have seen quite a few such comments in some out-of-the-box SH3Cmdr .cfg files, so I assumed that such comments were intended to be OK in all cases.

RoaldLarsen
05-19-07, 01:25 PM
Bump, in case Jason didn't see my replies.

Jimbuna
05-19-07, 02:10 PM
Mine works fine (SH3Cmdr v2.7) :up:
http://img352.imageshack.us/img352/8307/untitledfe9.jpg (http://imageshack.us)

RoaldLarsen
05-21-07, 12:20 AM
Mine works fine (SH3Cmdr v2.7) :up:
Thanks, Jim.

Sure. Mine (SH3Cmdr v2.7) works fine too, until I add a comment at the end of a line in "SH3 Commander\Cfg\U-boat availability.cfg", such as:

904_Month1=1 ; This comment seems to foul things up
Then it doesn't work fine any more. Try adding a comment and see if you get any strange behavour.

SH3 Commander is a great product. I am just trying to tidy up a few minor glitches. Hopefully Jason will continue to support and update it.

Normally I would handle this sort of bug report message with a PM or an email to the developer, but in this case I honestly thought at first that my own error was the most likely source of the problem. A message in a forum like this one seemed a better place to get help. Jason's prompt reply motivated me to run some tests (to see if I was being as much of an idiot as I inferred from his message) and I posted the results of those tests. I would hope that Jason could make use of those observations to improve his product.

Jimbuna
05-21-07, 01:40 AM
AKAIK Jaesen is actually in the process of updating CMDR :hmm: