linuxgurugamer Posted July 16, 2017 Share Posted July 16, 2017 (edited) @TheReadPanda asked me to take over the mod, so I've done so. Original thread is here: http://forum.kerbalspaceprogram.com/index.php?/topic/111412-121-trp-hire-formerly-ksi-hiring/& This mod used to be formerly known as KSI-Hiring. So right now it has the following features: You can select the gender of your kerbal hires or make them random (male/female/random) You can select the career of your kerbal. 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. You can set the kerbal Courage Stat (Higher is better!) You can set the kerbal Stupidity Stat (Lower is better!) You can set the kerbal Fearless attribute (On/Off - Game code calls this BadAss) You can hire said kerbals with a hire button. If you are in career mode the various options you pick will change your cost. 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. 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 KIAeach kerbal of that profession that is killed raises costs for that profession type by 10%. Additional traits are now supported 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. New feature: The Community Trait Icons mod is now supported, if installed an icon will be displayed next to the trait. Download Spacedock: https://spacedock.info/mod/777/TRP-Hire Source: https://github.com/linuxgurugamer/PHS License: MIT <---New // Old --> Edited March 23, 2018 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
NomenNescio Posted July 16, 2017 Share Posted July 16, 2017 I downloaded it straight from Spacedock, and now the game is telling me I have version 0.1 installed, and that 0.6.2 is available. I'm kind of at a loss here. Quote Link to comment Share on other sites More sharing options...
TheRagingIrishman Posted July 27, 2017 Share Posted July 27, 2017 Can you add an option to randomize stupidy and courage as well as the fearless attribute? Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted July 27, 2017 Share Posted July 27, 2017 Hmm. This reminds me of something... Is kinda variant of this embedded into another mod, like RP-0 ?? Quote Link to comment Share on other sites More sharing options...
DStaal Posted July 27, 2017 Share Posted July 27, 2017 15 minutes ago, Gordon Dry said: Hmm. This reminds me of something... Is kinda variant of this embedded into another mod, like RP-0 ?? There's a variant embedded in MKS. Quote Link to comment Share on other sites More sharing options...
Lupi Posted October 22, 2017 Share Posted October 22, 2017 Can confirm the mod works fine in 1.3.1 for anyone who's looking to use it Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 22, 2017 Author Share Posted October 22, 2017 3 hours ago, Lupi said: Can confirm the mod works fine in 1.3.1 for anyone who's looking to use it Which version are you using? I recompiled it for 1.3.1 last week Quote Link to comment Share on other sites More sharing options...
Lupi Posted October 23, 2017 Share Posted October 23, 2017 (edited) Oh, there was a recompile? I didn't even get that. I had assumed there wasn't one for whatever reason based on a lack of posts here, so I was just using the version that i last downloaded like.... several months ago? So 0.6.2. Aside from the AVC popup, nothing was actually out of the ordinary. I should probably download that recompile, though lol Edited October 23, 2017 by Lupi Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 23, 2017 Author Share Posted October 23, 2017 49 minutes ago, Lupi said: Oh, there was a recompile? I didn't even get that. I had assumed there wasn't one for whatever reason based on a lack of posts here, so I was just using the version that i last downloaded like.... several months ago? So 0.6.2. Aside from the AVC popup, nothing was actually out of the ordinary. I should probably download that recompile, though lol Well, when AVC tells you it's out of date, did you even think to check to see if it was updated? AVC is a tool, if you don't use it, it won't do anything for you Quote Link to comment Share on other sites More sharing options...
flart Posted October 25, 2017 Share Posted October 25, 2017 (edited) @linuxgurugamer The formula for stock hiring cost is 150n2+12350n (wiki/Astronaut_Complex), so maybe it should be more stock alike? For example, "normal" kerbal (KCourage = 50, KStupidity =50) hiring cost equals to stock, then it go up and down. Something like that: Spoiler private int costMath() { dCheck(); float basecost = _STOCK_ ; // 150*n*n+12350*n float couragecost = basecost * ( KCourage /200.0 - 0.25); // if 0<KCourage<100, -0.25*basecost < couragecost < 0.25*basecost float stupidcost = basecost * (-KStupidity/200.0 + 0.25); float cost = basecost + couragecost + stupidcost; if (KFearless == true) { cost *= 2; } // badass gets x2 if (<gender> != <random>) { cost *= 1.25; } // pay for choosing gender DCost = 1 + (KDead * 0.1f); // don't know what it is. float diffcost = HighLogic.CurrentGame.Parameters.Career.FundsLossMultiplier; // don't know what it is. double currentcost = cost * (KLevel + 1) * DCost * diffcost * KBulki; // Is "KBulki" counter of purchased kerbals? // Maybe some discount for buying many kerbals? return Convert.ToInt32(currentcost); } Edited October 25, 2017 by flart Quote Link to comment Share on other sites More sharing options...
Murdabenne Posted October 25, 2017 Share Posted October 25, 2017 Does this conflict with @RoverDude's adapted/redacted of it for MKS? Or can this be used to expand upin it? Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 25, 2017 Author Share Posted October 25, 2017 17 minutes ago, Murdabenne said: Does this conflict with @RoverDude's adapted/redacted of it for MKS? Or can this be used to expand upin it? I have no idea, you would need to ask him Quote Link to comment Share on other sites More sharing options...
Murdabenne Posted October 25, 2017 Share Posted October 25, 2017 That's why I tagged him Quote Link to comment Share on other sites More sharing options...
DStaal Posted October 25, 2017 Share Posted October 25, 2017 22 minutes ago, Murdabenne said: Does this conflict with @RoverDude's adapted/redacted of it for MKS? Or can this be used to expand upin it? I believe it technically conflicts - but the functionally is the same (aside from the MKS version allowing MKS classes), so you aren't losing anything. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 25, 2017 Author Share Posted October 25, 2017 55 minutes ago, flart said: @linuxgurugamer The formula for stock hiring cost is 150n2+12350n (wiki/Astronaut_Complex), so maybe it should be more stock alike? For example, "normal" kerbal (KCourage = 50, KStupidity =50) hiring cost equal stock hiring, then it go up and down. Something like that private int costMath() { dCheck(); float basecost = <STOCK, 150*n*n+12350*n>; float couragecost = basecost * ( KCourage /200.0 - 0.25); // if 0<KCourage<100, -0.25*basecost < couragecost < 0.25*basecost float stupidcost = basecost * (-KStupidity/200.0 + 0.25); float cost = basecost + couragecost + stupidcost; if (KFearless == true) { cost *= 2; } // badass gets x2 if (<gender> != <random>) { cost *= 1.25; } // pay for choosing gender DCost = 1 + (KDead * 0.1f); // don't know what it is. float diffcost = HighLogic.CurrentGame.Parameters.Career.FundsLossMultiplier; // don't know what it is. double currentcost = cost * (KLevel + 1) * DCost * diffcost * KBulki; // Is "KBulki" counter of purchased kerbals? // Maybe some discount for buying many kerbals? return Convert.ToInt32(currentcost); } The mod as written does a pretty good job of having a reasonable cost to hire. Yes, the base cost is higher, but with what you propose, the 150*n*n+12350*n where n = number of kerbals already hired, makes it very exponentially more expensive to hire more kerbals, which doesn't make sense. The mod eliminates that by establishing a base cost of 25000 to hire, which is more than it costs to hire your first kerbal, but after the second kerbal is hired, the cost just gets unrealistic. I also don't understand what you mean by the entire expression, commas are not part of any mathematical expression that I know of. If you like the stock way, then use stock. This is a well balanced alternative which I did not write, am just maintaining. Why not contact @TheReadPanda and discuss this with him, since he is the original author, and is still around. Quote Link to comment Share on other sites More sharing options...
flart Posted October 25, 2017 Share Posted October 25, 2017 (edited) 34 minutes ago, linuxgurugamer said: base cost is higher, but with what you propose, the 150*n*n+12350*n It's just wiki info, possibly outdated, I talk about stock formula, whatever it is. 34 minutes ago, linuxgurugamer said: commas are not part of any mathematical expression It was just ill-formed pseudo code, edited for clarify (and let's not talk about dark side ) Also (and at least), some config-file for users with these or those values would be helpful And it can be checkboxed, for something like that float basecost; if (is_checkbox_constant) basecost = 25000 ; else basecost = _STOCK_ ; // 150*n*n+12350*n or whatever it is Edited October 25, 2017 by flart Quote Link to comment Share on other sites More sharing options...
flart Posted October 25, 2017 Share Posted October 25, 2017 (edited) @linuxgurugamer Are you forget to add Issues tab to your repo? @TheReadPanda edit: https://github.com/linuxgurugamer/PHS/pull/1 Edited October 26, 2017 by flart Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 25, 2017 Author Share Posted October 25, 2017 50 minutes ago, flart said: @linuxgurugamer Are you forget to add Issues tab to your repo? @TheReadPanda There is proposal (pseudocoded _IS_CHECKBOX_CONSTANT_ and _STOCK_): Reveal hidden contents private int costMath() { dCheck(); // Params for config int const_cost = 25000; float b = 0.5; // bad kerbal cost coef, KStupidity = 100, KCourage = 0 float n = 1; // normal kerbal cost coef, KStupidity = 50, KCourage = 50 float g = 2; // good kerbal cost coef, KStupidity = 0, KCourage = 100 float bulk_discount1 = 0.85; float bulk_discount2 = 0.7; float basecost; if (_IS_CHECKBOX_CONSTANT_) basecost = const_cost ; else basecost = _STOCK_ ; // 150*n*n+12350*n or whatever it is at stock game float kerbal_quality = (100 - KStupidity + KCourage)/200; float cost_coef; if (kerbal_quality < 0.5) // Piecewise linear cost_coef = 2*(n-b)*kerbal_quality + b; else cost_coef = 2*(g-n)*kerbal_quality - g+2*n; float cost = basecost*cost_coef; if (KFearless == true) cost *= 2; // badass gets x2 if (KGender != 2) cost *= 1.25; // pay for not random gender cost *= KLevel + 1; // pay for level DCost = 1 + (KDead * 0.1f); // don't know what it is. float diffcost = HighLogic.CurrentGame.Parameters.Career.FundsLossMultiplier; // don't know what it is. double currentcost = cost * DCost * diffcost * KBulki; if (KBulki >= 5) // discounts for bulk purchases currentcost *= bulk_discount1 else if (KBulki >= 10) currentcost *= bulk_discount2 //TODO: BlackFriday :) return Convert.ToInt32(currentcost); } Issues now there Quote Link to comment Share on other sites More sharing options...
RoverDude Posted October 26, 2017 Share Posted October 26, 2017 To answer... yes, this directly conflicts. Or to put it another way... if you're using MKS, you should not also use this mod as you're going to get a bucket of weirdness. Quote Link to comment Share on other sites More sharing options...
cyberKerb Posted October 26, 2017 Share Posted October 26, 2017 (edited) Sorry I haven't downloaded yet to check, but does this version have the same issues when the Stock GUI is resized? MKS Issue in case you need a screenshot references Edited October 26, 2017 by wile1411 Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 26, 2017 Author Share Posted October 26, 2017 Probably has the same issue Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 27, 2017 Author Share Posted October 27, 2017 New beta release: 0.6.4-beta: Only available by direct download on Github: https://github.com/linuxgurugamer/PHS/releases/tag/0.6.4-beta Following changes submitted by @yalov: checkbox for stock cost system bulk purchase discounts (≥5 kerbals is 15% and 10 kerbals is 30%), BlackMunday discount (day when eclipse occurs), New Year discount; pay x1.25 for choosing gender (male of female), change default gender to random; pay x2 for badass (they pretty unique and should be expensive); low quality kerbal (Stupidity = 100, Courage = 0) gets x0.5, high quality kerbal (Stupidity = 0, Courage = 100) gets x2. Following changes by LGG: Added settings page Settings page includes: KStockCost = false; const_cost = 25000; fearless_coef = 2f; gender_coef = 1.25f; bulk_discount1 = 15f; bulk_discount2 = 30f; black_discount = 10f; new_year_discount = 50f; Removed the Stock Center button and put it into the Settings page Made all new settings fully configurable Added Disable All Modifiers Quote Link to comment Share on other sites More sharing options...
flart Posted October 27, 2017 Share Posted October 27, 2017 42 minutes ago, linuxgurugamer said: Following changes by LGG: Push changes to github Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 27, 2017 Author Share Posted October 27, 2017 18 minutes ago, flart said: Push changes to github Look at the Dev branch Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 27, 2017 Author Share Posted October 27, 2017 I forgot to upload some changes to github, the repo has now been updated Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.