Giter Site home page Giter Site logo

Comments (9)

CptMoore avatar CptMoore commented on July 3, 2024

CrusherBob

Didn't want to commit to using code to set chassis weights because I wasn't sure how the SLDF mechs were implemented.

The Royal Griffin is supposed to have FF armor, looks like they just brute forced the chassis weight to get the right numbers.

Also, didn't want to close off avenues for future modders by making chassis weight something they couldn't just brute force, or change for whatever reason.

But would suggest trying to implement endo steel as something with negative weight: Each piece of endo steel reduces weight by (mech max tonnage / 20 / 14) You can fit a maximum amount of 14 pieces of endosteel on your mech.

That would get you around all sorts of weird salvage issues.

Example:

You only have 13 pieces of endo steel because one of the parts that had an endo steel piece got blow > up. Now, you either need to buy 1 more piece of endo steel, or to take the other 13 pieces out.

Also makes people 'care' about loss of endo steel parts to crits and limb loss. In TT, losing endo steel crits is irrelevant, so you can pack your arms (or whatever) with the ES criticals and not care if they get blown off.

This also has the advantage of working for people who aren't using the engine switching mod, the endo steel parts will work just as well for them.

Not sure how to implement FF armor using the same idea. Not sure if armor per ton number is easily modifiable by code, or not.

from mechengineer.

CptMoore avatar CptMoore commented on July 3, 2024

Also, didn't want to close off avenues for future modders by making chassis weight something they couldn't just brute force

I would argument the other direction, if mechs get added, we wouldn't know about them, and they would have a way too high initial tonnage which we can't fix since we don't patch added jsons.

I rather calculate the initial tonnage through code, maybe add options to exclude chassis and turn off the feature altogether.

However I saw that you don't use the 10% rule, why is that?

You only have 13 pieces of endo steel because one of the parts that had an endo steel piece got blow > up. Now, you either need to buy 1 more piece of endo steel, or to take the other 13 pieces out.

Well that covers what I was thinking, the only thing I wouldn't do is calculate the weight savings per item, once you put in one item you get instant 50% weight reduction and an invalid mech loadout. So you can quickly check and try your mech with endo steel without having to mount all of em at first. Only if you want to field the mech do you need to mount all of the required slots.

from mechengineer.

CrusherBob avatar CrusherBob commented on July 3, 2024

OK, have thought about it for a bit now. Here's my current idea on how to handle it:

Add settings:
//This settings says that the calculated structure weights will include the default cockpit weight. Is here so that if someone comes along and implements light cockpits (or something) this setting can be turned off so that the calculated base structure weight won't include the default cockpit weight anymore
bool StructureIncludesCockpit = true;

//Included in settings in case this needs to change, for some reason
int const_CockpitWeight = 3;

Define new upgrade type 'structure_basic'
0 weight, 1 crit item; goes only in CT.

New code:
Can only have one 'structure_basic' item on mech

'structure_basic' is the item used as a flag to tell the program to set your chassis weight to (maxtonnage X .1 + const_CockpitWeight) (if StructureIncludesCockpit == true) else, (just maxtonnage X .1)

So if someone has a custom chassis with their own defined weight, they can just not put the basic structure item into the mech.

This probably means CT engine size would go down to one crit.


Then, for endosteel

Add settings:

//This determines how many endosteel parts a mech is allowed to have
int const_MaxEndoParts = 14;

//this setting determines how much weight each endo steel part gives back, as a multiple of max tonnage
// the default number is 1/20/14 = 0.0035714286
float const_EndoSteelWeightReduction = 0.0035714286f;

Define new upgrade type 'structure_endo'
0 weight, 1 crit item; goes anywhere

When in mech lab:
redefine structure_endo upgrades to weigh (maxtonnage * const_EndoSteelWeightReduction)
Check to make sure mech doesn't have more than const_MaxEndoParts of 'structure_endo'

This means that endo steel could be spun off to a separate mod, that the engine upgrade mod requires, since even people not using the engine mod could use this implementation of endo steel.

Endo steel parts should probably be broken up by weight class (Light,Medium, ...) so you can't just strip the endo steel from your locust and put it on your Atlas.

from mechengineer.

CptMoore avatar CptMoore commented on July 3, 2024

regarding endo-steel i have implemented that in the branch, see https://github.com/CptMoore/MechEngineMod/tree/crusher_bob_overhaul, once you add a single endo-steel item you will see an immediate 1/20 tonnage reduction, but you still have to add all for a mech to become valid.

I also added double/standard heatsink switch support for engines and added a heatsink to engine rating calculation. engines jsons don't define heat dissipation anymore.

I'm still working on getting everything to run, but the principle things are implemented.
geek_out_please

I'll have to understand your first idea, I'll write a second comment for that.

from mechengineer.

CptMoore avatar CptMoore commented on July 3, 2024

your first idea does not work nicely, since mechs can have inventory but not chassis, so I cant add an item to a chassis and change the tonnage when its loaded (if we really want to just include stock mechs, lets just make a setting where we list all mechs that are supported to work with our new mechanism).

what about if we add cockpits as special items? and what about adding actual gyros as items?
(and call this MechInternalsMod - the missing components)

lets just make all head slots one larger and require to add a cockpit, we can even have different kinds of cockpits (think of all the cockpit mods, no injury under 10 dmg, better accuracy..., more armor).

same for gyros, instead of having them as only upgrades, require gyros.. remove gyro upgrades from the game (well we would just rename the "upgrades" to actual gyros and add some standard/stock ones without any effects, same idea for the cockpits and their upgrades)

with this, and forcing at least 2 head slots, we can calculate all weights and mech requirements automatically right?

Edit so one can even have small cockpits... so the default one is 2 slots high, the small one is one. so we need 3 slots for the head.

from mechengineer.

CrusherBob avatar CrusherBob commented on July 3, 2024

Sigh. Is there a function like return CheckComponentDef for chassis?

Had the following idea:
Add setting:
// automatically overrides mech chassis initialtonnage to maxtonnage * .1 if chassis is not named chassisdef_custom_(whatever)
bool AutoSetStructure = true;

Then just look at the name of the chassis, if it's chassis_mechname then over-write the structure weight, but let modders declare their own chassis weight if they want by naming their chassis files chassisdef_custom_atlas_AS7-D (or whatever).


Have already figured out how to set max number of jump jets to const_MaxNumberOfJJ when mechs are loaded into the mech lab, could have that be ignored if the chassis starts with chassisdef_custom as well.

Would assume it's hard to change the maximum allowed number of jump jets displayed when you change the engine? But this does get around having to re-write every chassisdef to support the maximum number of jump jets, also means you can change it for every chassis simply be changing const_MaxNumberOfJJ.

from mechengineer.

CptMoore avatar CptMoore commented on July 3, 2024

Is there a function like return CheckComponentDef for chassis?

your idea with going by name should work, I've added CheckChassisDef to Control.cs see 9584aee

Have already figured out how to set max number of jump jets to const_MaxNumberOfJJ

good job

from mechengineer.

CptMoore avatar CptMoore commented on July 3, 2024

btw, I have given you access to this repo, but you havent accepted the invite yet

and there are lots of other issues you can comment on

from mechengineer.

CptMoore avatar CptMoore commented on July 3, 2024

Would assume it's hard to change the maximum allowed number of jump jets displayed when you change the engine?

I think I can do that, on it.

Edit done 8860312

from mechengineer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.