wmtorode / mechaffinity Goto Github PK
View Code? Open in Web Editor NEWA Mod for HBS's BattleTech that makes pilots bond with their mechs
A Mod for HBS's BattleTech that makes pilots bond with their mechs
Allow chassis quirks to have assoicated affinites, this will be a third affinity set
right now its decay after x missions, add an option for a per x missions
this will allow the AI to receive affinites, should be based on a tag then deployment count
example having no training sim gives XX deploys per decay cycle. with level 1 sims it would lessen
this should kick in on pilots who are not deployed to a mission
Would you be interested in a change where mechs that are over the topAffinitiesInTooltipCount shows a one line summary?
Before I put in a pull request, just wanted to check if you are interested in the change and get your feedback.
The prototype code uses the following text if the mech is over the topAffinitiesInTooltipCount and the deployment count is more than zero:
$"<b>{chassisName}: ({deploymentCount})</b>\n";
The normal Affinities tool tip text is unchanged otherwise.
Would you like the feature to have a setting something like showAdditionalAffinitiesInTooltip, which defaults to true or perhaps just use the showAllPilotAffinities for this purpose as well?
My apologies if this is not the right forum. I don't contribute on GitHub very often.
BTA has both chasis affinities and global ones. For example:
Global - Attuned (5): Get a +1 bonus to all skills
Chassis - Nimble (8): +15% jump distance
When the user hits 8 missions, "Nimble" is shown, while Attuned disappears (while still having an effect). It would be nice to see both, so that we don't have to edit "and +1 to all skills" into each individual chassis affinity.
One potential solution would be to display the highest value in each "category" for each mech - eg, the best chassis affinity and best global affinity. This would also support more flexible layouts, eg. adding Mastered (15): +2 to all skills, which in the current setup, would hide Nimble, and we'd have no way to display that the jumping bonus still applies.
Hi there,
Thanks very much for making this mod! I just had a question about the vanilla version. How do the stat bonuses you get after 3 and 7 missions work? I was assuming that they would get you the benefits of a higher stat, eg if you go from 8 to 9 Guts you get +30 heat threshold, that sort of thing. But this doesn't seem to happen.
Do you at least get the bonus chance to hit from a higher Gunnery?
adding to many stats to company stats may slow it down,
may be best to track on the individual pilot stat collections or inject into the global reference container
The pilot.FromPilotDef() call in SimGameState_RehydratePatch is causing injuries to be lost.
The pilotDef does not have injuries set at this point but the pilot does, so the call erases those injuries. I was able to fix the issue with a simple check and Traverse call but I don't know if there is a deeper underlying issue.
Here's the fixed code starting on line 32 of SimeGameState.cs:
if (Main.settings.enablePilotQuirks)
{
foreach (Pilot pilot in __instance.PilotRoster.ToList())
{
PilotQuirkManager.Instance.proccessPilot(pilot.pilotDef, true);
if (pilot.Injuries != pilot.pilotDef.Injuries)
Traverse.Create(pilot.pilotDef).Property("Injuries").SetValue(pilot.Injuries);
pilot.FromPilotDef(pilot.pilotDef);
}
// the commander is not part of the roster, so need to specifically call it.
PilotQuirkManager.Instance.proccessPilot(__instance.Commander.pilotDef, true);
if (__instance.Commander.Injuries != __instance.Commander.pilotDef.Injuries)
Traverse.Create(__instance.Commander.pilotDef).Property("Injuries").SetValue(__instance.Commander.Injuries);
__instance.Commander.FromPilotDef(__instance.Commander.pilotDef);
}
I added some vehicle assembly IDs to established Chassis Affinities that work on mechs and they were not applied.
"chassisNames : a list of chassis this affinity is available to. the chassis name is the prefab name followed by a - and the tonnage of the mech. In the event a the chassis has an assembly variant (from custom salvage), this will be used instead of the prefab. example chassis name for the assassin chrPrfMech_assassinBase-001_40"
If i understand this right, if an assembly id exists it should be used instead of the prefab ID?
Vehicle assembly IDs don't seem to be recognized. Perhaps because custom salvage labels them separately as "VAssemblyVariant"
logs show that VA is looking at the prefab name for vehicles not the assembly ID.
As discussed in BTA discord, consider moving affinity information into a tooltip available by hovering over mechwarrior portraits, both in the barracks and when assigning lances for drop.
Hi, thanks for creating this awesome mod.
I was using version 1.0.4 from Nexus until I noticed that there was a later version here. When I installed 1.2.0, I could no longer go into the skirmish mechbay, which is what I'd been using to tinker with designs; I just get the endless spinning wheel.
There's nothing in MechAffinity.log, and the modtek logs don't show anything either.
I have a bunch of mods loaded, but none of the big modpacks (unless you count Expanded Arsenal):
[
"AdvancedWeapons",
"AlternativeReputation",
"Artillery",
"BattletechPerformanceFix",
"CAB-Clan Mech",
"CAB-CU",
"CAB-IS Mech",
"CAB-Misc",
"CAB-Tanks",
"CASE",
"CrystalClear",
"Elite Forces -Stand Alone-",
"Even More Gear",
"Extreme Weapons",
"FYLS",
"Haakon's Hangar",
"MechAffinity",
"MeleeMover",
"Mission Control",
"ModTek",
"More Guns",
"More Lazerz",
"More Rokkits",
"PanicSystem",
"Pilot Fatigue",
"PilotHealthPopup",
"PlasmaRifle",
"Repair Bays",
"Retrainer",
"SkipIntro",
"Expanded Arsenal",
"Elite Arsenal"
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.