DarthPointer

[1.8.x 1.9.x] PayToPlay - Maintenance Costs Money

Recommended Posts

Posted (edited)

Pay to Play

67lTsEP.png?1

(or get ready for the consequences)

Download from Github or via CKAN

 

Tested on KSP 1.8.1 and 1.9.0

Dependency - Module Manager

Recommendation - KCT

Compatible with:

Kerbalism (kerbalism's engine reliability is removed)

Procedural Parts (SRBs)

EngineIgnitor (ignitions number is handled by P2P)

Licence - MIT

 

What is this?

This is a brand new mod to make you pay for reusing vehicles above just refueling them. Had a ride on your "Falcon" or SSTO? - Pay for the maintenance or the next flight will likely have a bad outcome. The changing cost of the engines also causes maintenance take time in case of using KCT - what a nice interaction.

 

The gameplay

1. Add an engine provided with an EngineDecay MODULE to your craft

2. Choose rated burn duration and number of ignitions (if the engine needs them)

3. Start the flight

4. Your engines stop working if they fail or run out of ignitions. There is a 1% chance that the engine fails before it has been burnt for the "rated time". For more detail see a .docx in GameData/PayToPlay folder

5. Recover the craft. If you do not have KCT/use normal recovery, you get less recovery funds for the time the engines have been running

6. KCT recovery only! Press "maintenance" button while editing the craft to have your engine repaired (changing ignitions number or rated duration will make the engine repaired too)

 

Features

Engines fail if they run for too long

Engines have limited ignitions (Engine Ignitior integration is to be done)

"Rated burn time" and number of ignitions can be configured while editing a vessel

These tweaks increase engine's cost and mass

Ignitions have a 0.05% chance to be wasted and a 0.05% chance to cause a failure

5% of failures cause engine destruction

Recovered engines improve "reliability", reducing early failure chance

It makes sense to have 4-6 burn tests before using a recently developed engine

Some sort of engine stats configuration

 

Yet a bit of words

The mod is extremelly new (started on Apr 20, 2020). Get ready to report bugs and suggest features. Only stock (non-DLC) engines and procedural SRBs (Procedural Parts) are provided with configs. Use your brain and hands to write copypaste the configs for all the other engines. Examples can be found in GameData/PayToPlay/Support/Stock.

A lot of thanks to kerbalism's contributors as their open source has been the documentation for me!

Mod logo by @Avira

 

Changelog

v1.2.3

Added:

Applied a fix for .version

Added a .pdf copy of "thoughts"

v1.2.2

Added:

Modulekiller for Kerbalism support is disabled (renamed the file) as Kerbalism 3.8+ does all the stuff we need. Rename it into .cfg to use with Kerbalism 3.7-

v1.2.1

Added:

EngineIgnitor support patch removing its ignition limits

Symmetry Maintenance button (runs maintenance for the whole "symmetry group")

v1.2.0

Added:

Support for procedural SRBs (Procedural Parts)

Settings when starting a new game

v1.1.0

Added:

Special behavior for engines with no failures while burning. See wiki or configs

Subtracting resources cost (for engines with resources)

It means SRBs have a proper support, I have added configs for them (no reliability progress though)

v1.0.0

Added:

New failure time generation

Reliability progress

Random failures on ignitions and ignition failures

Random engine explosions on failures

Fixed:

Failed engine was restartable via staging

Edited by DarthPointer

Share this post


Link to post
Share on other sites
Posted (edited)

I have encountered a small QoL issue connected with KCT recovery.

The mod disables staging for a failed engine in order to prevent an exploit restarting it via staging. This also removes the engine's indicator from staging sequence (for me it is a side effect). Repairing the engine reenables staging, but its icon does not appear in the staging sequence until you reload the editor scene or rollout and launch. Any ideas how to fix it?

Edited by DarthPointer

Share this post


Link to post
Share on other sites

You have to tell the editor to recalculate the staging  take a look at the SOS mod for some code

Share this post


Link to post
Share on other sites

I could not make any sense of the stuff in Staging.cs. Calling

SortIcons.Invoke(stageManager, new object[] { true, part, false });

(repaced SortIcons and stageManager with what they represent) twice does not work.

The next one causes NRE.

stageManager.HoldIcon(part.stackIcon.StageIcon);

 

I have not tried pasting the whole file. I don't wish this turn itno traversing through the whole vessel.

Share this post


Link to post
Share on other sites
Posted (edited)

Now I'd like to introduce an integration with Engine Ignitor. I have found out that @linuxgurugamer is the maintainer of Engine Ignitor. The mods have "a bit of interference" thus I'm asking him for some advice. The main question is "How should things work in an installation with both EI and P2P?".

Edited by DarthPointer

Share this post


Link to post
Share on other sites
5 hours ago, DarthPointer said:

Now I'd like to introduce an integration with Engine Ignitor. I have found out that @linuxgurugamer is the maintainer of Engine Ignitor. The mods have "a bit of interference" thus I'm asking him for some advice. The main question is "How should things work in an installation with both EI and P2P?".

Not sure what you want to do, please elaborate

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, linuxgurugamer said:

Not sure what you want to do, please elaborate

On the one hand, EI has a deeper ignition management. On the other one, P2P has random ignition failures. I'd like them work at the same time in a proper way.

.... And it seems I know the solution. I'm going to add a special treatment for "ignition using" engines in case EI is present with help of a small MM patch. It will let EI work in the usual way.

Now it is time for my apologies. It looks like there was no need in asking for your help :)

 

Edited by DarthPointer

Share this post


Link to post
Share on other sites
24 minutes ago, DarthPointer said:

On the one hand, EI has a deeper ignition management. On the other one, P2P has random ignition failures. I'd like them work at the same time in a proper way.

.... And it seems I know the solution. I'm going to add a special treatment for "ignition using" engines in case EI is present with help of a small MM patch. It will let EI work in the usual way.

Now it is time for my apologies. It looks like there was no need in asking for your help :)

 

Not a problem.  There is a famous discussion about this, it's called Talking To The Bear, you can read about it here:

http://wiki.greptilian.com/programming/talking-to-the-bear/

In short, explaining your problem to someone else will oftentimes let you figure out the answer.

Share this post


Link to post
Share on other sites
Posted (edited)

I have finally introduced a kind of EngineIgnitor support. EI is made to keep hands away from ignitions number management. It is not a perfect solution, some EI features are canceled. But I have plans for a better implementation of maintaining the engines during the missions.
Let it be so "for a while", it won't be left in such a state forever. At least I hooe so.

Edited by DarthPointer

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.