simplyWiri / Loadout-Compositing

GNU Lesser General Public License v3.0
12 stars 8 forks source link

Feature: Billtype "(X per (tag +Y)) +Z" #22

Closed Raszul closed 2 years ago

Raszul commented 2 years ago

We already have a "X per tag" billtype.

This is good to create bills where we want exactly X items for each pawn with the given tag. But when we want some spares, e.g. so we can quickly swap out of tattered apparel, this would lead to excessive amounts of spares.

Thus I would like a bill type of "one per tag +X" so as to, for example, create a set of pants for each pawn plus say 4 extras so they can swap to a new set if the old one has gotten tattered.

simplyWiri commented 2 years ago

Would you consider a bill like x per pawn with tag y + z to implement the functionality you desire? I.e. Bill Info (you set x and z): x = 2, pawnCount = 4, z = 1

TargetCount = 2 * (4 + 1) = 10

For example, if someone wanted to make 5 medicine per pawn, and wanted to keep spare for a new doctor, they could do something akin to: x = 5, z = 1, same numbers as above it would look like TargetCount = 5 * (4 + 1) = 25

using this bill with z = 0 would be effectively equivalent to the current bill added by the mod, and it would be trivial to add

Raszul commented 2 years ago

yes. almost.

(x per pawn with tag) + y

e.g. x = 2, pawn count = 4, z = 1 targetCount = (2*4)+1 = 9

but i think adding both (x per pawn)+y and x per (pawn+y) would be even better - that way the player can pick which one he/she prefers.

Raszul commented 2 years ago

thinking about it ... (x per pawn)+y feels more intuitive and having both basically just adds clutter.

would (x per (pawn+y))+z be possible? though ... that might be overcomplicating the issue ...

ah, well, regardless of which of the various options you'll end up picking, so long as i can have a certain amount per pawn with a given tag plus some spares - regardless of the exact formula/mechanic behind that - i'm gonna be happy ^.^

simplyWiri commented 2 years ago

The latter is definitely possible. I'll give it a shot and see if people complain / think it is too complicated.

simplyWiri commented 2 years ago

Begun in https://github.com/simplyWiri/Loadout-Compositing/commit/d9322d18c7d54257a29845115bef7d938b7a8d26, may be as far as I go before the next release. I am not sure.

simplyWiri commented 2 years ago

Yup. Re-open this issue if you do not believe the functionality implemented in the previous commit is enough. This will be the last change related to bills in the next release though.