Jump to content

FORUM_TEST_2-19-14

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by FORUM_TEST_2-19-14

  1. This was already suggested (by me) a month ago!... [Plugin Request] "Real Altitude" altimeter that shows "when am I gonna crash?"! ...& written by Diazo a couple days ago!... Landing Height: Show distance from bottom of your vessel to ground
  2. ...can you add code to "draw a line" where the ray is casting?...for debugging, so while playing, we can SEE which point is being used as the raycast point? I think it would be fun to see & help in debugging. I know about Debug.DrawLine() & Debug.DrawRay()...but they both say... ...I actually do know what this means: in the Unity editor there is a "Gizmos" button, if that button is clicked (toggled down/enabled), then gizmo drawing is enabled. However, the problem is that I don't have KSP open in the Unity editor (& I don't think I can do that)...so I don't know if gizmo drawing is enabled in KSP (I don't think so) & I don't know how to enable it (or if I can). So, unless I can get gizmo drawing to be enabled in KSP, both of those functions are useless. From the Ceko Labs Rangefinder mod's code, I know about LineRenderer...but have not actually tested it yet in my own code.
  3. ...thank you for replying! ...since posting this topic & after writing some code, I too found a function to do that. Well, not "all GameObjects"...but a function to dump the passed object... Logging an entire GameObject - AngryAnt ...this is where I went wrong...I'm not using any IDE, just Notepad2 & csc.exe (command line C# compiler, included with every .NET install)...so I don't have any "object browser" to use. It's like writing code blindfolded...I can't see what's inside any object or what any object does...well, now I can, cuz of the LogGameObject() function, but before I couldn't. ...I will check, but if it's altitude-to-CoM of ship, that problem is already solved. I already found a way to get an accurate altitude to the ship's CoM (which is not 100% what I want, but it's what I can get right now). Starwaster just showed me how to force a new value into the built-in altimeter, which is great! So the only problem left, in my mind, is getting a CoM-to-side-of-ship distance (in the Vector3.down direction, specifically), so I can offset my CoM altitude. I can already offset my calculations, but I don't know how much to offset them by. ...keep in mind those mods are not on the list cuz they are "bad mods"...they are great mods & do their job well...the only problem is this topic is for a specific mod to only do Real Altitude. It's not just finding a way to display the info, it's displaying the info on the built-in Altimeter or displaying the info in a large font Gui on top of the built-in Altimeter. My current code does the "large font Gui" method...with Starwaster new code, I can amend my code to fix the built-in Altimeter. I plan on having a user setting for doing 1, the other, or both! Even before these most-recent replies, I already had some pretty good code. Now, with these new developments, it will be even more awesome!...& I can't wait to see what Diazo's cooking up! If he can solve the CoM problem, that'd be great! I wanna take this time to mention another great resource I found since posting this topic... KSP Plugin Framework - Plugin Examples & Structure ...I haven't used it quite yet...but it looks awesome...I need to rewrite my addon to use that Framework. I really wish I had found that before I started writing...would've saved me some time. ...thanks will look into it now!...every piece of info helps!
  4. ...I've been thinking of trying to raycast from CoM to "edge of ship"...can I collide (a raycast) with my own ship?
  5. ...those 2 lines, 2 freaking lines!!! I will start searching right now, but where did you find "FlightUIController"?...don't tell me, you used an "object browser"...if I knew about "UI.alt.setValue"...I would've been much farther sooner. ...in my current working code (written before Starwaster's reply)...I do have a way to set the offset...pretty manual tho. As, Diazo said we still need CoM-to-Bottom-of-ship correction code...but with a manual offset, this is very close to being awesome!
  6. In this thread... The Grand 0.23.5 Discussion Thread THE PROBLEM The 1st post has scrolling issues... This is the top part of the post, notice the partial text, but no scrollbar is visible (for this section)... If you scroll down, then at the BOTTOM of the post, there is a horiz scrollbar (for the ENTIRE POST)... Scroll all the way right... Now, scroll back up to where you were...THERE'S the missing scrollbar for that section!... THE FIX The source to that post mentions 1000 (pixels) at least twice. I know most Devs have big monitors & use big screen resolutions, but you should NOT assume people have 1000 spare pixels...at least not in the context of the space available in the "right-side (body) of a post on the forum". I think 1280x720 would be a fine minimal resolution to expect people to have...but remember that's the SCREEN size, not the "space available in the right-side of a post on the forum" size. When I force-edited the page (using Firefox's DOM Inspector)...I changed "1000" to "100%" (in maybe 3 places?)...resulting in this screenshot, compare this to the 1st screenshot...in this screenshot there is no whole-post horiz scrolling...that section's scrollbar is clearly visible, without needing to scroll down, scroll right, then scroll up to see it... This is the top part of the post (after hacking it to fix the width), notice the partial text, but now a scrollbar is visible... ....you should ALWAYS use "100%", if you want the site to work on more resolutions.
  7. ...actually, I'm not using an IDE...I'm simply using Notepad with the csc.exe compiler. ...yup, that info I was able to find. How to compile was the easy part, after finding that the csc.exe was installed by default with every .NET version. ...this may help. ...unfortunately, I'm not using Visual Studio or any IDE, which may be part of my problem. Instead of using an IDE, I'd just like a text file or HTML page listing the stuff the IDE would tell me, like every function in every DLL, for a start. Can someone dump that info for me?...or is there a command I can run (without installing the full IDE) to dump the DLL info? ...& that is why I'm here. There really is no Developer Changelog for what changed in the API between versions? That's sad. They know what changed & it should be simple for them to say "hey, if your using ABC.XYZ, you need to update to DEF.GHI". They have a changelog for USERS, why not Devs/Modders? ...yes, I did stumble on Taranis's templates before & those were some of the best things I found when searching. ...the Rangefinder mod uses a Raycast to find the distance. I plan on using the RealChute way of getting the Altitude & making sure that it's really reliable...it's reliable enough for him, so it should be good enough for me. Does anyone know how to hijack the built-in Altimeter & force it to display a different number???...what could possibly be the API for that?...maybe I need to hook its OnUpdate() event/method & prevent it from updating, so I can update it myself?...but how? How do I get a "handle" to the Altimeter? How do I override it's OnUpdate()? (or whatever method it uses to update) How do I change the numbers manually/myself? I'd like something simple, like GameObject.Find("Altimeter").setAllitude(12345)...but I don't think it'll be that easy...I don't even know its real name, if it's called "Altimeter" or something else...Anyone know where I can find the names of built-in objects? ...I wouldn't say most obviously...since that syntax is foreign to me (I'm new to C# {but not programming in general}), particularly the "{ get; }" part...I don't know what those braces & the word "get" mean/signify in C# syntax, since I've never coded in C#. If that entire "{ get; }" part wasn't even there, then I wouldn't be confused...it would simply be a property, since there's no parens to signify it being a function, but the get part is really confusing...you don't actually call it like "FlightGlobals.ActiveVessel.get" or "FlightGlobals.ActiveVessel.get()", so why is get there? ...since I'm trying to fix someone else's code, I need to read every line to even know what is used. ...oh, yes, I know about the logs. I did that 1st, there were no errors, no logs for this particular problem: the mod just isn't working in 0.23...you add the part to the ship, Launch & nothing happens...no flood of errors for why it's not working, nothing. The part just sits on the ship & doesn't work (no altimeter overlay). I would love for there to have been errors in the log to fix. I'm particularly happy you replied, stupid_chris, cuz just a couple days ago I was looking at your RealChute Parachute Systems mod...the changelog says... ...after seeing that, I ran to your source code, so I could generate a diff of version v0.3.1 to v0.3.2...alas, those versions are not on GitHub...so I couldn't find out what you needed to change to make it work. More replies welcome...the more info the better!!!
  8. Hopefully I'm blind, but... Where is the KSP Addon/Plugin API Documentation? ...no, I don't mean this... Category:Community API Documentation - Kerbal Space Program Wiki ...or these... Add-on Development - Tutorials - Kerbal Space Program Wiki Plugins - Kerbal Space Program Wiki Creating your first module - Kerbal Space Program Wiki XML documentation for the KSP API ...or even the sticky... The official unoffical "help a fellow plugin developer" thread ...I mean, REALLY...where is the documentation about... What functions/events/methods can I call/catch/use? ...I have read some source code of other mods, so I do know a little more than I'm letting on, but really: how did all the current Plugin Authors LEARN THE API to begin with???...how can you learn the KSP API when there are little-to-no docs about it? Example... OK, the wiki page... API:FlightGlobals - Kerbal Space Program Wiki ...says this... ...that's great, but 1st of all, is FlightGlobals.ActiveVessel a function?...or a property?...or a method?...which way do I "get the value from it?"... vessel = FlightGlobals.ActiveVessel vessel = FlightGlobals.ActiveVessel.get() vessel = FlightGlobals.ActiveVessel() vessel = FlightGlobals.ActiveVessel("some magic unknown param") ...but once I do get a copy of the active vessel, what ELSE can I do with it? In PHP terms, I need the output of a print_r(vessel) to be able to SEE what properties/methods/whatever are available off the vessel object...where is the documentation for this? Basically, I'm trying to learn C# (C-Pound), Unity & the KSP Plugin API...all at the same time. I need to know which syntax (when I'm looking at other plugin's code) is C#, which "things" are part of the Unity API (which there IS Documentation for) & which "things" are part of the undocumented KSP API. I might wanna make this a separate topic for the following, but... What changed, in the Addon/Plugin API, between KSP 0.22 & 0.23? ...I'm trying to revive a plugin, that I didn't write. It works fine in KSP 0.22, but fails to do almost anything in KSP 0.23. To fix it, I need to know "what changed between KSP 0.22 & 0.23?"...but not just the normal user-facing "changelog", I need the developer-facing "what in the API changed?"...since I can't really find any KSP API Docs (the links above are not good enough/complete...or I wouldn't be posting for help). I understand if the KSP Addon/Plugin API Docs are incomplete or yet-to-be-written, but then, again: if there are no Docs, how did all the current Plugin Authors LEARN THE API to begin with???...how did anyone learn to write a plugin for KSP without any Docs?...how can you call/use a function, if you don't know it exists?...once you do (somehow) call a function, how can you use the return value, if you don't know the details of what type of object it returns? I know that some of what I need to learn is in the Unity API Docs...that's fine...but I need to know where Unity ends & KSP begins. I need to know the KSP-specific API, that is the mystery. Plugin Authors: you can help me, if you post a link to a diff of what you changed to make your addon compatible with KSP 0.23. I want several diffs of what various addons HAD TO CHANGE to make their addon work again in KSP 0.23...but more than just the diffs: how did you find out that you needed to change those things...how did you know what to change, without docs? All of this is about the Ceko Labs Rangefinder mod...it was only written/last updated for 0.21.1...I have confirmed that it "works" (but I may not have tested everything) in KSP 0.22...& for no reason at all it DOESN'T WORK in KSP 0.23. This is my dilemma, I don't know where to start fixing it. I don't know why it worked, I don't know why it stopped working. I'm not even sure I should try to fix it...or simply write my own plugin from scratch?...my end goal is not to have a PART plugin, I want a PARTLESS plugin to show the Real Altitude...but the Ceko Labs Rangefinder mod, even tho it requires a part, is the closest mod to my goal. So, I need to fix it so it will work at all, then I can tinker with it, to hopefully make it not need a part.
  9. ...don't know why. Perhaps it's because the SpacePort is old, has bugs & needs some love. Anyway, the Forum Topic is here... Chatterer Also, the best way to find any mod is to simply Google... KSP Chatterer
  10. ...thx! That mod, Ceko Labs Rangefinder (forum), had not come up in all my searches. I can't say it's the answer yet, but I'm definitely gonna look at it! Note: I would prefer a mod that doesn't require a part...but in any case, perhaps the source code (if it's available???) will help me too! This image (in the post linked above), kinda sums up what I want, at least the "digital display" part of it. I now need to find Ceko & get that source code! (it could be in the download on Spaceport, I haven't checked yet) ...as I mentioned, their idea of true altitude sometimes means "the bottom of the sea". I know that this reading is probably a limitation of the Game, so I don't fault the mods...but in any case, "bottom of the sea" alt is not what I want...even if it is correct over land. ...yes, I never said there aren't mods to give you this info, but I want one that "fixes" the normal altimeter, instead of providing the info in a small font window. Those mods are great, but they don't serve the purpose I'm describing here. ...the "trajectory altitude" mode is not for when you are "over" the mountain, it's when you'll hit it cuz you are too low to go over it. The normal altitude is in the "straight down" direction (which, in this example, is not the direction you are going, so it doesn't apply in the "trajectory altitude" mode). The "trajectory altitude" mode comes into play when you are going sideways or "not down" (it would ALSO work in the down direction, but ignore that for now, since the normal mode also covers the down direction). If moving sideways means you'll pass OVER the mountain, then the "trajectory altitude" reading would be infinite, since you AREN'T gonna hit anything, in that direction. The "correct" altitude mode is what would be "constantly changing over mountains", since the mountain DOES get closer & farther away as you pass over it. ...which is why you click the altimeter to change to the mode you want (other modes would exist so you can get a constant reading over mountains, if you want)...or simply don't install the mod, if you like the default behavior. ...it's TOTALLY absurd that everyone is "landing" when it don't say 0. With the current altimeter, you NEVER know when you'll "really land", unless you over water...making the current altimeter almost useless.
  11. ...it's OK if the mod CAN do that, but I mainly want a mode that will "stay in correct mode" regardless of "radar range" or "height above ground". Yes, real Radar Altimeters have limits, but this is a game & I don't want limits. Basically, I just want my "correct" alt, from orbit, all the way down, without it switching on the way down. It should only switch, if what's below me changes. I should probably look at Telemachus, not as "the mod to do this", but as "how in the world does he get the data I need". Hopefully, in all the "altitudes" that Telemachus might display, at least one of them will be my "correct" value at any particular time...then my mod can simply change which way it's getting the altitude, depending on what's below...but the real key here: I want the altitude from the BOTTOM of my ship, which the normal Game API might not tell you. I don't care when the CENTER (CoM) of my ship will hit the ground, I care when the bottom hits -- or not even "bottom", but the "lowest part of the ship"...if I happen to be landing upside down or sideways, then I wanna know when the top or side will hit, whichever side is closer to the thing I'm gonna hit.
  12. ...nope. Doesn't fit the requirements. Non-IVA only. Must alter the built-in altimeter...& that's only in non-IVA. ...that was in my list of "NOT what I'm looking for"...Steam Gauges adds an ANALOG altimeter. I want a digital one/one that alters the built-in altimeter.
  13. ███ Update  4/13/14  There is now a plugin that does this! ███ Landing Height: Show distance from bottom of your vessel to ground by Diazo Note: The release of my own Mod/Addon/Plugin is still pending & will be linked here & in my sig when ready. ███ Original Plugin Request Below ███ I need a mod that will alter the built-in altimeter & change it to display "real altitude"...as in the "when am I gonna land/crash" altitude  or "if I go straight down, what's gonna stop me 1st" altitude. I want something that will display 0 when the BOTTOM (not CoM) of my ship touches ANYTHING (be that water, land or a building). These mods are NOT what I'm looking for... Radar altimeter? Other then mechjeb Bucky's Instruments SteamGauges - Analog Radar Altimeter and More! MechJeb Kerbal Engineer Redux ...OK, now that I've listed every mod in existence. I need a new mod...or pointers on how in the world I could write it. The mod should follow these rules... If I'm actually over water: do nothing. The built-in Altimeter shows the "altitude above sea level", so if I'm really over water, the number displayed is correct! If I'm over land, show the "distance to land". I don't care about "sea level" when I'm not over the friggen sea. Call this "Radar Altitude" if you want, but I don't want any limits on it, for example the IVA altimeter only works below a certain height...I don't want that. Also, if I'm over sea I do not want the "altitude to the bottom of the sea" (which some mods display as "true altitude"). If I'm over a building or "crash-into-able object", then I want the "altitude to that object". Scenery rocks CAN be ignored, since you pass thru them & don't crash...but I'm fine with knowing the distance to them too...of course, as soon as the bottom of my ship passes thru the Rock, it needs to recalibrate & tell me the real distance to land. ...I hope I made it clear why the existing solutions are not acceptable. Things the mod should do... Alter the EXISTING altimeter to show the "correct" altitude (based on the rules above), using the "scrolling numbers font" like it already does. Provide DIGITAL (not Analog) numbers in a nice font (the font should be the same size as the built-in altimeter's numbers, not a small font Gui on top of the existing altimeter) to REPLACE the built-in scrolling numbers. Be clickable to toggle the displayed altitude between "correct", "sea level", "land", etc...clicking should rotate thru all the modes that it can display, it should be obvious which mode you just changed to. Perhaps clicking & holding for 1 or 2 seconds should return to "correct" mode, regardless of what mode it was in before (even if it was already in "correct" mode). As a bonus, I'd also like the mod to... Show the "trajectory altitude". For example, if you are going sideways on the Mun, really low & a mountain is coming up, you don't need to know the "straight down" altitude, you need the "direction I'm traveling into the side of that mountain" altitude. This mode would always show the distance/altitude in the direction your velocity is going, sideways, up, down, etc. So, now, how do we get this created? I'm willing to TRY to write this myself, but I don't think there are ANY Docs on how to do it. 1st of all, "how do I get a "handle" to the built-in altimeter? For example, the "Sliding Nav Ball" mod has this code in it... GameObject ce = GameObject.Find("collapseExpandButton"); ...where in the bloody heck did he find out that the navball's collapse/expand button, was actually called "collapseExpandButton"??? Is that mentioned anywhere? Should I just assume the built-in altimeter is called "altimeter"? But then, once I find the "handle" or "name", what do I do with it? In this case, the handle is in the ce var...OK, but what attributes/methods are available off that var? In his code he does "ce.GetComponent<ScreenSafeUIButton>();"...how am I supposed to know to do something like that? Are there ANY Docs on this API/stuff? & before you link, NO the stuff on the Wiki talking about "API" does NOT have enough info...sure there's SOME info, if you wanna do any of the stuff it does mention, but what about when you wanna do something that's NOT mentioned in the Wiki's API listing? My current plan is to get a handle to the built-in altimeter, then force it to display my "corrected" value...but I need to know... How can I force the built-in altimeter to display some other number? How can I get the "correct" number in the 1st place? It would probably be much easier to just write the "correct" altitude code, then display is on my own Gui, but again, that's not what I'm looking to do. I wanna display it on the built-in altimeter. So any mod authors wanna take this on? I'm sure this would be a POPULAR mod, since, in almost every video on YouTube the person doing the video mentions "well, that altitude is above sea level, so I might crash sooner". People are always "landing" at 3785 km...so absurd. Why on KERBIN does anyone CARE about sea level when they are trying to land/about to crash??? They don't! Everyone wants an altimeter that would work like I've described.
  14. ...ah, that is bad. Didn't notice that little detail when I was investigating before. Strange that vBulletin has it that way. A better permission would be "Can Delete Own Threads (before they are replied too)" (that's what I thought it meant). They've got permissions for everything else, except that. I can't see why they'd have a permission that essentially means "user can wipe entire thread with 1000 posts".
  15. ...actually, I just checked, it's not a moderator-only permission. It is possible to set for normal users. To set this permission in vBulletin 4... Go to the Admin CP On the left pane, find Usergroups, click the arrow to expand it, click Usergroup Manager On the right pane, find the row for Registered Users, at the far right of that row, click Go Note: that is, of course, if you are using the default "Registered Users" group. If you have a different group for normal users, edit that group instead. Under Post / Thread Permissions, find Can Delete Own Threads, click Yes Scroll down (wayyy down) to the very bottom of the page (just press End on the keyboard to scroll to the very bottom quicker), click Update ...that should do it!
  16. ...you are also a Mod with 3000 posts (or at least Green, even if it don't say "Moderator" under your name). I can make another undeletable topic & make screenshots, if you want. Unless this changed since I posted today, the button is not there...at least for people with low posts counts/non-mods (again, the only way for me to test is creating another topic).
  17. ...outsider chiming in here: I don't think that the E-mail address [email protected] was listed anywhere (before this thread, of course). I believe the E-mail address [email protected] FORWARDS to [email protected] (as well as other places). When Rob left, his E-mail was disabled, but this forwarder was not updated. So, in my mind, the fix is to edit the forwards for [email protected] & remove the forward to rob. No more forwarding to rob, no more bouncing.
  18. Problem: The "Jump to page" option/form does not jump to the page you tell it to, it jumps to WRONG page. You tell it page 150, it goes to page 101. This can be reproduced on ANY page with a "Jump to page" option/form, but we're gonna use the Lazor System thread for the example... Steps to reproduce... Go to the Lazor System thread Click Page 1 of XXX to open the drop down form (currently it says "Page 1 of 153", but, of course, that will change). In the Jump to page box, type 150 (or any other number) Press Enter or click Go Actual Results... You will end up on page 101 Expected Results... You should end up on page 150 (or whatever number you entered) I think I see the problem... The form's action attribute is set to... <form action="threads/9923-0-23-Lazor-System-v32b-%28Dec-19%29/page101" method="get" class="..."> ...so the form submits to... http://forum.kerbalspaceprogram.com/threads/9923-0-23-Lazor-System-v32b-%28Dec-19%29/page101?t=9923&page=150 ...which responds with... HTTP/1.1 301 Moved Permanently ...which ends up redirecting to... http://forum.kerbalspaceprogram.com/threads/9923-0-23-Lazor-System-v32b-(Dec-19)/page101 ...thus completing the "taking you to the wrong page" problem. The fix is simple... If you change the "form action" to this (removing "/page101" from it)... <form action="threads/9923-0-23-Lazor-System-v32b-%28Dec-19%29" method="get" class="..."> ...or even more simply, blank it out (so the form submits to the current page)... <form action="" method="get" class="..."> ...then it all works fine! Side bug: Searching for "Lazor" or "Lazor System" on the KSP forums DOES NOT produce the correct thread (at least not on page 1 of the results)...I have to Google for "KSP Lazor" or "KSP Lazor System" to find it quicker. This bug might deserve its own topic, but I'm including it here for now.
  19. ...if that's the case, then it's not working -- or "not working" for "new spawns" with my lost post count. I can guarantee that if the delete button was there, I would find it. I clicked "Edit Post" & "Go Advanved" & the delete option was nowhere (on this topic, before you replied). Note that I was able to delete a Reply in another topic just about an hour ago, so I could find the option then -- but again that was on a reply, not a topic.
  20. What? I can't delete this topic from this subforum? I posted this to test the thread title, intending to delete it, before posting my real bug report, but now I can't delete this topic if it's in this subforum???...or is there a time limit before I can delete? What ARE the rules on deleting topics/posts? When CAN you & when CAN'T you? It seems that sometimes I CAN & sometimes I CAN'T delete them. The original problem was that I was "too new" to delete anything, now what's the problem? OK, it appears I can delete POSTS but not Topics...is that it? (if that's the case, then it's not specific to this subforum)
  21. ...this does not appear to be true. Please change it so that this is true. I cannot find anywhere to delete my own topics or posts  something you can do on other forum software (which I won't name to avoid seeming like spam) I think the user should be able to delete their own posts (& topics too  at least, before anyone has replied). I also think the user should be allowed to edit their post without getting that annoying "Last edited by" msg (at least until someone else replies  again like that "other forum software" does). Here I go, I'm about to push the dreaded Submit button & be forever linked to this version of this post, wish me luck!...hopefully I don't have to edit it! (or I'll get that nasty "Last edited by" msg)
  22. To moderators: I'm just trying to test, but I can't test if I can't see my own posts. I also can't delete my tests, if I can't see them. I understand the need to moderate posts, but please let ME see my OWN posts while they are being moderated! I'm about to become a new forum user, so I'm simply TESTING 1st.
×
×
  • Create New...