maja Posted March 22, 2018 Author Share Posted March 22, 2018 3 hours ago, ubergosu said: Is there some kind of normals map accessible from KSP API ? Is it possible to adjust vehicle orientation so it would be perpendicular to current place's normal? I like explosions when vehicle loads, so I didn't searched a solution Joking aside, I know, that you want to help, but only accepted help is PR or a code sample from other mod where is this issue solved (rotating of an unloaded craft perpendiculary to a surface), because I don't have time to explain to you internals of BV code. You can find the source code on github and if you propose a code change, which will not take a lot of time during processing, I'll implement it. Quote Link to comment Share on other sites More sharing options...
ubergosu Posted March 22, 2018 Share Posted March 22, 2018 Hi, maja! Thank you for your reply and your efforts to keep BV up to date! It is really hard and not very rewarding work to maintain such projects, and I understand that our feature request is not as simple as it sounds. Maybe, there is something useful in SCANSat (https://github.com/S-C-A-N/SCANsat/). They calculate slope map https://github.com/S-C-A-N/SCANsat/blob/release/SCANsat/SCANutil.cs#L732 Maybe if it's hard to adjuct vehicle's position according to normal to planet surface (something like CelestialBody::GetSurfaceNVector(double lat,double lon) ), it would be possible to adjust pathfinding so that trajectory ends at place with small or zero slope? Quote Link to comment Share on other sites More sharing options...
maja Posted March 22, 2018 Author Share Posted March 22, 2018 6 hours ago, ubergosu said: it would be possible to adjust pathfinding so that trajectory ends at place with small or zero slope? There are other situations to consider. You can return to a rover anytime during it's travel, so you can't always say, that a slope will be in some predefined range. Also some things don't work when vehicle is unloaded. As you can see, it's not that easy and I though a lot about it how to fix or hack it. There is of course always a room for improvement. I have a long todo list. KSP 1.4.x brought some long standing issues in BV up, but I'm used to it. So fix will come sooner or later Quote Link to comment Share on other sites More sharing options...
ubergosu Posted March 23, 2018 Share Posted March 23, 2018 9 hours ago, maja said: There are other situations to consider. You can return to a rover anytime during it's travel, so you can't always say, that a slope will be in some predefined range. Agreed, but could be just a workaround for a big problem. Is BonVoyage/ActiveRover.cs:208 public void Save(double currentTime) only for vehicle currenlty under player's control? How do you think, is it possible to deal with Quaternion Vessel.srfRelRotation and Vector3 Vessel.terrainNormal in this method? Quote Link to comment Share on other sites More sharing options...
maja Posted March 23, 2018 Author Share Posted March 23, 2018 @ubergosu Vehicle under player control is handled by game alone during scene switch. If it's not clipping too much, then it's repositioned without problems. Also Active rover in BV isn't active in a sense, that you are in a control right now. I have some ideas what's wrong with this version, just need to test it, but it's not happening this weekend, because I will not be at home. Quote Link to comment Share on other sites More sharing options...
ubergosu Posted March 25, 2018 Share Posted March 25, 2018 Found some code that may be useful for finding actual normal to surface https://github.com/CYBUTEK/KerbalEngineer/blob/master/KerbalEngineer/Flight/Readouts/Surface/Slope.cs not very easy, though. Also experimented with Vessel.terrainNormal , it gives something strange. Always shows (0,0,1), but sometimes changes to (1,0,1) when vehicle starts or stops climbing a slope. Quote Link to comment Share on other sites More sharing options...
maja Posted March 26, 2018 Author Share Posted March 26, 2018 (edited) On 25. 3. 2018 at 6:02 PM, ubergosu said: Found some code that may be useful for finding actual normal to surface https://github.com/CYBUTEK/KerbalEngineer/blob/master/KerbalEngineer/Flight/Readouts/Surface/Slope.cs not very easy, though. Also experimented with Vessel.terrainNormal , it gives something strange. Always shows (0,0,1), but sometimes changes to (1,0,1) when vehicle starts or stops climbing a slope. Unfortunately, you can't use raycast when not in physics range. A vessel is unloaded when moved by BV so no coliders for it. Edited March 27, 2018 by maja Quote Link to comment Share on other sites More sharing options...
Starwaster Posted March 26, 2018 Share Posted March 26, 2018 33 minutes ago, maja said: Unfortunatly, you can't use raycast when not in physics range. A vessel is unloaded when moved by BV so no coliders for it. What you can do is find the base normal discounting terrain and rotate the vessel to that. That will work for flattish terrain. Then fine tune it when it comes off rails to match it to slopes. Quote Link to comment Share on other sites More sharing options...
maja Posted March 26, 2018 Author Share Posted March 26, 2018 2 minutes ago, Starwaster said: What you can do is find the base normal discounting terrain and rotate the vessel to that. That will work for flattish terrain. Then fine tune it when it comes off rails to match it to slopes. Basic rotation will be probably enough. Right now I'm adding some margin to the sum of the vessel height and the terrain height at a waypoint, so a vessel will be heigher over terrain, because for a KSP reasons uknown wheels aren't completly counted into the vessel height (height from the terrain to the root part). That wasn't much of an issue in 1.3.1, but 1.4.1 is behaving more violently when wheels clip into terrain. Quote Link to comment Share on other sites More sharing options...
johnkeale Posted March 30, 2018 Share Posted March 30, 2018 Hi @maja! I have tried installing BonVoyage 0.13.3, and I got this weird issue where the UI never comes up. Clicking the button on the right nor clicking it on the bon voyage part does nothing. Since I have many mods installed, I wanted to make sure that it's not conflicting with the other mods. So, on a fresh install of KSP 1.3.1, I tried installing BV and trying it there. I created a simple rover, added 4 wheels, added BV part and launched it. Since I forgot to put batteries and solar panels, I just turned on the Infinite Electricity cheat (In my normal playthrough, I don't use cheats, and it does not work there, so I assumed that turning this on doesn't really have an effect.). Upon launch, I tried moving the rover away from the runway, waited a little bit, and then clicked the buttons. Nothing. I tried going to the space center and going back to the rover, clicked the buttons, nothing. I assume it's something wrong with my install, or maybe my game in general haha (since I experience weird issues from other mods as well). Anyways, I uploaded KSP.log and output_log.txt. I seem to be missing some Unity libraries or something? Btw, I play using the 64 bit if that makes any difference. Cheers~ Quote Link to comment Share on other sites More sharing options...
maja Posted March 30, 2018 Author Share Posted March 30, 2018 3 hours ago, johnkeale said: Hi @maja! I have tried installing BonVoyage 0.13.3, and I got this weird issue where the UI never comes up. Clicking the button on the right nor clicking it on the bon voyage part does nothing. Since I have many mods installed, I wanted to make sure that it's not conflicting with the other mods. So, on a fresh install of KSP 1.3.1, I tried installing BV and trying it there. I created a simple rover, added 4 wheels, added BV part and launched it. Since I forgot to put batteries and solar panels, I just turned on the Infinite Electricity cheat (In my normal playthrough, I don't use cheats, and it does not work there, so I assumed that turning this on doesn't really have an effect.). Upon launch, I tried moving the rover away from the runway, waited a little bit, and then clicked the buttons. Nothing. I tried going to the space center and going back to the rover, clicked the buttons, nothing. I assume it's something wrong with my install, or maybe my game in general haha (since I experience weird issues from other mods as well). Anyways, I uploaded KSP.log and output_log.txt. I seem to be missing some Unity libraries or something? Btw, I play using the 64 bit if that makes any difference. Cheers~ It's easy. You are using KSP 1.3.1 and trying to use BonVoyage for KSP 1.4.1. Download BV version 0.13.2.1 from here: https://spacedock.info/mod/950/BonVoyage BV is blocking any cheat Just joking. There isn't any check for Infinite Electricity, so this setting isn't working with BV. Quote Link to comment Share on other sites More sharing options...
johnkeale Posted March 31, 2018 Share Posted March 31, 2018 (edited) @maja, Oh I see. I assumed backward comaptibility, but I was wrong. Will try it later. Thanks! The infinite electricity thingie is just my laziness actually. I eventually tried putting on solar panels and well, as expected, it didn't work. But yeah, I'll try the 0.13.2.1 version later. Thanks a bunch! Edit: I tried it using 0.13.2.1, and the menu now opens up! Thanks a lot! Now I'm gonna try and use this on my playthrough. Thanks for all the hard work! Btw, the link you provided points to 0.13.3. I obtained 0.13.2.1. from github on this zip fille downlad here. The GameData in the folder, I assume (might be wrong again), is the build for that (or an earlier) version right? Edited March 31, 2018 by johnkeale added details Quote Link to comment Share on other sites More sharing options...
maja Posted March 31, 2018 Author Share Posted March 31, 2018 4 hours ago, johnkeale said: Btw, the link you provided points to 0.13.3. I obtained 0.13.2.1. from github on this zip fille downlad here. The GameData in the folder, I assume (might be wrong again), is the build for that (or an earlier) version right? On Spacedock click on Changelog half down the page. There is a list of all versions and you can see for which version of KSP they are. In the zip file is in GameData folder BonVoyage folder. Put it inside GameData of your KSP game. You can overwrite everything, because file structure is the same. There isn't backward compatibility, because I usually build against the newest KSP libraries available. Quote Link to comment Share on other sites More sharing options...
johnkeale Posted March 31, 2018 Share Posted March 31, 2018 1 minute ago, maja said: On Spacedock click on Changelog half down the page. There is a list of all versions and you can see for which version of KSP they are. Oh, I didn't know that. Thanks for the info! 4 minutes ago, maja said: There isn't backward compatibility, because I usually build against the newest KSP libraries available. It's OK, I'll probably update to 1.4.1 soon, once some of the mods I have have been updated to 1.4.1. Thanks! Quote Link to comment Share on other sites More sharing options...
GrandProtectorDark Posted March 31, 2018 Share Posted March 31, 2018 Question, would it be possible to create a function to use bonvoyage with boats. I'd guess calculating the movement speed and range could be harder, since actual engines would be used instead of ec consuming wheels. But it would using boats much more convenient. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted March 31, 2018 Share Posted March 31, 2018 (edited) 40 minutes ago, GrandProtectorDark said: Question, would it be possible to create a function to use bonvoyage with boats. I'd guess calculating the movement speed and range could be harder, since actual engines would be used instead of ec consuming wheels. But it would using boats much more convenient. It's possible, yes, though I think the author, Maja or both have said that it would probably necessitate making a new mod. I have a hacked version that makes amphibious craft possible (using the Lynx rover parts) but it's been so buggy that there's nothing I would even want to put into a pull request and I frequently have to intervene by editing my save file because this or that vehicle gets its landed/splashed state set incorrectly. It is NOT pretty when KSP thinks your craft is LANDED = true and it's sitting on the top of the ocean. (teleport straight to ocean floor where my rover is crushed like an egg shell) A dedicated boat autopilot mod would probably be easier. Not saying it HAS to be done that way but it would make sanity checks easier dealing with craft that are limited to one medium. Edit: The engines don't really make things intrinsically harder, though to do it right you would probably want at least some rudimentary thrust vs drag checking to get an idea of how fast the craft could go. (my version only works with the Lynx parts so I was able to make assumptions as to what kinds of speeds I could go and what it would cost me in energy) Edited March 31, 2018 by Starwaster Quote Link to comment Share on other sites More sharing options...
maja Posted March 31, 2018 Author Share Posted March 31, 2018 (edited) 45 minutes ago, GrandProtectorDark said: Question, would it be possible to create a function to use bonvoyage with boats. I'd guess calculating the movement speed and range could be harder, since actual engines would be used instead of ec consuming wheels. But it would using boats much more convenient. As @Starwaster wrote, when I decide to do a boat version of BonVoyage, then it will be different mod, because from a standpoint of a mod author it's easier to deal with it that way. Edited March 31, 2018 by maja Quote Link to comment Share on other sites More sharing options...
steve_v Posted March 31, 2018 Share Posted March 31, 2018 13 minutes ago, maja said: when I decide to do a boat version of BonVoyage When... I like When, it's way better than "If" Quote Link to comment Share on other sites More sharing options...
GrandProtectorDark Posted March 31, 2018 Share Posted March 31, 2018 Ok, I did thought about it being made into a separate mod. To hear that it do is somewhat-ish possible, is interesting. Gonna keep an eye out if this gets to be a thing at some point Quote Link to comment Share on other sites More sharing options...
theonegalen Posted April 5, 2018 Share Posted April 5, 2018 On 3/31/2018 at 8:25 AM, maja said: As @Starwaster wrote, when I decide to do a boat version of BonVoyage, then it will be different mod, because from a standpoint of a mod author it's easier to deal with it that way. I just came over here to ask about this! Hopefully this will be sooner rather than later, but I understand how RL and modding work. Quote Link to comment Share on other sites More sharing options...
maja Posted April 5, 2018 Author Share Posted April 5, 2018 2 minutes ago, theonegalen said: Hopefully this will be sooner rather than later, but I understand how RL and modding work. Don't worry, it seems that it'll be better with my free time Quote Link to comment Share on other sites More sharing options...
Beetlecat Posted April 5, 2018 Share Posted April 5, 2018 (edited) On 3/31/2018 at 6:25 AM, maja said: As @Starwaster wrote, when I decide to do a boat version of BonVoyage, then it will be different mod, because from a standpoint of a mod author it's easier to deal with it that way. Just for the fun of it, you could name the boat-based mod "Happy Trails" Edited April 5, 2018 by Beetlecat Quote Link to comment Share on other sites More sharing options...
Tiankay Posted April 6, 2018 Share Posted April 6, 2018 (edited) Hey. I know you are busy with bugfixing right now, but here is a small suggestion for intermediate time. Right now rovers can be powered by solar, RTGs, reactors, and nothing else. It always bugged me that BonVoyage doesnt accept any fuel cells as power source, as I really like to build fuel cell powered rovers. They get a ton of mileage out of their fuel, theres no danger of accidentally destroying your panels on rollovers and they cost far less then RTGs, let alone reactors. I cannot see a reason why fuel cells shouldnt work. The only problem that comes to my mind would be calculating fuel consumption while beeing unloaded. But reactors also use up fuel, so I guess that problem was already solved. Peace TK Edited April 6, 2018 by Tiankay violent video games Quote Link to comment Share on other sites More sharing options...
maja Posted April 6, 2018 Author Share Posted April 6, 2018 (edited) 10 hours ago, Beetlecat said: Just for the fun of it, you could name the boat-based mod "Happy Trails" Happy Little Trails? 7 hours ago, Tiankay said: Hey. I know you are busy with bugfixing right now, but here is a small suggestion for intermediate time. Right now rovers can be powered by solar, RTGs, reactors, and nothing else. It always bugged me that BonVoyage doesnt accept any fuel cells as power source, as I really like to build fuel cell powered rovers. They get a ton of mileage out of their fuel, theres no danger of accidentally destroying your panels on rollovers and they cost far less then RTGs, let alone reactors. I cannot see a reason why fuel cells shouldnt work. The only problem that comes to my mind would be calculating fuel consumption while beeing unloaded. But reactors also use up fuel, so I guess that problem was already solved. Peace TK This was discussed in the old thread and the results was, that it's not worth that hassle with computing fuel consumption and reducing fuel behind the scenes or during catch up like different life support mods do. Reactors can function years so mod author and I cut some slack in the sake of simplicity and quicker execution time. EDIT: On the other hand, I was thinking today about marine version of BV and there is a big probability, that I will be forced to address fuel consumption issue. Soooo, opinions can be changed Edited April 6, 2018 by maja Quote Link to comment Share on other sites More sharing options...
maja Posted April 18, 2018 Author Share Posted April 18, 2018 Just heads-up for all of you, who are waiting for a burried rover fix. I'm waiting for the new KSP update, which will most likely happen this week. It's a little bit hectic this month, but I hope that BV update will be soon after KSP one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.