Jump to content

johnqevil

Members
  • Posts

    126
  • Joined

  • Last visited

Posts posted by johnqevil

  1. Just did a test: on day 60 I fired Bob and hired Mitney and Macmal, then fast-forwarded until pay day.

    Bob got his full pay (1065). Mitney and Macmal weren't in the list. I fast-forwarded again to the next pay period: it was still paying Bob, and not paying Mitney and Macmal.

    So, something's not quite right.

    I think I just figured out what it was, too. Testing now.

    EDIT: Yep, that was it. New version incoming.

  2. Hey Johnqevil, could you check that the master repo on github is, in fact, the 0.1.2 that's supposed to have fixed the payroll issue? I'm pretty new to github, but I may have forked the wrong thing as all of my builds don't seem to calculate the correct "available" payrates and seem to clear loans without making any payments. Thanks.

    Just uploaded 0.1.3, point of fact. Changelog is on Github already, I'm uploading binaries now. I corrected a bunch of calculations and cleaned it up some.

  3. I've got code that checks for what status the crewmember is in when it runs, but it doesn't seem to actually seem to query the status correctly. Relevant code:


    void Update()
    {
    if (crewMember.rosterStatus.Equals(ProtoCrewMember.RosterStatus.Assigned)){
    paycheck = wage * multiplier;
    message.AppendLine(", level" + crewMember.experienceLevel + ", is on mission. Wages paid = " + paycheck);
    Funding.Instance.AddFunds(-paycheck, 0);
    }
    else if (crewMember.rosterStatus.Equals(ProtoCrewMember.RosterStatus.Available))
    {
    paycheck = standbyWage * multiplier;
    message.AppendLine(", level" + crewMember.experienceLevel + ", is available. Wages paid = " + paycheck);
    Funding.Instance.AddFunds(-paycheck, 0);
    }
    }

    Some runs it seems to get stuck on "Assigned", and others it never seems to see that a crewmember is Assigned out.

  4. I got the Jeb's on a mission when he isn't, and double pay bug as well.

    http://i.imgur.com/1dl4BOL.jpg

    And a link to my output log too:

    https://www.dropbox.com/s/tuonoxr1abkw55u/output_log.txt?dl=0

    Excellent, I'll dig in further. Thank you!

    I just sent you a pull request with some updated calculations for compound interest calculations. Unfortunately, my c-sharp IDE is on the fritz just now and I can't check it myself. Use with caution - but you can check out the math, though I'm almost positive c# doesn't like my notation for taking powers (^)... Sorry - will try to fix my stuff Monday.

    Was a bit disconnected this weekend. I've approved this pull now, and I'm going to be doing a rewrite this week to clean up the code and and a few things people have asked about. Since multiple loans seems to be a popular idea, I'll let you guys borrow yourselves into oblivion :D

    Along with a few other things....

  5. Can the mod "see" the status of the various buildings? If so, why not tie the number of current loans you're allowed to have to the level of the admin facility? Level one = 1 loan. Level 2 = 3 loans, and so on. If the building gets destroyed, you're still stuck paying off your existing loans, but can't get any new ones.

    I would take out the option to make additional loan payments: make loans a fixed thing with fixed repayment schedules. That way, you have to plan around them, and taking one out is not an easy decision.

    The plan, ultimately, is to have a compound interest accrued on the loans. So the longer the loan takes to repay, the more funds it takes to pay it off. The current iteration is a flat overall interest applied at the start of it.

    Being able to take out more than one loan at once would enable this scenario: Take out a loan. Take out a MUCH larger loan. Pay off the original loan with the new one.

    I'll actually be implementing a loan cap based on Reputation, kind of like a credit score, so you can't just start off the game with a $50 million dollar loan and take the next 30 years paying it off.

    EDIT: I see that bug now. Working on it.

  6. Given it a test. Loans work nicely, as does the menu. Only allows one loan at a time, though: I assume the ability to have multiple loans at the same time will come later?

    The salaries aren't paying correctly, however: paying 0 for all Kerbals.

    Single loans were implemented as it would be possible to simply stack them before the funding period to never have to pay the loan back. I don't know if multiple loans will get added later, that would depend on whether or not I can come up with a good method for preventing this from getting too cheaty.

    I'll look into the salary issue as soon as I get a chance, that was working on my last test before uploading the release.

  7. EvilCorp Presents Kerbanomics: Kerbal Payroll and Loans

    Pay your Kerbals a fair wage, based on their years of experience!

    Get periodic funding for not murdering your employees!

    Running out of money? Need a boost for that next mission? Take out a payday loan and shoot for the stars*!

    *Variable APR, starting at a low, low 1500% or one kneecap per year.

    Thanks to ObsessedWithKSP ​for the new app launcher icon! And thanks to DivisionByZero for the fantastic APR code!

    Please be aware that this plugin is going through a MAJOR rewrite for 0.2.0, and I am addressing some rather impressive bugs with this rewrite.

    Please submit all bug reports either here or at the GitHub repo.

    Current version: 0.1.8

    Screenshot:

    2xIogDi.png

    DOWNLOAD: https://github.com/johnqevil/Kerbanomics/releases

    MIRROR: https://kerbalstuff.com/mod/427/Kerbanomics

    Also available on ckan.

    SOURCE: https://github.com/johnqevil/Kerbanomics

    License: http://www.gnu.org/licenses/gpl.txt

    Changelog:

    0.1.8
    -Fixed bug where changing the scene caused another period to increment.
    -Fixed bug where the loaned amount and payment were zeroing out at the
    end of a period.

    0.1.7

    -Corrected additional bug in custom intervals. They will now save immediately when you hit "Save" in the Settings menu.
    -Merged APR code from DivisionByZero's branch.

    0.1.6

    -Resolved issue with custom interval data not saving/loading

    0.1.5

    -Persistent data now saves at the same time the system is saved. This was to resolve an issue where the game froze or crashed shortly after financials were processed but before the game saved.
    -Custom intervals! you may now specify your own period in Kerbin days from 1-9999. All values are calculated accordingly.
    -Autopay is now working! You can specify the percentage of how much of your available Funds can be paid out automatically.
    -Loans are now NOT paid automatically. They are also not figured into the Autopay system, they must be paid manually. This is to make way for upcoming changes in 0.2.0.


    0.1.4

    -Fixed error with reading Kerbal status
    -Added back standby pay when Kerbals are not on mission (we dug up some dirt on the Brothers, they backed down during negotiations)
    -Fixed floating point notation problem with large numbers in persistent
    data

    0.1.3 - Subprime Loan Edition

    You may now take out as many loans as your little heart desires! The Kerbals were also threatening to let Jeb try to attach boosters to the VAB if we didn't give them full salary and benefits year round, so now Kerbals are paid their full salary regardless of mission status.

    -Added yearly interval back to settings menu
    -Removed "Standby" pay due to a bug in the engine preventing Kerbal status from updating correctly
    -Removed the "Loan Deny" menu, added logic to compound multiple loans
    -Added option to make a payment to the loan balance outside of the payment interval
    0.1.2 Bugfix

    -Fixed GUI issue with Settings menu
    -Changed out icon for one provided by ObsessedWithKSP
    v0.1.1 Bugfix
    -Corrected issue with wage processing
    -Corrected issue with additional funds being set to 0
    -Removed "yearly" option as the interval is not triggering properly. Will re-add this when I get the calculation sorted out.

    v0.1.0 RELEASE
    -Added loans with interest and repayment plans
    -Added configurable settings
    -Added persistence. Settings and loan data will save to your save folder, so other saves are untouched
    -Added option to bill yearly or quarterly
    -Added option to disable funds processing

    v0.0.3
    -Fixed toolbar icon, added additional logging.

    v0.0.2:
    -Fixed bug where the additional funds were being processed as part of the loop handling staff wages, so way more funds were being added than expected.

    v0.0.1:
    -All finances are calculated every quarter, or 106.5 days.
    -Kerbals are paid based on their level and status at the time of pay.
    -When finances are calculated, funding is added to the available funds based on reputation. The max additional funding is 1,000,000; the minimum is 10000.

    Known Issues:


    Right now, nothing. Let me know if you find something!

  8. I'm getting an unexpected result when attempting to locate the save folder within the plugin. There's only one line that pulls it, and I consistently return the folder name "DestructibleTest" instead of the actual folder name loaded. My code to return the full path:

    private static readonly String save_folder = GetRootPath() + "/saves/" + HighLogic.SaveFolder + "/";

    EDIT: Yeah, I'm an idiot. I was getting the whole string set up before the game was even loaded. Moved it to Start() and it's working fine now.

  9. It certainly looks to be on the right track! It might be showing the button, but with a white icon on a white background (I get a white square up at the top right).

    The mission/standby seems to be trapping Jeb in permanent mission status even after he's come back from the mission. But if that's not part of what you've done yet, then okay! :D

    Can you run it again? Had a thought, I think you leveled Jeb up when you were, which would give him a raise. The log should show the level next to his name.

    I can't replicate it on my machine here.

  10. I've given the mod a test. My results: The button doesn't appear to show up: there is a white square, but it doesn't do anything when clicked.

    If I fast forward past the 106.5 days mark, I get a notification: Payroll is processed. Current staff, Jeb, Bill, Bob, wages paid 532.5 for each. Received funding -2500. My funds have changed to 25902 (starting from 25000), so that's working correctly!

    I then gave myself infinite fuel, sent Jeb on a jaunt to get him up to level 1, and fast forwarded again to the next notification: Bill and Bob still cost 532.5, but now Jeb cost 1065 in wages. However, it stated Jeb was on a mission (he wasn't at the time), so I think it might be doubling all of his wages because he went on a mission in that quarter. It's also not changing him back to available in the subsequent quarter after fast forwarding again.

    It looks to me that the base mechanic is working. Amazing work so far!

    EDIT: This was with all other mods stripped out, so otherwise stock.

    Ok, I can start debugging those later tonight when I'm at a point I can launch it. I wondered about the button, I don't think that code is correct. That's the only part I didn't rewrite from scratch. It doesn't really do anything, but it should at least show the icon.

    Looks like the code for mission/standby is correct, I'll check that out. That actually IS the goal, so if it's working then GREAT!

  11. THIS IS NOW RELEASED! GO GET IT!

    http://forum.kerbalspaceprogram.com/threads/104000-EvilCorp-Kerbanomics-v0-1-0-Kerbal-Payroll-and-Loans%21

    EvilCorp Presents Kerbanomics: Kerbal Payroll and Loans

    Pay your Kerbals a fair wage, based on their years of experience!

    Get periodic funding for not murdering your employees!

    Running out of money? Need a boost for that next mission? Take out a payday loan and shoot for the stars*!

    *Variable APR, starting at a low, low 1500% or one kneecap per year.

    Roadmap:

    -Periodic billing for wages based on Kerbal level and mission status

    -Periodic funding, based on reputation with bonuses for completed missions

    -Life Insurance payouts to the families of brutally murdered Kerbals

    -Loans, with regular payout schedules and payoff options

    FIRST RELEASE IS READY!

    ...sortof. WARNING: This is untested as I am not in a location I can run it. This could ENTIRELY break your save, so PLEASE use this on a save that does not matter.

    This is currently built as a fork of Kerbal Economy Enhancements as I'm still using the button that one was using. As such, we're using the GPLv3 license.

    DOWNLOAD: https://github.com/johnqevil/Kerbanomics/releases

    SOURCE: https://github.com/johnqevil/Kerbanomics

    License: http://www.gnu.org/licenses/gpl.txt

    Changelog:

    v0.0.3

    -Fixed toolbar icon, added additional logging.

    v0.0.2:

    -Fixed bug where the additional funds were being processed as part of the loop handling staff wages, so way more funds were being added than expected.

    v0.0.1:

    -All finances are calculated every quarter, or 106.5 days.

    -Kerbals are paid based on their level and status at the time of pay.

    -When finances are calculated, funding is added to the available funds based on reputation. The max additional funding is 1,000,000; the minimum is 10000.

  12. Okay. I have COMPLAINTS INCOMING:

    First: This is incompatible with Career because of PFCE.

    Second: PFCE is outdated junk, you should really use PFREV (my mod) and just modify the Kopernicus system.cfg to add Corbo and Dolas, once RSS is updated.

    Third: Did you ask the creators of these mods before just scooping them up just because their licenses permit it?

    Finally, why does everyone worship an outdated RAM-gobbler and not my wonderful replacement?

    Oh, let's look at that: "Requires RealSolarSystem." Nope, I'm out. Did not care for that one at all.

    Shouldn't be hijacking other people's threads to shill your own.

  13. Well, almost orbit. If I start the game and load my save, the first craft I launch from KSC goes directly to 42km with a 0 m/s velocity. This includes the launch clamps.

    Mod List:

    Blizzy's Toolbar

    ActiveTextureManagement - Basic

    Baha's Engines

    CIT

    CommunityResourcePack

    CommunityTechTree

    CrewFiles

    DangIt

    Deadly Reentry

    Action Groups Extended

    Distant Object Enhancement

    Editor Extensions

    Extraplanetary Launchpads

    Ferram Aerospace Research

    Final Frontier

    FinePrint

    Firespitter (no parts)

    Hex Cans

    Raster Prop Mon

    KAS

    KerbalAlarmClock

    Kerbal Joint Reinforcement

    Kethane

    KSPLua

    MapResourceOverlay

    MechJeb2

    ModuleManager

    ORSX

    PartCatalog

    ProceduralFairings

    QuantumStrutsContinued

    Regolith

    RemoteTech

    ResearchThemAll

    SCANsat

    ShipManifest

    StarSystems

    TechManager

    TextureReplacer

    TAC Life Support

    Transfer Window Planner

    TweakScale

    MKS/OKS

  14. This seems useful but I have a question. When a Kerbal sits in the seat is its mass added at the seat's CoM?

    Yep, it is. Works just as if a Kerbal were sitting.

    - - - Updated - - -

    I just tested it a bit and have a strange issue: Every time I load the craft (in use), one amount of dummy gets subtracted, i.e. starting I have 0 dummy, when I switch to another vessel and then back I have -1, then -2 etc.

    Also, when "empyting" the command seat before start, one amount of dummy is still subtracted, so I start with -1. It is probably a bug or some lapse in the code. At this point I would like to ask what you people use for making .dlls. I have some ideas myself, too.

    Edit: Sorry, missed the "Source" link. I think you have a loop in your subtraction.

    That's likely. I'll take a look at it later tonight. EDIT: I use Visual Studio 2013, seems to work fine.

    EDIT: Update now. See OP.

  15. Yep. OnSave it would create a node for each dynamic module and call each dynamic module's OnSave on those nodes; OnLoad it would recreate the modules (if they don't exist) and call their onloads on the nodes.

    What about having a new module that references these, and having an enable/disable option? Then all of the possible modules would be loaded but not active, depending on selection.

    I have no idea though, just a thought.

  16. So I closed all of the most useless and CPU-hungry programs in task manager, but I didn't notice any effect. Is there anything else I can do? And if not, are there any good CPUs out there that run KSP well?

    As a rule, Intel does far better than AMD. My wife's computer has an A8-6600K @ 4.1 GHz, and my e8600 @ 3.33GHz outstrips hers easily. That A8-5500 is listed at 3.2, maybe pushing up to an FX series near the 4GHz mark will help. I will warn you: multiple cores make no difference for this game. My E8600 is only a dual.

  17. That's a good idea, but why does it need a plugin? Something to do with the off center fuel mass?

    Something to dump the Crash Dummy resource when loading to the pad, so the weight calculation remains accurate when you put a Kerbal into it.

    - - - Updated - - -

    I thought kerbals were weightless, and the weight of the capsule was its weight regardless of how many kerbals you had onboard

    This ONLY applies to the Command Seat which adds a small amount of weight with a Kerbal seated.

×
×
  • Create New...