kikotheexile / Endless-Sky-Civil-War

A stand alone, content driven Endless Sky fork.
22 stars 17 forks source link

Profit sharing for captured vessels #170

Closed ravenshining closed 3 years ago

ravenshining commented 3 years ago

Context

Money is easy to make, and the player doesn't have a lot in the way of overheads. This makes it very simple for a player to make a lot of money in a short space of time, which allows them to quickly amass a powerful fleet and do away with the game's sense of challenge.

We've been adding mechanics to help mitigate this issue. For the last few versions, commodity trading has required the player to pay profit shares to the various crew across the fleet. This helps slows down economic advancement once the player has amassed some power, but leaves it relatively unhindered in the early game.

We need to extend profit sharing to other kinds of income, such as capturing and plundering enemy ships. Currently, capturing and plundering are by far the most powerful way to make money. Capturing is far more profitable than plundering, especially in the early game.

Changes

This commit makes capturing and plundering add an outstanding debt to the player's bank account. The amount of the debt is equal to the value of the captured or plundered assets, multiplied by the fleet's current profit share ratio.

Considerations

As of this commit, the interest rate and term of the profit sharing debt are hard-coded. In a future commit, we intend to make those values based on some settings in the data files.

In the future, we want to introduce system that tracks the morale of each ship in the fleet and creates incentives for the player to keep their crew alive and happy. As part of that, we intend to punish the loss of life that often takes place when inherent in capturing ships by having it create morale problems.

We plan for the profit sharing debts to also affect morale. How it does that exactly will be up to the data files. At this stage, we think that having outstanding profit sharing debt would cause morale to tick down each day, but paying the profit shares up front would trigger a morale boost. Being unable to pay the daily rates on the profit sharing debt would of course be a morale disaster.

lukearndt commented 3 years ago

How would you feel about adding just the profit shares, instead of bundling them together with death benefits?

kikotheexile commented 3 years ago

i am more concerned about how and that it functions, opposed to the terminology or verbiage used. although both can always be changed at a later date, there's no reason to hold up testing of a function over a few choice words that can be ironed out during testing.

ravenshining commented 3 years ago

Okay, as this is it compiles but with a warning and it's not working.

We need to calculate the profit share before any plundering or combat takes place, and remember that when it does. @Janaszar suggested putting the line to do so here: https://github.com/kikotheexile/Endless-Sky-Civil-War/pull/170/files#diff-bd5c5f8ac293c62c58b8640fd06c248253fa442079a27045cebe642606662966R65

and I've tried a couple of other different places, with no luck. On compile it complains that the variable is unused.... which I take it means that it's local to that function and won't be remembered down in BoardingPanel::KeyDown? Even though I put it in the class here: https://github.com/kikotheexile/Endless-Sky-Civil-War/pull/170/files#diff-144840faa9bcf20eb39fb5de9b8c87370b5dae5cb53fd33972388af58f223f09R130

So it's forgetting it and then getting zero for the profitShareRatio when actually needed which results in zero charges.

Anyway it's 0245 now. Hopefully this is a simple issue that more experience and/or more sleep can solve :-)

ravenshining commented 3 years ago

Everything checks out, I think we can merge this now!

kikotheexile commented 3 years ago

I'll leave this to @lukearndt