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

Messages - Kuratheris

#1
I've figured it out. Turns out my file wasn't an XML. lol.
#2
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>
#3
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>
#4
I need to know exactly how I do it, because those wiki examples barely help at all. Anything I try just crashes the game.
Also I already figured out how to replace.
#5
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>
#6
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>
#7
Help / Re: Need help updating mod settings
March 12, 2020, 05:42:55 AM
Quote from: LWM on March 10, 2020, 03:52:49 PM
Has the mod been updated for 1.1?

The main defs and such have, yes. The mod works except the mod settings.
#8
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.
#9
It still gives me the same error, and still doesn't get rid of the code in-game WITHOUT the other mod on.
#10
Okay I have this so far, what am I doing wrong?

<?xml version="1.0" encoding="utf-8" ?>
  <Operation Class="PatchOperationFindMod">
<mods>
<li>[WD] Expanded Floors 1.0</li>
</mods>
  <match Class="PatchOperationAdd">
    <xpath>/Defs</xpath>
    <value>

<Defs>
  <TerrainDef ParentName="WDRoughStoneTileBase">
    <defName>WDRoughAndesiteTile</defName>
    <label>rough andesite tile</label>
    <color>(112,118,118)</color>
    <costList>
      <BlocksAndesite>2</BlocksAndesite>
    </costList>
  </TerrainDef>
</Defs>

    </value>
</match>
  </Operation>
</Patch>


Error text:
D:\Steam\steamapps\common\RimWorld\Mods\Kura's Extra Minerals\Defs\TerrainDefs/Terrain_Floors_StoneTile_Expanded_Floors.xml: unknown parse failure
Verse.Log:Error(String, Boolean)
Verse.LoadedModManager:CombineIntoUnifiedXML(List`1, Dictionary`2)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()
#11
Quote from: hauvega on December 04, 2019, 04:30:02 PM
Is that the only def being added?

Yes, plus more in the same .xml that are pretty much the same but 6 different ParentNames, and a bunch of different defName, label, color, and cost. Just knowing what I put for those 8 lines will probably tell me what to do with the rest(if I even need to).
#12
Quote from: LWM on December 02, 2019, 11:00:20 PM
Here are some concrete examples:

https://github.com/lilwhitemouse/RimWorld-LWM.DeepStorage/tree/master/_Mod/LWM.DeepStorage/Patches

This still doesn't help me. Like, I assume I use PatchOperationFindMod, then PatchOperationSequence, success always, then the mod in the right place, then I assume PatchOperationAdd, then what? I don't know exactly what I would put in the xpath, nor anything of what I would put after that.
#13
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>
#14
Unfinished / Re: [1.0]Lost Forest (WIP)
July 28, 2019, 01:11:42 AM
Quote from: IGNI on June 07, 2019, 06:54:33 PM
@nylem

Thanks playing. Please rest assured. There is no intention to stop development at all. I only take a rest for a while. You can permanently use the latest version of v0.3.1 by downloading from this page until 6/14.
As far as the Steam side is concerned, I won't release new version until the notification system to users is completed. About Ludeon side, I'm going to update as usual because I think they will check premise of the each updates certainly on their downloading.

So did someone of authority actually come to you and tell you to take it down? Or are you just worried that will happen? If it did happen, how about you just remove those sound files until you eventually work things out?
#15
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.