Jump to content

McOffsky

Members
  • Posts

    26
  • Joined

  • Last visited

Reputation

4 Neutral

Profile Information

  • About me
    poland can into space
  1. Heh, I must have misspoke something Next beta version with more features should be ready next week, now real life got me really bad and boss want his projects done first. Final version will be released around second half of November, I will keep you posted.
  2. Hm, what version of Android do you have? I've tested it on 4.4.2 na 4.4.4. Connetion errors are well handled and you should see Toast massage after few seconds. Also you can upload logcat from Android, but this is optional, becourse you will need another app to do this.
  3. I agree with you if by germania you mean scoring few goals and wining match ;P And gerMoney anschluss ;P Also our silly goverment recently created Polish Space Agency. Yeah, yeah, I know, world is going crazy. ------------------------------------------------------ Topic got big fat update and beta download links. Enjoy.
  4. Ok, another question: is there any elegant way to detect part (or vessel with part) unload? I've onInactive, but it only works when part is destroyed. I need to do some actions on vessel unload, like when vessel is going out of phisics range or when user switch back to Space Center.
  5. @SaplingPick - I think it could be done, only problem might be loading layouts to devices, you need mouse to right click on part and load button layout from it. But besides that you should be able to play whole game with smartphone as your controller (with joysticks, an essential switches) and for example tablet as informaction display/switch board. Possibilities are unlimited. After first release I will think about some other way to switch layouts (so hopefully in November).
  6. Yeah, I found out about CCP when I was searching for way to invoke Action Group. Main difference between CCP and Csurfs is whole layout creation. You build your layout along your ship, then you store it and put it on device when needed. Every Csurfs Module Part can store one layout for one device. Also CPP utilize external app for connection between game and device, Csurfs has in-game server. And CCP does not support Android I will look into scansat map when I deal with skins support. I need to develop way to fetch image trough socket data connection. When I have this I can transfer scansat image without any problem.
  7. ***UPDATE 18-10-2014*** This post is still work in progress, it will be updated during plugin development. What is Csurf? This plugin basically allows you to use mobile device as second screen for Kerbal Space Program. You can arrange buttons according to your needs. Connect your device, add part to ship, create button layout and fly! Skin support ***need documentation*** Modders support Csurfs will have support for other modders, much like Toolbar plugin. For example: class DefaultElements { public static void load() { CsurfsButton stageBtn = CsurfsManager.instance.addButton("uniqeID"); stageBtn.setLabel("Stage"); stageBtn.setSize(new Vector2(2, 2)); stageBtn.setIcon("button/icon"); stageBtn.setDefaultTexturePath("button/default"); stageBtn.setInfo("info info lorem lorem"); stageBtn.onClick += Event_stageButtonClicked; } static void Event_stageButtonClicked(object sender, CsurfsEventArgs e) { Staging.ActivateNextStage(); e.vessel.ActionGroups.ToggleGroup(KSPActionGroup.Stage); } } Supported devices For now it works with Android only, but I will develop PC version after I finish Android app, and iOS, if there will be need for it. I'm writing this plugin by myself, so you have to be patient It will be free to download, but there will be Supporter version, it will be basically Free version with only one feature added: multi device support (so you can use your tablet and smartphone at the same time, even for two different ships). Download Kerbal Plugin https://dl.dropboxusercontent.com/u/2844497/KSPCsurf_Beta_Release/KSP_Csurf_Win_0_3Beta.zip Android App https://dl.dropboxusercontent.com/u/2844497/KSPCsurf_Beta_Release/KSP_Csurf_Android_0_3Beta.zip
  8. I will quote Coldplay now, play music in your head on your own: "...nobody said it was eeeeeasy!" ModuleCommand is Squad script and I think it's not public. If I understand your plugin correctly you just need to find parts with that module on active ship. You will get that with code below. And you can use Module Manager to attach your code to stock parts. foreach (Part p in vessel.Parts) { foreach (PartModule pm in p.Modules) { if (pm.moduleName.Contains(n)) { list.Add(pm); } } }
  9. Take a look at TAC Examples ( https://github.com/taraniselsu/TacExamples ) 1) KSPEvent and KSPField - https://github.com/taraniselsu/TacExamples/blob/master/03-PartRightClicking/Source/PartRightClick.cs and https://github.com/taraniselsu/TacExamples/blob/master/05-KspFields/Source/KspFieldsModule.cs 2) As far as I know keyboard input is controlled by Unity and you cannot fake this input. You should be able to bind to those functions from your code, using keyboard as proxy is not good idea. Have a look at documentaction (http://anatid.github.io/XML-Documentation-for-the-KSP-API/annotated.html), this should help. 3) In your part module: public override void OnLoad(ConfigNode node) { if (node.GetValue("cid") != null) { this.cid = node.GetValue("cid"); } } public override void OnSave(ConfigNode node) { if (node.GetValue("cid") == null) { if (string.IsNullOrEmpty(this.cid)) { this.cid = this.part.ConstructID; } node.AddValue("cid", this.cid); } }
  10. @Ippo Nah, that would be total mess. I will go with module manager approach, and write simple module to communicate with my part. @Diazo To be honest this dazzled me so much to force me to write here. Uid in persistent.sfs file differs from uid in game, and, like ConstructID, changes after every ship load. It makes no sense.
  11. @Ippo GetInstanceID() is not useful for me, I need some way of storing part reference to perform actions on it even after game reload. @Diazo I will read your plugin code (Actions Extended) for inspiration, it does almost exactly what I need.
  12. Hi, is there any way to obtain part persistent id? I'm trying to access other parts from my part and I cannot find any id field that is persistent in VAB, in game, after reload or vessel switch. if ((Time.time - lastUpdate) > logInterval) { foreach (Part _part in this.vessel.Parts) { Debug.Log("vessel name " + _part.vessel.name + " | name " + _part.name + " | ClassID " + _part.ClassID + " | ClassName " + _part.ClassName + " | ConstructID " + _part.ConstructID + " | uid " + _part.uid + " | flightID " + _part.flightID); } lastUpdate = Time.time; Debug.Log("My Module " + this.vessel.Parts.Count); } Code above generates this output: [LOG 00:44:02.865] [FLIGHT GLOBALS]: Switching To Vessel test 3 ---------------------- [LOG 00:44:19.965] vessel name mumech.MJ2.Pod (test 3) | name largeSolarPanel | ClassID 2480147 | ClassName Part | ConstructID largeSolarPanel_4294870102 | uid 4294870098 | flightID 3679346614 [LOG 00:44:19.987] [FLIGHT GLOBALS]: Switching To Vessel test 2 ---------------------- (...) [LOG 00:46:04.011] [FLIGHT GLOBALS]: Switching To Vessel test 3 ---------------------- [LOG 00:46:15.636] vessel name mumech.MJ2.Pod (test 3) | name largeSolarPanel | ClassID 2480147 | ClassName Part | ConstructID largeSolarPanel_4294469078 | uid 4294469074 | flightID 3679346614
  13. Hey, I've got little idea for feature - toolbar could remember which windows user has on each screen and open/close when switching screens. For example: mechjeb node editor and planner is kinda useless outside map view, the same goes for sass in map view.
  14. When I was doing my tests I've added mods in inverse order so conflict SPO + OpenResourceSys occured without b9 and KAS. But yeah, this combination only occured in my case. I would bet on some change in ksp core / unity. Anyway - as MrWizerd noted - your beermoney account number would be usefull, few sessions without SPO reminded mi how much livesaver this little mod is.
  15. But it worked with b9 Probably with all those community originated mods what happens in code is pure *magic* Anyway, thanks to you I'm currently catching class E for using it as space station core. Thanks again!
×
×
  • Create New...