Skip to content

Maniacs Patch - ChangePictureId command + Pictures Inspector - #3500

Open
jetrotal wants to merge 7 commits into
EasyRPG:masterfrom
EasyRPG-NewFeatures:maniacs/setPictureID
Open

Maniacs Patch - ChangePictureId command + Pictures Inspector#3500
jetrotal wants to merge 7 commits into
EasyRPG:masterfrom
EasyRPG-NewFeatures:maniacs/setPictureID

Conversation

@jetrotal

@jetrotal jetrotal commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

Had to put those two together because I needed one to test another

Change Picture command:

Added support for the Maniac Patch ChangePictureId event command, enabling move, swap, and slide operations on picture IDs with error handling and sprite refresh logic. This replaces the previous stub implementation and ensures proper picture management for Maniac Patch compatibility.

Map for testing the command:
Map0003.zip


Pictures Inspector:

Introduces a new debug scene and windows for viewing and inspecting active pictures and string windows. Updates scene and debug menu logic to support the new 'DebugPicture' scene, adds menu option, and implements detailed property display for both image and string pictures.

image

Added support for the Maniac Patch ChangePictureId event command, enabling move, swap, and slide operations on picture IDs with error handling and sprite refresh logic. This replaces the previous stub implementation and ensures proper picture management for Maniac Patch compatibility.
Introduces a new debug scene and windows for viewing and inspecting active pictures and string windows. Updates scene and debug menu logic to support the new 'DebugPicture' scene, adds menu option, and implements detailed property display for both image and string pictures.
@Ghabry

Ghabry commented Dec 14, 2025

Copy link
Copy Markdown
Member

Imo it would be better to have Replace(int src_id, target_id) (replaces source pic with target pic) and Swap(int first_id, int second_id) added to Game_Pictures so that most of the complex logic is not inside the interpreter.

@Ghabry Ghabry added the Needs feedback Waiting for the issue author to give further information. label Dec 24, 2025
Ghabry added 2 commits July 13, 2026 02:18
@Ghabry
Ghabry force-pushed the maniacs/setPictureID branch from f0cc536 to 1936d1d Compare July 13, 2026 00:26
@Ghabry Ghabry removed the Needs feedback Waiting for the issue author to give further information. label Jul 13, 2026
@Ghabry
Ghabry force-pushed the maniacs/setPictureID branch 2 times, most recently from abf90ed to b315343 Compare July 13, 2026 00:33
@Ghabry

Ghabry commented Jul 13, 2026

Copy link
Copy Markdown
Member

The code actually looks fine to me. Only:

  1. integrated the Picture Inspector better in the existing Debug UI
  2. extracted these complex lambda functions into methods in the Picture class

Only have to test it g

@Ghabry Ghabry added this to the 0.8.2 milestone Jul 13, 2026
@Ghabry

Ghabry commented Jul 30, 2026

Copy link
Copy Markdown
Member

Testing some out of bounds stuff (as this is always the interesting part xD) I noticed some weird behaviours depending on whether src or dest are out of bounds.

Will document it when I fully understood it.

So this will take a bit longer to get everything right... Unexpected problems 😢

Ghabry added 3 commits July 31, 2026 16:36
They were considered not existing as they have no filename.

The window is deattached after erase
Was able to delete a huge amount of the AI boilerplate

My favourite optimisation is noticing that a Move can be implemented in terms of a Swap+Delete
@Ghabry
Ghabry force-pushed the maniacs/setPictureID branch from bbe7ef8 to 3116f1e Compare July 31, 2026 14:51
@Ghabry

Ghabry commented Jul 31, 2026

Copy link
Copy Markdown
Member

Works including all my tests concerning out of bounds and overlapping ranges.

Honestly this took again far too long to "review" (well, rewrite).

Turns out most of the code in Swap was unnecessary. It's enough to swap the two elements in the vector and then to adjust the IDs.

Move can be simplified by just doing a swap followed by deleting the one swapped with.

In general looking at the original code the AI is too afraid to just invent new API. Instead it hacks around by doing lots of function calls.

@Ghabry
Ghabry force-pushed the maniacs/setPictureID branch from 3116f1e to c964ec2 Compare July 31, 2026 15:10
@Ghabry
Ghabry requested a review from carstene1ns July 31, 2026 15:11

@Ghabry Ghabry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this is ok now

not reviewing the debug scene. Considering this is debug code I don't really care how its written (based on my tests it works)

@Mimigris

Copy link
Copy Markdown
Contributor

Checked a bit the Picture Inspector (will do later on ChangePictureID as it requires playing with the command), only thing I have to say so far is that the empty filename picture bug from RPG_RT that we partially support will not be correctly listed (listed in the list as undefined even if the picture still exists and is displayed).
As this only affects the wallpaper computer screen of Yume 2kki on its picture of ID 2 and the TestGame-2000, it may not be that big of a deal, but was still worth mentioning.

@Mimigris

Copy link
Copy Markdown
Contributor

Okay, finished testing the command I think.
The only issue I found is that the picture layer is not swapped along the picture.

More of a feedback on something else, but for the picture inspector, when the using the spritesheet feature, the first cell is displayed as 0, wouldn't it make more sense to have it be displayed as 1, as it seems to be how it is referred in RPG Maker? Or is it how it is internally referenced in the Player, and thus was simpler to implement this way?

screenshot_20260731_223504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants