Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mostly good for Rimworld v1.5 support. #207

Open
wants to merge 1 commit into
base: 1.5
Choose a base branch
from

Conversation

hopeseekr
Copy link

@hopeseekr hopeseekr commented Apr 1, 2024

I did the vast majority of the work for Rimworld v1.5 support.

ALMOST everything seems to work perfectly, though I didn't thoroughly QA it.

There's one dialog that gives tons of errors on the Forestry Tab but after it opened and closed, I never experienced it again.

I have attached the zip file release so people can use Colony Manager with v1.5 while you guys brush up this work more fully.
ColonyManager-v1.5.0-alpha.zip


My build + project files are all geared for Linux and multi-builds (builds v1.2-1.5 instantly on file saving), so I just realized you'll need to tweak your .csproj to get this to compile:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release v1.5|AnyCPU' ">
    <DefineConstants>RIMWORLD15</DefineConstants>
  </PropertyGroup>

You need that RIMWORLD15 constant to compile this stuff.

feel free to copy and use my ColonyManager.csproj and ColonyManager.sln to build rimworld versions with the same code base.

@biship
Copy link

biship commented Apr 16, 2024

Does not work for me. Doesn't even load. Log is full of errors. Sorry! :(

  • [Mod list length: 13]
    Prepatcher [https://steamcommunity.com/sharedfiles/filedetails/?id=2934420800]
    Harmony [https://steamcommunity.com/sharedfiles/filedetails/?id=2009463077]
    Visual Exceptions [https://steamcommunity.com/sharedfiles/filedetails/?id=2538411704]
    Core [https:// no link (local mod)]
    Royalty [Official DLC] [https:// no link (local mod)]
    Ideology [Official DLC] [https:// no link (local mod)]
    Biotech [Official DLC] [https:// no link (local mod)]
    Anomaly [Official DLC] [https:// no link (local mod)]
    HugsLib [https://steamcommunity.com/sharedfiles/filedetails/?id=818773962]
    Colony Manager [https:// no link (local mod)]
    Pawn Editor [https:// no link (local mod)]
    RandomPlus [https://steamcommunity.com/sharedfiles/filedetails/?id=1434137894]
    RocketMan - Performance Mod [https://steamcommunity.com/sharedfiles/filedetails/?id=2479389928]

Mono path[0] = 'C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Managed'
Mono config path = 'C:/Program Files (x86)/Steam/steamapps/common/RimWorld/MonoBleedingEdge/etc'
Initialize engine version: 2019.4.30f1 (e8c891080a1f)
[Subsystems] Discovering subsystems at path C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: NVIDIA GeForce RTX 4090 (ID=0x2684)
Vendor:
VRAM: 24142 MB
Driver: 31.0.15.5212
Begin MonoManager ReloadAssembly

  • Completed reload, in 0.094 seconds
    Initializing input.

Input initialized.

Initialized touch support.

UnloadTime: 0.744800 ms
Command line arguments: -savedatafolder=C:\Users\nick\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios
RimWorld 1.5.4066 rev841
Save data folder overridden to C:\Users\nick\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios
ReflectionTypeLoadException getting types in assembly Manager: System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at Verse.ModAssemblyHandler.AssemblyIsUsable (System.Reflection.Assembly asm) [0x00000] in :0

Loader exceptions:
=> System.TypeLoadException: Could not resolve type with token 01000045 (from typeref, class/assembly Verse.Dialog_DebugOptionLister, Assembly-CSharp, Version=1.4.8322.9374, Culture=neutral, PublicKeyToken=null)

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B09016EE50.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091582160.dll
Prepatcher: Starting... (vanilla load took 3.402296s)
Prepatcher: Game processing took 112.9105ms
Prepatcher: Serializing patched assemblies
Prepatcher: Serializing took 1134.7882ms
Prepatcher: Setting refonly
Prepatcher: Loading patched assemblies
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0A5020040.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0A5CCC040.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091373010.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0922E5020.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091CBF030.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091A2B030.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091CC2040.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091CF4250.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091DE5C40.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B091DF7250.dll
Prepatcher: Done loading
Command line arguments: -savedatafolder=C:\Users\nick\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios
RimWorld 1.5.4066 rev841
Save data folder overridden to C:\Users\nick\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios
ReflectionTypeLoadException getting types in assembly Manager: System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at Verse.ModAssemblyHandler.AssemblyIsUsable (System.Reflection.Assembly asm) [0x00000] in :0

Loader exceptions:
=> System.TypeLoadException: Could not resolve type with token 01000045 (from typeref, class/assembly Verse.Dialog_DebugOptionLister, Assembly-CSharp, Version=1.4.8322.9374, Culture=neutral, PublicKeyToken=null) assembly:Assembly-CSharp, Version=1.4.8322.9374, Culture=neutral, PublicKeyToken=null type:Verse.Dialog_DebugOptionLister member:(null) signature:

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0A699C9A0.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B088004190.dll
Prepatcher: Restarted with the patched assembly, going silent.
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0AAFDE0A0.dll
[HugsLib] version 11.0.3
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0AB863F30.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0AB807DF0.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0AB87C970.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0AB812E00.dll
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-000002B0AB889980.dll
GAGARIN: <color=green>StartUpStarted called!
GAGARIN: <color=green>Cache found
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: <color=yello>Cache disabled from
Gagarin.StartupHelper:StartUpStarted():0
System.Reflection.MonoMethod:InternalInvoke():0
System.Reflection.MonoMethod:Invoke():0
System.Reflection.MethodBase:Invoke():0
RocketMan.FunctionsUtility+<>c__DisplayClass1_0`1[[RocketMan.Main+OnInitialization, Cosmodrome, Version=0.6.3.2421, Culture=neutral, PublicKeyToken=null]]:b__3():0
RocketMan.RocketMod:.ctor():0
System.Reflection.MonoCMethod:InternalInvoke():0
System.Reflection.MonoCMethod:InternalInvoke():0
System.Reflection.MonoCMethod:DoInvoke():0
System.Reflection.MonoCMethod:Invoke():0
System.RuntimeType:CreateInstanceImpl():0
System.Activator:CreateInstance():0
System.Activator:CreateInstance():0
Verse.LoadedModManager:CreateModClasses():0
Verse.LoadedModManager:LoadAllActiveMods():0
Verse.PlayDataLoader:DoPlayLoad():0
Verse.PlayDataLoader:LoadAllPlayData():0
Verse.Root+<>c:b__6_1():0
Verse.LongEventHandler:RunEventFromAnotherThread():0
Verse.LongEventHandler+<>c:b__28_0():0
System.Threading.ThreadHelper:ThreadStart_Context():0
System.Threading.ExecutionContext:RunInternal():0
System.Threading.ExecutionContext:Run():0
System.Threading.ExecutionContext:Run():0
System.Threading.ThreadHelper:ThreadStart():0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: Mod list changed! Deleting cache
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: <color=green>Cache not found or got purged!
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

b.4066:4/15/2024 12:00:00 AM:1.5.4066 rev841
b.4066:4/15/2024 12:00:00 AM:1.5.4066 rev841
b.4066:4/15/2024 12:00:00 AM:1.5.4066 rev841
b.4066:4/15/2024 12:00:00 AM:1.5.4066 rev841
GAGARIN: <color=white>LoadModXML_Profiler took <color=red>0.885 seconds
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: CombineIntoUnifiedXML has <color=red>Context.IsUsingCache=False
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: <color=white>CombineIntoUnifiedXML_Profiler took <color=red>0.568 seconds
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: <color=white>TKeySystem.Parse took <color=red>0.001 seconds
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: <color=white>ApplyPatches_Profiler took <color=red>0.122 seconds
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

GAGARIN: <color=white>XmlInheritance.Resolve took <color=red>0.11 seconds
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not find a type named FluffyManager.JobDriver_ManagingAtManagingStation
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not find a type named FluffyManager.MainTabWindow_Manager
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Could not find type named FluffyManager.UnlockPowerTab from node


  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Exception loading list element Verse.ResearchMod from XML: System.MissingMethodException: Default constructor not found for type Verse.ResearchMod
    [Ref 9CFA15CC]
    at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in :0
    at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in :0
    at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in :0
    at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in :0
    at System.Activator.CreateInstance (System.Type type) [0x00000] in :0
    at Verse.DirectXmlToObject.ObjectFromXml[T] (System.Xml.XmlNode xmlRoot, System.Boolean doPostLoad) [0x0040b] in :0
    at Verse.DirectXmlToObject.ListFromXml[T] (System.Xml.XmlNode listRootNode) [0x0011b] in :0
    XML:


  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.Building_ManagerStation
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find type named FluffyManager.CompProperties_ManagerStation from node

  • FluffyManager.Comp_ManagerStation1000

  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.Comp_ManagerStation
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    XML error: 1000 doesn't correspond to any field in type CompProperties. Context:

  • FluffyManager.Comp_ManagerStation1000

  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.Building_ManagerStation
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find type named FluffyManager.CompProperties_ManagerStation from node

  • FluffyManager.Comp_ManagerStation500

  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.Comp_ManagerStation
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    XML error: 500 doesn't correspond to any field in type CompProperties. Context:

  • FluffyManager.Comp_ManagerStation500

  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.Building_AIManager
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find type named FluffyManager.CompProperties_ManagerStation from node

  • FluffyManager.Comp_ManagerStation250

  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.Comp_ManagerStation
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    XML error: 250 doesn't correspond to any field in type CompProperties. Context:

  • FluffyManager.Comp_ManagerStation250

  • (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Could not find a type named FluffyManager.WorkGiver_Manage
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    b.4066:4/15/2024 12:00:00 AM:1.5.4066 rev841
    GAGARIN: <color=white>Cache created! creating cache took <color=green>0 seconds
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    GAGARIN: <color=white>ParseAndProcessXML_Profiler took <color=red>6.595 seconds
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    GAGARIN: <color=white>ClearCachedPatches_Profiler took <color=red>0 seconds
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    GAGARIN: <color=white>XmlInheritance.Resolve took <color=red>0.11 seconds
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    GAGARIN: <color=white>XmlInheritance.Resolve took <color=red>0.11 seconds
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    GAGARIN: <color=green>StartUpFinished called!
    [net.pardeike.rimworld.lib.harmony] Patches on methods annotated as Obsolete were detected by HugsLib: Verse.Translator.Translate
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

    Setting up 8 worker threads for Enlighten.
    Thread -> id: 1ac -> priority: 1
    Thread -> id: 4ffc -> priority: 1
    Thread -> id: fa8 -> priority: 1
    Thread -> id: 63f4 -> priority: 1
    Thread -> id: 3a90 -> priority: 1
    Thread -> id: 1390 -> priority: 1
    Thread -> id: 1ad8 -> priority: 1
    Thread -> id: 35ec -> priority: 1

    @allaryin
    Copy link

    Have not tried building this, don't currently have a c# dev environment available.

    I have, however, just loaded the provided binary into a client (windows, steam, current) with 200 other mods as ballast, and did not notice any errors.

    Was not able to repro any error with forestry tab.

    However, behavior on newly created bills feels off - they sit in the queue waiting 24 hours before any pawn will look at them by default. But, by cranking the time to recheck bills down, I was able to force a pawn into scheduling another pawn to hunt a rat.

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

    Successfully merging this pull request may close these issues.

    3 participants