Battletech

Add topics here with methods, analysis, code snippets, mods etc. for a certain game that normally won't make it in the Tables or Requests sections.
Post Reply
Kay
Novice Cheater
Novice Cheater
Posts: 18
Joined: Fri Mar 31, 2017 10:52 pm
Reputation: 1

Battletech

Post by Kay »

im guessing there was some problem re-compiling the dll file. I've since started to have crashing upon entering main menu as well (first time worked fine so....)
Last edited by Kay on Sun Apr 29, 2018 11:49 pm, edited 1 time in total.

Ashar
Expert Cheater
Expert Cheater
Posts: 278
Joined: Mon May 01, 2017 7:04 pm
Reputation: 35

Battletech

Post by Ashar »

hmm, i cant find dlspy, ive found Ilspy, and dnspy, cant you link it

housellama
Novice Cheater
Novice Cheater
Posts: 22
Joined: Mon Jun 12, 2017 10:15 pm
Reputation: 2

Battletech

Post by housellama »

I used DNSpy on the steam version of the game. Also, there appear to be two versions of the DLL. Make sure you are replacing the one located at *Steam LibrarysteamappscommonBATTLETECHBattleTech_DataManaged



not the one at *Steam LibrarysteamappscommonBATTLETECHBattleTech_DataStreamingAssets oolswinDisplayDetector_DataManaged

[automerge]1525045952[/automerge]

[URL]https://github.com/0xd4d/dnSpy[/URL] <- DNSpy
Last edited by housellama on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

Ashar
Expert Cheater
Expert Cheater
Posts: 278
Joined: Mon May 01, 2017 7:04 pm
Reputation: 35

Battletech

Post by Ashar »

yes, ive got teh right file, theres only 1 that is around 12MB, but i cant get any of the decompilers to save the file, Ive tried Ilspy, JustDecompile, and DNspy, i see you finnaly corrected your spelling mistake after i spent 10 mins looking for Dlspy, but that doesnt sav either. It just spouts errors at the bottom.

Like i said ive never used these apps before, and i cant find anywhere telling me what to do.

[IMG]https://i.gyazo.com/9d1c05a7cd6bcb52a865492a57955666.png[/IMG]



are there some refereances i need to install, noone mentioned that, people just said it worked, not much use for first timers
Last edited by Ashar on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

bucketofmayo
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Apr 19, 2017 3:29 am
Reputation: 0

Battletech

Post by bucketofmayo »

Gentlemen, be wary of modifying the tonnage files for the mechs; Ran into a lance featuring 8 weapon systems each along with missile carriers dragging 9 racks of SRMs. This tells me the difficulty has an auto adjuster to accommodate your higher mech loadouts, gonna be looking into that.

Ashar
Expert Cheater
Expert Cheater
Posts: 278
Joined: Mon May 01, 2017 7:04 pm
Reputation: 35

Battletech

Post by Ashar »

grr, peopel using these compilers just assume people know what they are doing, so none of the guides are helpful, they probably have them setup differently, with extra stuff, that isnt installed auto, so screw it, ive uploaded my gog working dll, maybe someone can edit it for me.

[URL]http://www.mediafire.com/file/inq22qs7h2qakg6/Assembly-CSharpGOG.rar[/URL]

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Battletech

Post by SunBeam »

I'll just leave this here as reference (it's in [B]BattleTech:AbstractActor[/B]):



[code=cpp]

protected virtual void InitEffectStats()

{

this.StatCollection.AddStatistic("ToHitIndirectModifier", 0f);

this.StatCollection.AddStatistic("AccuracyModifier", 0f);

this.StatCollection.AddStatistic("CriticalHitImmunity", false);

this.StatCollection.AddStatistic("CriticalHitChanceReceivedMultiplier", 1f);

this.StatCollection.AddStatistic("KnockdownImmunity", false);

this.StatCollection.AddStatistic("TerrainCostMultiplier", 1f);

this.StatCollection.AddStatistic("CalledShotBonusMultiplier", 1f);

this.StatCollection.AddStatistic("CanShootAfterSprinting", false);

this.StatCollection.AddStatistic("CanMoveAfterShooting", false);

this.StatCollection.AddStatistic("WeaponHeatMultiplier", 1f);

this.StatCollection.AddStatistic("ForceReceiveMinDamage", false);

this.StatCollection.AddStatistic("ForceReceiveOneDamage", false);

this.StatCollection.AddStatistic("ForceReceiveMaxDamage", false);

this.StatCollection.AddStatistic("DamageReductionMultiplierAll", 1f);

this.StatCollection.AddStatistic("DamageReductionMultiplierMelee", 1f);

this.StatCollection.AddStatistic("DamageReductionMultiplierEnergy", 1f);

this.StatCollection.AddStatistic("DamageReductionMultiplierBallistic", 1f);

this.StatCollection.AddStatistic("DamageReductionMultiplierMissile", 1f);

this.StatCollection.AddStatistic("DamageReductionMultiplierAntipersonnel", 1f);

this.StatCollection.AddStatistic("IgnorePilotInjuries", false);

this.StatCollection.AddStatistic("JumpDistanceMultiplier", 1f);

this.StatCollection.AddStatistic("ToHitThisActor", 0f);

this.StatCollection.AddStatistic("ToHitThisActorDirectFire", 0f);

this.StatCollection.AddStatistic("IsTargetingDummy", false);

this.StatCollection.AddStatistic("GuaranteeNextBackHit", false);

this.StatCollection.AddStatistic("GuaranteeUnhittable", false);

this.StatCollection.AddStatistic("ReceivedMoraleDamageMultiplier", 1f);

this.StatCollection.AddStatistic("MoraleBonusGain", 0);

this.StatCollection.AddStatistic("IgnorePartialCoverPenalties", true);

this.StatCollection.AddStatistic("PrecisionStrike", false);

this.StatCollection.AddStatistic("GainEvasiveFromMove", false);

this.StatCollection.AddStatistic("MaxEvasivePips", 4);

this.StatCollection.AddStatistic("DeferResetsInstability", false);

this.StatCollection.AddStatistic("GuardedFromBeingStationary", false);

this.StatCollection.AddStatistic("PhaseModifier", 0);

this.StatCollection.AddStatistic("PhaseModifierSelf", 0);

}

[/code]





And these are for weapons ([B]BattleTech:Weapon[/B]):



[code=cpp]

public override void InitStats()

{

base.InitStats();

this.statCollection.AddStatistic("MinRange", this.weaponDef.MinRange);

this.statCollection.AddStatistic("MinRangeMultiplier", 1f);

this.statCollection.AddStatistic("MaxRange", this.weaponDef.MaxRange);

this.statCollection.AddStatistic("MaxRangeModifier", 0f);

this.statCollection.AddStatistic("ShortRange", this.weaponDef.ShortRange);

this.statCollection.AddStatistic("MediumRange", this.weaponDef.MediumRange);

this.statCollection.AddStatistic("LongRange", this.weaponDef.LongRange);

this.statCollection.AddStatistic("HeatGenerated", (float)this.weaponDef.HeatGenerated);

this.statCollection.AddStatistic("ForceMaxDamage", false);

this.statCollection.AddStatistic("HeatDamageModifier", this.weaponDef.HeatDamage);

this.statCollection.AddStatistic("CriticalChanceMultiplier", this.weaponDef.CriticalChanceMultiplier);

this.statCollection.AddStatistic("RefireModifier", this.weaponDef.RefireModifier);

this.statCollection.AddStatistic("ShotsWhenFired", this.weaponDef.ShotsWhenFired);

base.StatCollection.AddStatistic("ProjectilesPerShot", this.weaponDef.ProjectilesPerShot);

this.statCollection.AddStatistic("AttackRecoil", this.weaponDef.AttackRecoil);

this.statCollection.AddStatistic("InternalAmmo", this.weaponDef.StartingAmmoCapacity);

base.StatCollection.AddStatistic("TemporarilyDisabled", false);

if (this.Type != WeaponType.Melee)

{

this.statCollection.AddStatistic("DamagePerShot", this.weaponDef.Damage);

this.statCollection.AddStatistic("Instability", this.weaponDef.Instability);

this.statCollection.AddStatistic("AccuracyModifier", this.weaponDef.AccuracyModifier);

this.statCollection.AddStatistic("DamageVariance", this.weaponDef.DamageVariance);

}

else

{

ChassisDef chassis = ((Mech)this.parent).MechDef.Chassis;

if (this.WeaponSubType != WeaponSubType.DFA)

{

this.statCollection.AddStatistic("DamagePerShot", chassis.MeleeDamage);

this.statCollection.AddStatistic("Instability", chassis.MeleeInstability);

this.statCollection.AddStatistic("AccuracyModifier", chassis.MeleeToHitModifier);

}

else

{

this.statCollection.AddStatistic("DamagePerShot", chassis.DFADamage);

this.statCollection.AddStatistic("Instability", chassis.DFAInstability);

this.statCollection.AddStatistic("AccuracyModifier", chassis.DFAToHitModifier);

}

this.statCollection.AddStatistic("DamageVariance", 0);

}

base.StatCollection.AddStatistic("OverheatedDamageMultiplier", this.weaponDef.OverheatedDamageMultiplier);

this.statCollection.AddStatistic("HeatDamagePerShot", this.weaponDef.HeatDamage);

this.ResetWeapon();

}

[/code]
Last edited by SunBeam on Thu Jan 01, 1970 12:00 am, edited 3 times in total.

tommyturd
What is cheating?
What is cheating?
Posts: 1
Joined: Mon Apr 30, 2018 9:15 am
Reputation: 0

Battletech

Post by tommyturd »

[QUOTE="Ashar, post: 44025, member: 3790"]grr, peopel using these compilers just assume people know what they are doing, so none of the guides are helpful, they probably have them setup differently, with extra stuff, that isnt installed auto, so screw it, ive uploaded my gog working dll, maybe someone can edit it for me.

[URL]http://www.mediafire.com/file/inq22qs7h2qakg6/Assembly-CSharpGOG.rar[/URL][/QUOTE]



Not sure if anyone has helped you out yet, but I've attached my .dll for the GOG version that works for me, damage should be back to normal with 'god' mode. Hope it helps.
Last edited by tommyturd on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

Anexgohan
Noobzor
Noobzor
Posts: 6
Joined: Sat Apr 28, 2018 1:20 am
Reputation: 0

Battletech

Post by Anexgohan »

[QUOTE="Ashar, post: 44025, member: 3790"]grr, peopel using these compilers just assume people know what they are doing, so none of the guides are helpful, they probably have them setup differently, with extra stuff, that isnt installed auto, so screw it, ive uploaded my gog working dll, maybe someone can edit it for me.

[URL]http://www.mediafire.com/file/inq22qs7h2qakg6/Assembly-CSharpGOG.rar[/URL][/QUOTE]



Ok let me help you out here, first off im a noob as you so dont expect anyone to hand hold you through this, you have to put some efforts by yourself and get help pointers here and there.

ok so the software I mentioned is dnspy link : [URL]https://github.com/0xd4d/dnSpy/releases[/URL]

in releseases just get the first one dnSpy.zip

unpack it and start the dnSpy.exe

now open the Assembly-CSharp.dll in dnspy and search for "setgodmode" without quotes

now it will find you 1 entry double click on it and it will take you to the code

now browse through and locate this "weapon.StatCollection.ModifyStat("debug", -1, "DamagePerShot", StatCollection.StatOperation.Float_Multiply, 10f, -1, true);"

right click on it and select "Edit Method" and change the values you need in this case set the 10f to 1f for normal damage

after you are done click compile and you are done with the editing

Go to file and select Save Module and overwrite the file.

Start the game and your new changes should apply.



Also as I said im a noob too but I learned all this from the screenshots Sunbeam posted and just 1 youtube video. Happy hunting

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Battletech

Post by SunBeam »

Here's the "screenshots" topic he mentioned: [URL]https://fearlessrevolution.com/threads/battletech-ce-mono-vs-justdecompile.6630[/URL]. Cheers!

User avatar
StonerMk2
Noobzor
Noobzor
Posts: 8
Joined: Thu Nov 30, 2017 12:49 am
Reputation: 0

Battletech

Post by StonerMk2 »

[QUOTE="bucketofmayo, post: 44024, member: 2511"]Gentlemen, be wary of modifying the tonnage files for the mechs; Ran into a lance featuring 8 weapon systems each along with missile carriers dragging 9 racks of SRMs. This tells me the difficulty has an auto adjuster to accommodate your higher mech loadouts, gonna be looking into that.[/QUOTE]



I havent run into any problems yet, then again im not really going ham either. Ive only added 5-10 tons per mech im using, and usually maxing out armor takes care of whatever i added ton wise. I really havent edited too much, because i sure as hell dont want a lance rolling up on me with 6 ERPPC's and 20 racks of missles per mech. All ive done is made Double Heat Sinks buyable and added a few tons to my current mechs. Some people have said the AI uses presets, but honestly id rather not test it lol.

Ashar
Expert Cheater
Expert Cheater
Posts: 278
Joined: Mon May 01, 2017 7:04 pm
Reputation: 35

Battletech

Post by Ashar »

the godmode option in the table DOES NOT create the code, it only activates the code already present, the only way to alter it, is to directly edit the Assembly-CSharp.dll in your games folder. So stop asking.

Download DNSpy, and you can very easily edit the file yourself.

[URL]https://github.com/0xd4d/dnSpy/releases[/URL]

[URL]https://fearlessrevolution.com/threads/battletech.6563/page-4[/URL]
Last edited by Ashar on Thu Jan 01, 1970 12:00 am, edited 3 times in total.

KS212
Expert Cheater
Expert Cheater
Posts: 1139
Joined: Fri Mar 03, 2017 5:29 pm
Reputation: 143

Battletech

Post by KS212 »

Aha... Ok, now THAT makes a lot more sense! Downloaded DNSpy and edited the 10f to something like 2f, now its not so cakewalk.



Thanks for the info!

Ashar
Expert Cheater
Expert Cheater
Posts: 278
Joined: Mon May 01, 2017 7:04 pm
Reputation: 35

Battletech

Post by Ashar »

the 10x value made way more than that, cause when activating it once, my small laser showed an output of 2500000, still now ive edited the dll they are all back to original values, so thx either wya, you the one who first posted about the code you found, and the table, so its all working awesome. Still not sure why that dll that was posted caused crashes, puzzling.

User avatar
HEROES
Novice Cheater
Novice Cheater
Posts: 21
Joined: Fri Mar 17, 2017 8:11 am
Reputation: 2

Battletech

Post by HEROES »

Sorry english i'm not good





how to Editing shop







[IMG]https://i.imgur.com/B39O5fN.png[/IMG][IMG]https://i.imgur.com/3rOLdI9.png[/IMG]



1. Open SteamSteamAppsCommonBattletechBattleTech_DataStreamingAssetsdatasimGameConstantsSimGameConstants.json

change "DefaultShopMaxInventory" : 50, to "DefaultShopMaxInventory" : 500, Or you want



2. Editing SteamsteamappscommonBATTLETECHBattleTech_DataStreamingAssetsdatashopsshopdef_Components_base_0.json for HeatSink, JumpJet ,Cockpits all Components



Editing SteamsteamappscommonBATTLETECHBattleTech_DataStreamingAssetsdatashopsshopdef_Mech_0.json for buy Mechs



3.in game go to Star map

change star systems

go to systems store Enjoy



Remember if you want to buy Mechs go to planet manufacturing





ok I attached a sample to study.
Last edited by HEROES on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users