-
Posts
149 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by TheReadPanda
-
[1.2.1] TRP-Hire (formerly KSI Hiring)
TheReadPanda replied to TheReadPanda's topic in KSP1 Mod Releases
<---New // Old --> -
CURRENT VERSION: 0.6.0 Updated as of 10.20.2016 The updated mod is now out of alpha and into beta - but since it actually works and the beta to release is mostly me getting the Mini-AVC, CKAN and layout tweaked a bit, I am releasing it now. The mod can be downloaded here: http://spacedock.info/mod/777/TRP-Hire The source code is here: https://github.com/TheReadPanda/PHS This mod used to be formerly known as KSI-Hiring. It has changed since I used to be OakTree42 and am now TheReadPanda. So right now it has the following features: 1. You can select the gender of your kerbal hires or make them random (male/female/random) 2. You can select the career of your kerbal. 3. You can select a number of kerbals to hire (1 to 10) but this is limited to what you can afford or what the Astronaut complex can hold in career mode. 4. You can set the kerbal Courage Stat (Higher is better!) 5. You can set the kerbal Stupidity Stat (Lower is better!) 6. You can set the kerbal Fearless attribute (On/Off - Game code calls this BadAss) 7. You can hire said kerbals with a hire button. If you are in career mode the various options you pick will change your cost. 8. In career mode you can hire level 0 kerbals without upgrading the complex, level 0&1 if you upgrade it once and 0, 1, and 2 if you have fully upgraded the complex. Note it costs more to hire more experienced kerbals. 9. If you are in career mode each kerbal that is MIA in a profession raises the cost of that profession by 5%. If you are in a mode that results in KIA each kerbal of that profession that is killed raises costs for that profession type by 10%. Note the cost increases are cumulative, so two dead kerbals results in a 20% increase if they were both pilots. If you have a bunch of dead pilots but not a single dead scientist it should not effect the scientist costs. And for now that is it. Thanks to all those who helped me update this to 1.2. It was a bit of a slog but here we are! Special shout out to Drakonite for help on my Twitch channel while we reworked this for 1.2! Note we added functionality for the new 'noExp' mode in career as well! updated as of 10/20/2016
-
Creating a New Kerbal
TheReadPanda replied to TheReadPanda's topic in KSP1 C# Plugin Development Help and Support
For those interested I have some code that works but it is failing to update the crew half of the screen right now: Getting the right 'career' will be tricky as will setting xp level based on career type and flight logs etc. But I shall chug through that. But for now I have to leave and return to get things to show. I suspect this has more to do with the GUI override I'm doing than the hiring code. But I thought I would share this code here as I hadn't seen anything quite like it on the forums yet. -
I have used this code to great effect but have a sort of problem here. My hire system works now, but I have to leave and return to the complex to get the right side to refresh. Is there something here that I could call upon hiring? I tried the game event for onhire but that just seems to deduct cash and not actually do what I want. I thought I had a hiring code issue but when I found it was working by leaving after I checked the save game file... Also this does not seem to over-write the astronaut complex if it is entered via the vab/sph crew option. Is there a way to make that work? Your help has been EXTREMELY helpful and I can not thank you enough for the help you have already given!
-
Creating a New Kerbal
TheReadPanda replied to TheReadPanda's topic in KSP1 C# Plugin Development Help and Support
Okay turns out it /is/ creating the kerbals but the crew roster side of the screen is not updating, which means if I leave the game then return, it is updated.... So now I have to figure out how to refresh that when a kerbal is hired but that seems to be giving me grief now too. Whee. -
Creating a New Kerbal
TheReadPanda replied to TheReadPanda's topic in KSP1 C# Plugin Development Help and Support
I've tried all kinds of variations: ProtoCrewMember newKerb = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal(); The above does not seem to work. I've tried pretty much every permutation I could find by poking the object browser. I have to think I'm missing something simple here... but I am not sure what. Ah, stupid me, yeah, no, that wouldn't work. Trying a few other things now. What I keep thinking I need is something like: ProtoCrewMember newKerb = new (insert type here) But no variation of protocrew member seems to work nor HighLogic.x as the only variations I can get there at that kind of reference is LogEntry and VK. - - - Updated - - - Here is some code I was trying... and failed to get to work: I've also tried such approaches as ProtoCrewMember newKerb = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal(); Or even things like: ProtoCrewMember newKerb = new HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal(); And variations on: Kerbal newKerb = ....... So something here is just... not working. And I am unsure the 'correct' approach to use to instantiate a new kerbal into the system so I can modify the proper attributes. I also tried: Which was the core code I could find in the draft twitch viewers but again, no luck. And yes, I do have the roster set earlier in the code... so that isn't it. *shrugs* Any help here would be greatly appreciated as I am bashing my head against this code wall with little luck so far. -
I am having trouble with basically the last step of my attempt to make a new hiring application. The GUI is pretty much done, as are the logic checks to set things. However I am hitting a brick wall when it comes to the actual 'create a kerbal' code. I have looked at both the code behind Ship Manifest (kerbal roster part) and the code behind Draft Twitch Viewers. Neither seems to be working for me. Long story short I have a method call that goes to make the new kerbal. The method needs to create a valid kerbal, give it a name, set the various fields and then set it so that it shows in the active roster. Now I have almost gotten there a few times in that I had my test for if the roster was full some how say yes even when it was not showing in the roster. Even had it show up in the save file some how, but still not show on the roster. I feel like I am just missing one core step. But as my code is all over the place in all the things I have tried can someone help? I can't find good documentation on this process... Should I be using protokerbal? Kerbal? Classes? If someone could just outline a basic framework for making a new kerbal I am sure I could fill in the rest. Thanks in advance for any help anyone out there can provide!! OakTree42 http://www.twitch.tv/oaktree42/
-
Sorry if I wasn't clear enough! My first attempt on this forum to ask questions about my mod efforts. I want to do 4. I want to take the left hand area where it shows kerbals you can hire and replace it with a hiring API that allows you to hire kerbals based on career, gender, courage, stupidity, fearless attribute and level. I would then have level limited on both the max level of kerbal of that career who is available currently on kerban at minus one to their level. And limited by the level of the building, meaning a hard limit of level 3. It would dynamically display how much said kerbal would cost and when you hit 'hire' it would randomly generate a name for that career type and create the kerbal, deduct the money and put him in your roster. And that's pretty much all of it. So the goal would be to take the left hand side of the AC interface and remove the current window and replace it with one of my own design. -OakTree42 http://www.twitch.tv/oaktree42/ Is this doable? I can handle tedious if it is doable and you can point me in the right direction. Much appreciated for your speedy reply by the way! Thanks!! -
-
I noticed that the GUI for several of the buildings seems to prevent override methods. So I can't re-do part of the astronaut complex for my hiring kerbals mod I am working on. I'm working from the C# angle from the limited documentation from the assembly-CSharp.dll, as best as I can. Perhaps I am not finding the right hook? I can't see much about the astronaut complex at all to be honest. Is there a better place for looking for such information that does not involve trying to decompile things? (edit to clarify this last part). Anyone know if I am missing something? Or if there is any chance that Squad might remove that so that one might use an override method on some of the methods for the sub-buildings? I suspect the answer (From my search so far) is no to at least the first part. I think I will stick with just a button to pull up my new hiring interface but I thought it best to ask here before I gave up entirely on the idea. Thanks in advance for any answers any of you may have, even if it is just to say 'no there isn't a way'. -OakTree42 http://www.twitch.tv/oaktree42/
-
Kerbal Hiring Agency - Engineers Rule?
TheReadPanda replied to TheReadPanda's topic in KSP1 Discussion
I did have one idea, adding a new strategy from the administration building to hire kerbals with rep or make them cheaper with rep/science or something. That seems a bit like a no - brainer? Not sure. And yes but rescuing kerbals leaves you with random career kerbals and so on. Still! I may just need to use mods to make/buy kerbals cheaper. -
Kerbal Hiring Agency - Engineers Rule?
TheReadPanda replied to TheReadPanda's topic in KSP1 Discussion
Yes, if you have remote tech you need a person but you could, from what I understand, put an engineer and a probe core and get the benefit of the kerbal and the piloting skill of the probe? Let me know if this is not a thing but I thought it was? As for science, yeah, you're right, if you turn science into k-bucks then definitely. I hadn't thought of /that/ So yes, scientists are definitely good still. Not /as/ good as engineers, but better than pilots. Ah well, Still open to other questions/answers there. Also if you use remote tech and tac life, you can reduce the entire load on your tac life support by only having the engineer not two kerbals, although it is true the probe core eats electrical current it is likely easier than putting supplies in for another kerbal, plus the costs of the pilot and his supplies? -
So a few questions. Some may know me from my twitch streaming as http://www.twitch.tv/oaktree42 I tend to do a lot of colony building in the past using RoverDude's MKS/OKS system. I am looking at the balancing issues with the 1.0.x pay for kerbals and have a few questions/suggestions? First of all, your first new hire costs about 65k. By the time you have 100 kerbals it will cost you around 3,000,000 (3 mil). And before you say that you will never need that many kerbals please realize I had only gotten 3 celestial bodies colonized in my game and already had 70+ kerbals stationed on moons and space stations. So... If the best probe core costs 3.4k why would you ever hire a pilot past starting game? With engineers helping drill efficiency, once the science tree is done you have no motivation to hire scientists either? So it leads to the 'Only engineers are worth it' in the mid/end game? The idea that hiring one more kerbal would cost more than upgrading a building is a bit problematic. So I think there needs to be things pilots can do that the best probe core can not. I think scientists need some effect on things even after the tree is fully explored? Not sure what on this but these things need to be looked at for end game. So any ideas? Am I missing something? I know scientists can help increase your science gain but in stock I don't see much benefit to pilots once you get the highest probe cores and I don't see much use in scientists once you finish the tech tree? Or is the game basically meant to be 'done' once you get to that point? Anyway, hope to see other folks ideas out there. And if my math is wrong or I'm missing something I would love to know that too! -OakTree42