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
That said, there should be a MUCH simpler script available these days as I'm pretty sure they finally exposed the thruster force property to the in game programming API. That would cut the meat of the script down to about 6 lines of code. As I haven't playing in years, I'd suggest looking for an alternative script.
had the same idea for a script too, googled for it and found yours.. good job as far as i can tell, got a little problem
i have everything setup just the way you listed it above... i've named everything like this: http://i.imgur.com/aODRK7x.png (hope the group of mass blocks is fine this way)
unfortunately the gravity generators turn off upon running the script and never turn on again. they are not mirroring the thrusters at all
any clue what the issue might be?
There is (as far as I know) no easy way to get the moment of inertia for a ship. So there is no way to calculate torque which would then be easy to correct with gyros.
That said, it would be possible to use "orphan" gravity drives that don't overlap the base drive placed on the extremes of each of the 3 axis (only 1 set needed per axis due to being able to set both positive and negative gravity). Then for each axis, calculate the location of the acceleration axis from the base gravity drive components then calculate the strength needed on the orphan drive to bring that acceleration axis in line with the center of mass of the ship. All of that could be done on script initialization if you don't need to take into account adjustments due to ship damage or cargo loads.
IMHO, spaceballs are overkill since this setup is so power and space efficient compared to thrusters to begin with. I can already fly a massively overweight factory ship off solar panels and batteries as it is. Spaceballs do allow adjustments in virtual mass though which could be useful to finely adjust the gravity acceleration vector to match the ships center of mass and remove the drift caused by off center gravity drives.
ill publish this one if u want , already published the "rough" versions
maybe then i will use spaceballs ( less efficient but powerless )
thanks !
To modify this code, I would imagine manually tagging (or grouping) mass blocks by direction they represent, getting those groups within the Init function, then change out the lower part of Main to turn your mass block groups on/off instead of the gravity generators.
You would lose dampener control as you only have one set of gravity generators and cannot adjust the mass block's mass. You'd also have to strip out the code for finding the various components and setting the field strengths.
what do you mean "work with correct alignement" ? inertia distribution ? i find it easier to fix it on sphericals ...
ima try to code something crude : get consumption , fire corresponding axis mass .. i dont really need dampeners :D
The oscillations issue has some code to help combat it, but is impossible to fix completely. (although it may be possible now with the API changes). Esentially, the problem is too large of a drive on too small of a ship. Try adjusting the StopSpeed variable to something larger.
Does hitting "Reset" help with the oscillation ?
I found that the closer the grav drive was to center of mass, the better the performance of the whole ship.
I also wonder if the percentage of total ship mass the artificial mass takes up might affect the performance.
I tested it with an "off center" small ship (just to see how capable it is), and it still worked somewhat -- there were some issues where it would veer off center (as expected) and get stuck in an "on" mode even when the dampeners were firing. Sometimes it would jitter back and forth when stationary, which was very funny to watch.
All of those issues disappeared when I moved the center of mass in-line with the direction of travel.
I'm planning on incorporating it in a larger ship design soon.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=723855022
Make sure your timer block is set to "Run" with a blank argument and not "Run with default argument" and try running the program block with the argument "Reset" to get it working again.
Let me know if it is still having issues.