Jump to content

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


Shadowmage

Recommended Posts

26 minutes ago, Gaalidas said:

I thought the mod, under lo-fi's code, already did some of that in the background.  KSPWheel must have changed a lot of the back end stuff.  Then again, I never totally understood most of this stuff.

Indeed; the new codebase uses zero lines of code from the old KerbalFoundries plugins.  It is entirely new, written from scratch.  When Lo-fi stepped down, I already had a basic but functional system in place (that was supposed to be just for testing);  rather than take 2-3 months to figure out the old KF code and then another few months to adapt it to the new wheel system, it was much faster to take the existing 'testing' part-module code and finish it off and clean it up a bit.  As a result of this there is no transfer of feature set between the old KF plugin and the new KSPWheels plugin.  KSPWheels didn't just change 'a lot of the back end stuff'.  It changed all of it.

 

14 hours ago, LexxyT said:

Hi all, not sure if this is a bug but I am trying to make a HUGE mun crawler and I have 5 sets of the KF large wheel at 2x scale (unevenly spaced along the side of the vehicle). Yes it's going to be big! Anyway, I have an issue when turning. All wheels turn to full lock and this causes them to bind up with the ground and makes turning near impossible. I've tried grouping all the wheels and setting them individually but still having problems. Any ideas would be greatly appreciated.... Cheers.

As always picture of the vessel (and problem) would be extremely helpful.

But either way the response will still likely be 'Did you set up the steering limit and invert settings properly?'  Each wheel will need to individually be configured for its location on the vehicle; wheels closer to the front/rear should have a higher steering limit; wheels near the center should have close to zero steering limit (or be locked).  What limits are needed for each specific wheel will vary depending on placement, part being used, intended craft purpose, and personal preference.

Link to comment
Share on other sites

On 4/26/2017 at 9:55 AM, Shadowmage said:

Indeed; the new codebase uses zero lines of code from the old KerbalFoundries plugins.  It is entirely new, written from scratch.  When Lo-fi stepped down, I already had a basic but functional system in place (that was supposed to be just for testing);  rather than take 2-3 months to figure out the old KF code and then another few months to adapt it to the new wheel system, it was much faster to take the existing 'testing' part-module code and finish it off and clean it up a bit.  As a result of this there is no transfer of feature set between the old KF plugin and the new KSPWheels plugin.  KSPWheels didn't just change 'a lot of the back end stuff'.  It changed all of it.

Except I think you pretty much imported the dust system directly, didn't you?  Either way, I think the old KF code needs to be looked at again for features that could be included with the new code.  lo-fi had them very customization while still allowing a user to just slap it on and make it happen.

Link to comment
Share on other sites

1 hour ago, Gaalidas said:

Except I think you pretty much imported the dust system directly, didn't you?  Either way, I think the old KF code needs to be looked at again for features that could be included with the new code.  lo-fi had them very customization while still allowing a user to just slap it on and make it happen.

Good point; yes and no :)  There wasn't any copy-pasting, though chunks of the new code were based very closely on the original code where I was unfamiliar with the some of the concepts/functions (camera setup, render texture use, manual use of particle effects).  So I guess it was more of a 'port' than an 'import', but still a valid point.

Yeah, there are a few things in the KF plugin that I would like to bring over to the KSPWheels modules -- mostly the auto-setup stuff; detecting left/right/front/back properly and setting of initial motor/steering inverts.  I have a bit of it working decently, but especially in the steering there is room for auto-setup improvement.  Probably a few more features that I never even got to see..... ( I should probably setup a 1.05 install and give the old KF a test run for ideas :) ).

Link to comment
Share on other sites

Hi all,

Sorry I didn't realise you had to treat each wheel independently. I thought once grouped they would sort themselves out. So I set them up (through trial and error) and finally got them working as good as possible. Is there an easy way to set the steering angles or is it just a case of load up the vehicle, launch it and drive around the KSC, continually fiddling with the settings until it becomes acceptable?

Thanks all for your input.

Link to comment
Share on other sites

If you look at it from directly above and turn to full lock (while not moving), you should be able to adjust things. Note the values and apply them in the VAB. Maybe Shadowmage could implement a "turn hard right/left" button, similar to the "show forward rotation" one, come 1.3.

Link to comment
Share on other sites

3 hours ago, Fireheart318 said:

Getting a lot of random overstressing on the ground when exiting timewarp and spawning in from the SPH (and probably VAB). Luckily, this craft is a VTOL but it might not have been D:

Pics of the craft and wheel setups (right-click windows / vessel debug GUI) would be helpful, along with a few stats (vessel mass, wheel scale).  Also -- physics time-warp, or non-physics timewarp?  What does the wheel stress guage read when just sitting on the runway (after repairing the wheels)?

If it is overstressing when simply spawning from the VAB/SPH, you have overloaded the wheels for whatever their current max load is.

 

12 hours ago, 0111narwhalz said:

Maybe Shadowmage could implement a "turn hard right/left" button, similar to the "show forward rotation" one, come 1.3.

Possibly.  I would like to find an easier way to do the setup for some of the settings the wheels while in the VAB.  That was the case of the 'forward rotation' hack, and something similar might be applied to the steering.  Hmm.. thinking on it, perhaps a simple / dummy UI where you can set 'simulated' inputs while in the editor might be useful.  Sliders to set the left/right 'steering' and 'throttle', and all of the wheels on the craft will display with those values just as if it was real user input from the flight scene.


 

12 hours ago, LexxyT said:

Hi all,

Sorry I didn't realise you had to treat each wheel independently. I thought once grouped they would sort themselves out. So I set them up (through trial and error) and finally got them working as good as possible. Is there an easy way to set the steering angles or is it just a case of load up the vehicle, launch it and drive around the KSC, continually fiddling with the settings until it becomes acceptable?

Thanks all for your input.

It is a bit hit-or-miss right now on what wheel settings 'just work' with grouping and which ones need to be setup individually.  Kind of hard to do proper auto-setup when the wheels get used for such vastly different purposes.

Hopefully the KSP 1.3 releases will have a bit more friendly setup, or at least a bit more intuitive.

Link to comment
Share on other sites

It's all well and good for realism, but I don't really like the speed limit on wheels, especially tank tracks. Can you include some form of settings.cfg file and have a way to compltely ignore speed-based overstressing? My franken-rover thank you! :wink:

Also, can we have robot legs, pontoons, and retractable skis?

 

Edited by Fireheart318
Link to comment
Share on other sites

15 minutes ago, Fireheart318 said:

I have like 0.1 wheel stress maximum. It's clearly not supposed to happen

What is not supposed to happen?  In what situation?

 

As asked for previously when you have reported 'problems', I need pics of the craft, pics of the part-action window that show the wheel loading, etc.  Some random statement of 'there's a problem' does me no good.  Less than no good actually, as it actively wastes my time.

Link to comment
Share on other sites

On 4/27/2017 at 7:41 PM, Shadowmage said:

Yeah, there are a few things in the KF plugin that I would like to bring over to the KSPWheels modules -- mostly the auto-setup stuff; detecting left/right/front/back properly and setting of initial motor/steering inverts.  I have a bit of it working decently, but especially in the steering there is room for auto-setup improvement.  Probably a few more features that I never even got to see..... ( I should probably setup a 1.05 install and give the old KF a test run for ideas :) ).

I've been trying to look over ways to integrate the old code, but somehow my copy of the source got really screwed up.  Gonna re-download a copy and get back to it.  I still have to figure out a way to get around the fact that I can't properly evaluate the "nameof" calls... but I can easily revert that to the old method for testing purposes I think... I make no promises, but I'm definitely giving it a hard look.

Link to comment
Share on other sites

1 hour ago, Gaalidas said:

I still have to figure out a way to get around the fact that I can't properly evaluate the "nameof" calls...

It's a C#6 feature.  I've managed to compile such code on all 3 platforms (Windows, OSX, Linux), so let me know if you need help.

Link to comment
Share on other sites

Hi guys

I've just installed Kerbal Foundries on a fresh copy of KSP and I've noticed something with the ajustable landing gear.

I tried to use them to make a compact rover but if the strut angle is moved even 0.5 from the centre or 0 position they won't steer at all, could any one please confirm if this is an intended feature or something from installing the mod incorrectly.

Thanks

Link to comment
Share on other sites

34 minutes ago, Star-Eagle said:

Hi guys

I've just installed Kerbal Foundries on a fresh copy of KSP and I've noticed something with the ajustable landing gear.

I tried to use them to make a compact rover but if the strut angle is moved even 0.5 from the centre or 0 position they won't steer at all, could any one please confirm if this is an intended feature or something from installing the mod incorrectly.

Thanks

Thanks for the interest, and including enough details so that I understand what you are asking about :)


To answer your question:  Yes, it is an intended feature/design choice.  I did not design those models originally, and they were not modeled or rigged in a fashion that would allow for steering of the wheel while the strut was angled.  As such, anytime the strut is angled I explicitly disable steering for those parts.

Sadly I'm not aware of a workaround currently.  The function is hard-coded without any config-based option to disable it, and even if it could be enabled, I could not guarantee that the steering would actually function as desired.  However if you would like to open an issue/feedback ticket regarding the problem (either on the KerbalFoundries or KSPWheel repositories), I will see what I can do about it next time I'm working on wheel code.

Link to comment
Share on other sites

Hi Shadowmage

Thanks for taking the time to reply, I really appreciate getting the info from the source.

The lack of steering isn't a big deal for me at the moument, I'm something of a casual KSP player right now so don't worry about.

That said I'll see about the issue/feedback ticket thing if its of any help, I just don't want to be the person who dumps to much on the dev and causes them to drop the mod.

Anyway many, many thanks for taking the time to keep this great mod going even if it seems like a thankless task.

 

Link to comment
Share on other sites

Are there any shortcut keys to turn on all the repulsors at once?

I must have missed that in the documentation.

Anyway, it is tricky and a bit time consuming when I try to turn on 12 repulsors, one at a time. Or shut them down so I can quicksave.

Link to comment
Share on other sites

6 minutes ago, Core said:

Are there any shortcut keys to turn on all the repulsors at once?

I must have missed that in the documentation.

Anyway, it is tricky and a bit time consuming when I try to turn on 12 repulsors, one at a time. Or shut them down so I can quicksave.

No, I do not use hotkeys for my mods.  Far too much potential for conflict with other mod-added hotkeys.

 

The correct way to do it would be to use the 'wheel group' feature.  Put all your repulsors in the same group (same group #), and then hitting the power button on one will turn on/off all of them in that group.  Same for many other features (height, spring, etc).

Link to comment
Share on other sites

1 hour ago, Shadowmage said:

No, I do not use hotkeys for my mods.  Far too much potential for conflict with other mod-added hotkeys.

 

The correct way to do it would be to use the 'wheel group' feature.  Put all your repulsors in the same group (same group #), and then hitting the power button on one will turn on/off all of them in that group.  Same for many other features (height, spring, etc).

Thanks, the wheel groups function did the trick.

Link to comment
Share on other sites

If i get a chance, i'll try to add some stuff for the shadow to put into his next release to expand the action group functionality.  Either that or I'll put them in an add-on for KF that I'm mulling over.  My plan right now is to try and create an add-on rather than integrating directly into KSPWheel.  That way I can add the vessel-aware steering and expand on the module action groups without modifying the original code.  This will also let me get around my lack of ability to compile with C#6 features using SharpDevelop (I prefer that to VS due to the fact that VS takes several years longer to load everything up than SharpDevelop does.

Something to keep an eye of for the wheel/repulsor group functionality: if you're using symmetry and decide to use an action group to update the like-grouped parts, you cna easily end up activating something twice or more for all the action-grouped parts under that symmetry.  I know we did a lot of work in the original mod to counter this possiblity, but I have yet to check on that in the current code.

This was more apparent when I had the action groups available to increase or decrease the height on the repulsors by a set interval.  If I activated the action group on one repulsor I could then iterate through the rest of the group to update them all.  However... if I action grouped a symmetric part it would then activate the command on both parts in the symmetry resulting in double the increment/decrement.  That's the trouble with adding action group commands to parts that also have their own settings sharing system, such as the wheel/repulsor groups.

Edited by Gaalidas
Link to comment
Share on other sites

Hi everyone.

I've noticed something with the RBI inverting track, in scale 1 the max drive speed is shown as 47 m/s but a max safe speed of only 29 m/s. Any time I try using it without increasing the gear ratio to at least 1.5 or 1.75 it always breaks due to over stressing.

Could anyone tell me if this is how it's supposed to be or if there's some kind of problem?

Thanks

Link to comment
Share on other sites

17 minutes ago, Star-Eagle said:

Hi everyone.

I've noticed something with the RBI inverting track, in scale 1 the max drive speed is shown as 47 m/s but a max safe speed of only 29 m/s. Any time I try using it without increasing the gear ratio to at least 1.5 or 1.75 it always breaks due to over stressing.

Could anyone tell me if this is how it's supposed to be or if there's some kind of problem?

Thanks

That would appear to be an error in the config.  Looks like I didn't catch that the part was using non-standard scale/rescale factors, which alter several of the calculations for speed and motor rpm.

Have opened a bug report regarding the problem, which you can track the status of through: https://github.com/shadowmage45/KerbalFoundries2/issues/14

Thanks for catching that, should be fixed up for the next release (no ETA, sorry).

 

In the meantime, this small patch should put things a bit closer to usable:
 

@PART[KF_TrackRBIInverting]
{
  @MODULE[KSPWheelBase]
  {
  	@maxSpeed = 38
  }
}

(that '38' should get multiplied by the scale factors; if it is incorrect, feel free to tweak it a bit to get it closer to what is needed)

Alternatively you can turn down/off the speed-based damage in the in-game difficulty settings (under the KSPWheel tab).

Link to comment
Share on other sites

Just spent over an hour looking for a half decent wheels mod.

Found the first version of this, but saw the incompatibility warning, so didn't pursue further.

Stumbled upon this thread after a 'wheels' search here on the forums (Google-fu was weak). I just signed up for an account so I could come tell you as one coder to another, I see what you're doing here, and you are awesome for it, as well as everyone else who contributes.

Keep up the outstanding work.

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...