Jump to content

[1.8.x 1.9.x 1.10.x, 1.11.x] PayToPlay - Maintenance Costs Money


DarthPointer

Recommended Posts

Pay to Play

67lTsEP.png?1

(or get ready for the consequences)

Download from Github or via CKAN

 

Tested on KSP 1.8.1, 1.9.1, 1.10.1 and 1.11.1

Dependency - Module Manager

HARD RECOMMENDATION FOR KSP 1.11+ - KSP Recall

Recommendation - KCT 1.4.8.0+ (14 Jul 2020)

Compatible with:

Kerbalism (kerbalism's engine reliability is removed)

Procedural Parts (SRBs)

EngineIgnitor (ignitions number is handled by P2P)

ReStock+, SETI-Rebalance and SETI-ProbeParts (configs for engines, including proc. HRB), Bluedog DB, Tantares/LV, Knes, Coatl.

 

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 no recovery funds for the the engines that have been running (cmon, use KCT xD)

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

7. You get NO refunds for used engines since 1.4.0. Why?

 

Features

Engines fail if they run for too long

Engines have limited ignitions

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

These tweaks increase engine's cost and mass

Ignitions have configurable chances to be wasted and to cause a failure

Configurable chanse of engine destruction on failure

Speical treatment for SRBs (failures only on ignitions), see how to turn it on [here](https://github.com/DarthPointer/PayToPlay/wiki/What-do-those-numbers-in-the-configs-mean%3F#srbs-and-other-engines-with-no-failures-while-burning) or provided configs

Ignition failure, failure on ignition and destruction on failure probability depend on reliability progress

Procedural S/HRBs have separate reliability progress for "models". In order to gain usage experience on further recovery, press "Set as a New Model" button (if it is present)

Configurable thrust and diameter margins for procedural S/HRB "models"

Recovered engines improve "reliability", reducing early failure chance

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

Configurable oncoming failure warnings and switchable autoshutdown on warning

Replace-or-Maintenance system

Some sort of engine stats configuration

Sibling Reliability Progress

 

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, MH, SETI engines and ProceduralParts SRBs 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

 

Latest Version Changes

v1.5.6.4

Fixed:

  • Excessive optimization was causing bugs and NREs when placing symmetrized engine parts.
 

Previous Versions Changelog

Spoiler

v1.5.6.3

Added:

  • Rolling out an engine with 0 ingitions left (used before, fixed failure but did not refill ignitions) now (almost) instantly triggers "Out of ignitions" state.
  • Moved EngineDecay PartModule logics to Update ticks to improve performance (I can't tell if it was a problem but better I do it now).

Fixed:

  • Rolling out a burnt engine with refreshed ingitions could (almost) instantly cause a failure without starting it.
  • Multimode engines used to get both modes' modules activated for new parts and after reenabling engines.
  • Engine part startup and reenabling opertations now should be valid for both multimodule in single mode and multimoded with MultiModeEngine module.
  • Misconfiguration warning now is not thrown for multimoduled singlemoded engines.

v1.5.6.2

Fixed:

  • Logspam after engine reaching warning time not in simulation.
  • Finally built binaries in Release mode.

v1.5.6.1

Added:

  • Support for KSP 1.11 new TwinBoar

v1.5.6.0

Added:

  • Coatl Aerospace support config.
  • Knes support config.
  • Tantares/LV support configs.
  • Reworked Sibling Reliability graph configging.
  • Sibling Reliability for Bluedog DB, Tantares/LV.
  • Failures are disabled during KRASH simulations

v1.5.5.0

Added:

  • Sibling reliability, supporting it in Stock and ReStockPlus.
  • ignitionIssuesChanceScale field to make some engines more reliable on ignition (provided config makes ignition issues chance 10 times less for SRBs).
  • EngineDecay module can be configed to use specific engineModelId instead of part's name.
  • Bluedog DB support config.

Fixed:

  • NRE when first opening gamesave first time with the mod.

v.1.5.4.5

Fixed:
Replacment happenning on KCT re-rollout when it shoild not occur.
Wrong strings in flameout reason.

v1.5.4.4

Added:
subjectToProgress flag to configs, setting it to false turns reliability progress off for parts, removing need to test them.
Set the new sTP = false for nuclear, ion and SRBs.
Tweaked reduced maintenance and ignition restore costs by 5 times.

Note:
For engines with no ignition limits "replace: 0" button appears for newly added parts. Not fixed yet, no problems detected too.

v1.5.4.3

Added:
Button for reenabling failed engines without full maintenance (consumes reliability).
Maintenance reliability consumption doubled for failed engines.

v1.5.4.2

Added:
Config for ReStock+.

Fixed:
Entering KCT-edit mode and saving changes could decrease parts sreliability for "no reason".
Issues with autoreplacing.

v1.5.4.1

Added:
Failed engines get a random configurable extra maintenance cost. Default configs set max random cost to 10% of "full" cost, random costs are not less than 1/2 of configured maximum.

Fixed:
NREs when editing symmetries.
New Mainsail and Skipper were not patched.

v1.5.4.0

Added:
Ignition Restore buttons that let you restore ignitions without having full maintenance/replacement.
Ignitions cost money now (relevant for new Ign. Restore buttons and maintenance as now maintenance costs as earlier + ign. resotre).
Maintenance cost is now not limited with replace cost and can exceed it making maintenance almost useless in certain cases.
Nerfed Stage1 engines category to 100s of topBaseRatedTime.

Fixed:
Reenabled vessel change calls when target part costs changed. In 1.5.3.1 cost changes could only be visible after any other change to the vessel.
Possibility to clone used null-priced engines. Now copied engines should be treated as "new".

Note:
A way I store a state of engine has changed: nominal bool flag is replaced with issueCode int. I've added an OnLoad(ConfigNode) code to properly load status from the bool to the int (for nominal = false there are two different codes). Some testing is done, no issues found yet. Still I'm warning you there is a slight chance that pre-1.5.4.0 P2P saves with any vessels in flight or in KCT building/storage may need manual fixing.

v1.5.3.1

Fixed:
Too large step for ignition issues sliders.

v1.5.3

Fixed:
Vessels that have been rolled out via KCT had their engines stats reset to "a new up-to-date" state on EVERY flight scene (re)load.

v1.5.2

Added:
Automatic reliability progress update for rolled out engines if replace cost is 0 (no need to KCT-edit vessesl using engines that got reliability upped).

Fixed:
Replaced OnVesselChanged calls for updating the PAW.

v1.5.1

Added:
Random startig reliability bonus (configurable)
Hiding burn time for engines with no usage experience recovered yet (switchable)
Random strings instead of "failed" status (switchable)
Automatic model reliability update if vessel is not KCT-built or replacement is free. (Needs KCT 1.4.7.14+)
Uptweaked usage experience generation for engines without burntime failures (SRBs)
Separate PAW group for buttons
Extra logging switchable

Fixed:
Some misbehaviour with procedural SRB's
Autoshutdown on warning button should be removed properly now

Handling of burn time visibility for P2P 1.4 saves
Switching of burn time hiding did not reveal it for "existing" parts

v1.4.3

Fixed:

Random failure time miscalculation (mostly affected low reliability models)

v1.4.2

Added:

Random warnings about oncoming failure (toggled in settings, chances and deviation from failure depend on reliability progress and settings). Warning sets part highlighted in yellow.Autoshutdown for warings (toggled per part)

v1.4.1

Added:

Funny random reliability status strings (stored in GameData/PayToPlay/Data/ReliabilityStatuses/*.txt, you can change the strings)                                                                                                                                                                                                                                 Better ignition issues chances model

v1.4.0

Added:

Replace-or-Maintenance system

Fixed:

Ignition failure chances being too low at low reliability

v1.3.1

Fixed:

Description of some of the settings

v1.3.0

Added:

Reliablility progress for procedural S/HRB with separate "models"

Settings tweaking is now available in savegames

Ingame tweaking of ignition failures

Ignition failures now depend on reliability progress 

Config for SETI-Rebalance HRB and Procedural HRB

Config for SETI-ProbeParts 

Config for Making History 

Time displaying format switching

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
Forgot to update supported part packs back in time when config coverage got increased
Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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

Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...

A small notice for moderators and other ppl reading the thread: the mod is not abandoned. I'll try to be back next week. Then I have exams, the last one is on 1st July.

Thus there is no reason to close the thread or start thinking about adoption till 5 July.

Edited by DarthPointer
Link to comment
Share on other sites

Alarm! It has been reported that kerbalism 3.8-3.9 does NOT patches in a proper way with EngineIgnitor. I have checked it, it seems to be so with PayToPlay too. As of current P2P "my side" compatibility patch is disabled. Rename GameData/PayToPlay/Kerbalism/[the .txt] into a .cfg file. Or change AFTER[Kerbalism] into AFTER[KerbalismDefault] in relevant files of KerbalismConfig/Support.

Upd: Everything is OK with KerbalismConfig 3.8+, don't pay any attention.

Edited by DarthPointer
Link to comment
Share on other sites

PayToPlay version 1.3.0 is out! Download it here or wait for CKAN to update its database.

 

## Added:
- Reliablility progress for procedural S/HRB with separate "models"
- Settings tweaking is now available in savegames
- Ingame tweaking of ignition failures
- Ignition failures now depend on reliability progress
- Config for SETI-Rebalance HRB and Procedural HRB
- Config for SETI-ProbeParts
- Config for Making History
- Time displaying format switching

Link to comment
Share on other sites

Version 1.4.0 is going to be about engine degradation. Each reuse'n'repair cycle will decrease reliability and increase further maintenance expenses. At some point, replacing the engine should get the only acceptable option (maintenance will cost more or reliabillity will get insufficient). Such a mechanic will make KCT an "almost dependency". Unfortunatelly, KCT does not let the player merge two built crafts into one, making the degradation and replacement mechanic be harly playable with it. If you recover your LV as separate vessels then you will have scrap all vessels besides one. This will end up into replacing engines with new ones for full price.

Thus I would really like somebody to make merging KCT-built craft a KCT feature while I'm working on P2P. If noone responses by the time I release degradation and replacement (I guess it will be P2P 1.4.0 this month), then I will try to do it.

Link to comment
Share on other sites

Hi there!

I have released 1.4.0 with engine degradation making you to choose between replacing your engines with new ones or repairing them in case of KCT recovery. See this for a sort of explanantion. Since that KCT is HIGHLY recommended as you will NOT get ANY refunds for used engines. I have plans for some QoL and fun for 1.4.1. I hope I finish it before running out of time.

## Added
- Maintenance-or-Replacement system

## Fixed
- Ignition failure chances were too low

Edited by DarthPointer
Link to comment
Share on other sites

1.4.1 and some kerbal-style humour is here. Not-very-reliable engines have random reliability status strings that can be changed by user. I have also changed the dumb ignition issues generator that caused engines with intermediate reliability having unreasonable chances to fail.

## Added:
- Funny random reliability status strings (stored in GameData/PayToPlay/Data/ReliabilityStatuses/*.txt, you can change the strings)
- Better ignition issues chances model

Link to comment
Share on other sites

1.4.2 is released, here is the link. Now you can know about oncoming failure if you are lucky enough and your engines have sufficient usage experience. At this moment P2P does not feature EVA repairs yet but it still can be helpful for reusable LVs in order to save faulty engine from possible explosion for further maintenance. "Side effect" - autoshut engines are not considered to experience a failure (if you have not restarted them), thus they suffer less unrecoverable degradation than failed. The drawback is that they don't provide as much reliability progress for the model.

## Added:
- Random warnings about oncoming failure (toggled in settings, chances and deviation from failure depend on reliability progress and settings). Warning sets part highlighted in yellow. Highlighting is reset on scene reload!
- Autoshutdown for warings (toggled per part)

Edited by DarthPointer
Link to comment
Share on other sites

I have to report that random falure while burn is broken in 1.4.2. Thus you should use 1.4.3. I'm sorry for my coding abilities being at low reliability level xD.

## Fixed:
- Random failure time miscalculation (mostly affected low reliability)

Edited by DarthPointer
Link to comment
Share on other sites

  • 3 weeks later...

I have finished working on P2P 1.5.0. Most of the debugging is done in KSP 1.8.1, some sort of testing in 1.10. The only problem is KCT. In order to handle engine costs, maintenance and replacement properly, KCT has to "tell" the PartModules thet they are loaded as a part of a KCT-built vessel. I have found a way to do it and tested it (I have built my own KCT plugin from the sources with some extra lines to do the job). Thus I'm NOT MAKING A NEW RELEASE AT GITHUB, NOR INDEXING IT IN CKAN, just sharing the progress with you.

As for now, you can get P2P 1.5.0 from the master branch of P2P repo (GameData folder) and find the edited KCT sources in my fork of KCT.

## Added:
- Random startig reliability bonus (configurable)
- Hiding burn time for engines with no usage experience recovered yet (switchable)
- Random strings instead of "failed" status (switchable)
- Automatic model reliability update if vessel is not KCT-built or replacement is free. (Needs KCT with [this](https://github.com/linuxgurugamer/KCT/pull/73) feature. I'm going to make it added in a proper way ASAP.)
- Uptweaked usage experience generation for engines without burntime failures (SRBs)
- Separate PAW group for buttons
- Extra logging switchable

## Fixed:
- Some misbehaviour with procedural SRB's
- Autoshutdown on warning button should be removed properly now

Link to comment
Share on other sites

  • 2 weeks later...
19 hours ago, TranceaddicT said:

PaytoPlay v1.5 is being indexed by KSP-AVC and listed AVAILABLE for download.

 

Ignore it, or use your hands to get 1.5.0 and a modified KCT form my repo. It smells like I redistribute a (slightly) tweaked KCT without @linuxgurugamer's permission. I hope noone gets angry with such a situation.

What is happening: I have merged WIP branch into master at the repo and AVC checks a .version file in the master with all the 1.5.0 edits. Thus It sees 1.5.0. That is my fault, sorry. As I have written before, 1.5 requires a modified KCT which is only available as source code at my fork of KCT. I have opened a PR to LGG's KCT repo that is still not merged. I have had no plans to keep P2P 1.5 in such a stupid state...

Link to comment
Share on other sites

21 minutes ago, DarthPointer said:

Ignore it, or use your hands to get 1.5.0 and a modified KCT form my repo. It smells like I redistribute a (slightly) tweaked KCT without @linuxgurugamer's permission. I hope noone gets angry with such a situation.

What is happening: I have merged WIP branch into master at the repo and AVC checks a .version file in the master with all the 1.5.0 edits. Thus It sees 1.5.0. That is my fault, sorry. As I have written before, 1.5 requires a modified KCT which is only available as source code at my fork of KCT. I have opened a PR to LGG's KCT repo that is still not merged. I have had no plans to keep P2P 1.5 in such a stupid state...

I just merged and released KCT with your PR

Link to comment
Share on other sites

As KCT with my PR is released, I can freely release P2P 1.5 I have already spent some time on testing and brought a bit of fixing, thus 1.5.1 is released (everyone who has succeeded in getting P2P 1.5.0 and a "modified" KCT should get P2P 1.5.1 and probably the recent "official" KCT release). Here is the changelog (1.5.1 vs 1.4.3)

## Added (1.5.0):
- Random startig reliability bonus (configurable)
- Hiding burn time for engines with no usage experience recovered yet (switchable)
- Random strings instead of "failed" status (switchable)
- Automatic model reliability update if vessel is not KCT-built or replacement is free. (Needs KCT 1.4.7.14+)
- Uptweaked usage experience generation for engines without burntime failures (SRBs)
- Separate PAW group for buttons
- Extra logging switchable

## Fixed (1.5.0):
- Some misbehaviour with procedural SRB's
- Autoshutdown on warning button should be removed properly now

## Fixed (1.5.1):
- Handling of burn time visibility for P2P 1.4 saves
- Switching of burn time hiding did not reveal it for "existing" parts

Edited by DarthPointer
Link to comment
Share on other sites

I have just released P2P v1.5.2 with minor tweaks. It has not broken anything apart during testing (tm).

## Added:
- Automatic reliability progress update for rolled out engines if replace cost is 0 (no need to KCT-edit vessesl using engines that got reliability upped).

## Fixed:
- Replaced OnVesselChanged calls for updating the PAW.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...