Jump to content

Optional MechJeb Modules for FAR, NEAR & km_Gimbal 2/3 (July 16)


sarbian

Recommended Posts

I got it fixed. Not really sure what was wrong but a complete wipe and re-install of all the relevant files and now it works. Go figure.

So, I'm getting terminal velocity and everything, which is awesome. Sometimes it seems a bit not right but definitely a huge improvement.

One thing I'm noticing is that control surfaces are seriously wonky. Not sure if it's a design flaw on my part or what, but on a test with some winglets (for a craft I can, myself, put into orbit with FAR easily), MJ started wildly over-adjusting and compensating right off the pad. Had to go to work, so I couldn't test it further.

I'm still a KSP scrub, and only recently got FAR and MJ, too (after doing pretty much everything unmodded) - my FAR rocket design skills are rubbish. Will investigate further tomorrow

Link to comment
Share on other sites

I'll think about it but it won't be high on my list for now. I Had to do a quick search to understand why you would need that. I learn things everyday here :)

ullage is done with RCS on real rockets ? Or do they use some special engine ? I remember some talk about ullage engine on a thread about the Ares.

The problem with enabling/disabling engine is that I would need a way to know which engine I can touch and which I should left offline. And the lack of common engine interface will again lead me to some code duplication nightmare...

I think we can manage both realistic and normal mode in the same code base. I just need to avoid quick dirty fix.

There's three solutions that are generally used. 1 - Use RCS to ullage the tank; 2 - Use a special SRB to ullage the tank; 3 - Ignite a stage right before a previous one is done.

Once you're in space, like on an Apollo CM or LEM, you use solution 1, a few seconds of RCS to settle the tanks before the main burn. During launch 2 and 3 are common. Generally, 3 is a Soviet solution and 2 is an American one, though the Soviets invented 2 - at least as far as I can gather from the history. (There's a 4 - very kerbal - spin the craft on yaw or pitch axis using reaction wheels, let the centrifugal effect settle the tanks before the burn.)

Now, Mechjeb doesn't like 3 much as far as I can tell, but once you have SRBs you can use proper staging and 0 stage delay to make 2 work just fine during launches. What would need to change is the flying of manoeuvre nodes in space and the reentry/landing burn. Once the craft is in space it needs to do that ullaging process. I would think that a short RCS burn wouldn't hurt a non-ullage modded game, it'd just look strange. Those of us with the mod would certainly appreciate it, however. I tried looking at the Mechjeb source and seeing if it would be possible to add such a burn easily with my lack of programming knowledge, but I didn't know what was going on inside there at all.

Startup and shutdown would be nice as well, though I can see why determining what engine to turn on-and-off would be much harder than just turning on RCS and using it for a few moments.

Link to comment
Share on other sites

Toolbar isn't working for me, the button doesn't work. From logs:

[LOG 13:42:42.179] [MechJeb2] MechJebFARExt adding MJ2 callback

[LOG 13:42:42.191] mk1pod(Clone) (Part): -1 FULL

[LOG 13:42:42.200] Command Pod Mk1: FAR drag model added; Size: (1.3, 1.1, 1.3), LD (1.3, 1.3, 0.0), UD (0.5, 0.6, 0.0)

Surface area: 3.215506

Fineness Ratio: 0.892536

TaperRatio: 0.4244644

Cross Sectional Area: 1.264568

[LOG 13:42:42.204] FAR Raycast mask: 557059 557063

[LOG 13:42:42.223] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Ascent_Guidance

[LOG 13:42:42.224] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Attitude_Adjustment

[LOG 13:42:42.225] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Custom_Window_Editor

[LOG 13:42:42.226] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Docking_Autopilot

[LOG 13:42:42.227] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Landing_Guidance

[LOG 13:42:42.228] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Maneuver_Node_Editor

[LOG 13:42:42.229] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Maneuver_Planner

[LOG 13:42:42.229] [MechJeb2] [MechJebModuleMenuToolbar] No icon for RCS_Balancer

[LOG 13:42:42.230] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Rendezvous_Autopilot

[LOG 13:42:42.231] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Rendezvous_Planner

[LOG 13:42:42.232] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Rover_Autopilot

[LOG 13:42:42.233] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Settings

[LOG 13:42:42.234] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Smart_A_S_S_

[LOG 13:42:42.235] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Spaceplane_Guidance

[LOG 13:42:42.236] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Translatron

[LOG 13:42:42.237] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Utilities

[LOG 13:42:42.238] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Warp_Helper

[LOG 13:42:42.239] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Docking

[LOG 13:42:42.239] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Editor

[LOG 13:42:42.240] [MechJeb2] [MechJebModuleMenuToolbar] No icon for General

[LOG 13:42:42.241] [MechJeb2] [MechJebModuleMenuToolbar] No icon for Plane

[LOG 13:42:42.263] button visibilities have changed, forcing auto-size

[LOG 13:42:42.264] saving toolbar settings (EDITOR)

[ERR 13:42:42.268] error loading button texture: MechJeb2/Plugins/Icons/MJ2

[EXC 13:42:42.274] ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint

Aborting

[LOG 13:42:42.339] button visibilities have changed, forcing auto-size

[LOG 13:42:42.340] saving toolbar settings (EDITOR)

Outputlog I can't find anything worthy. I have the icons in GameData/MechJeb150/Plugins/Icons, do I have to keep the original MechJeb folder name? Maybe that's why. I'll try when I get back home.

Link to comment
Share on other sites

do I have to keep the original MechJeb folder name? Maybe that's why. I'll try when I get back home.

Yes, with a lot of mod changing the dir break things.

Link to comment
Share on other sites

I've installed this mod, and while I enjoy not having the weird sidebar-button, there is not "Toolbar Options" within MJ. The main MJ button is in the toolbar, but I don't see how I could Ascend Guidance or Smart A.S.S.

Link to comment
Share on other sites

I've installed this mod, and while I enjoy not having the weird sidebar-button, there is not "Toolbar Options" within MJ. The main MJ button is in the toolbar, but I don't see how I could Ascend Guidance or Smart A.S.S.

Assuming you're in Career Mode and have already unlocked those function, or alternately that you're in Sandbox mode ...

Using the large main MJ window on the right side of the screen, open the module you want to add to the Toolbar. At the top of each of those smaller windows you will see a "T". Click the "T" and the module will be added to the Toolbar.

Link to comment
Share on other sites

As it is currently taking ages to load the game (just installed about 600+ mb of mods), I'll tell you if that works in ... a while :D

Although I think I can remember the T you are talking about :) So thanks in advance.

Link to comment
Share on other sites

Open the module you want to add to the Toolbar. At the top of each of those smaller windows you will see a "T". Click the "T" and the module will be added to the Toolbar.

A "T" though? Can we get a button icon overlayed there instead? Maybe with a dim blueish glow for on? Or better yet, remove the icon by placing a transparent icon overlay when the button is clicked and the module is added to the toolbar?

Link to comment
Share on other sites

I also don't see the toolbar option in the MJ main window.

I also have a similar problem as AndreyATGB, only the MJ icon is loaded, all the others appear with the '?' symbol and a bunch of errors appear in the log

EDIT: I'm using the dev version 2.1.1.0-161 and toolbar 1.4.1

Link to comment
Share on other sites

All MJ windows are draggable. Why not make it so that you can directly drag a window onto the toolbar, and poof - a new button for that window appears.

Did you change something in the toolbar source? Last time I asked, you confirmed me the toolbar rect was to remain a private class and therefore unavailable for modders to reference it.

Link to comment
Share on other sites

Did you change something in the toolbar source? Last time I asked, you confirmed me the toolbar rect was to remain a private class and therefore unavailable for modders to reference it.

All the plugin author would need is an event that informs of a drop over the toolbar, not where it is actually positioned on the screen.

Link to comment
Share on other sites

Sarbian, noticing a problem when the FAR Extension dll is installed but FAR itself is not. I guess that's technically an edge case since there's no reason to do so deliberately but the problems it causes might not be readily apparent if someone does it accidentally.

The two issues are:

  1. Certain MJ2 windows are broken, such as ones that display atmospheric info such as drag.
  2. Stretchy or Modular Fuels tanks cannot be configured. (not sure what the relationship here is... but it stopped when I removed the FarExt plugin or reinstalled FAR)

Like I said, it probably should be considered an edge case and I don't have any error logs for you; the main purpose in reporting this right now is for other people who might have these problems so they know where to look for the problem. (just in case they actually do try to read the thread first...) It's easy enough to either remove the plugin or reinstall FAR

Link to comment
Share on other sites

J_Davis / NathanKell : I'll think about it but it won't be high on my list for now. I Had to do a quick search to understand why you would need that. I learn things everyday here :)

ullage is done with RCS on real rockets ? Or do they use some special engine ? I remember some talk about ullage engine on a thread about the Ares.

The problem with enabling/disabling engine is that I would need a way to know which engine I can touch and which I should left offline. And the lack of common engine interface will again lead me to some code duplication nightmare...

I think we can manage both realistic and normal mode in the same code base. I just need to avoid quick dirty fix.

Hmm this is not easy. since there might be lots of different designs of rockets. For ullage, some use RCS thrusters, some use small auxiliary engines/solid boosters, some just use venting system to generate small acceleration (right now it's not implemented in KSP yet, but you can consider that as a small low-efficiency engine).

i would rather hope that some sorts of script system can be made (like kOS i guess, but i'm not sure if kOS has capability to write scripts for certain parts instead of the whole vessel), which can automate the process (but might need to code by oneself), and leave MJ to control the heading of the vessel and perhaps the cut-off of the throttle. BTW shouldn't RF 4.1 already have the feature to adjust min-thrust of a liquid fuel engine to 0 when the throttle is completely 0, NathaneKell?)

EDIT: ah, didn't notice that the quoted post is several weeks ago...

Edited by HoneyFox
Link to comment
Share on other sites

Hmm this is not easy. since there might be lots of different designs of rockets. For ullage, some use RCS thrusters, some use small auxiliary engines/solid boosters, some just use venting system to generate small acceleration (right now it's not implemented in KSP yet, but you can consider that as a small low-efficiency engine).

i would rather hope that some sorts of script system can be made (like kOS i guess, but i'm not sure if kOS has capability to write scripts for certain parts instead of the whole vessel), which can automate the process (but might need to code by oneself), and leave MJ to control the heading of the vessel and perhaps the cut-off of the throttle. BTW shouldn't RF 4.1 already have the feature to adjust min-thrust of a liquid fuel engine to 0 when the throttle is completely 0, NathaneKell?)

EDIT: ah, didn't notice that the quoted post is several weeks ago...

Actually, I was thinking about this today while playing (instead of playing with NK's RF spreadsheets) and it occured to me that what might work is a checkbox in the MJ settings. Something like "Trim with RCS? Y/N"

When set no, it behaves as normal when burning a manoeuvre. When set yes, it precedes and follows each burn with a couple seconds of forward RCS and doesn't use the throttle, instead just ramping straight to 100% and straight back down.

In real spaceflight, they need to start with the RCS to ullage, and follow with it to get the deltaV of the burn exactly right. This would replace the normal functionality where it slowly throttles down the engine then 'trims' the burn with the main engine. This would support realistic thrusts /and/ ullage simulations. (It would also be potentially useful to regular players who want to conserve main-engine fuel.) This might be better functionality in general, when there's an overburn, instead of turning the ship around and burning backwards for a moment, it just trims it with forward and reverse RCS after a burn.

Sarbian, how asinine would something like that be to implement? I'm curious if I'm asking for 3 minutes or 3 days of coding.

Edited by J_Davis
Link to comment
Share on other sites

Also I should mention on this point that RF v4.1 on sets minThrust to 0 iff throttle = 0, so MJ can shut the engine off after the burn and (try to) turn it on again for next burn, without having to keep track of enabled/disabled engines. It also means your dV doesn't go to 0 (on dV stats) due to disabled engines :)

Link to comment
Share on other sites

Also I should mention on this point that RF v4.1 on sets minThrust to 0 iff throttle = 0, so MJ can shut the engine off after the burn and (try to) turn it on again for next burn, without having to keep track of enabled/disabled engines. It also means your dV doesn't go to 0 (on dV stats) due to disabled engines :)

Yeah, I noticed that, that was why I thought that the "RCS Trim" feature would be nice.

Link to comment
Share on other sites

What do I need to do to be able to use newly created icons, as well as specify active and inactive versions? I'm working on making a couple but I want to test them first.

Link to comment
Share on other sites

You need 24x24 pixels png icons, with our without alpha.

Put them in GameData\MechJeb2\Plugins\Icons

The list of filename can be found here : http://forum.kerbalspaceprogram.com/threads/60933-Optional-MechJeb-Modules?p=858477&viewfull=1#post858477

I did not implement the active/inactive state yet. I'll add _active to the the icon name when I do.

Nothke was working on an icon set but he seem to be MIA.

Link to comment
Share on other sites

You need 24x24 pixels png icons, with our without alpha.

Put them in GameData\MechJeb2\Plugins\Icons

The list of filename can be found here : http://forum.kerbalspaceprogram.com/threads/60933-Optional-MechJeb-Modules?p=858477&viewfull=1#post858477

I did not implement the active/inactive state yet. I'll add _active to the the icon name when I do.

Nothke was working on an icon set but he seem to be MIA.

I figured the filename format from the existing ones, but I was a bit braindead and didn't restart the game. :confused:

Nothke's icons do look very nice. Seems he's around but hasn't officially released them.

Link to comment
Share on other sites

I think it's time we get rid of the MechJeb side panel altogether and go with a dependency on the toolbar. Just put an icon set for all windows in the 'toolbar repository', where all icon pairs from all toolbar enabled addon windows will be available. Toolbar needs to be modified to allow us to add/remove/position icons from it using icon sets in the repository (like adding/removing icons from the toolbar in Firefox).

Link to comment
Share on other sites

I think it's time we get rid of the MechJeb side panel altogether and go with a dependency on the toolbar. Just put an icon set for all windows in the 'toolbar repository', where all icon pairs from all toolbar enabled addon windows will be available. Toolbar needs to be modified to allow us to add/remove/position icons from it using icon sets in the repository (like adding/removing icons from the toolbar in Firefox).

This is exactly what I've been trying to advocate against. It is very bad practice to implement hard dependencies on third party plugins. What if, dare I say, Toolbar gets abandoned? Sure, someone else might pick it up, but hypothetically a future KSP update may break it and then all the mods that depend on it are broken.

Toolbar support should always be optional. If the user installs Toolbar, they get the nice grouped buttons, but if they opt not to, they still get the old window.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...