Player icon indicating copy to clipboard operation
Player copied to clipboard

Maniac CallCommand - Add ResolveEventCommand

Open jetrotal opened this issue 3 weeks ago • 2 comments

in maniacs this is a thing: image

To support it, this PR Introduces the ResolveEventCommand method to process Maniac Patch @cmd (Call Command) event commands, resolving them into their actual form. Refactors interpreter logic to use this method where event commands are accessed, ensuring correct handling of Maniac Patch commands and improving compatibility. Updates function signatures and documentation accordingly.

Test map (dog npc): Map0003.zip

jetrotal avatar Dec 12 '25 09:12 jetrotal

Your screenshot is misleading. The code in Map0003 is different to it.

Also a typical problem with these AI generated commit messages: They explain "what" they did but not "why" they did it.


So here is the why explanation:

grafik

Commands like ShowMessage read the event commands right after to locate stuff such as ShowMessage_2 (line continuation) or ShowChoice.

What is new: The "right after" scan also supports now CallCommand lines for on-the-fly generation of e.g. continuations. To implement this, the parsing logic from CallCommand had to be extracted into a new method ResolveEventCommand which is now used everywhere where these continuation scans happen.

Ghabry avatar Dec 12 '25 12:12 Ghabry

Sorry I edited the map but forgot to save before zipping.

Correct map: Map0003.zip

Yeah, I also forgot to explain why those changes happened. The idea, as you said, is to properly support parent/sibling commands both as its typical command or as a call command.

jetrotal avatar Dec 12 '25 12:12 jetrotal

This PR actually looks fine code-wise. Will revisit it again in January to do some testing.

Ghabry avatar Dec 24 '25 12:12 Ghabry