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

DirectMenuPatch #3192

Merged
merged 2 commits into from
May 20, 2024
Merged

DirectMenuPatch #3192

merged 2 commits into from
May 20, 2024

Conversation

florianessl
Copy link
Member

@florianessl florianessl commented Feb 28, 2024

Implementation for the DirectMenuPatch for RM2k(3) as described in Makerpendiums patch database:
https://dev.makerpendium.de/docs/patch_db/main-en.htm?page=direct_menu

This patch is enabled by adding the following line to the [Patch] section in EasyRPG.ini
DirectMenu=[VariableId]

Additionally the "OpenMainMenu" command is extended to mirror the same functionality. (If both variants are used, scenes set via command parameter take priority)
1st param: scene id
2nd param: party member id or actor id
3rd param: 0: party member id is used, 1: db actor id is used

Default var ids for this patch are V3326 & V3327

EDIT: It should be noted that in this implementation scene id 4 (Status) also works for RM2K and not just 2k3 engine type games.

src/game_config_game.cpp Outdated Show resolved Hide resolved
@Ghabry Ghabry added this to the 0.8.1 milestone Mar 11, 2024
@Ghabry
Copy link
Member

Ghabry commented Apr 14, 2024

I will redo the API of these scenes to take an array of actors instead. Your solution works but lets improve it while we are at it (these scenes are around 10 years old, everything a bit dated ^^)

@fdelapena fdelapena added the Awaiting Rebase Pull requests with conflicting files due to former merge label Apr 15, 2024
@Ghabry Ghabry self-assigned this Apr 15, 2024
@Ghabry Ghabry force-pushed the DirectMenuPatch branch from 5513779 to 532bae9 Compare May 10, 2024 18:49
@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label May 10, 2024
@Ghabry
Copy link
Member

Ghabry commented May 10, 2024

Rebased and updated the API...

About your extension to the Open Menu event command: I think this should get "ValueOrVariable" support so you can do indirection through it. (otherwise it has less functionality than the patch).

@Ghabry
Copy link
Member

Ghabry commented May 13, 2024

I will remove this part for now to make the PR-merge ready.

	if (Player::HasEasyRpgExtension() && com.parameters.size() > 1) {
		subscreen_id = com.parameters[0];

		if (com.parameters.size() > 1) {
			actor_index = com.parameters[1];
		}
		if (com.parameters.size() > 2 && com.parameters[2]) {
			is_db_actor = true;
		}
	}

I'm in favour of this but imo it needs some extensions for the full potential:

  • Use ValueOrVariable.
  • Instead of a single Actor allow the parameter list: actor_mode, size (n), actor_id1, actor_id2, ..., actor_idn. This is possible now after the API change.

@Ghabry Ghabry force-pushed the DirectMenuPatch branch from 532bae9 to 2aac562 Compare May 13, 2024 18:12
…instance of Game_Actor

Scenes that can handle multiple actors expect now an vector of actors.
Makes it more flexible.
@Ghabry Ghabry force-pushed the DirectMenuPatch branch from 2aac562 to 99d381f Compare May 13, 2024 18:17
@Ghabry
Copy link
Member

Ghabry commented May 13, 2024

Honestly this redirection of the menu invocation is so useful that it must become a real feature later.

@carstene1ns carstene1ns merged commit c024e67 into EasyRPG:master May 20, 2024
13 checks passed
@florianessl florianessl deleted the DirectMenuPatch branch January 31, 2025 20:54
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.

4 participants