Question KSP Countdown display

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
Hey there !

I wanted to know, is there a mod for a functionnal countdown display ?


I found this one for Orbiter 2010. It's static so I don't think the countdown really works :p
unknown.png


Thanks in advance !:tiphat:


Edit: KSC* for the title, did too much KSP lately :p
 
Last edited:

Marijn

Active member
Joined
Mar 5, 2008
Messages
755
Reaction score
166
Points
43
Location
Amsterdam
The Falcon9 and FH do have countdown timers. Have a look.
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels

Marijn

Active member
Joined
Mar 5, 2008
Messages
755
Reaction score
166
Points
43
Location
Amsterdam
Hi Marijn, are you referring to these ones ?

Yes. And there is a display. Check this video I made:


---------- Post added at 11:23 PM ---------- Previous post was at 11:20 PM ----------

But it's part of the add-on I guess. It's not a standalone mod. But is shows how it can be done.
 

Kyle

Armchair Astronaut
Addon Developer
Joined
Mar 17, 2008
Messages
3,912
Reaction score
339
Points
123
Website
orbithangar.com
Would actually be a good idea to make a mod to turn that countdown clock mesh into a functional one.
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
Yes. And there is a display. Check this video I made: SpaceX Falcon Heavy tribute Orbiter Space Flight Simulator 2016 Edition - YouTube

---------- Post added at 11:23 PM ---------- Previous post was at 11:20 PM ----------

But it's part of the add-on I guess. It's not a standalone mod. But is shows how it can be done.


Funny, I thought you made that yourself actually as I don't have the countdown on my end (strange).

Would actually be a good idea to make a mod to turn that countdown clock mesh into a functional one.


It would be awesome ! It's the little details like that that makes you appreciate the job :)

Btw I did a quick video edit with OBS, using the SSU countdown, I cropped that area and placed it over the clock display and the result is <something>

Alas I'm no coder I can only fake it through videos. At least it's "doable" but not practicle, even for Twitch streamings.

 

Marijn

Active member
Joined
Mar 5, 2008
Messages
755
Reaction score
166
Points
43
Location
Amsterdam
Funny, I thought you made that yourself actually as I don't have the countdown on my end (strange).

I had some issues with this timer being displayed properly. Try a 16:10 resolution if you currently have a 16:9 and check whether that makes a difference.

When I change 1920x1200 to 1920x1080, the timer becomes a solid yellow box..
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
Here you go (attached on this post).

Unzip in your Orbiter directory maintaining directory structure.

How to use:

1. Run the Scenario you want, pause and open the Scenario editor.
2. Press "New", select "Timer" from the drop-down menu and name it "timer" (or whatever you want, without the quotes).
3. Place the "timer" vessel wherever you want.

XROJmv.jpg


4. Exit the scenario.
5. Open the Orbiterroot\Script\timer.lua file with notepad
6. In the first line, enter the MJD you want the timer to countdown to
Example: launch_mjd = 55278.647452
7. (optional) Enter the name of the timer-vessel you created in the line right below the launch_mjd. If you named your vessel "timer" there is no need to change this line.
Example:
vessel name = timer -- leave the line as it is.
vessel name = display -- change it to: shiph = oapi.get_objhandle("display")
8. Save and exit.
9. Open the Orbiterroot\Scenarios\(Current state).scn file with notepad.
10. Enter the following: Script timer --Under the date, between the BEGIN_ENVIRONMENT, END_ENVIRONMENT lines.
Example:
BEGIN_ENVIRONMENT
System Sol
Date MJD 55278.5004612550
Script timer
Help CurrentState_img
END_ENVIRONMENT
11. Save and exit.

Done. When you run the (Current state) scenario you will have a working countdown display.

It can count from -100 to +100 hours to/since launch, defined by the launch_mjd line in the script.

WKRxNP.jpg


Have fun, happy orbiting
:cheers:

--------------EDIT-----------------
Attachment removed. For the latest version, please download the file
attached on post #16 of this thread.
---------------------------------------
 
Last edited:

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
I cannot say how grateful I am !

This is so cool ! Thank you a thousand times !:hailprobe:

And now Discovery is going to space :D
S7fWEIf.png
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
No prob, glad you like it.

From the screenshot you posted, I see that I forgot to make the display glow.



If you are using the D3D9 client, do the following.
In your Orbiterroot\Config\GC folder create a file named Timer.cfg

Copy the lines below and paste them there.
Code:
; =============================================
MESH ???
; ---------------------------------------------
MATERIAL 0
EMISSIVE 0.662745 0.662745 0.662745
; ---------------------------------------------
MATERIAL 1
AMBIENT 0.000000 0.000000 0.000000
DIFFUSE 0.905882 0.905882 0.905882 1.000000
EMISSIVE 0.000000 0.000000 0.000000
Save and exit.
It should look much better the next time you run it.
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
Hi again, I did that and now the countdown is now blocked at the time of loading.
It's also glowing but the rest of the textures are "black"

Here's the countdown after a few seconds of scenario (T-1min)
jOdQmwX.png


When I reload the same scenario (current state).scn.
The timer is reloaded at the correct time but still stuck. Any idea how to correct this ?
3CFFQwS.png



Thanks in advance !
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
That's odd. That started after you created the Timer.cfg file in Config\GC ?
What happens if you remove the file? Does it work properly?
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
When I remove the Config/GC/timer.cfg file, it's working good again.

3w9wOLU.png


EDIT:

I deleted them all, copied them again and now the countdown has resumed.
But the textures are still black. I don't know how to fix this.

tT0ufM4.png


Maybe some missing SPEC and NORM textures that are needed ?
 
Last edited:

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
I edited post #8 in this thread and attached a new zip file. unzip in your Orbiter directory and let it overwrite the previous files.

Also delete the Config\GC\Timer.cfg file.

Changes:

-Materials handled by the mesh itself.
-Mesh moved 0.3 meters down, so that it doesn't "float".
-Debug countdown text on upper right corner removed.

Everything should work ok now, please test and let me know if there are still any problems. Sorry for the inconvenience. :tiphat:
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
Thanks again for your time dgatsoulis !

It is now working porperly !

Day time test
FbgUbes.png


Night time test
asKlJNj.png
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
New version.

No need to edit the timer.lua script anymore. Simply select the scenario you want, enter the "Script timer" line between the BEGIN_ENVIRONMENT - END_ENVIRONMENT lines and run it. You can create a "Timer" vessel anytime/anywhere you want, press F3 to select it and hit "K" to enter the MJD you want the display to countdown to/from.

In detail:

1.Unzip the attached file in your Orbiter2016 directory.
2.Go to Orbiterroot\Scenarios\ and open any scenario you want to have the countdown display in with notepad.
3.Enter the line "Script timer" between the BEGIN_ENVIRONMENT - END_ENVIRONMENT lines. Example:
Code:
BEGIN_ENVIRONMENT
System Sol
Date MJD 55278.5004612550
Script timer
Help CurrentState_img
END_ENVIRONMENT
4.Save and exit.
5.Run the scenario.
6.Open the Scenario Editor, press "New" and select "Timer" from the drop-down menu. Name it whatever you want.
7.Press F3 and select the vessel you just created.
8. Press K and a popup window will appear, asking you to enter the "launch MJD".

The timer will start counting to/from that date (as long as it is within -100/+100 hours from the current scenario MJD).

Pressing K again while focused on the "Timer" vessel will stop the countdown, Pressing K a 3rd time repeats the cycle (enter launch mjd).

While you have the "Timer" vessel in your scenario, you can switch focus to any other vessel you want and it will keep counting normally.

Attachment on post #8 of this thread removed. Please use the latest version, attached on this post. If you already have the previous one, let it overwrite the files.

Please test and report any problems here.

It was fun making this one, learned a few things along the way.
:cheers:
 

Attachments

  • Timer.zip
    69 KB · Views: 18
Last edited:

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
Hi, I'm back for some Orbiter now that I have a new computer :)

I wanted to use this addon again and I'm glad there's a final version !

When I press K to have the popup window to enter the launch MJD date, nothing appears ? Can you confirm this ?
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
Hi, I'm back for some Orbiter now that I have a new computer :)

I wanted to use this addon again and I'm glad there's a final version !

When I press K to have the popup window to enter the launch MJD date, nothing appears ? Can you confirm this ?

Works fine on my end. Did you follow the instructions?

-Open .scn with editor, enter the Script timer line, save and exit.
-Run scenario and spawn Timer vessel
-Switch focus to Timer vessel and press K
 
Top