Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Hey, just figured I'd share what I needed your script for. Thanks again.
https://youtu.be/Fjx7adXu1sE?si=lVCmWRdE7j07LnaJ
Thanks for getting back so quick. Didn't expect it and it went over my head. I'll keep fiddling with it. I have a 6.3 million kilometers ship with I think... 36 large ion thrusters for forward thrust and only a few small ones for docking and final maneuvers in every other direction. It very much needs a script like this, and it also needs to be abortable both for combat and for asteroids. I sure don't know what I'm doing with C# to make it work my way, so I think I'm going to have to just use a timer to turn off gyro override and turn on thrust and just let that slide mentally as "this is the emergency button, you'll have to do a hard reset."
Still, if you're still updating/working on this I'll keep checking back. Thanks again. This is the only script I can find that does something like this.
But! It's not releasing control because it's trying to get your ship within .2 degrees of your original velocity before re-enabling all thrust. For some ships, this might be too narrow/too small of a tolerance.
Aside from slapping on more gyros, another thing to try:
1. Select the PB and edit its Custom Data
2. Add the following
cruiseMaxGyroError .05
3. Re-compile and try again. The number is the tolerance in radians. .05 radians is almost 3 degrees, which seems plenty tolerant.
Thanks very much for creating this, despite the issue.
At some point though, I started modding the game and adding my own Lua functions. I got tired of maintaining two branches of scripts (especially since they weren't public anymore in the first place). The scripts haven't been used in the vanilla game in a long while.
I used something like "cruise 10 forward h" and it correctly only used hydrogen thrusters to cruise forward.
as soon as I leave it the grid starts accelerating to a set speed
(So while my generic library doesn't care about grids, the layer above it, i.e. this script, does make sure the blocks it touches are local.)
I guess the "duplicate" group doesn't necessarily have to be CruiseControlReference to cause the exception. The library function is trying to gather all the available groups, and a group on the shuttle "collides" with one on your local grid.
The game is case-sensitive when it comes to groups, so I guess my scripts will have to be as well. That will be an annoying change.
Thanks for the bug report.
I'm not sure if the game actually allows distinct groups with the same name that only differ by letter case, but that's the only thing that makes sense with that error.
I'll have to eventually investigate (and fix on my side, if needed), but making sure there are no duplicate CruiseControlReference groups should avoid the issue you're seeing.
[code]Caught exception during execution of script:An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Program.ZACommons.get_GroupsByName()
at Program.ZACommons.GetBlockGroupWithName(String name)
at Program.ShipOrientation.SetShipReference(ZACommons commons, String groupName, Func`2 condition)
at Program.Main(String argument, UpdateType updateType)
at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.<>c__DisplayClass42_0.<ExecuteCode>b__0(IMyGridProgram program)
at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.RunSandboxedProgramActionCore(Action`1 action, String& response)
[/code]
It works in vanilla, at least. Are you talking about atmospheric drag through some mod, or the usual decay of thrust of ion/atmo engines depending on your altitude?
The script itself has worked fine for me, it just seems like the workshop is messed up. And the github copy is gone.
I'm specifically looking for only some of the thrusters to be used by the script though. Any thoughts as to why when I add thrusters to the CruiseControlGroup group the script doesn't appear to do anything?
I also added my cockpit to a CruiseControlReference group and only the two atmospheric thrusters I use for propulsion. After that, no thrusters would answer to the plugin
Also your GItHub does not lead to a copy of this script at all
Not sure why it's not documented above, but that I see that feature is there in this version of the script.
right in back .... when i do cruise set in any direction it go right
but good script i just wanted a cruise for my tunel ship and its awesome :P
However, what might work is if you create a group named CruiseControlGroup around only the nuclear engines. And then don't use any sort of thruster spec.
Then again, first try it without doing anything and see if it can control them properly... The script classifies any engine without "Hydrogen" or "Atmospheric" in the type name as ion, so...