Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introducing resource materials and customizable techpoint and cbill costs #66

Closed
CptMoore opened this issue Jun 26, 2018 · 8 comments
Closed

Comments

@CptMoore
Copy link
Member

CptMoore commented Jun 26, 2018

I found the solution which is still hard to implement, but finally makes sense.

summary

you want to build an xl engine into a 100 ton mech and an engine rating of 300?

well that costs you 20 tons of xl shielding materials when building it. you dont have any left, well dragndrop won't allow it then.. (or cant save/accept the mech)

go to the store and buy 10x 1'000 kg of xl shielding materials.

right now we already have 2 resources:

  • cbills
  • techpoint

I would just implement a mechanic to add custom resources:

  • cbills
  • techpoint
  • endosteel
  • repairkit

The framework discussed will also allow to adjust techpoint and cbill cost per item, that allows more precise control what item costs what.

Features

  • allow to overwrite cbills and techpoint costs per item
  • allow overwrite of specific transitions where cbills and techpoints are currently used
  • allow to use parameters to calculate costs (e.g. cbills = 200 * {{UnitTonnage}})
  • introduce custom resources

resource representation and suspension of disbelief

2 variants on how to represent resources:

  • 1ton components. resource should be 1ton items just for now, use the mod to sell/buy more using shift to have virtual 10/100 increments.
  • use the idea of companystats where even partial tons could be saved and 1ton/10ton/100ton are just representations of the current company stats. requires more patching but is true to the resource nature of the game.

to solve issue with suspension of disbelief:
require different type of refit kits for different actions, like repair kit to repair the endo-steel frame that was damaged, or conversion kit to move that std engine to xl. why even have kits? 1. its in lore 2. someone can't just reconstruct a mechs frame just using materials, there must be something else, helps with suspension of disbelief.
A refit kit is bascially just a fourth resource only required on certain transitions and the resource is consumed on use.

container components (stuff that contains resources):

  • basic materials (endo-steel materials)
  • kits (e.g. class A-F refit kit)

transitions

all use cases / transitions:

  • shop -> inventory (buy)
  • salvage -> inventory (salvage)
  • inventory -> shop (sell)
  • inventory -> cbills (scrap)
  • inventory -> mech (install, repair)
  • mech -> inventory (uninstall/cancel/unready/strip)
  • mech -> cbills (scrap)
  • mech -> mech (armor, structure)

buy: ? (use defaults for now)
sell: ? (use defaults for now)
salvage: ? (use defaults for now)
scrap: ScrapComponent, ScrapActiveMech, ScrapInactiveMech
install: ComponentInstall
repair: ComponentRepair
uninstall: ComponentInstall->None
cancel: CancelWorkOrder, RefundWorkOrder, GetCBillCostForIncompleteTasks
strip: StripMech
armor: MechArmorModify
structure: MechRepair

for each transition check the following:

  • cbill cost / gain
  • custom resource cost / gain
  • if applicable, techpoint cost (/ gain on cancel)

some resources should have very asymmetric cost/gain ratios at various transitions

  • e.g. endo-steel via inventory -> mech will cost resources and cbills, while mech -> inventory will loose 80% endo-steel resources
  • e.g. ferros-fibrous always costs install and uninstall but no ff resources are lost
  • e.g. on shop -> inventory and inventory -> shop be more symmetric

special handling

armor

armor changes have to be handled seperatly, e.g.

  • go into MechLab
  • change armor points
  • change armor type
  • confirm

if previous armor type != current armor type {
-> get previous armor and armor tonnage and calculate costs
-> reduce existing armor tonnage = 0 for next calculation
}
-> get armor tonnage difference to existing armor and calculate modifyarmor costs based on that

engine

engine handling is also different, as several parts should act as one (gyro is also part of engine!):

  • engine components can't be changed without uninstall first (need that anyway for internal heat sinks)
  • on Cancel, make sure to auto-uninstall all engine components
  • only a single engine component has any techpoint + cbill + resource cost associated, all others install immediately

implementation details

adjust workorders on mechlab confirm.
wait for after pruning, as pruning removes all previous workorders that would be overwritten

using custom components, a component would need to conform to IResourceProvider or IResourceConsumer.

  • IResourceProvider is used for components that represent resources, this is for selling/buying/scrapping and used up on installation. get it from salvage etc.
  • IResourceConsumer is used for components that require resources when installed/repaired, and (maybe) provide resources back on uninstall/cancel

all variables have to be precalculated before being applied. dict = getvarsforalgorithm(mechdef)

Resource def semantics (will be json in the end):

Example XL Engine
80% of EngineTonnage is shielding, rest is core or other requipment

Component: XL Engine
Transition: FromInventoryToMech
Resource: cbills, Cost: "20000 * {{EngineRating}} * {{UnitTonnage}} / 75"
Resource: xlshielding, Cost: "0.8 * {{EngineTonnage}}"
Resource: RefitKit_ClassF, Cost: "1"

Example Ferros-Fibrous

Component: Ferros-Fibrous Armor Slot
Transition: RemoveArmor
Resource: cbills, Cost: "20000 * {{ArmorTonnage}}"
Resource: ferrosfibrous, Cost: "-1 * {{ArmorTonnage}}"

Example Endo-Steel

Component: Endo-Steel Structure Slot
Transition: AddStructure
Resource: "cbills", Cost: "1600 * {{UnitTonnage}}"
Resource: "endosteel", Cost: "1 * {{StructureTonnage}}"

Example Endo-Steel #2

Component: Endo-Steel Structure Slot
Transition: RemoveStructure
Resource: "cbills", Cost: "1600 * {{UnitTonnage}}"
Resource: "endosteel", Cost: "0"

Example Gyro

Component: Gyro
Transition: FromInventoryToMech
Resource: "cbills", Cost: "300000 * {{GyroTonnage}}"

Example Heavy Jump Jet

Component: Heavy Jump Jet
Transition: FromInventoryToMech
Resource: "cbills", Cost: "200 * {{UnitTonnage}}"

Example MASC

Component: MASC
Transition: FromInventoryToMech
Resource: "cbills", Cost: "200 * {{EngineTonnage}} * {{MASCTonnage}}"
@Aliencreature
Copy link
Contributor

So let me see if I understand this right.

  1. STD Engines would be able to be converted into different types, e.g. XL Engines.
  2. Converting an STD Engine to an XL Engine costs as many tons of XL Shielding Materials as the tons of the resulting engine (9.5 tons for an XL 300) rounded up.

I am not so sure this is the way to go about solving the cost issue. It is like hunting a fly with an AC20, with significant lore implications (which we are already stretching but not much more than Tabletop does). Yang is good, but can he really make an XL engine with only a small engineering team?

But you are on to something with requiring parts, and I think the answer to the cost problem lies once again in the rules of TableTop, for they really did think of everything. According to Strategic Operations, customization (or "refit") is classified according to its difficulty.

Class A - Replacement of a weapon with another of the same category with the same or less slots, including its ammunition. (Medium Laser --> Medium Pulse Laser, AC10 --> LB10X, etc.)
Class B - Replacement of a weapon with another _of a different _category with the same or less slots, including ammunition. (AC10 --> Large Laser for example)
Class C - Replace one armor type with another (e.g. standard --> ferro), change armor quantity/distribution, move a component, add a heatsink/ammo or replace any weapon/equipment with any other (e.g. Medium Laser --> AC20)
Class D - Add an item that didn't exist, install ECM, C3 or TComp, change HS type (i.e. SHS --> DHS), change engine rating but NOT type (i.e. STD 300 --> STD 325 but NOT STD 300 --> XL 300 or XL 325)
Class E - Change myomer (looking at MASC), install CASE
Class F - Change structure (standard --> endo), engine type, gyro type, cockpit type.

In order to perform a refit, you need a Refit Kit for every change that matches its refit level. Each refit level requires more time and is more difficult for the technicians than the last (it includes a roll), and most importantly, requires different facilities.

Refit Classes A and B are Field Refits and can be performed pretty much anywhere.
Classes C and D are Maintenance Refits and require the facilities of a Dropship (or other unit with a Transport Bay).
Classes E and F are Factory Refits and require planetside facilities on worlds with mech factories.

What can we take from this that can be translated to Battletech?

  1. Refit kits. In TT, refit kits include both the component and the required parts and cost 110% of the original price, but due to the salvage mechanics it might be best to set them at around 10% of an 'average' component of the category. Instead of XL Shielding Parts, the 'currency' would be refit kits.
  2. Refit classes. For simplicity purposes, I propose consolidating them into three categories: Field, Maintenance, Factory. Depending on how much you hate yourself, you could take TT's interpretation of them, or merge all weapon changes into Field for coding simplicity, armor/equipment into Maintenance and engine/gyro/structure into Factory.

So what happens? Much like what you proposed, when performing any operation in the MechLab, it checks if a repair kit is required, what class, and if one is available. If it is, the repair kit is consumed, if none are available an error is produced. So we have the cost.

Optionally, you could also implement restrictions on availability, namely where refits can be performed. Yang may be god's own gift to MechWarriors, but the base game never allowed for extensive structure/engine changes.

Field Refits, he could do anywhere.
Maintenance Refits, he could do either on a planet with a low level of industry, or after unlocking a particular Argo upgrade.
Factory Refits he could do only on a planet with a high level of industry.

It adheres to TT better and it doesn't seem to require any more coding on your part than your XL Shielding proposal.

@CptMoore
Copy link
Member Author

excellent summary, I learned a lot, I have 2 questions/issues though:

  1. the idea behind mats was that you can buy less for smaller mechs and more for larger mechs. how can we translate that to refit kits? one refit kit c per armor ton changed? one refit kit f per engine type ton changed?

  2. another idea was to strictly separate the items materials, so when you salvage an xl engine from a light mech, you can't just install it on a assault mech without having more xl components. using kit classes, suddenly just buying a certain class refit kits would allow a bigger mechs to install that xl engine even though no xl engine parts were salvaged or bought from somewhere else.
    for abundant component parts, those kits works, for the games rarity component mechanism, those rules wont work (e.g. xl).

  3. and 2. could be solved by making kits more use case specific (basically renaming xl mats to xl kits) and making sure the kit requirements scale nicely.

the problem with the rule books is that they never assume buying stuff before installing, its always about directly installing stuff in a specific mech right? so all the parameters for the cost calculations are known beforehand, which doesnt work for our game without allowing autobuying of even rare items on installation.

Yang is good, but can he really make an XL engine with only a small engineering team?

yes he is.. he can build mechs from destroyed salvage parts, he can also build engines left and right out of thin air. no seriously, we just have to assume we are a flying manufacturing plant anyway.

that doesn't mean we shouldn't reuse ideas that are already in the core rulebooks. and if we can avoid Yangs superpowers why not?

I still like your idea of different refit kits having planetary requirements though, that could be part of a feature were we tone down yangs superpowers.

@Aliencreature
Copy link
Contributor

I am going to address both issues with two possible, simpler solutions:

  1. Light Mechs are 1 kit/change, Mediums 2 kits/change, Heavies 3 kits/change and Assaults 4 kits/change. The values are placeholders, it could easily be 1/2/4/8. Or take the locust as a baseline and add 1 kit for every 10 tons.

OR

  1. Divide kits further into:

Field Kit (Light/Medium)
Field Kit (Heavy/Assault)
Maintenance Kit (Light/Medium)
Maintenance Kit (Heavy/Assault)
Factory Kit (Light/Medium)
Factory Kit (Heavy/Assault)

In both cases, taking an XL from a Light and placing it in an Assault can cost much more than transplanting it into another light. It doesn't require you to gather any extra materials, so you can do it if you can afford the cost, but that cost will be heavy.

I think I see your point though. Without any other system in place, you could take the XL part from a lower cost XL 100 engine and transplant it into a 400 for no additional cost. It is late, so I will have to think more on this tomorrow. Can an engine 'remember' what fusion core it was installed with last? I don't recall if they remember their internal sink type. If they can, then you can just require X refit kits for every +/-5 change in rating from the old to the new.

@CptMoore
Copy link
Member Author

Without any other system in place, you could take the XL part from a lower cost XL 100 engine and transplant it into a 400 for no additional cost. It is late, so I will have to think more on this tomorrow.

please think about it, but this ticket is not a priority, don't put too much energy into it

Can an engine 'remember' what fusion core it was installed with last?

the game always removes components before adding them (and in between you can cancel work order). to avoid race conditions you have to always calculate from 0.
so refit kits for "changes" are a no go in my opinion, the game engine just isn't made for it.

just as a interim recap of this ticket, we have 2 contending mechanism

  1. material specific refit kits, where several ones are consumed for greater tasks concerning the a specific material like refitting a higher rated engine with a shielding of the specific material type in a bigger mech.

  2. class based refit kits, where several ones or special ones are used for larger tasks. this would require far less different refit kits but would allow to upgrade rare items with nothing but cbills instead of materials.

even another idea

ok lets remove refit kits and materials again. those can be patched on later.

a small mech requires 1 XL Engine CT
a medium mech requires 2 XL Engine CT
a heavy mech requires 3 XL Engine CT
an assault mech requires 4 XL Engine CT

that would remove the whole issue of implementing other resources that are not shown and have to be tracked separately. its still not as fine grained as my materials suggetions, and it looses the coolness of refit kits from the core rules.

also kinda weird that you suddenly have to do it for some items and not for others. (you dont have to add 2 ML to get 1 on an assault mech)

I'm not a fan of this new idea, as edge cases of mechs (light assaults, heavy heavies) are suddenly overly good or bad.

@Aliencreature
Copy link
Contributor

but would allow to upgrade rare items with nothing but cbills instead of materials.

I don't think that's necessarily a bad thing. Cbills are not abundant, and indeed, their availability for upgrades usually follows the player's progression through the weight classes. When you are using only lights, even getting the refit kits to replace their weapons might be a cost worth considering, and you wouldn't even think of changing their engine type, and realistically you wouldn't have the connections to get the necessary kits to fit an XL engine.

By the time you have a full assault lance, you can afford to put an XL on your heavies or know a guy who knows a guy in the Lyran military who can hook you up with the refit kit to put it on a mech.

As a side-note, the similar problem with endosteel (taking endosteel from a light and throwing it to an assault) can be handled much more elegantly: do it like how MechWarrior Online does it. Once you add endosteel to a mech, you can't take it out and put it on another, and it is destroyed if you ever decide to change to standard structure. Armor can persist because it is reusable, but keep an internal store of each armor type so stripping a light mech of its measly few tons of ferro isn't enough to fill up an assault. Now there's even a reason to use ferro over endo, because it is more flexible! Balance!

@CptMoore CptMoore changed the title solve the cost issue - introducing resource materials introducing resource materials and customizable techpoint and cbill costs Jul 3, 2018
@CptMoore CptMoore self-assigned this Jul 6, 2018
@CptMoore CptMoore removed their assignment Jul 19, 2018
@CptMoore CptMoore removed the question label Jul 19, 2018
@CptMoore
Copy link
Member Author

work order cost customizations are good enough for now, this resource thing is for the future

@CptMoore
Copy link
Member Author

CptMoore commented Aug 3, 2018

this is a lot of work and requires work order manipulation that is hard to maintain. have to wait for someone to provide a more extensive work order framework

@CptMoore
Copy link
Member Author

ok, giving up on this, while still doable, it won't bring much to the game in comparison to other features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants