Jump to content

[1.8.x] Kerbal Foundries -- Continued - Tracks, Wheels, and Gear


Shadowmage

Recommended Posts

20 hours ago, Shadowmage said:

Yeah, I've been investigating ways to allow the user to swap the left/right models through a UI button -- but they all run into the same problem:  the model needs to be fully in place before the PartModules can be allowed to initialize, and the model cannot change once the PartModules have run their init code.  So as soon as the part is initialized the first time it is impossible to change the model, as it will cause all of the PartModules that reference any model tranforms to crash (as the transforms that it once referenced become null once the model is deleted).

There is a giant hacky workaround that I could put in place -- rebuild all of the part-modules to allow for 're-initialization' where they would re-find their transforms anytime he model is changed.  But it is far too hacky for my likes (notably that it will only work if -every- module has been rewritten specifically with that functionality in mind), and would require re-writing each and every part-module.

The swap was in the editor only, and was originally intended as an automatic swap that would only work if the part was attached on the correct side that matched the default state.  The other side would then swap to the other tread-direction and/or any other swaps for that sub-model.  It was a similar thing to the model swaps in the B9-HX parts or the Firespitter texture/mesh swappers.  No plans were made to allow this to happen on-the-fly in the flight scene from what I was able to tell.  I've yet to launch the game and investigate... but it sounds like you have an automatic switch system in place.  Now you just need an override button added to the part that will override the automatic swap for that specific part (if not placed in symmetry mode of course, since parts tend to stay connected when symmetrically placed.)

20 hours ago, Shadowmage said:

Must not be a part that I'm familiar with, as I've seen no 'crawler wheels' in any release of KF that I ever played with.  I'll take a look through the KF modeling/assets pack to see if I can find anything, but I don't remember seeing any new wheel types when I last looked through it.

Still runs afoul of the problems of how to have such a large steering range on a wheel while still allowing it to be usable for normal purposes.

The wheel is part of the medium wheel design if I'm remembering correctly.  If you look at that wheel model (I assume we're still shipping that model with the mod...) you'll notice it has a steering swivel that could, potentially, turn around full circle.  In fact, If I remember correctly and it hasn't been reworked, that model also has a repulsor plate stuck in the middle of the wheel on the outer edge which was part of the repulsor-wheel transformable part.

That aside... the crawler wheel was one of the very first exotic steering systems lo-fi experimented with.  Way before your involvement with this mod.  In fact, the model wasn't even fully textured back then either and I don't think we even had a proper working model for the repulsors... or, at least, not the surface-attach repulsors.  The vision, from what I was able to gather, was a wheel that would act like the normal medium-wheel for the most part but, upon switching modes, would synchronize the steering angle between all wheels of the same set (the entire craft back then, before wheel grouping) to face the exact same way relative to the front of the craft.  That way the craft could move it any direction without turning.

That's where the code stopped being worked on from what I understand.  The problem with it was that, once switched on, the wheel could never be reset to center again.  The relative steering system, which turns the wheels by differing degrees based on their position on the craft, wasn't turned off either.  This meant that you could use the regular turning keys to turn the vehicle while the wheels were centered on a different angle.  This was great, for the most part, but also made it difficult to reset all the wheels to normal center.  In the end, your craft would never drive straight ever again due to the fact that you couldn't get them to re-center the crawler portion even when you turned off the crawler steering system.

Now... re-centering them seemed like trivial stuff... to me anyway.  However, I was not a coder back then at all and so couldn't do it myself.  I also didn't have access to th repo back then.  lo-fi was more interested in buffing his steering systems and making new models.  He also wanted to incorporate tracks, which started with the RBI inverting track and the crawler track.  It wasn't until I started coding and picking up errors in his code base that I got involved in the project and, by then, crawler steering was history.  I still think the centering could be fixed quite easily if that module were to be resurrected.

The fact remains that, while in crawler steering mode, you wouldn't be using the wheels in any normal fashion.  The best idea is to simply turn off other steering modes while the crawler system is active and then return it to the previous mode when finished.  Re-centering the forward vector of the wheels should be optional, and possibly have a way of re-centering to a specific angle.  This would allow one to make a craft that can drive backward without having to change the angle of control.  All that means is that the steering system center itself on that new angle instead of the forward vector of the craft.

Control is the next thing I want to mention.  Originally he had the crawler steering always active, like I mentioned earlier, where the variable steering would still work even when crawler angle had been altered.  The controls for the crawler angle were mapped to the alt-maneuvering controls (I forget which keys... the ones on the other side of the keyboard used for translation maneuvering when in rotational mode for standard RCS systems) but there was a nicer system discussed early on.  The idea was to make it very intuitive by making the wheels respond to the relative direction, based on the craft's forward-vector, of the button pressed on the numpad of your keyboard.  If you are facing forward, like you are when launching the craft, and you pressed the 1 key, your wheels would all turn to face back-left and then start moving that direction.  Depressing the button would stop the movement but leave the wheels where they are.  Pressing a different button, like 5, would cause them to reset but not move the craft anywhere.  8 would reset the wheels to forward and move the craft, 7 would angle toward the front right, etc.  I always figured you could add a precision mode based on the numlock state which would stop the movement action, but angle the wheels in the direction pressed, varying the speed of the angle change based on how far from the current state the button is.  For example, you have numlock on and the wheels are facing forward.  You press 7 and they slowly turn towards the left until they reach the preset angle and then stop.  Lets say you hit 1 instead of 7, then the wheels would turn rapidly towards the 7 mark, then half speed towards the five mark, and then slowly towards the 1 mark until reaching the preset angle.  Hit 2 instead of 1 and the wheels will either default to turning one direction, or they would approach the angle from the nearest side they are currently facing, again varying speed as they get close to the desired angle.

It's a lot of stuff that could be slowly implemented over time as long as the angle of the wheels could be made into a public variable accessible from the vessel-level.  When vessel-modules made their mark on the modding community, I thought that, perhaps, such a system would be at home in such a place as a vessel module so that the wheels weren't constantly re-hashing the same commands individually.  If the angle, and the angle changing methods, were usable from that scope, then one could also create action groups to fine tune things, and even set up wheel groups to crawl separately from the rest of the craft for some truly inspired creations.

Anyway... that's the whole story from my point of view from the beginning onward.  Yes, I'm that old.

Edited by Gaalidas
Careful when you get me started... I usually write something HUGE in response.
Link to comment
Share on other sites

Not sure if this is the right place to complain: When i use the ALGs on my planes, the biome detector goes crazy. For example, when i launch my plane, i'm sitting on the runway but x! science claims i am on KSC/shore (so, no runway biome) and the contracts from contract configurator (namely, GAP) don't fire the "Sit on runway and wait for takeoff clearence" event. Any launched experiments also say, "KSC" instead of "runway". Then, when i took off and i am airborne, doing experiments inform me that i'm still landed, like in "Landed on Kerbin Waters". However, when I use Stock landing gear (which i won't because landing with these things is like riding a kangaroo) everything works fine. Is this a known issue? Can i do something about this?

Link to comment
Share on other sites

4 hours ago, LupinoArts said:

Not sure if this is the right place to complain: When i use the ALGs on my planes, the biome detector goes crazy. For example, when i launch my plane, i'm sitting on the runway but x! science claims i am on KSC/shore (so, no runway biome) and the contracts from contract configurator (namely, GAP) don't fire the "Sit on runway and wait for takeoff clearence" event. Any launched experiments also say, "KSC" instead of "runway". Then, when i took off and i am airborne, doing experiments inform me that i'm still landed, like in "Landed on Kerbin Waters". However, when I use Stock landing gear (which i won't because landing with these things is like riding a kangaroo) everything works fine. Is this a known issue? Can i do something about this?

Congratulations -- looks like you found a legitimate bug.

In the future, please report issues directly to the github issues tracker.  I went ahead and opened an issue ticket for you on this one though: https://github.com/shadowmage45/KSPWheel/issues/37

You can track the progress of the bug being fixed through that ticket -- I will update it as information is found, progress made, or the problem solved.

Link to comment
Share on other sites

5 hours ago, Shadowmage said:

Congratulations -- looks like you found a legitimate bug.

In the future, please report issues directly to the github issues tracker.  I went ahead and opened an issue ticket for you on this one though: https://github.com/shadowmage45/KSPWheel/issues/37

You can track the progress of the bug being fixed through that ticket -- I will update it as information is found, progress made, or the problem solved.

\o/ yeay, I was usefull!

Seriously thou, i work as a software developer myself and i know how anoying "bug" reports are which are a result of a badly configured base system. So i wanted to figure out whether there are other users of KF that experience the same issue, or if it was caused by some of my hundreds of mods that don't go well together. Therefore I asked here first.

But Thank you very much for looking right into this. I will try your development build in my current mod-heavy game and tell you if it works.

Edit: Jupp, it seems to work fine now, no side effects so far. Thanks again.

Edited by LupinoArts
Link to comment
Share on other sites

Okay, so.... with the recent news of the upcoming 1.2.9/1.3.0 pre-release, here is a quick layout of my plans for the immediate future of KF development.

1.)  Will pack up and publish an updated release a bit later this week (wed. or thurs. probably).  This will be the final KSP-1.2.2 release; all future releases will be slated for KSP-1.2.9-pre / 1.3+.
2.)  Further development will be made against the 1.2.9+ codebase.
3.)  Don't expect any full KF releases for 1.2.9+ until 1.3 is fully released.  I'll likely have usable stuff on Github in the dev branches, but I'm not going to be packing anything up or making any official releases until after the KSP pre-release period is over.

I was going to pack up the final 1.2.2 release tonight, containing a few updated textures, configs, and KSPWheel-bugfixes -- but I have decided that I'll hold off a few days so that I can add in a couple much requested features (action-group stuff).

On the note of action groups -- (and this is where you all come in...) -- what are some wheel functions that are in need of action group support?  Please keep in mind that I will not be adding multiple presets for action groups in this pass, but am willing to add toggles for various features where they are lacking (AG's for invert motor, steering, lock motor, steering, etc).  Which wheel features could use AG toggles?

In the future I am considering/investigating allowing for action group 'presets' for various wheel-related functions -- so that you would be able to setup AG trigger-able preset states for stuff like motor or steering limits, gear ratios, etc (e.g. 3-4 action groups per function that can be configured for various % levels for that function, so you could set up a 19% motor preset, a 100% motor preset...).  This would be quite a ways out, if ever -- needs quite a bit of UI work to get it functional.

Link to comment
Share on other sites

That's what always stopped my in my tracks.  A lot of UI work has been done in other mods to allow for configurable presets, but it's a lot of work to get right and I never had the patience to sit down and tweak things with super-slow load times of KSP and whatnot.  I also never fully fleshed out how I was going to make these groups accessible.  There are some options that are usable on any of the wheel parts, but others are more specific to that part.  My initial idea was to have a separate module handle action groups and passing that action to the main module.  This would allow one to easily restrict certain group functions from being available on a per-part basis in the part config files.  I need to experiment further on this.

Link to comment
Share on other sites

AGs might include things like motor/steering locks, gear +/-, presets for gear ratio, steering limits, strength, and damping. In the case of the antigrav repulsors, perhaps height presets as well.

I haven't investigated the AGUs yet, but there should at lest be the basic toggles and so on.

IR has a good preset system, I find. Perhaps you could investigate that one.

Link to comment
Share on other sites

For those users of BonVoyage, @RealGecko has been kind enough to implement compatibility for KSPWheels (and KerbalFoundries) into BonVoyage.

KF/KSPWheels and BonVoyage should now be compatible with the stock/default configs.  Enhanced compatibility should continue to be developed in the future to remove a bit of 'hard-coding' of a few values and to enable generic compatibility with any mod using KSPWheels  (probably a few weeks out at least, but in the works).

Thanks @RealGecko:)

Link to comment
Share on other sites

Hi, bit new to this whole modding stuff so hope I don't ask a stupid question. But i'm trying to make a sort of crawler but every time I start on the runway my craft instantly fly's a few 100 feet up into the air and explodes. I've tried adding more tracks/increasing their size with tweak scale but nothing is helping. 

I feel this is because the size of my craft as it doesn't happen with smaller crafts.

I was wondering if I could edit something in the config to be able to make it so the mole tracks can carry an unlimited amount of weight without this issue.

Link to comment
Share on other sites

32 minutes ago, annihilator hd said:

Hi, bit new to this whole modding stuff so hope I don't ask a stupid question. But i'm trying to make a sort of crawler but every time I start on the runway my craft instantly fly's a few 100 feet up into the air and explodes. I've tried adding more tracks/increasing their size with tweak scale but nothing is helping. 

I feel this is because the size of my craft as it doesn't happen with smaller crafts.

I was wondering if I could edit something in the config to be able to make it so the mole tracks can carry an unlimited amount of weight without this issue.

If you want to turn off the load-rating/damage stuff -- go into the in-game difficulty settings, hit the KSPWheel tab, and slide the load-based damage slider to '0'.

I don't think that will solve your problem though; what you are reporting doesn't sound like it is related to the wheel damage model.  Anyway you could post pics of your craft (or a .craft file if it is otherwise stock)?

Link to comment
Share on other sites

Updated release is available:

https://github.com/shadowmage45/KerbalFoundries2/releases/tag/2.0.1.5

One new part courtesy of @TiktaalikDreaming (Large folding hydraulic leg), and several bugfixes and minor improvements to a few modules in the updated KSPWheel plugin.  Should not be any breaking changes in this release.  See the link above for full change-log and downloads.  This will likely be the final release for KSP 1.2.2, future development will be switching over to the pre-releases in preparation for 1.3.

f7stHnf.png

Link to comment
Share on other sites

  • 2 weeks later...

I love the anti-roll feature on these wheels... Rovers that fit in mk3 bays are typically rather taller than they are wide, if you want them to have anything on them, but anti-roll is enabling me to drive around like a hooligan anyway, even with SAS turned off :) 

*goes off to totally redesign his stock-wheeled rover into a narrower model that can get back up the cargo ramp and be brought home*

Link to comment
Share on other sites

Well this is awkward...

PjxudS1.jpg

...rough design, I'll refine it. Point is that the wheelbase is narrow enough to get down and up a mk3 cargo ramp, this allowing it to be recovered with the lander. It also simply won't flip over unless I drive sideways at a 45 degree slope. The anti-roll feature is my new favourite thing. Second favourite is the scale button :)

Link to comment
Share on other sites

9 hours ago, Beetlecat said:

Cetera's suits, yeah?

Yus, I liked the flexibility of colouring :)  Going to look at bubble helmets from Wearable KIS Props though, think it'll be more photogenic ^^

Link to comment
Share on other sites

Ok, so, turns out the dual front wheels are basically a kerbal grinder, so a mudflap was necessary for their survival!

ibN0YNA.jpg

That aside, this crazy thing handles better than I could reasonably have hoped for... Cruises around 25-30m/s, takes slopes of up to 20 degrees at 1g. Can be flipped, but only if you actively look for the steepest, most horrible terrain and then charge at it. Driving with any degree of sanity results in a very stable ride where everyone comes home. Basically, the anti-roll suspension is godly for making rovers that actually handle like you'd expect a wheeled vehicle to handle and which doesn't flip and roll every time the tyres sideslip over a pebble.

It's violating my design principles in many ways, but I might put the safety of the next mission in the hands of technology rather than a raw mass of steel plating.

Link to comment
Share on other sites

I encounter a problem with some of the wheels provided by this mod : This is the craft  I'm trying to get to Mars in RSS but as soon as I'm in orbit around earth and the timewarp starts, the wheels brake due to stress.

Spoiler

 

Any idea why this is happening? I tripplechecked all the fairings and it seems as if they're fine.

Link to comment
Share on other sites

45 minutes ago, Meltdown said:

I encounter a problem with some of the wheels provided by this mod : This is the craft  I'm trying to get to Mars in RSS but as soon as I'm in orbit around earth and the timewarp starts, the wheels brake due to stress.

  Reveal hidden contents

 

Any idea why this is happening? I tripplechecked all the fairings and it seems as if they're fine.

Have you tried removing RSS and loaded the craft in a vanilla install (with whatever mods used to make the craft)?

Link to comment
Share on other sites

9 hours ago, Meltdown said:

I encounter a problem with some of the wheels provided by this mod : This is the craft  I'm trying to get to Mars in RSS but as soon as I'm in orbit around earth and the timewarp starts, the wheels brake due to stress.

  Reveal hidden contents

 

Any idea why this is happening? I tripplechecked all the fairings and it seems as if they're fine.

Looks to me like the wheels might be contacting/clipping into the heat shield.  Does the warp problem go away with the heat shield removed or offset away from the rover?

Link to comment
Share on other sites

I don't have any problems while launching,the tires are only breaking due to stress when timewarp is active. I have to admit that timewarp is far above KSP stock values in RSS and the wheels start to break at the 10k mark. I checked the tires after they broke and all of them showed a wheelstress of 400 the least, the most was something in the 2k. I might also just add some leeway to the wheelMedium.cfg as RSS is kinda tricky when timewarping to say the least.

Link to comment
Share on other sites

1 minute ago, Meltdown said:

I don't have any problems while launching,the tires are only breaking due to stress when timewarp is active

Thanks for the reply, but I didn't ask if you were having problems while launching.  I asked if the tires were contacting or clipping into the heatshield at all.  Even if it looks fine and works fine while launching (at normal physics rates/no timewarp), if the wheels think they are contacting something, you are going to have problems at some point (unstable orbits, kraken drive, RUD).  If for some reason the wheels are breaking when they are -not- contacting something, that is clearly a bug that will need to be fixed in the plugin.

If the damage is your only problem, you can turn that off by going into the in-game settings menu.  Esc->Settings->Difficulty->KSPWheels->Damage Model slider -- set it to 'NONE'.

However I would recommend against doing that, but rather taking the time and steps needed to find what the actual problem is so that it can either be fixed in the craft design, or fixed in the plugin code (depending on what needs to be fixed).  So, if wheels are contacting something, it is a problem with the craft design that needs to be fixed.  If wheels are not contacting something, but still breaking during warp, it is a bug in the plugin that will need to be fixed (but will need steps for duplication on an otherwise stock install; impossible to tell if RSS might be messing with things).

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...