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

rimatomics crafting table stack trace issue #48

Open
yowshi opened this issue May 11, 2024 · 2 comments
Open

rimatomics crafting table stack trace issue #48

yowshi opened this issue May 11, 2024 · 2 comments

Comments

@yowshi
Copy link

yowshi commented May 11, 2024

GetInspectString exception on TableRimatomicsMachining822439:
System.InvalidCastException: Specified cast is not valid.
[Ref B7FE9FFD]
at RimWorld.CompReportWorkSpeed.CompInspectStringExtra () [0x000d4] in <2bfa0c274f854b5095bb30bd48706ce7>:0
at Verse.ThingWithComps.InspectStringPartsFromComps () [0x00020] in <2bfa0c274f854b5095bb30bd48706ce7>:0
at Verse.ThingWithComps.GetInspectString () [0x00015] in <2bfa0c274f854b5095bb30bd48706ce7>:0
- POSTFIX com.Replimat.patches: Void Replimat.Harmony_Thing_GetInspectString:Postfix(ThingWithComps __instance, String& __result)
at RimWorld.InspectPaneFiller.DrawInspectStringFor (Verse.ISelectable sel, UnityEngine.Rect rect) [0x00000] in <2bfa0c274f854b5095bb30bd48706ce7>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
RimWorld.InspectPaneFiller:DrawInspectStringFor (Verse.ISelectable,UnityEngine.Rect)
RimWorld.InspectPaneFiller:DoPaneContentsFor (Verse.ISelectable,UnityEngine.Rect)
RimWorld.MainTabWindow_Inspect:DoPaneContents (UnityEngine.Rect)
RimWorld.InspectPaneUtility:InspectPaneOnGUI (UnityEngine.Rect,RimWorld.IInspectPane)
RimWorld.MainTabWindow_Inspect:DoWindowContents (UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

RimWorldWin64_DAS36u8x7e

i didn't see this posted here but the table has a duplicate stacktrace issue.

@yowshi yowshi changed the title timatomics crafting table stack trace issue rimatomics crafting table stack trace issue May 11, 2024
@Null-Fault
Copy link

I am also having the same issue even on a devtest with no other mods installed. I'm on an Apple silicon Mac is that matters.

Screenshot 2024-05-19 at 11 40 46 PM

@tinygrox
Copy link

Go to the 1.5\Defs\ThingDefs_Buildings\Buildings_B_Production.xml,
find <defName>TableRimatomicsMachining</defName> and:

  1. look for
			<li>
				<compClass>CompReportWorkSpeed</compClass>
			</li>
  1. replace it to
                        <li Class="CompProperties_ReportWorkSpeed">
                            <workSpeedStat>WorkTableWorkSpeedFactor</workSpeedStat>
                        </li>

or you can make a Patch to do that:

make a .xml file and put it to your mod's Patches folder, see https://rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations for more detail

here an example xml:

<?xml version="1.0" encoding="UTF-8"?>
<Patch>
    <Operation Class="PatchOperationFindMod">
        <success>Always</success>
        <mods>
            <li>Dubs Rimatomics</li>
        </mods>
        <match Class="PatchOperationSequence">
            <success>Always</success>
            <operations>
                <li Class="PatchOperationReplace">
                    <xpath>Defs/ThingDef[defName="TableRimatomicsMachining"]/comps/li[compClass="CompReportWorkSpeed"]</xpath>
                    <value>
                        <li Class="CompProperties_ReportWorkSpeed">
                            <workSpeedStat>WorkTableWorkSpeedFactor</workSpeedStat>
                        </li>
                    </value>
                </li>
            </operations>
        </match>
    </Operation>
</Patch>

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

No branches or pull requests

3 participants