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 > Silent Hunter 4: Wolves of the Pacific
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-23-21, 05:55 AM   #1
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
bullhorn SH4toStellarium.py Phase 1 Is Ready!

Welcome Sub Skippers!

SH4toStellarium.py Phase 1 Is Ready!

If you are a SH4 captain I am happy to present the Python script to allow the use of the Stellarium application for realistic CelNav with Silent Hunter IV! The default Stellarium program normally shows the lat/lon onscreen which defeats the purpose for CelNav. This script not only accurately locates the correct celestials above the conning tower bridge, it hides the lat/lon, so you have to use CelNav to work out your location.

"Phase 1" will require manually recording the date and time to enter in the input window. "Phase 2" will hopefully be automatic. If interested, the plans for additional phases can be seen at bottom.

There are some prerequisites to download/install to make this work. All software downloads are freeware. Unfortunately, this is only for Windows.
  1. Python - (http://python.org) The script was written to use Python 3.6.9, but other versions may work. Python can be installed almost anywhere, but please don't install in "Program Files" or "Program Files (x86)" in Windows to bypass Windows security.
  2. Stellarium - (http://stellarium.org) The Stellarium program is what provides the canopy of stars, planets, etc. which will be used to take sight reductions with a "sextant."
  3. SH4toStellarium_Phase_1.py - Since a Python script is not allowed to post on SUBSIM, you can download the script here...https://www.dropbox.com/s/c8dl7nrnho...hase_1.py?dl=0 Be advised: the script will not work unless Python and Stellarium are installed as directed above. This script file can be placed anywhere. The Windows Desktop is recommended.
IMPORTANT!
  • You will need to install to "C:\Stellarium" to match the script's programming. If you can program in Python you can adjust the script to match whatever you prefer. Be certain you know what you are doing and ensure you make a copy.
  • Only save/re-save game scenario as "00000000" (8 zeroes). This is necessary due to limitations in SH4.
  • While not absolutely necessary at present, future phases will require you to command "ALL STOP" before saving and exiting your game. You may as well get used to it.


There are some suggestions to improve the experience, if desired. While these items can affect the look, the un-enhanced default setup will work just fine for CelNav. Also, you should explore Stellarium. There are a multitude of options.

One caveat - Due to the way Silent Hunter stores time and location, the actual time is not exact to the second which has some importance in real CelNav; however, this limitation can be viewed as an "undocumented feature" to allow a slight fuzziness to the experience which can mimic the un-exactness of real world navigation. Regardless, what is provided will be adequate to get from harbor to harbor.

As with all newly-released software, there could be issues. If you find any, please post in this thread and I will address them as I am able. Do not expect immediate response, who knows? It could happen. My testing worked well, but YMMV. I hope this work will be enjoyed as much as I enjoyed providing it.

Lastly, I wish to say thank you to all the individuals who provided input both privately and publicly. This has been a multi-year effort (because I had to learn Python) which I could not have accomplished without your help, instruction, advice, and commentary.

Happy navigating!


Calvin Waterbury
aka "Capt Codetrucker"

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

FUTURE PLANS

PHASE 1
- This is the one we're talking about now.

PHASE 2
- SH4toStellarium_Phase_2 is intended make the whole process automated.

PHASE 3
- SH3toStellarium_Phase_3 - This manual-entry script will hopefully make this function available to those who enjoy the original Silent Hunter III.

PHASE 4
- SH3toStellarium_Phase_4 will be intended to automate the process in SH3.

PHASE 5
- For Vehicle Simulator (formerly Virtual Sailor). Preliminary investigation shows this manual-entry process could work.

PHASE 6
- Assuming the above manual-entry works, it may be possible to automate the process as well.


Beyond the above, there is no plans to incorporate SH5 since there is already a working CelNav capability. I intend to tackle FS9, FSX, X-Plane, Flightgear, ???? Don't be surprised about incorporating flight simulation. There are many flightsim pilots who enjoy flying by the stars just like their maritime counterparts.
  Reply With Quote
Old 08-23-21, 07:41 AM   #2
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

I S S U E S

  • "could not convert string to float" - I have discovered if you get this error it is due to SH4 not saving your game save correctly. The script is looking for data that does not exist in a needed file. The only way I have "fixed" this is by re-running the saved game with attention to traveling for a while. Normally, this should never happen as game play would usually require adequate distance and time. If this occurs please post in this thread. Maybe there might be a workaround. Unfortunately, there is no other fix that can be applied as it is SH4 program internals.
  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 07:51 AM.


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