stacksm4sher / NotSoLethalCompany

:)
GNU General Public License v3.0
1 stars 0 forks source link

interesting project! #1

Open vxcall opened 9 months ago

vxcall commented 9 months ago

Hi, thanks for open sourcing an interesting project.

I've never interacted with mono-game with C++ therefore this looks attractive to learn from to me. Since the logger bin is not there yet, i quickly coded/built my own and placed it yet the resulting libNotSoLethalCompany.dll refused to be injected to the process somehow. I guess i fucked up with dll linking.

Anyways, Im looking forward to seeing this project to be completed by u and have some fun.

p.s.

successfully injected but there's a bug.

void *hudManagerInstance = GetStaticFieldValue("HUDManager", "k__BackingField;", "", GAME_ASSEMBLY, 8);

I thought k__BackingField; here is supposed to be Instance or <Instance>k__BackingField ? neither of them worked tho. Since HUDManager doesnt have other static members, idk what I'm meant to do.

stacksm4sher commented 8 months ago

Hi, glad to hear your feedback! :)

I'm already working on what you described, I'm currently stuck at work with a bunch of end-of-year tasks, but after the new year I'll commit fix changes!

vxcall commented 8 months ago

Take your time buddy.

I ended up with using C# to scratch the surface of Mono game modding. C++ was not for me in this scenario, it requires prior modding experience to being comfortable with how Mono works which i lacked.

I dont think I would do Mono modding with C++ in near future but I'm keen to see your fix! ( and dont forget to put the logger lib too man :laughing: )

Anyways, thanks for nice project!

vxcall commented 8 months ago

Oh and let me share u a tricky thing about the game.

This game has a problem with camera.WorldToScreenPoint. Use WorldToScreenViewport instead and multiply window width and height as below.

private Vector3 world_to_screen(Vector3 world)
{
  Vector3 screen = camera.WorldToViewportPoint(world);

  screen.x *= Screen.width;
  screen.y *= Screen.height;

  screen.y = Screen.height - screen.y;

  return screen;
}

also Camera.main is tend to be nullptr I think. So use localPlayer.gameplayCamera for camera instead.

U may know them already but I stuck at this badly so just wanna share it with u haha.