Battletech

Ask about cheats/tables for single player games here
User avatar
WarStalkeR
Expert Cheater
Expert Cheater
Posts: 122
Joined: Fri Mar 03, 2017 6:58 am
Reputation: 33

Battletech

Post by WarStalkeR »

Found a way to cheat skill levels. For that you need: [b]Telerik Just Decompile[/b] or [b]ILSpy[/b] and plugin called [b]Reflexil[/b] for any of them (I used v2.2 but newer if exist will be fine too).



1) Open [b]Assembly-CSharp.dll[/b] from folder [b]SteamsteamappscommonBATTLETECHBattleTech_DataManaged[/b] with any of them.

2) Go to the function [b]Assembly-CSharp -> BatteTech -> SimGameState -> GetLevelCost(Int32)[/b]

3) Open it with [b]Reflexil[/b] plugin and open in new windows [b]Instructions[/b] tab.

4) All instructions that are present in there, replace them with these:

[img]https://i.imgur.com/2BVyppV.png[/img]

5) Don't forget to save and overwrite original [b]Assembly-CSharp.dll[/b] and enjoy! Now all skills cost only 1 XP. If you want, you can try to set it to 0, but in case if something divides by that number - you know the consequences.

Alebastrowitch
Expert Cheater
Expert Cheater
Posts: 51
Joined: Fri Mar 24, 2017 8:21 am
Reputation: 16

Battletech

Post by Alebastrowitch »

SteamsteamappscommonBATTLETECHBattleTech_DataStreamingAssetsdata

You'll find there all sort of things you can edit

Have fun trying

User avatar
jungletek
Shogun
Shogun
Posts: 179
Joined: Tue Oct 17, 2017 7:31 am
Reputation: 62

Battletech

Post by jungletek »

[QUOTE="WarStalkeR, post: 43369, member: 227"]Found a way to cheat skill levels. For that you need: [B]Telerik Just Decompile[/B] or [B]ILSpy[/B] and plugin called [B]Reflexil[/B] for any of them (I used v2.2 but newer if exist will be fine too).[/QUOTE]



Better to just use the Mono features of CE and make a script that does the same thing, rather than permanently edit one of the game's DLL's...



Also to everyone: if you're not replying with a table/trainer that fulfills the OP's request, then you're doing it wrong. This is a request sub-forum, not a chat and share ways to hack X game sub-forum. Make a thread in the appropriate section for that.
Last edited by jungletek on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

Coga
Cheater
Cheater
Posts: 35
Joined: Fri Dec 01, 2017 10:10 am
Reputation: 12

Battletech

Post by Coga »

[QUOTE="Alebastrowitch, post: 43370, member: 1512"]SteamsteamappscommonBATTLETECHBattleTech_DataStreamingAssetsdata

You'll find there all sort of things you can edit

Have fun trying[/QUOTE]



Any way to edit the bonuses that your starting choices give? I thought it was lifepathnodes, but that doesn't seem to be it.

adept23
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Apr 25, 2018 8:06 am
Reputation: 0

Battletech

Post by adept23 »

So, while I haven't figured out how to edit skill costs or anything mucking with game settings, you can change the base amount of XP earned per mission:



Go to: SteamsteamappscommonBATTLETECHBattleTech_DataStreamingAssetsdatasimGameConstants and open SimGameConstants.json. There, go down to the "Pilot" header and change "BaseXPGainPerMission" from 400 to whatever you want. Reload the game, and there you go. You should backup SimGameConstants.json first.



Looks like changing it to 120000 should get everyone maxed after one mission.
Last edited by adept23 on Wed Apr 25, 2018 8:34 am, edited 1 time in total.

Kokuto
Noobzor
Noobzor
Posts: 13
Joined: Mon Sep 18, 2017 5:48 am
Reputation: 0

Battletech

Post by Kokuto »

So what's the pointer for money? Not been able to properly locate it. The figures itself seem unreliable to track.

User avatar
Mart1z
Expert Cheater
Expert Cheater
Posts: 58
Joined: Thu Sep 21, 2017 3:56 pm
Reputation: 6

Battletech

Post by Mart1z »

SimGameConstants.json - BATTLETECHBattleTech_DataStreamingAssetsdatasimGameConstants

Notepad++ - "StartingCBills" - 980000 - change - 9999999999

Snowz
What is cheating?
What is cheating?
Posts: 3
Joined: Wed Apr 25, 2018 12:42 am
Reputation: 0

Battletech

Post by Snowz »

[QUOTE="jungletek, post: 43376, member: 9475"]Also to everyone: if you're not replying with a table/trainer that fulfills the OP's request, then you're doing it wrong. This is a request sub-forum, not a chat and share ways to hack X game sub-forum. Make a thread in the appropriate section for that.[/QUOTE]

Frankly, at this point, I'm fairly sure anyone coming here will be glad for ANY help they can get at all.

[QUOTE="Kokuto, post: 43407, member: 8619"]So what's the pointer for money? Not been able to properly locate it. The figures itself seem unreliable to track.[/QUOTE] Money should be fairly easy, be on your ship, have half or a full mill or so (just not a too small, insignificant amount). Save before changing anything. Simply search for your money value in a 4 byte search. You'll probably end up with 6-10 values, simply change them all and switch screen and your value should update. This worked for me and should work for anyone, I'm a novice when it comes to using CE, but this was a pretty basic maneuver.
Last edited by Snowz on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

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

Battletech

Post by SunBeam »

CE's Mono should help with finding the Telerik equivalent of the statically decompiled function. Furthermore, I suggest looking for "cheats", "developer", "debug", etc. - words - and inspect the results to determine ways to either make use of them or enable the console ;) Most Unity games come with these features-in, just disabled by developers for some random reason. Can someone upload the [B]Assembly-CSharp.dll[/B] for me? :)

machida1
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Apr 25, 2018 12:45 pm
Reputation: 0

Battletech

Post by machida1 »

[QUOTE="SunBeam, post: 43414, member: 12587"]CE's Mono should help with finding the Telerik equivalent of the statically decompiled function. Furthermore, I suggest looking for "cheats", "developer", "debug", etc. - words - and inspect the results to determine ways to either make use of them or enable the console ;) Most Unity games come with these features-in, just disabled by developers for some random reason. Can someone upload the [B]Assembly-CSharp.dll[/B] for me? :)[/QUOTE]

[URL]https://mega.nz/#!VnICzRiJ!d3gblcATnsVzVEUoyidP99weVin1yyNIz8sbuT7iVFA[/URL]

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

Battletech

Post by SunBeam »

I didn't even start the game and..



[IMG]https://i.imgur.com/4gZHfxJ.png[/IMG]



Enable Mono in CE, open Memory Viewer, then go to [B]BattleTech.UI::CombatDebugHUD::Update[/B] function. I don't have all the libraries, therefore not all the references are resolved:



[code=cpp]if (DebugConsole.DebugCommandsUnlocked && Input.GetKeyDown(92))[/code]

But.. in Memory Viewer, close to the top of the function, you should find something like:



[code=NASM]

mov eax,[instance_ptr] // or "call func" which already gets instance ptr in eax

cmp [eax+offset],0

jne @f

push 92d_key_equivalent

call GetAsyncKeyState

test ax,ax

jne short @f

//

@@;

[/code]

If [B]DebugCommandsUnlocked[/B] BOOL is 1, you can then find all its uses and what you can enable with the various key presses. The above location seems to fiddle with [B]AIMood.SensorLocking[/B]:



[code=cpp]

for (int i = 0; i < this.combatState.AllMechs.Count; i++)

{

Mech item = this.combatState.AllMechs[i];

AIMood behaviorTree = item.BehaviorTree.mood;

if (behaviorTree == AIMood.Defensive)

{

str = "DEF";

}

else

{

str = (behaviorTree == AIMood.SensorLocking ? "SLK" : "OFF");

}

if (item.DynamicUnitRole == UnitRole.Undefined || item.IsDead)

{

UnitRole dynamicUnitRole = item.DynamicUnitRole;

string str1 = string.Format("no role [{1}]", dynamicUnitRole.ToString(), str);

AIUtil.ShowAIDebugUnitFloatie(item, str1);

}

else

{

UnitRole unitRole = item.DynamicUnitRole;

string str2 = string.Format("{0} [{1}]", unitRole.ToString(), str);

AIUtil.ShowAIDebugUnitFloatie(item, str2);

}

}

List allCombatants = this.combatState.GetAllCombatants();

for (int j = 0; j < allCombatants.Count; j++)

{

ICombatant combatant = allCombatants[j];

AIUtil.ShowAIDebugUnitFloatie(combatant, string.Format("Tags: [{0}]", combatant.EncounterTags));

}

EncounterLayerParent.showTagsInGame = !EncounterLayerParent.showTagsInGame;

[/code]

[automerge]1524664530[/automerge]

Here's some more:



[IMG]https://i.imgur.com/J45rlYI.png[/IMG]



Head to [B]HBS.DebugConsole::Initialize[/B]. While here:



[code=cpp]

private void Initialize()

{

DebugConsole.DebugCommandsUnlocked = (DebugBridge.TestToolsEnabled ? true : PlayerPrefs.GetInt("last_debug_state", 0) == 1); // here

this.consoleWindowID = GUIUtility.GetControlID(2);

string[] strArrays = PlayerPrefs.GetString("Console.CommandHistory", string.Empty).Split(new char[] { '
' });

for (int i = 0; i < (int)strArrays.Length && i < this.historyBufferSize; i++)

{

if (!string.IsNullOrEmpty(strArrays[i].Trim()))

{

this.history.AddLast(strArrays[i]);

}

}

this.historyNode = null;

}

[/code]

Notice you need [B]DebugBridge.TestToolsEnabled [/B]BOOL to be set to 1.



Then there's also this:



[code=cpp]

protected override void Update()

{

base.Update();

if (DebugConsole.DebugCommandsUnlocked)

{

if (BTInput.Instance.Toggle_DebugHUD().get_WasPressed()) // here

{

base.Visible = !base.Visible;

if (this.combatDebugHUD != null)

{

this.combatDebugHUD.Visible = base.Visible;

}

}

if (BTInput.Instance.DEBUG_ResetAchievement().get_WasPressed())

{

this.DEBUG_ClearAchievements();

}

}

}

[/code]

That code, if debugged a bit, would give you an idea how to get [I]Toggle_DebugHUD[/I] working :p



Last use of that debug BOOL is here:



[code=cpp]

protected override void Update()

{

base.Update();

if (DebugConsole.DebugCommandsUnlocked && Input.GetKeyUp(118) && (Input.GetKey(304) || Input.GetKey(303)) && (Input.GetKey(306) || Input.GetKey(305))) // here

{

base.Visible = !base.Visible;

}

}

[/code]

So, if that BOOL is 1 and you press a combination of keys (I'll check MSDN), something will show. Perhaps the debug HUD or console :p



BR,

Sun
Last edited by SunBeam on Thu Jan 01, 1970 12:00 am, edited 5 times in total.

NomuNomu
Cheater
Cheater
Posts: 31
Joined: Fri Mar 03, 2017 8:54 am
Reputation: 18

Battletech

Post by NomuNomu »

Left Ctrl + Shift (Either side) + Enter, then type 'hbsrocks' and hit Enter again. After that you should be able pop open the console with Ctrl + ~ (Useless since I think there are no commands registered) or Ctrl + Shift + Minus to pop open the Debug UI menu during combat (This one has the fun buttons, including one to SPEED UP MECH ANIMATION SPEED).

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

Battletech

Post by SunBeam »

And some more:



[code=cpp]

else if (_current.get_keyCode() == 27)

{

this.secretCodeBuffer = string.Empty;

if (!_current.get_shift())

{

DebugConsole.logger.Log("::-->> CURRENT ENTRY CLEARED");

}

else

{

DebugConsole.logger.Log("::-->> DEBUG COMMANDS UNLOCK CODE CLOSING INPUT");

this.scanForUnlockCode = false;

}

}

else if (_current.get_keyCode() == 271 || _current.get_keyCode() == 13)

{

if (this.secretCodeBuffer != "hbsrocks") // here

{

DebugConsole.logger.Log(string.Concat("::-->> INCORRECT DEBUG COMMANDS UNLOCK CODE ENTERED: ", this.secretCodeBuffer));

}

else

{

DebugConsole.logger.Log("::-->> DEBUG COMMANDS UNLOCKED");

DebugConsole.DebugCommandsUnlocked = true;

PlayerPrefs.SetInt("last_debug_state", 1);

this.scanForUnlockCode = false;

}

this.secretCodeBuffer = string.Empty;

}

_current.Use();

[/code]

[USER=258]@NomuNomu[/USER]: You got ahead of me :p LOL

[automerge]1524666585[/automerge]

If the [B]DEBUG_[/B] functions aren't linked to any activator, then simply either remap Unity key-checks to those functions OR write a [I]CreateThread[/I] hook that would do something like this (taken from my AC4 script):



[code=CEA]

[ENABLE]



alloc( KeyHandlerThread, 0x1000, your_game.exe )

registersymbol( KeyHandlerThread )

CreateThread( KeyHandlerThread )

label( KeyHandlerOff )

registersymbol( KeyHandlerOff )

label( ExitKeyHandler )



KeyHandlerThread:

push A

call kernel32.Sleep



cmp [KeyHandlerOff],1

jne short @f

mov [KeyHandlerOff],2

ret

@@:

push 60 //VK_NUMPAD0

call GetAsyncKeyState

test ax,ax

je @f



call Test

push C8

call kernel32.Sleep



@@:

jmp KeyHandlerThread



Test:

// add here your test code

call BattleTech.UI::CombatDebugHUD::DEBUG_ClearAchievements

// add here your test code

ret



KeyHandlerOff:

dd 0



[DISABLE]



{$lua}



if( syntaxcheck == false ) then --actual execution

local starttime = getTickCount()



if readInteger( "KeyHandlerOff" ) == 0 then --could be 2 already

writeInteger( "KeyHandlerOff", 1 ) --tell the thread to kill itself

end



while( getTickCount() < starttime + 1000 ) and ( readInteger( "KeyHandlerOff" ) ~= 2 ) do --wait till it has finished

sleep( 20 )

end



if( getTickCount() > starttime + 1000 ) then --could happen when the window is shown

showMessage( 'Disabling the thread failed!' )

error( 'Thread disabling failed!' )

end

sleep( 1 )

end



{$asm}



unregistersymbol( KeyHandlerOff )

unregistersymbol( KeyHandlerThread )

dealloc( KeyHandlerThread )

[/code]

Change [I]your_game.exe[/I] to the name of your game; press [B]Numpad 0[/B] to test/debug break. Then play with these functions (note not all of them can be called directly, as you may need [B]additional parameters[/B]; just so I don't hear you bitch about crashes):



[IMG]https://i.imgur.com/7KVdfEm.png[/IMG]



BR,

Sun

[automerge]1524667267[/automerge]

Game looks nice - at least from the screenshots; will see if it has the same crappy Unity GFX feel - I'll give it a try later on today. Can't guarantee I'll fetch the same version, as I don't plan to buy it. But at least will let you know if the [I]DEBUG_[/I] functions need any parameters or work by default.
Last edited by SunBeam on Wed Apr 25, 2018 2:41 pm, edited 6 times in total.

User avatar
Scanner
Novice Cheater
Novice Cheater
Posts: 21
Joined: Tue May 23, 2017 10:27 pm
Reputation: 3

Battletech

Post by Scanner »

Ah, okay.

You have to search 4bytes 1 time with... 980000 (your actual cbills). Then you have shown some result.

Just change all to... eq 150000000. That´s all.



With xp it didnt work and I didnt find out how. Next try is using floating and range.

(tested - didn´t work. with range I found one result but editing didnt work).



Number of parts/weapons/ammunition should be work like cbills, without problems.
Last edited by Scanner on Wed Apr 25, 2018 5:14 pm, edited 2 times in total.

User avatar
STN
Founder
Founder
Posts: 4435
Joined: Thu Mar 02, 2017 7:48 pm
Reputation: 3437

Battletech

Post by STN »

BattleTech.UI:CombatDebugHUD:Update+92 - 48 0FB6 00 - movzx rax,byte ptr [rax]



Change that (DebugConsole.DebugCommandsUnlocked) to 1 to enable bringing up of the debug ui.
Last edited by STN on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: Kenobi87, SemrushBot, yamadace