Idea: could you add Gauss Rifles to the possible upgrades for AC/20 equipped mechs? In the lore a number of AC/20 mechs received Gauss refits after the Helm core discovery, so it seems like it would be a 'done thing' when feasible.
except from AC2_st.json [ { "ID": "Weapon_Autocannon_AC2_0-STOCK", "Weight": 0 }, { "ID": "Weapon_Autocannon_AC2_1-Defiance", "Weight": 2 }, { "ID": "Weapon_Autocannon_AC2_1-Federated", "Weight": 2 }, . .How does this mod select which variant to choose? a) Does it iterate the list from top to bottom? ie, in order to get the best roll, the top variants had to fail the check? b) And how does Weight affect the chance? Does larger weight gets bigger chance? or opposite?
Search its UpgradeList from all loaded ones (that is probably only one for you now), selected by faction
Roll if you upgrade a component
look up, which sublist contains the component you want to upgrade. this also returns the offset (index) where it got found
calculate the chances for all valid results as Weight/SumWeight, where SumWeight is the sum of all valid weights. easiest example is, if all weights add up to 100, every weight is the percentage chance (but with this calculation it doesnt have to add up to 100)
use the offset returned previously to get the lower random boundary, so only upgrades get rolled
roll randomly on the list
go through the list, and return the first one that is valid and satisfies the roll result
Valid entries might depend on date and something called reroll that makes lbx upgrades possible. Next version will change things around a bit, but it will work off the same principles, just easier (especally for lbx upgrades)
If I am playing BT with all 3 DLCs, what are the relevant folders and files? I noticed there are "Vanilla" and "BTX".... is BTX the Extended 3025? What if I install BTA-3062, will this mod work for it?
PS. I am not getting any AC5+s. I got several LB2x, AC10+++, AC20+++s, ML+++s, LL+++s, LRM+++ but just no AC5+??? Thanks!
For Vanilla, use only the main BTRandomMechComponentUpgrader file. BTX is Battletech Extended https://www.nexusmods.com/battletech/mods/387 There is no config for another big modpack, but as long as they did not remove any Weapons, the vanilla ones should kinda work. (Or you write your own configs for it.) Small warning: this was never tested with MechEngineer, so this might produce lots of invalid mechs.
Concerning the AC5+s, the mech in question needs an AC5 to upgrade to one, the rest is just random.
I encounter a lot of Shadow Hawks which carry AC5, after another day I am still not getting any AC5+s.
How do I set mod to upgraded all items? Should I edit default_vanilla.json "UpgradePerComponentChance": 1?
And how do I force a guaranteed AC5+ upgrade? Should I edit the AC5_st.json and edit the desired AC5 variant like: { "ID": "Weapon_Autocannon_AC5_2-Federated", "Weight": 10 }, while setting the rest to 0?
And how does SimGameConstants.json's VeryRareWeaponChance and RareWeaponChance affects the outcome?
Setting UpgradePerComponentChance to 1 will upgrade every component. To force an upgrade to Weapon_Autocannon_AC5_2-Federated set its weight to something >1 and every other weight to 0. Nothing in SimGameConstants.json has any effect on upgrades performed by this mod. These variables are only used to upgrade salvage after it is generated (if the corresponding difficulty setting allows it).
I finally got AC5+s after much much more missions. Though AC5 is common, they simply do not roll AC5+s for me enough...
One thing I do notice is enemies spawm with UACs, ERs and Pulse Lasers, but I am not getting them in the salvage list in spite the fact that I carefully disabled those mechs without destroying the gear...
I finally got AC5+s after much much more missions. Though AC5 is common, they simply do not roll AC5+s for me enough...
One thing I notice is enemies sometimes spawn with UACs, ERs and Pulse Lasers; but I am not getting them in the salvage list in spite the fact that I carefully disabled those mechs without destroying the gear... Game removing gears not supposed to be in the game? Or is it time based? I am playing vanilla - campaign and career modes.
The ammo fixer (that part that balances ammo after you upgrade ac -> lbx) probably gets confused by that, but thats the only problem i can thing of now. I would just try it and see what happens.
Hey also, couple of queries on weapon-type-switching:
"UpgradeAll upgrades all copies to this variant (ignores if already other upgraded)."
^ Does that mean it can't trigger at all if one of that type of weapon has been upgraded, or it just skips over the already-upgraded weapon?
"SwapAmmoFrom changes ammo types to SwapAmmoTo (in conjunction with UpgradeAll used to change to different ammo weapons)."
^ How does that intersect with, say, different size SRMs? If you have a mix of SRM4s and SRM6s, will upgrading/ammo-swapping all SRM6s to Infernos leave the SRM4s without ammo?
UpgradeAll is made for the upgrade from AC to LBX, and it makes sure all instances of an AC size are upgraded. If first an AC gets upgraded to its +++ variant, and then the LBX gets rolled, the LBX gets ignored and the next upgrade gets used (in the vanilla lists this is the UAC).
If you use SwapAmmoFrom for something like SRM4, you can not be sure that there is no SRM6 now without ammo. (Although this makes no sense in Vanilla, cause Infernos uses internal ammo only.) But if it somehow happens, the modified MechDef would be invalid and get discarded for that reason.
In theory this is possible, but armor weight calculation is always a bit wonky. At the moment it just adds heatsinks to fill empty weight, as that's a lot easier.
24 comments
What does "ListLink": true mean?
Does it mean it will recursively search that list for a match?
thanks!
In the lore a number of AC/20 mechs received Gauss refits after the Helm core discovery, so it seems like it would be a 'done thing' when feasible.
except from AC2_st.json
[
How does this mod select which variant to choose?{
"ID": "Weapon_Autocannon_AC2_0-STOCK",
"Weight": 0
},
{
"ID": "Weapon_Autocannon_AC2_1-Defiance",
"Weight": 2
},
{
"ID": "Weapon_Autocannon_AC2_1-Federated",
"Weight": 2
},
.
.
a) Does it iterate the list from top to bottom? ie, in order to get the best roll, the top variants had to fail the check?
b) And how does Weight affect the chance? Does larger weight gets bigger chance? or opposite?
thanks!
- Select a Mech to be upgraded
- Search its UpgradeList from all loaded ones (that is probably only one for you now), selected by faction
- Roll if you upgrade a component
- look up, which sublist contains the component you want to upgrade. this also returns the offset (index) where it got found
- calculate the chances for all valid results as Weight/SumWeight, where SumWeight is the sum of all valid weights.
- use the offset returned previously to get the lower random boundary, so only upgrades get rolled
- roll randomly on the list
- go through the list, and return the first one that is valid and satisfies the roll result
Valid entries might depend on date and something called reroll that makes lbx upgrades possible.easiest example is, if all weights add up to 100, every weight is the percentage chance (but with this calculation it doesnt have to add up to 100)
Next version will change things around a bit, but it will work off the same principles, just easier (especally for lbx upgrades)
I noticed there are "Vanilla" and "BTX".... is BTX the Extended 3025?
What if I install BTA-3062, will this mod work for it?
PS. I am not getting any AC5+s. I got several LB2x, AC10+++, AC20+++s, ML+++s, LL+++s, LRM+++ but just no AC5+???
Thanks!
BTX is Battletech Extended https://www.nexusmods.com/battletech/mods/387
There is no config for another big modpack, but as long as they did not remove any Weapons, the vanilla ones should kinda work. (Or you write your own configs for it.) Small warning: this was never tested with MechEngineer, so this might produce lots of invalid mechs.
Concerning the AC5+s, the mech in question needs an AC5 to upgrade to one, the rest is just random.
How do I set mod to upgraded all items?
Should I edit default_vanilla.json "UpgradePerComponentChance": 1?
And how do I force a guaranteed AC5+ upgrade?
Should I edit the AC5_st.json and edit the desired AC5 variant like:
{
while setting the rest to 0?"ID": "Weapon_Autocannon_AC5_2-Federated",
"Weight": 10
},
And how does SimGameConstants.json's VeryRareWeaponChance and RareWeaponChance affects the outcome?
To force an upgrade to Weapon_Autocannon_AC5_2-Federated set its weight to something >1 and every other weight to 0.
Nothing in SimGameConstants.json has any effect on upgrades performed by this mod. These variables are only used to upgrade salvage after it is generated (if the corresponding difficulty setting allows it).
One thing I do notice is enemies spawm with UACs, ERs and Pulse Lasers, but I am not getting them in the salvage list in spite the fact that I carefully disabled those mechs without destroying the gear...
One thing I notice is enemies sometimes spawn with UACs, ERs and Pulse Lasers; but I am not getting them in the salvage list in spite the fact that I carefully disabled those mechs without destroying the gear... Game removing gears not supposed to be in the game? Or is it time based? I am playing vanilla - campaign and career modes.
"UpgradeAll upgrades all copies to this variant (ignores if already other upgraded)."
^ Does that mean it can't trigger at all if one of that type of weapon has been upgraded, or it just skips over the already-upgraded weapon?
"SwapAmmoFrom changes ammo types to SwapAmmoTo (in conjunction with UpgradeAll used to change to different ammo weapons)."
^ How does that intersect with, say, different size SRMs? If you have a mix of SRM4s and SRM6s, will upgrading/ammo-swapping all SRM6s to Infernos leave the SRM4s without ammo?
If you use SwapAmmoFrom for something like SRM4, you can not be sure that there is no SRM6 now without ammo. (Although this makes no sense in Vanilla, cause Infernos uses internal ammo only.) But if it somehow happens, the modified MechDef would be invalid and get discarded for that reason.