Giter Site home page Giter Site logo

Comments (20)

LadyAlekto avatar LadyAlekto commented on July 22, 2024

BTW if you are interested the game has working damagetakenmultipliers (toyed a bit with them while trying to make my variant of reactive/reflective/blueshield early on)

They are in DesignMaskDef

from mechengineer.

Aliencreature avatar Aliencreature commented on July 22, 2024

Additional armor and structure types from Advanced and Experimental Rules that require the above code changes:

Ferro-Lamellor Armor: occupies 12 slots, reduces all incoming damage by 1 for every 5 points per hit. For example, a Medium Laser in game that does 25 damage will only do 20 damage against a mech equipped with Ferro-Lamellor.

Reinforced Structure: takes only 50% damage from all types, weighs twice as much as standard structure. Requires no slots.

Composite Structure: takes 200% damage from all types, weighs 50% (like endosteel), occupies no slots.

from mechengineer.

Aliencreature avatar Aliencreature commented on July 22, 2024

I am looking at Tactical Operations right now, and according to it, the following armor should not need extra coding:

Reactive (occupies 14 slots, 7 for Clans)
Reflective (occupies 10 slots, 5 for Clans)
Ferro-Lamellor (occupies 14 slots)

The issue is Hardened armor, which does not occupy any slots. I think we could get away with having it occupy a single slot.

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

Laser Reflective Armor dissipates energy weapon attacks 50% more efficiently than other armor types
'Mech is physically attacked, the armor is half as effective as standard or Ferro-Fibrous armor
The total damage taken by the armor from energy weapon attacks is rounded down.

case Energy: dmg/2
case Melee: dmg*2

Reactive Armor protecting the area, the damage is reduced by 50%. Missle Weapons.
In addition there have been several cases where lucky weapon fire has initiated an armor explosion, stripping the Reactive Armor away from the protected location, leaving the unit extremely vulnerable.

case Missle: dmg/2
crit chance 1 % self dmg armor

Ferro-Lamellor

dmg - dmg/5

Reinforced Structure

dmg/2

where to look to patch:

designMaskDef.ballisticDamageTakenMultiplier
AbstractActor.GetAdjustedDamage
if AbstractActor as Mech && Mech.MechDef.Inventory hasReactive

from mechengineer.

Denadan avatar Denadan commented on July 22, 2024

additional one only armor slot (on ct for example) cose you cannot mix armor types(is it possible to add armor hardpoint, or need additional script check like engine?)
armor - independended module, add all bonuses. must be equiped in this slot and salvaged as usual.
armor crits - "free" module, no bonuses itself, need to fill armor crit slot requirements, cannot be salvaged.

ps. same rule for endosteel. even can use same crit filler module.

from mechengineer.

Aliencreature avatar Aliencreature commented on July 22, 2024

Ferro-Lamellor

I'd like to add something else here, due to how Tactical Operations handles it. Ferro-Lamellor doesn't reduce damage by 1/5th exactly. It subtracts 1 damage for every 5 damage taken, or for every fraction of 5. This is best explained by LBX autocannons in the manual:

An LB-10-X in cluster mode shoots 10 projectiles, each of which does 1 damage. Because the damage is between 0 and 5, Ferro-Lamellor removes 1 damage for every projectile. Thus a mech equipped with Ferro-Lamellor armor is immune to LB-10-X cluster munitions.

Using the 5x damage scaling of BattleTech, the damage done by Ferro-Lamellor would be:

finaldmg = dmg - 5xROUNDUP(dmg/25)

So a medium laser that does 25 damage would do:

MLdmg = 25 - 5xROUNDUP(1) = 20

But a medium pulse laser that does 32 damage would be:

MPLdmg = 32 - 5xROUNDUP(32/25) = 32 - 5x2 = 22

This makes Ferro-Lamellor very good at dealing with many small weapons, but gets diminishing returns at higher damages like an AC20:

AC20dmg = 100 - 5xROUNDUP(100/25) = 100 - 20 = 80

The best use-case for Ferro-Lamellor at the moment is machinegun fire. Each burst does 5 damage:

MGdmg = 5 - 5xROUNDUP(5/25) = 5 - 5x1 = 0

So regular machineguns are useless against ferro-lamellor armor.

additional one only armor slot (on ct for example) cose you cannot mix armor types(is it possible to add armor hardpoint, or need additional script check like engine?)

There is already a system in place that checks if more than one armor types are equipped, they just have to be defined as weightSavingTypes with a weight saving value of 0 so the code treats them as armor.

from mechengineer.

Denadan avatar Denadan commented on July 22, 2024

There is already a system in place that checks if more than one armor types are equipped, they just have to be defined as weightSavingTypes with a weight saving value of 0 so the code treats them as armor.

ok, good, digging now in source code.

main point we have separete slot for armor and structure and filler module(like engine side torso parts) for their criticals if need any. this remove "how to upgrade structure/armor if they dont have criticals" problem

as additional feature - structure can be split for weight (i.e. 20t standart, 55t endosteel...) and restricted to same weight mech. this remove all weightSaving logic from it replace with plain weight and make things more logical(you cannot use endosteel components from lighter/hevier mech - they just dont fit)

from mechengineer.

Aliencreature avatar Aliencreature commented on July 22, 2024

main point we have separete slot for armor and structure and filler module(like engine side torso parts) for their criticals if need any. this remove "how to upgrade structure/armor if they dont have criticals" problem

The only equipment that would suffer under the no criticals issue is hardened armor and composite structure, but it is much easier to implement them as one-slot items than it is to write an entirely new logic.

Side torso engines are already implemented for all engine types that require them and consist of a XXX Engine LT and XXX Engine RT part. I know destruction of a side-torso on an XL mech is treated as an engine kill, but I still want to do more tests on how LFE and/or cXL engines are treated.

as additional feature - structure can be split for weight (i.e. 20t standart, 55t endosteel...) and restricted to same weight mech. this remove all weightSaving logic from it replace with plain weight and make things more logical(you cannot use endosteel components from lighter/hevier mech - they just dont fit)

Mechanically difficult. As far as I know, the only type of equipment that is limited by weight class are jump jets, so by your system endosteel would have to be a type of jumpjet, occupy jumpjet slots, etc.

from mechengineer.

Denadan avatar Denadan commented on July 22, 2024

anyway i fork and try implement this.
first results:
https://i.imgur.com/SGNrhyR.png
it allow put only one structure module in ct and generate apropriate message on wrong fitting(no structure, more then one structure, weight missmatch and filller missmatch)

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

in the future i want a patchwork like behavior on each location. So one filler per location needed. Which actually means a special extra slot per location. The current implementation of whats in the mod is just temporary until proper patchwork can be implemented.

i also have more requirements for that special slot, like no dragging only replace. Autoreplace on repair with default item. Always on top.

What I dont yet understand is why no tonnge calculation? We need those again to support partial weight savings. (This mod supports patchwork structure..)

Having items that match weight classes is nice, we specifically want to avoid having multiple items thought to keep the mechlab performance up ond cluttering down.

Sorry if i sound too negativ, maybe i didnt understood fully what you are trying to achieve.

from mechengineer.

Denadan avatar Denadan commented on July 22, 2024

i just try to make things simple. using tt rules armor(except modular, but it use different rule) and structure is not component itself it is chasis characteristic, criticals slots for them dont do anything - they just take place, and some of armor or structure types dont have criticals at all. in games usually they represented with simple selector and reserved slots auto align and rearange on demand.

i trying to achieve the same - cose by code limitation armor and structure should be components - add two special slots for them. with same onlyreplace on refit and repair behaviour as you want. critical slots are just fillers and dont have any logic(in current iterration they even dont present in inventory, validation logic just check if enough free total space so they dont cluter equip and salvage, i search the way to display it, for examlpe by color/sprite change for free slot, so they will rearange by adding new items in equip).

As armor and structure cannot be split, they dont requre patchwork logic, their tonnage calculation become much simpler (structure - plain component tonnage from def file in case weight class based, or tonage / 10 * mod otherwise, armor = total armor/armor weight mod)
default
default

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

auto align and rearange

I would like that stuff to be part of this mod too, also for the engine side torso slots. however that is ALOT of work, fixing it for all the corner cases (destroy, repair etc..) + would require a lot of patching of component dragn/drops + workorder ignore and not ignore, workorder install / remove / repair. I wouldn't do this. until we get more support through a DLC or so.

add two special slots for them

official rules don't allow structure to be split, but since we have the code due to armor slots, we also allow it for structure. I wouldn't mind returning structure back to a mech-wide setting through a center torso special slot.

by color/sprite change

that makes sense to have it that way

As armor and structure cannot be split

armor can be split due to an optional rule: http://www.sarna.net/wiki/Patchwork_Armor

the rule itself is not strictly implemented, we do allow non-uniform distribution of critical slots right now.

also we support fractional accounting due to this.

but once you implement your stuff for one location (CT) it should be simple to apply that stuff to each location right?

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

I'm giving you this ticket Denadan, just do what you think is best and we can clean up and see whats missing once you think its ready

from mechengineer.

Denadan avatar Denadan commented on July 22, 2024

https://imgur.com/a/44htUuc
done

  • filtering structure by tonnage
  • reserved slot count check
  • auto place and rearrange filler for reserved slots
  • auto fix current dessigns by adding standart armor and apopreate structure

to do

  • validation check for placing items if not enought free space(now it just error message on exit lab)
  • max armor(now max it using standart armor weight)
  • "only replace" behaviour and linked repair stuff

ideas about patchwork armor

  1. "allow patchwork armor" setting, if not allowed - all stay as is
  2. if allowed - add additional armor slot for each location, each armor slot has its own armor weight calculation based on location armor
  3. "patchworked" flag for mechdef = have mixed armor
  4. critical slots. home rule - fixed 1/7 slots for location(so for example you cannot place ff on head, cose it requre 14/7 = 2 free criticals) if patchworked flag set. we have 8 locations so it is auto penalty + 1/7 slots for patchwork
  5. standart dynamic criticals distribuition if not patchworked

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

ok I havent looked at the code so I just go by your list here and what I see on the screenshots.

filtering structure by tonnage

I still say you should not have several endo-steel component types, we still have limitations because of #38 (performance) and #3 (reduce json count) . if you want to fix the issue with logic/cbills/item count/lore you should chime into #66, so we can fix it for everything.

reserved slot count check
auto place and rearrange filler for reserved slots
auto fix current designs by adding standart armor and apopreate structure

The reserved stuff with filler etc.. gets along very nicely. I like the use of colors so you know whats armor and whats structure!

The side torso engine parts however are another beast as those are actual items, so we can keep them as separate entities for now. Having them auto-added and removed would be cool tough. If the enforcement works we can even kick out the LT and RT part and just dynamically add Engine Reserved Slots based on the center engine installed. those have to be actual slots though, or we loose the compatibility with DamageComponent + critical hits.

validation check for placing items if not enought free space(now it just error message on exit lab)

I actually think that its ok that you can place stuff even though you don't have enough space. just make sure you can't actually save the mech in skirmish AND campaign. in campaign, inventory slots are allowed to be invalid and the mech can still start installing. (it just can't be deployed).

max armor(now max it using standart armor weight)

I was planning on staying compatible with Pansar. There you already have several armor patches. If you actually want to change max armor you probably have to start integrating Pansar into this mod first.

ideas about patchwork armor

Sounds about right, but have an option to allow an auto-switch from patchwork to normal when all patchwork slots are added. That would be the most gamer friendly approach.

Issue however is space now.. I don't we can fit in 2 additional slots per location, don't forget we even have actuators to add too! I think we need to resort to some form of state saving as we do with the heatsinks for the engines. Maybe we should just have a fake component called "mech settings" in the CT and there we save the state of a mech that concerns Armor, Structure and other stuff.

Important

can you think of maybe splitting up your changes so you can create small contained feature PRs that you can upstream one at a time?

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

@Denadan I created the issue #79 for your slots feature, as this here is about additional armor types and those can be done e.g. after your feature. can you move your slots comment in this ticket to #79 ?

from mechengineer.

LadyAlekto avatar LadyAlekto commented on July 22, 2024

internals.zip

2 dirty hacks for composite and hardened as well as reflective and reactive

Id love if thered be a way to simply define their effects through a multiplier in the custom tags

I use the statcollections from abstractactor.mech

edit fixed the composite error

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

added component ArmorStructureChanges that allow to manipulate the armor and structure points when combat starts

several issues here:

  • max is shown wrong in combat
  • shows them as damaged in combat if factor < 1.0
  • max and current in mechbay / mechlab don't show any item manipulations

fixing those issues seems complicated, like 20 patches or so for fixing them everywhere. display only fixes in mechlab might only require like 5 patches.

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

RT seems to have reflective and reactive already, so everything can already be backported

from mechengineer.

CptMoore avatar CptMoore commented on July 22, 2024

closing since RT has it

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.