-
Posts
1,780 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by malkuth
-
Mission Controller 2 Preview 2 Is Available. Change Log. 1. Added 3 new Parts and new Models thanks to Hellfire. RepairPanel, Orbital Scanner, and Lander Scanner. 2. Added 3 new Contracts. Repair, Orbital Scan, and Lander. 3. Adjusted the existing Satellite Contracts and added part requirements. 4. Fixed an issue where the contracts would not show up after being done. 5. Bunch of bug fixes. And maybe Bug Additions. Please Read Important. For some reason during my testing I noticed that randomly Some Completed contracts in your Archives would be erased. I think I figured out why it does this. If you have a current active Contract and install a new version of contract that has some major changes, the Achieves freak out and get cleared out. So be warned try to finish any MCE contracts you have active NOW before installing new versions. And BACKUP your SAVE FILE for KSP. wanted to add some more contracts guys, but bug squashing and finishing up the new contracts took up most my time. I will add more as I go. Preview 3 Will be soon, and will drop the existing save to config file and add saves to your persistent file. And I will add the new Civilian Module. More on this later.
-
I have pretty much converted about 60% of the Goals from Mission Controller to the new contract system. Its not hard just time consuming. And its actually a lot easier because I don't have to write all the fluff for how it all comes together.. Just the goals and the actual contracts. Had some issues with Contract spamming, and availability but have conquered that as of today. It should all be good. Should have next release by wed or thursday. As of tonight I have 5 new contracts.. 3 of them are repair, orbital research, and Lander Research (formally rover research). Everything is pretty solid. Going to see if I can fit in some more contract types tomorrow. And my idea for the new Civilian Module is going to be cool I think. Hint Hint.. And as for FinePrint, I have to tell you. Its very well written, and seems pretty solid. his weigh-point system is fantastic. I will be using it along side MCE on my next play session when I actually start playing a full game of .24.
-
Dang never thought of that. Good idea. Preview 2 will be coming out wed, or thursday and the contracts have been expanded a great deal. But have not done much more to sat contracts yet. They have been expanded a little bit. Ill have more info on wed. I was thinking of adding a random sciencepart to satellites the contract requires. See if I can get it working before preview 2 release. But having a module for Satellites, something simple like Connect to network or something would be pretty cool.
-
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
Dam, wish I would of know this before I made my own multipliers for the planets. -
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
Edit Mistake I made a error in stating that public int totalContracts = ContractSystem.Instance.GetCurrentContracts<OrbitalScanContract>().Count(); counts Completed missions. this is not the case and I have updated the post with the correct info. The problem was the combined issues making it seem that was the case. ------------------------------------------------- Ok, the info above I pretty much figured out whats going on. Still have a little work on finding some things out but here goes. When you finish a mission KSp saves it to your persistent file. And then adds your completed mission as part of the Archives. All well and good. The problem is that if you want a repeating mission KSP looks at the archives and the GetHashString(). If the GetHashString() match it will skip generation of that Contract again. So this part of code is what is recorded into the persistent file. protected override string GetHashString() { return "Conduct Orbital Research around kerbin" ; } this is title of the contract which is fine. The problem is that once finished this title will be recorded and since the title never really changes you can never get this Contract again. You could go like this. protected override string GetHashString() { return return "Conduct Orbital Research around kerbin" + " - Total Done: " + TotalFinished; } again this is more dynamic. If the bodytype is kerbin for first contract and is finished. Then Duna for 2nd time contract. The 2nd contract will show up. But the kerbin one will never show again (its already done in case its generated again as kerbin). So in a nutshell if you want repeating missions on kerbin this is still a problem. Be back to this in a little bit. 2nd problem that annoys me about contracts, is the amount of Same Contract spam you get that are offered. To many of same contracts is bad because the player can select all of them and do them at same time with same vessel (unless you code around it) Using this to control how many contracts you have at 1 time works.. public int totalContracts = ContractSystem.Instance.GetCurrentContracts<OrbitalScanContract>().Count(); if you get the count, then you can do a check against that count and cancel generation of contract if it fails. Like below. Snippet of code public int totalContracts; public int TotalFinished; protected override bool Generate() { totalContracts = ContractSystem.Instance.GetCurrentContracts<DeliverSatellite>().Count(); TotalFinished = ContractSystem.Instance.GetCompletedContracts<DeliverSatellite>().Count(); Debug.Log("Satellite Delivery Totalcontracts " + totalContracts + " - " + " Total Finsihed " + TotalFinished); if (totalContracts >= 1) { Debug.Log("contract is generated right now terminating Normal Satellite Mission"); Debug.Log("count is " + totalContracts); return false; } //Place Rest of code. } I use totalcontracts for the actual check. And I use TotalFinished for this next part. You don't need totalFinished, unless you want an easy way to change titles. Now to the title. Again you can come up with your own little thing if you wish but simply adding this to a title will change it everytime if you want Repeated Missions. protected override string GetHashString() { return "Conduct Orbital Research around. " + targetBody.theName + ": " + TotalFinished ; } so HashString will look like this in case of targeBody is kerbin. Conduct Orbital Research Around Kerbin: 1 I'm using the TotalFinsished float to change the title by how many of the same titles are completed. More testing is needed but seems to be working now. Hope this helps. -
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
After working some more with these. And developing more contracts I have come to conclusion that GetCurrentContracts is actaully all contracts including Archived or finished ones. This means this contract can only ever be done once while the Archives contain the finished contract not what I want. Which brings us back to the original problem that too much contract spam and allows the player to spam contracts of same type with same vessel. Not a good situation. I tried this.Root.ContractState == Contract.State.Active which is the same as GetCurrentActiveContracts. But if your doing a simple check like in Generate() if (this.Root.ContractState == Contract.State.Active) { Debug.Log("contract is generated right now terminating Deliver Satellite"); return false; } this won't stop contract spam because its looking only for active contracts (or accepted) there is a contract.State.Offered but does not seem to work. Must be a way to do it, because the default contracts don't get spammed. I will keep trying to figure it out, and might just have to accept that contract spam is going to happen and player is going to be able to cheat it. Edit Update : Found a way around this. But I just realized something. Seems anything that is in Archives as finished doesn't show up again. Is there a cool down on contracts when they are finished? Or after finished are they never able to be done again. I never noticed this before lol. -
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
Something noticed wonder if anyone else noticed. While testing contracts I have noticed that if you have a contract and working in it. All older versions that are stored in missioncontrol completed contracts get wiped if you change the contracts or add to them. -
Those nodes are actually stock. They were added by devs for future mods could use them. Only issue would be if mod rearranged them.
-
With the original MCE you had a readout that told you what your orbital time was. But now you need a program like mechjeb or my favorite Engineer that tells you what your orbital time. The mission is set up to put you into a GyoSync orbit. Two ways to get to GyoSync orbit one is to go to the max and min distantance it requires for Kerbin to get to it. Or in the orbital period case go to 6 hours. What I do with Engineer is launch and bring my ApA high enough were my readout of Orbital period reads about 3 hours. Then When I Circle the orbit at ApA I finalize the Orbital period until it gets to 6 hours. Other than that you will need to do math and figure out that way. Oh and the instant you get into the parameters set in this case between 5 hours 58 min and 6 hours 1 mins. Your mission is complete.
-
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
That is made from scratch and is part of DockingParameter Code. Thats the part that decides if you are docked or not and uses the OnPartCouble Event to trigger the check. To write a contract you need the contract and the Parameter. Contract is the actual contract that you see in game. The Parameter is where your code is to see if the contract is complete or not. So in this case we want to check for a docking event. and that is what dockingParameter does. -
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
Yeah I figured something else out, but will try this method also. Edit yeah that works much better less code. -
patch 1B Released. 1. Fixed The Toolbar Disappear issue. 2. Fixed the contract spam issue now you will only get 1 contract of each type. 3. Added new contract Satellite mission of Deliver sat to orbital period of 6 hours. 4. Both contracts now have Random Inclination objectives. And the objective themselves is random, some contracts will have inclination and others will not. thanks everyone have good weekend.
-
Contract Modding Information for Mod Authors
malkuth replied to MrHappyFace's topic in KSP1 Mod Development
All I have used it for is for a technology check for when the contract is available. Did not use any dubug code for it though.