Jump to content

[1.0.x] [V1.9f] Kerbal Foundries wheels, anti-grav repulsors and tracks


lo-fi

What to work on next?  

1,282 members have voted

  1. 1. What to work on next?

    • More wheels
      123
    • More tracks
      453
    • Rover bodies
      241
    • Landing gear
      137
    • Landing legs
      108
    • Something completely different
      193


Recommended Posts

yah, stack nodes and converting original wheels would be nice as well (maybe with making TR-2L wheels unbreakable since they look great but are too fragile :P). Thx for that nodes Gaalidas:)

Just adding stack nodes to stock wheels has problems when you use mirror symmetry. This is an inherent limitation of KSP (that's unlikely to be fixed). The only solution is to model the wheels at 90 degrees in Unity, which unfortunately squad didn't do.

Link to comment
Share on other sites

Indeed; as Zodius points out, the stack nodes as they are have symmetry issues. Sadly, to fix this minor bug, I'd have to do a deal of messing with the orientation detection in the code, as well as breaking every save using the parts.

The stock wheels aren't hard to figure out, I just used the blender importer to find the names of various things and popped them into the config for the kf plugin. The tricky part was sorting out the grip and suspension settings, as this required actually moving the wheel collider transform and overriding the settings in the model. Both of which I write a custom module for.

You can do the same for any wheel that's set up for stock or FS originally if you follow that method. It's probably a little easier for me, as I have a fairly in depth knowledge of the inner workings, but by no means impossible for someone else to pick up.

I know it ought to write some documentation, but it's boring, and been weeks since I even messed with a model, let alone some code..

Link to comment
Share on other sites

Indeed; as Zodius points out, the stack nodes as they are have symmetry issues. Sadly, to fix this minor bug, I'd have to do a deal of messing with the orientation detection in the code, as well as breaking every save using the parts.

The stock wheels aren't hard to figure out, I just used the blender importer to find the names of various things and popped them into the config for the kf plugin. The tricky part was sorting out the grip and suspension settings, as this required actually moving the wheel collider transform and overriding the settings in the model. Both of which I write a custom module for.

You can do the same for any wheel that's set up for stock or FS originally if you follow that method. It's probably a little easier for me, as I have a fairly in depth knowledge of the inner workings, but by no means impossible for someone else to pick up.

I know it ought to write some documentation, but it's boring, and been weeks since I even messed with a model, let alone some code..

yah, well personally I'd be happy with some kind of copy or custom wheels resembling TR-2L. And this reminds me I need to have a second attempt of creating my own wheels :P

Link to comment
Share on other sites

The configs for the stock wheels driven with KF are in a public repo in my github. I would add that the TR-2L is still not great due to the lack of suspension travel, but I've done what I can.

Link to comment
Share on other sites

Those configs are, of course, for adding new wheels that resemble stock wheels. If you have craft out in the universe with stock wheels, they'll still flip when you try to maneuver them in strange ways. I use a MM patch to replace the stock wheel setup and add the stack nodes. Granted, the stack nodes won't work in every situation, such as with certain symmetry modes, but that's nothing new for anyone who used surface attached symmetry of that type without the stack nodes. I just prefer to use stack nodes when possible to ensure that the wheels are all at the same level along the side of the craft. I've begun to look into even creating a resizable dummy part that would allow adding level stack nodes to the side of a flat surface for attaching wheels. I know it's possible, and rather easily, I just need to dig of the source for a few separate older mods and mix some stuff together.

Anyway, what I'd really love to see is those new WIP wheels for the IR part rework given, at the very least, the steering module used in KF wheels. Also, we never did get around to configuring those wheels from the ASET ERS system.

As for those TR-2L wheels, what we ened is an intermediate part to stock between the wheel and the parent craft that would handle just the suspension portion of this mod to whatever child object(s) are eventually coming into contact with the ground. That way, the wheel itself could still handle the steering mechanism, and you could then add suspension to them by adding a this other part between the vessel and the wheel. I guess what I'm interested in is the ability to separate the steering from the suspension so that the two mechanisms could be used separately, as well at together in custom-made wheels. It could also lead, eventually, to being able to steer a craft using thrusters which respond to the steering system. Just some stuff to mull over.

Edited by Gaalidas
Link to comment
Share on other sites

Anyway, what I'd really love to see is those new WIP wheels for the IR part rework given, at the very least, the steering module used in KF wheels.

I don't think the current KF steering module will work with my wheels due to their orientation. They are 90 degrees off from all stock and other wheels so that mirror symmetry via stack nodes works with them. If KF can be made to handle this I'd be more than happy to switch from the stock wheel module.

Link to comment
Share on other sites

hmm... I must confess I know next to nothing about the differences in rotation and whatnot, but KF has a number of different wheel types being run by the same basic modules, so I'd bet it could probably be made to work. If not, it might come down to simply exposing more information to KSPField items so you can set them up in the config.

Link to comment
Share on other sites

It's... Complicated. To cut a long story short, the symmetry bug needs fixing properly (Squad).

My dev days are over I'm afraid; just don't have the interest any more to keep going.

Link to comment
Share on other sites

It's... Complicated. To cut a long story short, the symmetry bug needs fixing properly (Squad).

My dev days are over I'm afraid; just don't have the interest any more to keep going.

Before you get frustrated or bored, take a break. I got caught up with playing Uplink and Prison Architect for 2-3 weeks or so. Could not stop it :D But in the end...KSP sucked me in again, and it was fun again to construct, explode and tinker with things.

Link to comment
Share on other sites

Before you get frustrated or bored, take a break. I got caught up with playing Uplink and Prison Architect for 2-3 weeks or so. Could not stop it :D But in the end...KSP sucked me in again, and it was fun again to construct, explode and tinker with things.

At least he's leaving a legacy behind :D

I couldn't have done this or any of my other wheel parts without Lo-Fi learning how stock wheels work and passing the knowledge on. I just hope he leaves stuff behind for me to finish off IR controlled Mecanum wheels.

Link to comment
Share on other sites

At least he's leaving a legacy behind :D

I couldn't have done this or any of my other wheel parts without Lo-Fi learning how stock wheels work and passing the knowledge on. I just hope he leaves stuff behind for me to finish off IR controlled Mecanum wheels.

Love those wheels. Are those using the KF modules?

Link to comment
Share on other sites

Love those wheels. Are those using the KF modules?

Thanks. They're not currently, although the orientation of this wheel's symmetry would allow for it I think (unlike what was mentioned for the other IR wheels). I am using Lo-Fi's hierarchy trick though :)

Link to comment
Share on other sites

Have there been any reports of problems using repulsors on more than one craft in the same scene? I can only get the repulsors on the last craft activated (from KSC or SPH) to work. When i switch to the next craft 5m away, it won't lift up. The malfunctioning vessel still responds in every other way and the repulsor right-click looks fine. Plenty of power. If i leave the busted craft behind and out of range and then return, it blows up skyward just as though its repulsors were working. Tried recovering and loading 4 different craft, restarting the game. Nada.

https://www.dropbox.com/s/vdyy8g2bs48k55p/output_log.txt?dl=0

http://imgur.com/a/n4M8f

If i've done a stupid, please let me know. Thanks!

Link to comment
Share on other sites

Most likely you've discovered a bug in the way the repulsors are initialized into the flight scene. Interesting. So, let me get this straight... if they're within physics range, only the last craft to be launched/loaded functions. If outside physics range, they work as expected. Anything missing?

My thought, without looking at the code, is that the initialization process takes into account all of the repulsors attached to the active craft when figuring out how to handle everything, but any repulsor not attached will not get initialized because the method cannot detect them as active repulsors. When a craft outside of the physics range is switched to, the game has to effectively re-initialize the flight scene and so the repulsors on that craft are then initialized as well. However, when a craft within physics range is switched to, there is no reload of the flight scene and so the repulsors on the other craft are not initialized fully. In this case, we need to add a check to detect if the active vessel has been changed within the same flight-scene instance, and reinitialize the vessel's repulsors when that happens, instead of waiting for the flight scene initialization.

lo-fi will be able to diagnose this further, but I'll take a look at the code to confirm my suspicions.

By the way, you've gotta share some of those designs. They look awesome. The first image, if I didn't already know the scale of those parts, looks absolutely massive without anything else to use as reference. It's not until you get to the second image that you realize it's a compact little thing.

EDIT: I took a look at the source, and I think I was right. The repulsors for the active vessel are only initialized when the flight scene is loaded, or reloaded. That means only the last active vessel will have working repulsors for each scene instance. The instance is not reinitialized when changing the active vessel within physics range, so the repulsors fail to repulse. I'm not confident enough in my coding to fix this, so it's in your court lo-fi.

Edited by Gaalidas
Link to comment
Share on other sites

It's not meant to be a jet-ski simulation. In fact, the threads of the screw wouldn't propel you very fast at all, land or sea.

- - - Updated - - -

Thanks. They're not currently, although the orientation of this wheel's symmetry would allow for it I think (unlike what was mentioned for the other IR wheels). I am using Lo-Fi's hierarchy trick though :)

Ah, I thought I was seeing the awesome suspension stuff from the other KF wheels... but then they did seem a bit too stiff to be a KF suspension system.

Link to comment
Share on other sites

I'd suggest fixing the nulls refs from some other mod and see if it stops happening:




UnityException: Input Key named: [] is unknown
at (wrapper managed-to-native) UnityEngine.Input:GetKeyDownString (string)


at UnityEngine.Input.GetKeyDown (System.String name) [0x00000] in <filename unknown>:0


at KAS.KASAddonControlKey.UpdateWinchCableControl () [0x00000] in <filename unknown>:0


at KAS.KASAddonControlKey.Update () [0x00000] in <filename unknown>:0

- - - Updated - - -

And they're great looking wheel, Zodius!

Link to comment
Share on other sites

I'd suggest fixing the nulls refs from some other mod and see if it stops happening:

If this is the multiple repulsor craft issue I don't think it's KAS (I'm only guessing that's KAS BTW), I get the same with just Kerbal Foundries and nothing else. I launched one, landed it near the runway (height to 0), launched another and the first wont raise again (the height reported in the right-click window adjusts but it stays on the floor).

http://www./view/fw2ydcjlyaj9fox/output_log.txt

Link to comment
Share on other sites

If this is the multiple repulsor craft issue I don't think it's KAS (I'm only guessing that's KAS BTW), I get the same with just Kerbal Foundries and nothing else. I launched one, landed it near the runway (height to 0), launched another and the first wont raise again (the height reported in the right-click window adjusts but it stays on the floor).

http://www./view/fw2ydcjlyaj9fox/output_log.txt

Indeed, I would agree that it's unlikely that KAS is interacting with the functioning of the repulsors on multiple vessels within physics range. I had a look at the source (from the source currently available on github) and I noticed that the repulsors seem to be taking stock of themselves and initializing the repulsion system when the flight scene is loaded, and not specifically when the vessel is set as the active vessel. This would likely lead to only the most recently loaded vessel (launched, or when loading from outside physics/visible range, I'm not sure if it's exactly physics range we're looking for, but whatever range defines the vessel unloading distance) having functioning repulsors. However, I also looked at the code for the wheels and they seem to initialize all of their settings in the same way so this isn't necessarily the root of the problem here. It's just my feeble attempt at finding something that could be an issue.

EDIT: Had a look at the log posted above, and this caught my attention:


NullReferenceException: Object reference not set to an instance of an object
at KerbalFoundries.Repulsor.OnStart (StartState start) [0x00000] in <filename unknown>:0

at Part.ModulesOnStart () [0x00000] in <filename unknown>:0

at Part+.MoveNext () [0x00000] in <filename unknown>:0

Seems like this might be a problem.

Love the repulsors, remember me Star Wars 1 (4 - first original)

I believe that was one of the goals... that and making easy-to-control pod-racers.

Edited by Gaalidas
Link to comment
Share on other sites

That was my plan all along. I really suck at landings, so one way to keep Omicron from landing too hard is to cushion the impact with some small repulsors. Besides, hovering a flying car over the terrain at a specific height is too much work with standard thrusters. What we need, really, are custom modeled repulsors that would fit the Omicron style and give them a specifically intended attachment spot on the hull of the vessel itself.

Link to comment
Share on other sites

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