Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

How to set up 1.3 Insider version. #62

Closed
Epicguru opened this issue Feb 8, 2022 · 15 comments
Closed

How to set up 1.3 Insider version. #62

Epicguru opened this issue Feb 8, 2022 · 15 comments
Assignees

Comments

@Epicguru
Copy link

Epicguru commented Feb 8, 2022

Hello! Thank you for making this tool. I found it very useful in the past.

I was hoping for a quick guide to setting up the new Insider version. I have installed it in VSCode but it does not seem to do anything. More specifically, it does not seem to recognize my custom def types or fields.
I understand that it no longer uses the config file (?)
Any help getting it to work would be appreciated.

I would like to help test and give feedback.
Thank you.

@zzzz465
Copy link
Owner

zzzz465 commented Feb 9, 2022

there's no reason to leave an old master version so I moved the insider version to the master version.

you don't have to configure anything (v0.10.0 or up) since it already knows where the "default" path is.
the extension requires RimWorld DLL, RimWorld Core to run, and it scans steam workshop, local mods/ directory for external mod support.

the default values are below

RimWorld DLL

  • windows: C:\Program files (x86)\Steam\steamapps\common\rimworld\RimWorldWin64_Data\Managed
  • darwin(macos): Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed

RimWorld Core

  • windows: C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Data
  • darwin(macos): Library/Application Support/Steam/Steamapps/common/RimWorld/RimWorldMac.app/Data

Local Mod Directory

  • windows: C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods
  • darwin(macos): Library/Application Support/Steam/Steamapps/common/RimWorld/RimWorldMac.app/Mods

Workshop Directory

  • windows: C:\\Program Files (x86)\\Steam\\steamapps\\workshop\\content\\294100
  • darwin(macos): Library/Application Support/Steam/Steamapps/workshop/content/294100

this is enough for most users, but if you're using D:\ or somewhere else for RimWorld, unfortunately customizing this path is not supported yet. you have to copy-paste necessary files to those "default paths"

@Epicguru
Copy link
Author

Epicguru commented Feb 9, 2022

Thank you for explaining. I've tested some more, and it seems that Vanilla defs are working (they have code completion and suggestions) but my custom defs do not:
image

image

I've tried opening the developer console to see errors but I couldn't see anything indicating an error (apart from a message about missing About folder).

@zzzz465
Copy link
Owner

zzzz465 commented Feb 9, 2022

TL;DR

you have to setup about/about.xml.

Explanation

external mod def is supported by runtime extraction, and it needs about.xml for mod dependency otherwise it tries to extract def from entire mods, leading to a huge(?) performance drop.

in the past, I managed this dependency as a config file, but as most users aren't familiar with this setup, I ended up using dependencies from about.xml.

if you really want to debug it, you can build the TypeInfo extractor by yourself and do a test against your dll.
I'll write instructions if you need them.

@Epicguru
Copy link
Author

Epicguru commented Feb 9, 2022

Thank you for the response. I should have clarified - the mod I'm working on does have an About folder and About.xml. There are some other mods in my Mods folder that do not have the folder - those were the ones giving me the error.

I will try building from source and debugging that way.

@zzzz465
Copy link
Owner

zzzz465 commented Feb 10, 2022

if you pass me your current Mod project (I suggest github) then I'll check why it's happening

also About/About.xml must be visible on your file view. because it uses vscode's FILE I/O to Read/Watch and it's limited to your current opened directory. don't open just a single xml file, open your mod project with "Open Folder"

@zzzz465
Copy link
Owner

zzzz465 commented Feb 10, 2022

I found that external mod's def is not supported in my local environment too.
I guess something is broken. I'll fix it

@zzzz465
Copy link
Owner

zzzz465 commented Feb 14, 2022

@Epicguru I think fixing the project is completed.
as version v0.11.0 has been released, you can try it out.

@zzzz465
Copy link
Owner

zzzz465 commented Feb 14, 2022

I found that autocomplete is not working correctly, fixing it.

version v0.12.0 is rollback version of v0.10.0 https://github.com/zzzz465/rwxml-language-server/runs/5187332639?check_suite_focus=true

@zzzz465
Copy link
Owner

zzzz465 commented Feb 15, 2022

@Epicguru version 0.13.0 released. you can try it out.

@Epicguru
Copy link
Author

Will do, thank you.

@zzzz465 zzzz465 self-assigned this Feb 15, 2022
@zzzz465
Copy link
Owner

zzzz465 commented Feb 18, 2022

@Epicguru please close the issue if you aren't having any issues.

@Epicguru
Copy link
Author

I did some quick testing yesterday with .13 and it still didn't seem to work unfortunately. I can send over the mod if you're willing to look into it.

@Epicguru
Copy link
Author

Mod.zip
Here is my WIP mod if you would like to test with it. On the latest version (0.15.x), it does not work with custom defs (see Defs/Executions.xml). It does work perfectly for regular defs (such as JobDefs in Defs/Jobs.xml).

Do not worry if you do not have time to look at it. Thank you for all your work so far.

@zzzz465
Copy link
Owner

zzzz465 commented Feb 19, 2022

@Epicguru

The easy fix

add loadfolders.xml in your project with this content.

<?xml version="1.0" encoding="utf-8" ?>
<loadFolders>
  <v1.3>
    <li>.</li>
  </v1.3>
</loadFolders>

explanation

as the extension supports multi Rimworld version support (v1.0, v1.1, v1.2 ...etc), program must know which version the file belongs to. it checks LoadFolders.xml, and if exists, follow that rule. if don't, the program will try everything useful to get version information. for example, you have assmblies/ resources under 1.3 directory, and the files will be determined as v1.3 project resources. however, Defs/ directory is not under 1.3 directory, it is determined as default (aka fallback)` version.

the program should include all resources in the project if there's no loadfolders.xml, but somehow it didn't so this is a bug. it'll be fixed as soon as possible.

prove

the extension working as intended after adding loadfolders.xml to the project

image
image

@Epicguru
Copy link
Author

Ah I see a simple fix then! Thank you very much. I'll close the issue now as it is working now.

This extension will be very useful to be.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants