CombatExtended-Continued / CombatExtended

Combat Extended mod for RimWorld
381 stars 255 forks source link

[Bug]: The May 7 update to Vanilla Armour Expanded causes a patch error with Combat Extended #650

Closed michaelbleung closed 3 years ago

michaelbleung commented 3 years ago

Specifications

Rimworld version: 1.2.2900 rev837 Combat Extended version: 1.2.3.2 according to the title in Mod Manager, but 1.2.3.6 from the description Combat Extended source (Steam, GitHub, etc.): Steam Your operating system: Windows 10 Pro, Version: 20H2 Your mod list: I pulled this from the my current active save file:

Dubs Performance Analyzer
Harmony
Core
Royalty
HugsLib
RandomPlus
Level Up!
[T] MoreFloors
Combat Extended
Combat Extended Guns
Combat Extended Melee
Combat Extended: Shields
Combat Extended: Weapons
Elite Bionics Framework
[FSF] Advanced Bionics Expansion
Vanilla Expanded Framework
Vanilla Apparel Expanded
Vanilla Armour Expanded
Vanilla Weapons Expanded
Vanilla Animals Expanded — Temperate Forest
Vanilla Animals Expanded — Tropical Swamp
Vanilla Animals Expanded — Tropical Rainforest
Vanilla Animals Expanded — Boreal Forest
Vanilla Animals Expanded — Arid Shrubland
Vanilla Animals Expanded — Extreme Desert
Vanilla Animals Expanded — Cats and Dogs
Vanilla Animals Expanded — Australia
Vanilla Animals Expanded — Tundra
Vanilla Animals Expanded — Desert
Vanilla Animals Expanded — Endangered
Vanilla Hair Expanded
Vanilla Hair Expanded - Beards
Vanilla Expanded - Royalty Patches
Vanilla Factions Expanded - Insectoids
Vanilla Factions Expanded - Medieval
Vanilla Factions Expanded - Settlers
Vanilla Factions Expanded - Vikings
Vanilla Furniture Expanded
Vanilla Furniture Expanded - Art
Vanilla Furniture Expanded - Farming
Vanilla Furniture Expanded - Medical Module
Vanilla Furniture Expanded - Power
Vanilla Furniture Expanded - Production
Vanilla Furniture Expanded - Props and Decor
Vanilla Furniture Expanded - Security
Vanilla Furniture Expanded - Spacer Module
Vanilla Books Expanded
Vanilla Events Expanded
Vanilla Textures Expanded
Spoons Hair Mod
Xeva's Rimhair
Rimsenal - Rimhair
Numbers
Numbers Trait AddOn
Show Draftees Weapon
Simple sidearms
Blueprints
More Trade Ships
[FSF] More Quests
Interaction Bubbles
Mod Manager
Colorblind Minerals
Replace Stuff
RimHUD
Camera+
Achtung!
Allow Tool
Pick Up And Haul (Continued)
Dubs Mint Minimap
CM Color Coded Mood Bar [1.1+]
Defensive Positions
Reasonable Components
Bionic icons
Animal Food Restrictions
EdB Prepare Carefully
Smart Speed
[FSF] Filth Vanishes With Rain And Time
MinifyEverything
Drugs are not Food
Damage Indicators [1.2]
Grazing Lands
[KV] RimFridge
LWM's Deep Storage
[KV] Trading Spot
Wall Light
Smart Medicine
[SYR] Neuter
Tilled Soil
[1.2] Small Shelf
[FSF] No Default Shelf Storage
Craftable Synthetics Continued [1.0][1.1][1.2]
Antigrain
[FSF] Meditation Freedom
Designator Shapes
Everybody Gets One
Quarry 1.1
Infestations Spawn in Darkness
Armor Racks
Skilled Stonecutting
CleaningArea
Dubs Break Mod
Snap Out!
Immortals
[FSF] Complex Jobs

Description After the May 7 update to Vanilla Armour Expanded, during startup, the debug log was shown at the main menu of the game with an error in said log. Here's the exception from the log:

[Combat Extended] Patch operation Verse.PatchOperationFindMod(Vanilla Armour Expanded) failed
file: C:\Games\Steam\steamapps\workshop\content\294100\1631756268\Patches\Vanilla Armour Expanded\ThingDefs_Misc\Armor_Footwear.xml
Verse.Log:Verse.Log.Error_Patch2(String, Boolean)
Verse.PatchOperation:Complete(String)
Verse.LoadedModManager:ClearCachedPatches()
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Expected behavior No error in the debug log on startup.

To reproduce The error from the log was a result of the initialization of the game. Assuming all mods are installed simply starting the game should show the error in the debug log.

Screenshots & log dumps Debug log: https://pastebin.com/Yg6PFPVL

I hereby verify that I have done the following:

Mx772 commented 3 years ago

The May 7th update of VAE "Removed hyperweave from the recipe to make Marine boots."

As a result it seems this particular lines are failing to replace:

https://github.com/CombatExtended-Continued/CombatExtended/blob/29dbf6833772287c016847b2601f7258d8bc46f9/Patches/Vanilla%20Armour%20Expanded/ThingDefs_Misc/Armor_Footwear.xml#L94-L99

New costList for MarineBoots is:

        <costList>
            <Plasteel>20</Plasteel>
            <ComponentSpacer>1</ComponentSpacer>
        </costList>

Simple work-around is to just delete it. If you want to add the 5 Devilstrand back, I'm pretty sure this is the valid syntax for PatchOperationAdd. (So Plasteel, Components, and Devilstrand):

                <li Class="PatchOperationAdd">
                    <xpath>/Defs/ThingDef[defName="VAE_Footwear_MarineBoots"]/costList</xpath>
                    <value>
                        <DevilstrandCloth>5</DevilstrandCloth>
                    </value>
                </li>

Correct me if I'm wrong though. Just happened to see the error and check out the xml.

If that looks right and Devilstrand is wanted for the patch, I can whip up a quick PR for the 2 lines.