Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Kuratheris

#1
I'm trying to create a patch between my stone mod and Alpha Animals so that the CrystalMit will eat the stones from my mod, but the CrystalMit code is more than what I know how to patch.

This is the part of the Alpha Animals CrystalMit def I'm trying to add to:
<ThingDef ParentName="AnimalThingBase">
<defName>AA_CrystalMit</defName>

<comps>
<li Class="AlphaBehavioursAndEvents.CompProperties_EatWeirdFood">

<customThingToEat>

<li>ChunkSandstone</li>
<li>ChunkGranite</li>
<li>ChunkLimestone</li>
<li>ChunkSlate</li>
<li>ChunkMarble</li>
<li>GU_ChunkRoseQuartz</li>
<li>AB_ChunkCragstone</li>
<li>AB_ChunkObsidian</li>
<li>AB_ChunkMudstone</li>
<li>AB_ChunkSlimeStone</li>

</customThingToEat>
<nutrition>1</nutrition>
<digThingIfMapEmpty>false</digThingIfMapEmpty>
<fullyDestroyThing>false</fullyDestroyThing>
<percentageOfDestruction>0.1</percentageOfDestruction>

</li>

</comps>
#2
Help / Patch to Change a Label?
September 15, 2020, 01:59:38 AM
I'm trying to create a patch that replaces the label of a def in my mod when another mod is active. I thought I could just do it like replacing a designationCategory, but I guess not. Here's the code I'm trying that isn't doing anything:

<Patch>
  <Operation Class="PatchOperationFindMod">
<mods>
<li>Alpha Biomes</li>
</mods>
  <match Class="PatchOperationReplace">
    <xpath>/Defs/ThingDef[defName="Obsidian"]/label</xpath>
    <value>
<label>ES obsidian</label>
    </value>
</match>
  </Operation>
</Patch>
#3
Help / Remove a Designation Category with Patch?
May 18, 2020, 05:26:27 PM
Here I am again. I'm trying to get rid of the entire designation category below with a patch, is that possible?

<Defs>

<!-- UN-Industry  -->
    <DesignationCategoryDef>
    <defName>SadjuukUN-Industry</defName>
    <label>UN-Industry</label>
    <description>Available technologies from UN and UNSC colonization program</description>
    <order>729</order>
    <specialDesignatorClasses>
      <li>Designator_Cancel</li>
      <li>Designator_Deconstruct</li>
    </specialDesignatorClasses>
  </DesignationCategoryDef>
 
</Defs>
#4
So I'm trying to make a patch to replace the designation category below with something else. How would I do that? I only know how to replace things under a defName, not a ThingDef.

    <ThingDef Name="SadjuukHeavyGeneratorBase" ParentName="BuildingBase" Abstract="True">
<thingClass>Building</thingClass>
<category>Building</category>
<altitudeLayer>Building</altitudeLayer>
    <selectable>true</selectable>
<rotatable>true</rotatable>
<clearBuildingArea>true</clearBuildingArea>
    <passability>PassThroughOnly</passability>
    <pathCost>150</pathCost>
    <blockWind>false</blockWind>
    <fillPercent>1.0</fillPercent>
    <castEdgeShadows>false</castEdgeShadows>
<tickerType>Normal</tickerType>
<canOverlapZones>false</canOverlapZones>
    <designationCategory>SadjuukUN-Industry</designationCategory>
    <staticSunShadowHeight>0.5</staticSunShadowHeight>
<constructEffect>ConstructMetal</constructEffect>
<terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
<leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
</ThingDef>
#5
Help / (SOLVED)Need help updating mod settings
March 09, 2020, 08:02:52 AM
So the update to 1.1 broke the mod settings in the assembly I adapted from one of Cupro's mods, and I have no real knowledge to make it work again.

Here's the source files of my mod on Google Drive(I can't upload to Github because I don't know how the heck it works): https://drive.google.com/file/d/1uA-HeYaa6t_e2AwcRQIL6cP9IJfMhodm/view?usp=sharing
Or here's the file on Dropbox so you can preview it if you're scared of Google Drive: https://www.dropbox.com/s/s48bqsbi09xujdr/ExtraStonesSource.rar?dl=0

In case this helps, here's the error I get when I launch the game with my mod on:
Could not execute post-long-event action. Exception: System.TypeInitializationException: The type initializer for 'KurasStones.Static' threw an exception. ---> System.MissingMethodException: string Verse.Translator.Translate(string)
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) [0x0002a] in <567df3e0919241ba98db88bec4c6696f>:0
  at Verse.StaticConstructorOnStartupUtility.CallAll () [0x00018] in <000153db58284aa38698b9c41ca1154b>:0
  at Verse.PlayDataLoader+<>c.<DoPlayLoad>b__4_2 () [0x0000a] in <000153db58284aa38698b9c41ca1154b>:0
  at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x0007d] in <000153db58284aa38698b9c41ca1154b>:0
Verse.Log:Error(String, Boolean)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update()
Verse.Root_Entry:Update()


Here's the error when I click on "Select mod...":
Exception filling window for RimWorld.Dialog_ModSettings: System.TypeInitializationException: The type initializer for 'KurasStones.Static' threw an exception. ---> System.MissingMethodException: string Verse.Translator.Translate(string)
   --- End of inner exception stack trace ---
  at RimWorld.Dialog_ModSettings+<>c.<HasSettings>b__9_0 (Verse.Mod mod) [0x00000] in <000153db58284aa38698b9c41ca1154b>:0
  at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at RimWorld.Dialog_ModSettings.HasSettings () [0x00005] in <000153db58284aa38698b9c41ca1154b>:0
  at RimWorld.Dialog_ModSettings.DoWindowContents (UnityEngine.Rect inRect) [0x00035] in <000153db58284aa38698b9c41ca1154b>:0
  at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x00165] in <000153db58284aa38698b9c41ca1154b>:0
Verse.Log:Error(String, Boolean)
Verse.Window:InnerWindowOnGUI(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


I also get a mod incompatibility/corrupted error when launching with Harmony and HugsLib activated.
#6
I'm trying to create a simple compatibility patch for my mod so it will only add/activate the code below(and more just like it) when the mod I'm making compatibility for is activated. I have zero idea how to make a patch, and don't know enough for the wiki to help at all.

  <TerrainDef ParentName="WDRoughStoneTileBase">
    <defName>WDRoughAndesiteTile</defName>
    <label>rough andesite tile</label>
    <color>(112,118,118)</color>
    <costList>
      <BlocksAndesite>2</BlocksAndesite>
    </costList>
  </TerrainDef>
#7
Help / (SOLVED)Help with Missing Assembly References
March 15, 2019, 07:57:15 AM
So I've got zero experience with making a .DLL assembly mod, but I'm trying to edit the Cupro's Stones 1.0 source found here: https://github.com/Benjamin-S/Cupros-Stones/releases to give mod options to my stones mod.

I can open it and edit it with Visual Studio 2017, but I'm having some issues.
1: I've copied Assembly-CSharp.dll and UnityEngine.dll from the Rimworld Managed folder, and put them into the Cupro's Stones source at Cupros-Stones-1.0\Source\CuprosStones\Source-DLLs, but it still says they aren't found in Visual Studio when I open the sln file.

2: I have no idea how to compile it into a DLL when/if I do manage to tweak it.

Also if it's more complicated than just editing everything I need to, compiling it, and adding code to my mod for it, please do tell.
#8
Help / Help with updating floors from a B18 mod.
November 10, 2018, 07:13:24 PM
I'm currently trying to update the mod "A mod about meat" from B18 to 1.0. Everything else I've gotten to work, but hovering over either of the two floors in the build menu spams this error:
https://pastebin.com/agCmaq7U
I did completely remove the assemblies from the original mod, but I can't see how that's a problem(I still got them and included them in the file I'm giving you guys so you can see if it does somehow happen to do something with floors).

Download to my current make of the mod:
https://drive.google.com/file/d/13t3hsvW7qXiUAlN0sD7lSzIrkr_x_CyK/view?usp=sharing
Or if you don't trust that, here's the Steam workshop link:
https://steamcommunity.com/sharedfiles/filedetails/?id=1559495754&searchtext=about+meat