UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

"No-op find and replace performed on" thrown erroneously.

Open Evasion3356 opened this issue 2 months ago • 4 comments

Describe the bug

InfiniteCrewHP.yaml

Using this YAML file against this file from Void War: gml_GlobalScript_scrCrewAI.txt

It fails with this error:

[20:06:54 ERR] An error has occurred during import: System.Exception: No-op find and replace performed on gml_GlobalScript_scrCrewAI at UndertaleModLib.Compiler.CodeFindReplaceOperation.Import(CodeImportGroup group) in C:\Hub\Modding\Project\UndertaleModTool\UndertaleModLib\Compiler\ICodeImportOperation.cs:line 212 at UndertaleModLib.Compiler.CodeImportGroup.Import(Boolean throwOnFailedCompile) in C:\Hub\Modding\Project\UndertaleModTool\UndertaleModLib\Compiler\CodeImportGroup.cs:line 499 at GMLoader.GMLoaderProgram.importConfigDefinedCode(CodeImportGroup importgroup) in C:\Hub\Modding\Project\GMLoader\GMLoader\Program.cs:line 793

Changing it to a findreplace type fixes it.

Reproducing steps

Use mentioned YAML file against Void War.

Setup Details

Version: 38a7d7ca3328c1ac80e7a3192ffa99cd5d20f8e2 Operating System: Windows 11 24H2 Game: https://store.steampowered.com/app/2853590/Void_War/

Evasion3356 avatar Oct 06 '25 00:10 Evasion3356

I'm not entirely convinced this is an actual bug in UTModLib... I see no reason it would suddenly stop working on this specific case.

As a guess, it could be an issue with your specific formatting and decompiler settings (although I doubt it), or it could be an issue with GMLoader, which we don't have control over here.

colinator27 avatar Oct 06 '25 00:10 colinator27

Hi @colinator27. I debugged this with the creator of GMLoader. The issue is using single-line finds with findreplacetrim. Apparently that doesn't work?

Evasion3356 avatar Oct 06 '25 01:10 Evasion3356

I suppose that could potentially be a problem, though it would be the first I've heard of it. I guess it's something we can verify.

colinator27 avatar Oct 06 '25 01:10 colinator27

This shouldn't be the case anymore since we basically use the same setting a long time ago gmloader uses the decomp and formatting settings the same as the umtgui but not the umtlib

umtgui vs gmloader

Senjay-id avatar Oct 06 '25 01:10 Senjay-id