Jump to content

jmbon

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jmbon

  • Rank
    Curious George

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I'm rather new to modding KSP and Unity in general. I am attempting to add fog and clouds to KSP and I have really no clue where to begin. I've searched Google high and low as well as the forums and all I could find is incomplete code snippets so small that they really don't help much. If someone has the time and knowledge, would you lend me a hand. Below is my code so far. I think I am on the right track with making a gameobject, assigning it's .maintexture to be my texture I choose, adding a mesh, creating vertices, triangles, etc. but I really have no idea if this is correct
  2. Hello, I'm rather new to modding KSP and Unity in general. I am attempting to add fog and clouds to KSP and I have really no clue where to begin. I've searched Google high and low as well as the forums and all I could find is incomplete code snippets so small that they really don't help much. If someone has the time and knowledge, would you lend me a hand. Below is my code so far. I think I am on the right track with making a gameobject, assigning it's .maintexture to be my texture I choose, adding a mesh, creating vertices, triangles, etc. but I really have no idea if this is correct
  3. Thanks for that. I already had the bool in the code, I just wasn't using it there. Putting it there solved that issue. Still trying to figure out how to add an image. If I figure it out, I'll post it here. Thanks again.
  4. Hello, I'm relatively new to Unity still and I am having two issues that are GUI related. First, I am trying to set a .png image as the background for a GUI.button(rect, image). I just can not get the image to display as the background of the button. My second problem is that I am trying to use the same button to open another config UI for my mod so that players can enable and disable certain mod features. However, when I click the button (button appears even if the background image doesn't), my debug statement prints but the second UI doesn't draw to the screen. For the past several h
  5. Hello, I am in the process of creating a new mod and I find myself stuck on correctly creating two separate GUI's. The first is very simple as it has a toggle, a horizontal slider and 2 labels all inside of a window and all automatically positioned by using GUILayout.*. The second GUI is actually a compass that I want to display in the game window. I know how to do the rotations for the needle but I don't have much of a clue as to how to begin. I've read through forums, Unity how-to's etc and while they helped somewhat with the first GUI, they offered no help on the second. He
  6. Well crap. How would I tell if my craft were over the oceans biome or highlands biome? I know it's a noob question but without being able to do a logical on either a str compare or enum result, I'm temporarily in the weeds. I really do appreciate the help. Btw, huge fan of Orbital Science. It's one of my core mods where I don't even play KSP until Orbital Science is up and running for that version.
  7. Thanks for the reply. Your second way is the one I was slowly heading towards. I really appreciate it. Is there a list of official biome names in the KSP API somewhere? I'm sure I can't do something like, if (biome.name == "my_biomeKSC") { // Do stuff } I've looked through the latest Scansat source code but couldn't find a list of official c# biome names, enums, etc. Thanks again.
  8. Hello, I am trying to create my first addon for KSP and I am having problems detecting which biomes my active vessel is currently. I've looked through the API calls, class calls and some old code on Github but none of it has really helped. I feel like I am on the right track but hung up. Below is a snippet of my code where I am getting ready to detect the current biome my vessel is in. CelestialBody Body = new CelestialBody(); CBAttributeMapSO.MapAttribute[] biome = Body.BiomeMap.Attributes; I feel like my Body variable is the right route or maybe my Fl
  9. Hello, I am currently working on creating my first mod for KSP and I find myself sort of hung up on UI creation in KSP. I followed the example given in but 1) I don't want to tie my UI to a specific part like the author of the above video does, I'd rather tie it to a button click in the game much like Kerbal Alarm Clock does. Once I am able to display it via in game buttonclick events, 2) I'd like a radial gauge widget to appear similar in shape to a compass. Are there any good examples of both of those you could point me to. I've looked through Github at example code bu
  10. I didn't know about the F12 functionality but it's the same as right clicking the variable, class, etc., and selecting 'Peek Definition'. See, I thought they were equivalent as well, hence me coming here after the forums, man pages, and online tutorials/examples didn't help. Anywho, when changing the B to lowercase, I got conflicting types from my program and KSPUtils.dll . I commented out my public delegate CallBack(int que, int onDraw); and it seems to have solved the current issue but now my UI window doesn't show up in KSP. using UnityEngine; //This module will create a
  11. Ok. I understand that. When I make the changes, VS gives me; Error 11 The best overloaded method match for 'RenderingManager.AddToPostDrawQueue(int, Callback)' has some invalid arguments Error 12 Argument 2: cannot convert from 'CallBack' to 'Callback' I believe Error 11 is being caused by Error 12 but unless there is a reserved keyword type called Callback, Error 12 doesn't make much sense to me. All I can think of is that Callback in .RenderingManager.AddToPostDrawQueue(int, Callback) is not a delegate at all. However, I can find no other reference in Unit
  12. Hello, I am trying to create a new GUI window in KSP but when I call my delegate callback(onDraw()), VS errors on me. I've looked at the API pages, Unity tutorials and C# pages for help but have been unable to fix the issues. I'd greatly appreciate any help. Below is my code along with the VS errors. namespace KSP_Wind_Display { // public delegate CallBack(int que, int onDraw); public class Wind_GUI_Display : PartModule { delegate void CallBack(); CallBack callback; private Rect window_pos = new Rect(); // New blank window private GUISt
  13. Hello, I am new to modding KSP and I am having some difficulty that maybe the community could help me with. I am trying to get the surface area of the vehicle but to do that, I either need the activevessel radius (in cases of simple rockets) or a List<Part> parts that contains the current parts attached to the vehicle that I could then use to make an educated guess as to the vessels radius (for more complex ships as 3 Rockomax Jumbo-64 Fuel Tanks are likely to be side by side, etc.). Right now, I am assuming rockets can be approximated by cylinders as getting the true shape of
×
×
  • Create New...