Page 2 of 2

Hardspace: Shipbreaker

Posted: Thu Jun 18, 2020 5:22 pm
by akarnokd
I don't have a Cheat Engine definition for them. This game is based on Unity and the game file BBI.Unity.Game.dll can be opened dnSpy. I located 3 components and changed the game's code effectively, saved the dll back (It's a modified 3MB dll file.) Afaik, Unity tends to generate code at runtime specific to the target CPU thus, for example, the aobscans in the comments above didn't work for me.





[B]class TetherController[/B]



[CODE=csharp] // Token: 0x17000054 RID: 84

// (get) Token: 0x060001E4 RID: 484

// (set) Token: 0x060001E5 RID: 485

public int NumAvailableTethers

{

get

{

return 10; // <--------------------------

}

private set

{

this.mNumAvailableTethers = value;

if (this.OnNumTethersChanged != null)

{

this.OnNumTethersChanged(this.mNumAvailableTethers);

}

}

}[/CODE]



struct GameSessionTimerData

[CODE=csharp] [BurstDiscard]

public static GameSessionTimerData FromLevelData(LevelAsset.LevelData levelData)

{

bool enabled = false;

bool active = false;

float completionTimeInSeconds = levelData.CompletionTimeInSeconds * 100f; // <-----

bool timerCountsUp = levelData.TimerCountsUp;

if (timerCountsUp)

{

enabled = true;

active = true;

}

else if (completionTimeInSeconds > 0f)

{

enabled = true;

active = true;

}

return new GameSessionTimerData(timerCountsUp, timerCountsUp ? 0f : completionTimeInSeconds, timerCountsUp ? 36000f : completionTimeInSeconds, enabled, active);

}[/CODE]



[B]record OxygenComponent [/B]

[CODE=csharp] // Token: 0x17000895 RID: 2197

// (get) Token: 0x06001C9E RID: 7326

// (set) Token: 0x06001C9F RID: 7327

public float Value

{

get

{

return 400f;

}

set

{

this.Current = Math.Max(400f, value);

}

}

[/CODE]

Hardspace: Shipbreaker

Posted: Thu Jun 18, 2020 10:00 pm
by happyTugs
^^don't really know why you would mod the dll when you can just write a script for it since max values exist in the same struct.

i updated the table with slightly more features.

Hardspace: Shipbreaker

Posted: Thu Jun 18, 2020 10:24 pm
by Legath
[QUOTE="happyTugs, post: 140008, member: 39952"]

^^don't really know why you would mod the dll when you can just write a script for it since max values exist in the same struct.



i updated the table with slightly more features.



speaking of which, there is a debug service in which you can set no clip and god mode.

[/QUOTE]

because, with cheat engine table on, the game crashes. not constantly, but often.

modding the dll seems a better idea compared to those circumstances.

Hardspace: Shipbreaker

Posted: Thu Jun 18, 2020 10:37 pm
by happyTugs
Legath wrote: because, with cheat engine table on, the game crashes. not constantly, but often.
is that really the case?

personally, i never had that issue so i wouldn't know. usually, the game crashes whenever i declare the wrong sequence of bytes, input incorrect values before a call, or remove a function that wasn't supposed to be removed.

are any of my scripts crashing your game?

if that's the case, let me know.

Hardspace: Shipbreaker

Posted: Fri Jun 19, 2020 8:08 am
by JohnFK
[QUOTE="happyTugs, post: 140012, member: 39952"]

is that really the case?

are any of my scripts crashing your game?

[/QUOTE]



Yes and yes. If CE cannot allocate memory within a 2GB range around your injection spot, it will create a far jmp with 14 bytes in size instead of 5. Thus your scripts override other instructions, the jmp from codecave to the original function is no longer valid, the game will crash. This happens on memory intensive games. The chances for a crash are higher when you activate the scripts while the game has loaded much into memory. This happens not every time, its hard to debug. However CE has a feature to break on exception, toggle this on and repeatedly activate the scripts. When it breaks, take a look at the jmp instruction to the codecave.

Hardspace: Shipbreaker

Posted: Fri Jun 19, 2020 12:05 pm
by Legath
[QUOTE="happyTugs, post: 140012, member: 39952"]

is that really the case?



personally, i never had that issue so i wouldn't know. usually, the game crashes whenever i declare the wrong sequence of bytes, input incorrect values before a call, or remove a function that wasn't supposed to be removed.



are any of my scripts crashing your game?

if that's the case, pm me.

[/QUOTE]

no, not only your scripts.

your ones seem not to be working for me (for some reason).



I've found a table online, from some dude, idk, Colonel smth smth, whatever, he had unlimited tethers and 0 cutter heat. Then I just added astor's hook (which you modified) and now I have all I need. But once activated, all three scripts must be kept on, or the game will crash. It once crashed after I've fully disassembled a Gecko-type and was heading for master jack to end the shift. Decided to turn off the cheats. Big oof.

Hardspace: Shipbreaker

Posted: Fri Jun 19, 2020 2:05 pm
by happyTugs
ah, alright then.

i'll have a fix for it in a few (hopefully).

thanks for the info. ;)

edit. problem was that some didn't have mono enabled hence giving an error (i just forgot to mention). that was the issue from Legath. anywho, ill make that process automatic so this doesn't happen again. cheers

Table in the link below.
threads/12871/

Hardspace: Shipbreaker

Posted: Tue Jun 23, 2020 3:02 pm
by vipermaus
Any chance that you could add a way to add like 5 utility keys or otherwise calculate that memory address so people can specify their own amount? (that's what's kicking my butt right now) I think it would be REALLY beneficial free play, since you essentially go in fully upgraded.



Also, the version 2 crashed my game last night, but I am wondering if I am using it wrong; do I need to disable the scripts after every mission? Because I wasn't doing that.



Thanks!

Hardspace: Shipbreaker

Posted: Thu Jun 25, 2020 11:27 am
by happyTugs
vipermaus wrote: utility keys
i added your request and made an injection copy for it.

as for the crashing, check the thread for more information.

jumps have been encoded to 14 bytes in the very case that the jump is larger than 2gb.
i didn't think that was the issue to begin with, but oh well.

anyhow, peace.