This guide is all about rockets, programming, and math, but don’t worry, it’s not too complicated! I’m sharing some basic scripts that you can use and tweak for your own purposes. Keep an eye on this guide because I’ll be updating it regularly with new scripts as I find them. Have fun exploring and adapting these tools to suit your needs!
Introduction
I’m a beginner with Juno, and I’m not familiar with rockets or rocketry. While I’m confident in my programming skills, I’m clueless about Vizzy or any visual editor in this game. Creating this guide is my way of sharing what I discover while exploring this intriguing game. I aim for this guide to be helpful to you, inspiring your own ideas and applications of scripts and concepts within Juno.
The Script
So, you know, having the highest possible TWR (that’s Thrust-to-Weight Ratio) might seem like the best thing ever, right? But hey, turns out it can be kinda “inefficient” sometimes. Why? Well, drag and other stuff get in the way, making it not as awesome as it sounds.
So, you’re thinking, how about we get all fancy and automatically adjust the throttle to keep that TWR steady during a burn? Sounds cool, right? Well, hold on a sec. There are a few things we gotta remember if we wanna do this the “right” way.
- Our target TWR we wish to maintain
- The mass of the craft.
- The gravitational effect of a planet on our craft
- Our maximum thrust for the current stage
- The loss of mass over time (as we burn through fuel)
In terms of point number 5, it’s not something we need to dwell on too much. Our focus is primarily on the current mass of the craft, which will fluctuate as we consume fuel. I mention it just to keep it in our thoughts as we draft our script.
Now, onto Vizzy, which is new territory for me (as is this entire game). However, I believe I understand the basics. It’s a visual programming tool that enables us to create scripts. Given this, I recognize that the scripts I develop here may not be the most efficient. After all, this guide is aimed at simplicity. Perhaps in the future, I’ll craft more intricate and refined scripts.
Let’s start by sharing a screenshot to give you an idea of what it looks like. Then, I’ll delve into the process and the math involved.
Okay, let’s break it down.
So, we’re kicking off the script, right?
At the beginning, we’re just setting things up.
Then, we’re throwing in a few display messages every 3 seconds just to add a bit of drama. Why? No real reason, just for fun.
Next up, we’re adjusting something called the throttle. We’re pegging it at 77%, which is basically just picking a random number. You could set it to 0 if you felt like it.
Now, we’re getting to the main event. We’re activating a stage, waiting for 3 seconds, and then diving into an endless loop with the instruction While(true). This loop is the heart of the script. It’ll just keep going and going until you tell it to stop.
Inside this loop, we’re getting into some math stuff. We’re aiming to keep something called TWR (that’s Thrust-to-Weight Ratio) at a certain level. We’ve got a custom variable called Target_TWR that we’re setting to 1.8. Why 1.8? Well, that’s just what we’re aiming for. You might pick a different number depending on your spacecraft.
Now, here’s the loop doing its thing: adjusting the throttle. We want to make sure the TWR stays where we want it, so we’re constantly tweaking the throttle up or down. If the TWR gets too high, we’ll cap the throttle at 100%. If it gets too low, we’ll drop it to 0%. This loop keeps running, fine-tuning the throttle every frame to hit that sweet spot.
Here’s a straightforward formula to play around with:
Throttle% = (Target_TWR * (CurrentMass * CurrentGravity)) / MaxThrust
Give it a shot yourself and tweak the Target_TWR variable. If you set it to 1, you’ll aim to hover. But keep in mind, any previous motion will keep your craft moving. So, it won’t truly hover here; it’ll just maintain its current speed.
In the future, I’ll build on this basic script and demonstrate a practical use for it in Juno. I’m thinking of creating a simple hover script for a specific altitude above sea level (ASL).
Hopefully, this simple script gives you some inspiration and ideas for what you can do with scripts like these. Have fun experimenting!
That's everything we are sharing today for this Juno: New Origins guide. This guide was originally created and written by Aloe. In case we fail to update this guide, you can find the latest update by following this link.