Mad Games Tycoon 2
0 of 0

File information

Last updated

Original upload

Created by

Aerin the Lion

Uploaded by

riftenaerin

Virus scan

Safe to use

Tags for this mod

13 comments

  1. mynamemn
    mynamemn
    • member
    • 0 kudos
    Can you make a mod that allows you to create any size rooms, please?
  2. nascentes1
    nascentes1
    • premium
    • 1 kudos
    Hey! Another great mod. Just for the aesthetics of being able to put a plant next to a desk rather than 6m away is amazing! Thank you for your work.

    I am hitting one (really strange) issue that I'm wondering if you've seen.

    Every so often (maybe anywhere from 2-10 minutes in game; does not matter if paused or not), an item I've placed previously will suddenly "appear" in my mouse with option to place again, or to sell. Then other times, I can go for an hour without this happening one time. It's odd.

    Behavior example: When you delete a room with a radiator outside, that radiator pops into your mouse so you can place it elsewhere or sell it.

    This behavior happens randomly when I am not doing anything at all. Often from a room so far away that is not even visible to where I am on the map. I can be paused and AFK and will come back to a random Toillet placed on my mouse with the option to re-place or sell.

    Even as I'm typing this with the game on my second monitor, I just saw a Graphics Desk do this. If I leave it alone for a long time, objects will _queue_ up from random places on the map. Hand Dryer from toilet on the East building, one Graphics desk from one of the 6 identical/copied Graphics rooms, etc...

    Then I need to hunt down which room is "missing something" so I know where to re-place the item.

    Any ideas?
    1. nascentes1
      nascentes1
      • premium
      • 1 kudos
      Here is a picture example I just took after coming back from being AFK for maybe an hour: https://i.imgur.com/fyJabVl.png

      It's like this in maybe 3 of 10 identical bathrooms & two graphics rooms.

      Also note the toilets being aligned. I have toilets that will randomly glitch into the wall behind them. Same with MoCap workstations.

      I do understand this is probably not the fault of this mod since you are literally just disabling collision but I thought I would mention it anyways just in case. This is my favorite mod of yours (besides Assistant!) but it's getting very annoying to me. Constantly having to re-place stuff that should be fine even WITH collision.
    2. nascentes1
      nascentes1
      • premium
      • 1 kudos
      Alllright. This issue seems to be happen under two circumstances:

      1. Toilets exist and their surrounding rooms. I've completely removed all toilets from my map and the issue has gone away entirely except for....

      [or]

      2. For some reasaon using Marketing employee search after hitting the green checkbox to hire it seems like 1 in 4 times I will randomly end up with a desk from the other side of the map. No correlation as to what type of desk. Never mocap or sound though. Usually graphics, qa, or dev. One time I hired one employee (technician) and aftrer placing them in their room, I had a QA studio _completely_ empty of desks one after another popped to my mouse to sell or re-place.

      So strange.

      Cheers.


      Edit: OK I have no idea. Still randomly happens. Started the game, loaded my save, hit spacebar: boom, 4 QA desks all queued up for me to re-place...... No idea but it is very frustrating so I'm disabling the mod for now I guess.
    3. riftenaerin
      riftenaerin
      • member
      • 4 kudos
      Thank you for your comment.
      Regarding the bug you mentioned, I have encountered it as well.

      In fact, it wouldn't be an exaggeration to say that I created this mod, "Object-Collision-Remover", specifically to circumvent this bug.

      However, it seems that there's a crucial difference between your experience and mine: even with the mod, you're still facing the bug.
      After installing the mod, I haven't encountered such issues anymore.

      Objects in this game process collision-related operations every frame, which means weird bugs can occur at any time.
      And because these operations happen every frame, it's likely that the bug behaves differently depending on the environment.

      At the moment, I can't pinpoint the exact reason for this bug's occurrence.
      The source code for MGT2 is incredibly messy, and even after spending hundreds of hours looking at it, I often find myself getting lost.
      It's possible that even the developers of MGT2 couldn't fix the bug, as you can see from the numerous bug reports on the Steam forums, none of which seem to have a solution.

      When I have some time, I'll do some more testing, and if I manage to find a fix, I might release it as an Unofficial Patch.
      At least, I believe this mod shouldn't cause the bug.
      But that's just a guess.
    4. nascentes1
      nascentes1
      • premium
      • 1 kudos
      Hey, I appreciate you taking the time to explain this. It makes sense. I also didn't understand why this mod might cause that. From your explanation, it seems this mod is NOT at fault.

      I also didn't encounter this bug for my first ~20h or so playing with your mod on Secret Bunker, but I am on that map again for the second time and am seeing it very frequently now. Very strange! I'm currently using Cheat Engine to essentially max employee needs so they never need to use toilets and then I just removed the bathrooms entirely. I don't love this because it's less immersive(and "cheat-y"), but it's OK for now.

      I also was able to at least slightly mitigate the issue with desks (though not entirely) by using bigger rooms which I know much of the community discourages due to pathing issues (shout out to Kyouko Tsukino on Steam Discussions), however with my Cheat Engine shenanigans employess just never leave their desks so larger rooms are viable. For some reason if I have one large room of 20 employees rather than 4 small rooms of 5, I don't see this nearly as often.

      I'll keep tinkering and see if I can't discover anything more useful.

      edit: Coincidental timing but you might be interested in this thread: https://steamcommunity.com/app/1342330/discussions/0/4342103279857957568/ 
    5. riftenaerin
      riftenaerin
      • member
      • 4 kudos
      Hey bro, thanks for the extra info you've shared. It's really got me thinking.

      So, I've been poking around in the MGT2 code and stumbled upon something that might explain a few things.
      Just a heads up, this is just me thinking out loud, so I could be totally off base here.

      Before we get into it, let me give you a quick rundown on what the "Object-Collision-Remover" Mod does.
      Basically, it shuts down this method called "OnCollisionStay" that kicks in during object collisions.
      Normally, this method could make objects magically appear in your hands because of the "pick-up" process it triggers.
      But with this mod turned on in the Config, "OnCollisionStay" won't even get a chance to run.

      Now, getting to the heart of the matter, based on what you've told me, I've noticed a couple of things:
      1. When you turn off snapping and place objects manually, you don't run into this issue.
      2. Objects near walls seem to get picked up by accident.
      3. The bigger the room, the less likely this is to happen.
      4. Looking at the pics you sent, it seems to happen more around the edges of the map.

      Putting all this together, I'm wondering if the "UpdateUnkorrekterRoom" method is messing things up.
      It's supposed to check what kinds of objects are in a room and if something's not right, it does the whole "pick-up" thing. But as far as I can tell, that's the only time objects get picked up without you doing anything.

      If you're up for it, I'd love to get some debug logs from you.
      If we see "UpdateUnkorrekterRoom(): (Object Name)" popping up right when an object gets picked up without reason, it'll be a pretty clear sign we're on the right track!
    6. riftenaerin
      riftenaerin
      • member
      • 4 kudos
      To enable the console and debug log for Mad Games Tycoon 2 using BepInEx, follow these steps:


      • Navigate to the directory where Mad Games Tycoon 2 is installed, typically located at: 
        "..\Steam\steamapps\common\Mad Games Tycoon 2\BepInEx\config\"

      • Open the "BepInEx.cfg" file.

      • Change the setting on line 41 to
        LogConsoleToUnityLog = true

      • Change the setting on line 48 to
        Enabled = true

      • Change the setting on line 82 to
        WriteUnityLog = true

      • Save your changes to the "BepInEx.cfg" file.

      • Please check this file after the game ends. It contains the logs. 
        "..\Steam\steamapps\common\Mad Games Tycoon 2\BepInEx\LogOutput.log"

    7. nascentes1
      nascentes1
      • premium
      • 1 kudos
      Here you are: https://gist.github.com/Nascentes/d72adb4fe548022c2a3ba3ffcfe2bc3e
      Context: I loaded my existing game, fiddled around, actually re-created my original bathroom design & re-placed them, etc... Ran the game fine for awhile, then there were 8 occurrences of items getting picked up in a row. Specifically some Support desks and Dev desks this time.

      Note: There were THOUSANDS of occurrences of:
      [Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
      Stack trace:
      in the log that I removed because unhelpful & consumed a LOT of lines. No actual stack trace on any of them (or if there are, the gist will have a trace without the 'Stack trace:' header bit somewhere)

      I also had a watch set up on the log file while playing to `grep UpdateUnkorrekterRoom` and sure enough they started popping up when the issue happened.

      --

      Hope it helps. I can pull more info if you need.

      Also cheers for the explanation on the `OnCollisionStay` method. Educational!
    8. riftenaerin
      riftenaerin
      • member
      • 4 kudos
      Thanks for the prompt comment.
      I've taken a look at the debug log. Indeed, there is a log that says
      "[Info : Unity Log] UpdateUnkorrekterRoom(): O_1953593728," looks like a bingo.

      I've released version 1.03, which includes a bypass for this method. Feel free to use it if you like; it might just fix the issue.
      However, this is only a temporary solution, as this method might turn out to be necessary for something, so I'll keep an eye on it going forward.

      I'll continue to analyze the debug log further.
    9. riftenaerin
      riftenaerin
      • member
      • 4 kudos
      Regarding the deleted log entries spanning thousands of lines, which included
      [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
      Stack trace:

      There's a significant possibility of other adverse bugs occurring.
      If it's okay with you, sharing the game's save data file could also help in addressing potential issues.

      The directory path for the save data is:
      C:\Users(USER_NAME)\AppData\LocalLow\Eggcode\Mad Games Tycoon 2and look for the .sav file.

      Thank you!
    10. nascentes1
      nascentes1
      • premium
      • 1 kudos
      Done. Also tried 1.0.3 & reproduced the issue. Fresh log included in zipfile I attached here https://github.com/Aerin-the-Lion/MGT2-Object-Collision-Remover/issues/3

      Let me know in the issue thread if it does not work & I can provide it another way.
    11. riftenaerin
      riftenaerin
      • member
      • 4 kudos
      Thank you for providing the save data.
      However, I must apologize, as it seems I mistakenly uploaded the wrong file for Version 1.03.
      Instead of the intended Object-Collision-Remover, I released Enhanced-Training Ver 1.03.
      I've corrected this mistake and uploaded the correct Ver 1.03 for Object-Collision-Remover.

      Upon loading your save data, a significant number of error logs appeared, indicating the situation is more complex than anticipated.
      However, my testing in the Version 1.03 environment revealed no notable issues.

      I'll continue working on this. :)