CGamesPlay / RimModelled

A RimWorld mod manager
MIT License
10 stars 0 forks source link

Guinea Pig here. #1

Open Drunkender opened 2 years ago

Drunkender commented 2 years ago

Wanting to test RimModelled on windows 11.

Side note tried building it myself but the window was blank. I know enough to clone and build it but not enough to know how to find the issue.

Image ![rimmodelled](https://user-images.githubusercontent.com/14418412/156009176-3e897a60-5c18-480b-97e8-4673e23480c6.png)
CGamesPlay commented 2 years ago

Hey! Glad to hear it! I'm super excited to get a Windows version of this working!

So, everything that has to do with talking to RimWorld lives in loadRimworld. Presently it's hard-coded to look for Mac paths, because... I don't know what they should be on Windows!

There's 4 paths that we need to locate:

Once I get these for your system, I can make them generic for Windows (hopefully). Then I'll add a bit of extra error handling so you don't just get a blank window, and then we should have working Windows support!

Drunkender commented 2 years ago

This is my current setup for rimworld,

My paths ``` paths: { mods: [ path.join( process.env["HOME"]!, "C:/Gaming/Games/Steam/steamapps/common/RimWorld/Data" ), path.join( process.env["HOME"]!, "C:/Gaming/Games/Steam/steamapps/common/RimWorld/Mods" ), path.join( process.env["HOME"]!, "C:/Gaming/Games/Steam/steamapps/workshop/content/294100" ), ], data: path.join( process.env["HOME"]!, "C:/Users/bradl/AppData/LocalLow/Ludeon Studios/RimWorld by Ludeon Studios" ), lib: path.join( process.env["HOME"]!, "C:/Gaming/Games/Steam/steamapps/common/RimWorld" ), }, ```

The default for windows steam is the following

Default Paths ``` paths: { mods: [ path.join( process.env["HOME"]!, "C:/Program Files (x86)/Steam/steamapps/common/RimWorld/Data" ), path.join( process.env["HOME"]!, "C:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods" ), path.join( process.env["HOME"]!, "C:/Program Files (x86)/Steam/steamapps/workshop/content/294100" ), ], data: path.join( process.env["HOME"]!, "C:/Users/USERNAME/AppData/LocalLow/Ludeon Studios/RimWorld by Ludeon Studios" ), lib: path.join( process.env["HOME"]!, "C:/Program Files (x86)/Steam/steamapps/common/RimWorld" ), }, ``` The USERNAME is different per computer.

Changing the rimworld.ts file myself did not change the result of npm install && npm start Loaded into a blank screen. Hopefully you'll have better luck.

CGamesPlay commented 2 years ago

Thanks for this info! I’m going to try and take a look into why you’re getting a blank screen on Saturday, and add some better error checking for you.

CGamesPlay commented 2 years ago

OK, thanks again for being willing to test out RimModelled. I've made a bunch of changes to help out, but we still need to figure out the underlying reason for the error. Now when you get an error, instead of a blank screen, you'll see an error page explaining it.

I've also added support for your paths to the program. For your custom Steam directory, you'll need to use set STEAMAPPS=C:/Gaming/Games/Steam/steamapps; npm start to run, but you shouldn't need any changes to the source code now.

I'm hoping that the error is still a simple path thing and nothing complex to fix, and with the extra error handling it should be possible to figure it out. If these changes don't fix it for you, please use View -> Toggle Developer Tools in the error window, and then send over the output in the "Console" tab.

Drunkender commented 2 years ago
useRimworld.tsx?4d83:175 Error: [
  {
    "code": "custom",
    "message": "Directory does not exist",
    "path": [
      "mods",
      0
    ]
  },
  {
    "code": "custom",
    "message": "Directory does not exist",
    "path": [
      "mods",
      1
    ]
  },
  {
    "code": "custom",
    "message": "Directory does not exist",
    "path": [
      "mods",
      2
    ]
  },
  {
    "code": "custom",
    "message": "Directory does not exist",
    "path": [
      "lib"
    ]
  }
]
CGamesPlay commented 2 years ago

Got it. So the problem, based on these, is that despite you configuring the paths, RimModelled can't figure out the correct files. Actually, based on this, it looks like the steam directory is either not configured or wrong on my part.

I've pushed some changes again that should greatly improve the logging, which should nail the problem down pretty quickly. This won't fix it, but it should give me the information I need to fix it. Once you run the code, you'll get a shorter error message on the screen but you should have a lot more detail in the console. I also am writing to a log file now, which should be in C:\Users\USERNAME\AppData\Local\RimModelled\Log\RimModelled.log. It should have all of the information I need to fix the issue.

Thanks again for helping with this. If you want to email your contact information to ry@cgamesplay.com, we can maybe use discord/email/steam to work through the issues a bit quicker.

Drunkender commented 2 years ago

RimModelled.log Seems like set STEAMAPPS=C:/Gaming/Games/Steam/steamapps is not working. After copying rimworld and mods into the directories its actually looking in I got it to boot! Screenshot 2022-03-09 040441

STEAMAPPS Is in my environment tables but doesn't stay between reboots.

CGamesPlay commented 2 years ago

Great! The good news is that since the RimWorld data is in the right place, everything should work normally except for noticing when you install/uninstall new mods. Does the app seem to work for you now that it's booting? I'd appreciate any feedback you have about the app.

My next project will be to add a real GUI for choosing the Steam directory, so we don't have to worry about this environment variable junk, then I'll publish a Windows version. If you report that everything is currently working properly, that should be all that's needed!

Ant-V commented 2 years ago

Hi @CGamesPlay, just wanted to add that you really should add a way to change the directory, because even on MacOS I cannot use the build, because I run the GOG version which neatly sits in /Applications/Rimworld.app Apart from that I think this project has potential!