-
Notifications
You must be signed in to change notification settings - Fork 21
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
add reactive, reflective and hardened armor #45
Comments
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 |
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. |
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) The issue is Hardened armor, which does not occupy any slots. I think we could get away with having it occupy a single slot. |
case Energy: dmg/2
case Missle: dmg/2
dmg - dmg/5
dmg/2 where to look to patch:designMaskDef.ballisticDamageTakenMultiplier |
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?) ps. same rule for endosteel. even can use same crit filler module. |
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.
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) |
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.
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. |
anyway i fork and try implement this. |
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. |
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.
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.
that makes sense to have it that way
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? |
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 |
https://imgur.com/a/44htUuc
to do
ideas about patchwork armor
|
ok I havent looked at the code so I just go by your list here and what I see on the screenshots.
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.
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.
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).
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.
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. Importantcan you think of maybe splitting up your changes so you can create small contained feature PRs that you can upstream one at a time? |
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 |
added component ArmorStructureChanges that allow to manipulate the armor and structure points when combat starts several issues here:
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. |
RT seems to have reflective and reactive already, so everything can already be backported |
closing since RT has it |
reactive, reflective and hardened armor have properties that have to be coded in, but the actual problem is that they don't use up slots, so you can't detect them being enabled.
the idea is to add a special slot to all mech locations that can only be used for armor selection.
either make sure to add and filter those things properly (and ignore crits like endo-steel slots), or make it more like regular components you have to scavenge for.
The text was updated successfully, but these errors were encountered: