Jump to content

TaxiService

Members
  • Posts

    627
  • Joined

  • Last visited

Everything posted by TaxiService

  1. Thank you for letting us know on this error! (More specifically, the error seems to say that one or more parts of RoverDude's MKS are deliberately deactivated until as some milestones of a career are achieved?)
  2. Thanks for this bug report. We are aware of this (stubborn) bug some time ago and already include a fix to our next release (with several other fixes). This fix is essentially the transmission of the whole science data amount at the end of the transmission because the KSP will clamp the final size of the packet anyway. (more context: this link. Science data is float-type, meaning it gets approx very easily and fails sum/equal comparison, resulting in multiple fix attempts up to now)
  3. I took a quick glance at the AGX thread. It seems AGX has the action-group support for RT's flight computer and signal delay. Can you go ahead and find out with AGX and RT? Although we have the rebuilt flight computer and dish tracking features in our RT 2.0 proposal, I need some details on your tracking request. Do you want the rotation animation on dish in flight or just automatic connection to ground stations within your vessel's comm range? Even with additional RT ground stations, there is a dead zone to the east of KSC (it also shows in stock CommNet, even with the extra ground stations enabled). You need to ascent at much steeper angle/AoA (or just toss cheap probes around the dead zone)
  4. Announcement The pre-release version 0.3 is released (link). You can filter vessels out through KSP's MapView filters and sort the vessel list! P.S. Please backup your precious saves before installing this mod. LOOK!
  5. Oh, I was looking at the wrong reference (outdated one with older DialogGUIBase class). It seems DialogGUIBase only checks if a given prefab (like DialogGUILabel) has a tooltip component available. If no such component is found, then it never tries to update the tookltip.
  6. Yes, please. Send me both saves before and after. I also need a list of your mods so that I can download and install. (or yet better zip your mods inside your GameData except for Squad folder and send along with your save if your bandwidth allows) For the edit, one approach is to find your craft data (with your antenna) in your before save, and then overwrite the same craft data in the after save with the craft data of the before save.
  7. There are tooltips in the DialogGUI components? I haven't came across any function, parameter or argument mentioning such tooltips.
  8. Hi, Does this part disappearance occur right after the flight loading, and are they only antenna parts or any other part like solar panels, structures? I am thinking this part-loss problem is stock because I do lose some random parts (very rarely though) upon loading in my own play sessions.
  9. @garwel @HebaruSan You may be interested that it is possible to add new DialogGUI components to or delete the DialogGUI components from the dialog dynamically. But this solution is neither pretty nor compact. Assumed that you have kept the reference to the DialogGUIVerticalLayout or DialogGUIHorizontalLayout prior to the dialog spawn, //keep reference rowLayout = new DialogGUIVerticalLayout(10, 10, 4, new RectOffset(5, 25, 5, 5), TextAnchor.UpperCenter, someContentRows); // someContentRows is DialogGUIBase[] To add new DialogGUI components: Stack<Transform> stack = new Stack<Transform>(); // some data on hierarchy of GUI components stack.Push(rowLayout.uiItem.gameObject.transform); // need the reference point of the parent GUI component for position and size List<DialogGUIBase> rows = rowLayout.children; rows.Add(createContentRow()); // new row rows.Last().Create(ref stack, HighLogic.UISkin); // required to force the GUI creation To delete one row of DialogGUI components: List<DialogGUIBase> rows = rowLayout.children; for (int i = 1; i < rows.Count; i++) { DialogGUIBase thisChild = rows.ElementAt(i); if (thisChild is DialogGUIHorizontalLayout) // avoid if DialogGUIContentSizer is detected { DialogGUILabel label = thisChild.children.ElementAt(0) as DialogGUILabel; if (label.OptionText.EndsWith("" + id)) // you can assign unique ID to DialogGUIVerticalLayout or DialogGUIHorizontalLayout via SetOptionText too! { rows.RemoveAt(i); // drop from the scrolllist rows thisChild.uiItem.gameObject.DestroyGameObjectImmediate(); // necessary to free memory up break; } } } It won't be like OnGUI() though. But it is neat that DialogGUI takes in the list of DialogGUIBase prior to spawning a dialog and then edit the content on fly without repeatedly drawing like OnGUI().
  10. Hi, I figure I can post my notes about KSP's CommNet, given the namespace of CommNet is sort of large to sift through and no one has posted on CommNet yet. Organisation of KSP CommNet The entire CommNet feature is mainly consisted of CommNetUI, CommNetwork and CommNetVessel, along with a bunch of support classes and data structures CommNetUI is the user interface where a player is seeing and interacting with. This class has the method of interest, UpdateDisplay(), which draws every connection and shows/hides some or all connections, depending on the mode (FirstHop, VesselLinks, Network etc) the player selected. CommNetwork is subclass of the abstract class, Net, which is data-oriented class itself with multiple lists of different types, such as Link, Data and Occluder. This CommNetwork class manages and operates a global network of all CommNode (vessels) and CommLink (connections) objects. For example, the potential connectivity of a pair of two vessels is tested by SetNodeConnection() according to the connection and range rules. Every vessel (Debris, Rover, Flag etc) has the variable 'connection' of CommNetVessel class. This class has a number of methods that are releated to the vessel itself. For example, the class's CalculatePlasmaMult() calculates the multipler of the radio blackout of the reentrying vessel. CommNetScenario is responsible for starting up the CommNetwork and CommNetUI and disabling/enabling CommNet according to Game's settings. Support CommNet class CommNetNetwork seems to be a service layer where vessel and body data are added to and removed from CommNetork. It regularly fires a chain of health-check events for the CommNet. Relevant data structures of the CommNet CommNetHome is a ground station, whose data includes the body, alt, lat and lon. CommNetBody is a celestial body, whose occluder is supplied for CommNetwork to check if the connection is occluded between two vessels. CommNetVessel is a data structure attached to every vessel, even a debris (of course it is null). It has an unused variable of signalDelay, presumed a little gift for a certain mod. It also has a number of network-processing methods you can override: OnNetworkInitialized(), OnNetworkPostUpdate(), OnNetworkPreUpdate() and UpdateComm(). CommNode is analogous to a node of a graph. It has some information about antennas, remote-control capability. It is stored in the CommNetwork. The class conveniently provides a comparer, IEqualityComparer<CommNode>. Likewise, CommLink is analogous to an edge of a graph. It contains some information about the vessel-pair connection, such as the signal strength, relay capability of each node. CommPath, implied by its name, is a order-sequence of CommLink. How to substitute KSP's CommNet for your own CommNet Subclass CommNetUI to write your interface Subclass CommNetwork to create your own connection rules Subclass CommNetScenario to replace the KSP's stock CommNetwork and CommNetUI instances with your own subclasses above. You can also override OnLoad and OnSave for your CommNet data. You will need the KSPScenario tag to let KSP know it should run your CommNetScenario subclass instead of the stock CommNetScenario. Subclass CommNetVessel to write your communication behaviour for each vessel. KSP will automatically substitute the stock CommNetVessel for yours. Bug (Squad is aware of this now): CommNetNetwork class has the hard-coded CommNetwork instance in ResetNetwork() so subclass this class to fix it and then replace it in your CommNetScenario subclass (via reflection, singleton or FindObjectOfType)
  11. I gave my own play session a go on the Constellation mod. I am not sure how I feel about in these two pictures. Your thought? BEFORE AFTER
  12. Announcement The pre-release version 0.2 is released (link). It contains several improvements and one issue fix. P.S. Please backup your precious saves before installing this mod.
  13. Hi, Although I would like to get a bug report on this, we have previously received multiple reports on the connection loss involving the GX-128 antenna. The usual cause behind these reports is the antenna' extreme narrow cone (0.005 degree) that is too narrow to maintain connection at so close distance to Kerbin or its com sats. This GX-128 antenna is suited to be positioned at extreme distance from Kerbin (say Eeloo orbit). I recommend you to include a shorter-range antenna (KR-7 or RA-2) for the close-distance connections with Kerbin.
  14. @blowfish and this poster, many thanks for letting me know about the Unity singleton pattern and the reflection. I will go read up on those. I already filed a feedback issue on the bug tracker on this CommNet issue and it seems that it caught the attention of one of the KSP staff. So a fix to this could show up in the KSP 1.3 round.
  15. See below Yup, it is quite extendable and I succeeded in extending the most of the CommNet. But the CommNetNetwork.Instance is not extendable despite that CommNetNetwork has virtual methods to override. (Edit)
  16. Hi, With these codes of CommNetNetwork class below, I am trying to find out how to overcome the protected set and assign with my own subclass i.e. "CommNetNetwork.Instance = new SomeSubclassCommNetNetwork();". //Edited out the KSP codes I was not supposed to post I tried this trick but it doesn't work. CommNetNetwork a = CommNetNetwork.FindObjectOfType<CommNetNetwork>(); // or CommNetNetwork.Instance.GetComponentInParent<CommNetNetwork>(); a = new SomeSubclassCommNetNetwork(); // result is a = null Anyone can give tips on overcoming protected set property?
  17. Psst, RT 1.8 has the in-game setting window at the KSC scene where you can switch a lot of the mechanisms of the RT, included the standard and root range models.
  18. It is correct. It has to be done to avoid the fight between RT's Flight Computer and KSP's autopilot for the vessel control. If I recall correctly, in KSP 1.1, both SAS and autopilot were merged into the single and stronger SAS, and this caused issues of the newly-reformed SAS messing with the RT's Flight Computer when SAS was active.
  19. Assumed both Omnis is of the same part (same range), the math takes the range of the max-range X and computes on the remaining antenna, resulting in the range bonus of (X)*0.5 for both antennas. Someone (can't find his post here) posted this MM patch for the extra ground stations. @RemoteTechSettings { !GroundStations,* {} GroundStations { STATION { Guid = 5105f5a9-d628-41c6-ad4b-21154e8fc488 Name = Mission Control Latitude = -0.13133150339126601 Longitude = -74.594841003417997 Height = 75 Body = 1 MarkColor = 0.996078014,0,0,1 Antennas { ANTENNA { Omni = 75000000 Dish = 0 CosAngle = 1 UpgradeableOmni = 4E+06;3.0E+07;7.5E+07 UpgradeableDish = UpgradeableCosAngle = } } } STATION { Guid = c4020a3a-3725-4644-9185-e092ea000772 Name = North Station One Latitude = 63.0959948383325 Longitude = -90.0686195497409 Height = 2864.02024834626 Body = 1 MarkColor = 1,0.8,0,0.7 Antennas { ANTENNA { Omni = 1E+06 } } } STATION { Guid = a48ebe2b-dd33-43cd-b6fc-0ff01d286a28 Name = Baikerbanur Latitude = 20.6820169733268 Longitude = -146.499776485631 Height = 426.953797265305 Body = 1 MarkColor = 1,0.8,0,0.7 Antennas { ANTENNA { Omni = 1E+06 } } } STATION { Guid = 1b85e542-f333-42c4-b947-63c68fa1c07e Name = Crater Rim Latitude = 9.44728971864159 Longitude = -172.106644413907 Height = 4115.64748514118 Body = 1 MarkColor = 1,0.8,0,0.7 Antennas { ANTENNA { Omni = 1E+06 } } } STATION { Guid = 924a1f04-65fd-43b0-b5d9-92b42622b47a Name = Mesa South Latitude = -59.5861679042582 Longitude = -25.8627095278566 Height = 5455.44101071125 Body = 1 MarkColor = 1,0.8,0,0.7 Antennas { ANTENNA { Omni = 1E+06 } } } STATION { Guid = 5ff6a830-98a2-488f-bdd4-4322511222d6 Name = Harvester Massif Latitude = -11.9503778337192 Longitude = 33.7373248915106 Height = 2701.44694075082 Body = 1 MarkColor = 1,0.8,0,0.7 Antennas { ANTENNA { Omni = 1E+06 } } } STATION { Guid = 6de2d751-bbbc-4892-80d7-d3852ab99d9b Name = Nye Island Latitude = 5.36081966792828 Longitude = 108.546677792524 Height = 411.161351518473 Body = 1 MarkColor = 1,0.8,0,0.7 Antennas { ANTENNA { Omni = 1E+06 } } } } } Put it in a cfg file and toss into your GameData's RemoteTech.
  20. Announcement The first pre-release version is released to the public! Here's the link. P.S. Please backup your precious saves before installing this mod. Frequent Asked Questions What happens if you install the CommNet Constellation mod on your existing save? All existing vessels did not initially have radio frequencies yet so they would have the public frequency temporarily but would not save it. You need to visit each vessel and edit its radio frequency so that this frequency will be saved persistently. For the first time, all of your existing vessels will be "upgraded" to have Constellation module and related data. What happens if you install the CommNet Constellation mod and start a new game? Nothing bad would happen. Just edit the radio frequency of a ship in the editor and launch away! What happens if you remove the CommNet Constellation mod from your game folder? There are no parts introduced by this mod so your existing vessels would be safe. However, the entire CommNet would revert to the network of the single type. This means every vessel would yell at each other within its range. How do I edit my vessel's radio frequency? Every command part has its own frequency (meaning that your vessel can have multiple frequencies but can only utilize one frequency at any time). In the editor or flight, you can right-click each command part to open its part-action menu and then click the CommNet Constellation button to launch an user interface for this frequency. How does the overall radio frequency of a vessel with multiple frequencies get chosen? The overall frequency is the frequency of the command part that is added in the order in the editor. So if your root part is a command part, that part is the first one to utilize its frequency as the vessel's frequency. How can I overwrite all frequencies of a vessel to the same frequency? In the control panel in either flight or tracking station, you can open up the setup button of that vessel and update the frequency that will be forced upon every command part of the same vessel.
  21. *smack my forehead on my desk* The FlightGlobals didn't have two conflicting personalities. The cause of this whole problem turns out to be my tiny mistake. I forgot about my caching of vessel data and thus chased after the cached value instead of the actual value changed. Sorry for this trouble, Diazo.
  22. Through the debugging environment (link), I observed any change to the part module's variable is indeed saved. But it feels like the local copy of the vessel is only changed until it is committed to the KSP's global database upon existing the flight scene. I am searching for the trigger to this commit action. (last resort is to call an update function outside the flight scene to change the variable in the global database) Also this variable is not intended for a part-action menu as it is for behind-scene information. Edit: All right, I don't even understand now. if (rightClickedPart != null) // either in editor or flight { CNConstellationModule cncModule = rightClickedPart.FindModuleImplementing<CNConstellationModule>(); // TODO: in flight, update has no effect cncModule.radioFrequency = this.conFreq; Vessel gv = FlightGlobals.Vessels.Find(x => x.id == this.hostVessel.id); Part gp = gv.parts.Find(x => x.flightID == rightClickedPart.flightID); CNConstellationModule gm = gp.FindModuleImplementing<CNConstellationModule>(); // contain the same change! } I checked the same vessel through FlightGlobals and found the change is reflected immediately after the update. BUT somewhere else (say in the mapview in the same session), the same FlightGlobals shows the vessel's unchanged value! Why two different states of FlightGlobals?
  23. Hi, I need more details or exact reproduction steps because I can't reproduce this on the stock KSP 1.2.2 and the latest RT develop branch. The other vessel under remote control has a custom orientation (with disabled SAS) set up and holds to it, regardless of my active vessel (also under remote control and manual SAS) being outside 2.3km range, within 200m range and outside 200m range. Edited
  24. Hi there, I am trying to figure out how or why the newly-updated variable radioFrequency of a part module of an active vessel is not immediately reflected on the global scope in the flight scene. Here's the part module I added to every command part via ModuleManager: //This class is coupled with the MM patch that inserts CNConstellationModule into every command part public class CNConstellationModule : PartModule { [KSPField(isPersistant = true)] public short radioFrequency = CNCSettings.Instance.PublicRadioFrequency; [KSPEvent(guiActive = true, guiActiveEditor =true, guiActiveUnfocused = false, guiName = "CommNet Constellation", active = true)] public void KSPEventConstellationSetup() { new VesselSetupDialog("Vessel - <color=#00ff00>Setup</color>", this.vessel, this.part, null).launch(); // pass the active vessel and right-clicked part references } } Inside my VesselSetupDialog codes, the relevant codes for updating the part module are as follows. if (rightClickedPart != null) // either in editor or flight { CNConstellationModule cncModule = rightClickedPart.FindModuleImplementing<CNConstellationModule>(); cncModule.radioFrequency = this.conFreq; // the change is not immediately reflected until I exit the flight scene message = "The frequency of this command part is updated"; } The problem is that the change is reflected only upon existing the flight scene but not immediately in flight. I tried the GameEvent.onVesselWasModified.Fire(hostVessel) but it has no effect on immediate reflection. I tried the ProtoPartSnapshot updating but it doesn't immediately reflect until flight exit. I am poking in the plugin dev forum and DLLs for answers but there is a lot of information to sift through. Does anyone know how to notify the KSP that the active vessel has some changes that should be reflected immediately?
×
×
  • Create New...