long-war-2 / lwotc

Port of Long War 2 to XCOM 2's War of the Chosen expansion
345 stars 92 forks source link

Overhaul Rebel tactical loadout system so it can be expanded upon via config. #1680

Open SirMrMister opened 9 months ago

SirMrMister commented 9 months ago

Currently the rebel equipement loadouts during retas/raids/randevous are "minimally" exposed to config:

I've talked with Ted and Zel and I'm gonna try and take a stab at rebuilding that system.

What I want most is to allw for mods adding in new loadouts which the game will then semi-randomly pull from.

How I envision it may work for now:

  1. Game randomly selects from an array of valid weapon categories.
  2. Game then rolls for weapon tier (I'm leaving this part of the code untouched for now).
  3. Game then randomly selects a weapon from an array of valid weapons of that category that are of the valid tier (TD: make sure best way to implement this).
  4. Game then rolls for a "utility archsetup" from an array, which would be like "Offensive + Defensive", "Offensive + Offensive", "Offensive + Utility", you know.
  5. Game then rolls once from each of the utility arrays it rolled for in the utility archsetup (i.e. Offensive would inclue grenade and flashbang, Defensive would be smoke and medkit, that kinda thing).

This is the rough plan for now. Points 2 and 3 may be swapped if, in case of Plasma where different researcehs gate different plasma-tier loadouts, you'd "Roll tier: plasma" to force the weapon actegory to be a plasma-eligible one.

Point 3 in allows more variane with mods that add sidegrades within the same category (MJ's strike, battle and auto-rifles and hunting shotguns, and Laser-Edged/Prototype Plasma side-tiers), without making less-populated categries more scarce. Weights can be added at a later point if necessary.

Point 5 allows mod-added items to also not dillute the Offensive vs Deffensive balance.

Other useful stuff to maybe add later down the line could be optional parameters for some items to be incompatible with certain weapon categories, and of course individual utility items being gated OR outdated by specific researches.

Recommended reading: discussion that prompted this, including relevant screenshots of the relevant code https://discord.com/channels/590853492084572170/891335947415867412/1206755879546781806 image image

SirMrMister commented 9 months ago

Feature requests/advises are welcome.