Skip to content

feat: Add DynRPG Support for DynParams, fix DynTxt - #3692

Open
oulianov wants to merge 7 commits into
EasyRPG:masterfrom
oulianov:master
Open

oulianov wants to merge 7 commits into
EasyRPG:masterfrom
oulianov:master

Conversation

@oulianov

@oulianov oulianov commented Oct 8, 2026

Copy link
Copy Markdown

Hello!

I've made a game that uses DynRPG, and since I'm on MacOS I needed EasyRPG to make it playable. Thank you so much for this project!


This PR adds the DynParams plugin and fixes issues with DynTextPlugin, two common DynRPG plugins (see #1091). With it, my game plays correctly.

Changes

  • DynParams plugin (src/dynrpg_params.{h,cpp}): rewrites the parameters or text of the next event command. Supports all commands of DynParams.dll
  • DynRpgPlugin::OnEventCommand hook: equivalent to DynRPG's onEventCommand. Game_Interpreter::ExecuteCommand() lets plugins edit the command in place, on the interpreter frame's own copy. It does nothing when no plugin uses it.
  • Case-insensitive DynRPG tokens: v150 now works like V150, as the DynRPG guidelines require. This was a breaking issue for my game
  • Log fixes: DynTextPlugin printed No text with ID %s found; it now shows the ID. A missing SaveXX.dyn no longer logs "Corrupted DynRPG save". This prevented me for loading my game

Testing

  • cmake --build build --target check: all 406 test cases pass.
  • My game (DynTextPlugin + DynParams) works

Hope this tiny addition helps support more games in EasyRPG!

@oulianov oulianov changed the title feat: Add DynRPG Support for plugins DynParams, DynTxt feat: Add DynRPG Support for plugins DynParams, fix DynTxt Oct 8, 2026
@oulianov oulianov changed the title feat: Add DynRPG Support for plugins DynParams, fix DynTxt feat: Add DynRPG Support for DynParams, fix DynTxt Oct 8, 2026
@Ghabry

Ghabry commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Hi and thank you for your contribution! Just took a brief look at your code and it looks quite good to me.

I will report back next week when I found time to test the dynrpg plugin a bit. Based on my statistics (in the dynrpg issue) this is one of the most popular plugins. Cool.

@Ghabry Ghabry added this to the 0.8.2 milestone Oct 9, 2026
@oulianov

oulianov commented Oct 9, 2026 •

Copy link
Copy Markdown
Author

Glad that you liked this!

I made some more testing using the original DynParam demo, dll, and docs. I figured that I had a lot missing in my first PR and there were some subtle behavior differences. Here is a summary.

DynParams:

  • Missing DynParams commands added: message_line_append_string/_number, choice_case_append_string/_number, list_params.
  • Per-script state: each script now has its own pending overwrites, like DynParams.dll (its v1.2.2 fix). Before, a parallel process could pick up parameters another script was still building across a message or number input.
  • The rewritten command is restored after it executes, as DynRPG does. Before, a loop kept the overwritten parameters. A command that waits keeps its overwrite until it completes.
  • Out-of-range parameter indices are ignored with a warning instead of growing the parameter list.

DynRPG: Multi-line comments are now read the way DynRPG reads them (only with the DynRPG patch).

  • The DynRPG docs say a plugin gets "all comment lines at once (separated by newline characters)", and the comment guidelines say a comment must start with @ and that line breaks are ignored (implementation).
  • EasyRPG differed: a later line starting with @ ran as a separate call, an empty line ended the comment, and lines were joined with nothing between them. This latest PR commit fixes this discrepancy when DynRPG patch is added.
  • This mostly matters with custom RPG Maker editor, such as cherry's RPG Maker 2009 Ultimate which let you write multi-line comments. Also there was such multiline comment in the DynParam demo.

Erasing a picture keeps its sprite (without bitmap), so the texts of an
erased picture kept being drawn, e.g. after a map change erased it. The
original plugin only draws the texts of a picture that is shown.

(cherry picked from commit 2a5e644)
@oulianov

Copy link
Copy Markdown
Author

Fixed an issue in implementation of DynTxt where texts wouldn't disappear when their linked image would disappear

As DynTextPlugin.dll 1.10 does (EasyRPG#3577):
* write_text does nothing when the text exists, remove_text deletes the ID
* append_line keeps the lines drawn before (System graphic, font)
* The picture of a text is PictureID of [DynTextPlugin] in DynRPG.ini, else 1
* A text on the map does not shake with the screen
* \a[n] is the name of a condition, \N[n] the title of a hero
* A missing text, item, skill or condition is a debug line, not a warning
@oulianov

oulianov commented Oct 20, 2026 •

Copy link
Copy Markdown
Author

Addressed the DynText plugins issues listed in #3577 (thanks again Mimigris!) to match the original DynText behavior.

I didn't solve the bugs thare were originally in DynText

* [DynParams] DebugLog of DynRPG.ini writes what it rewrites to the log,
  as the DLL writes DynPlugins/DynParamsDebug<date>.txt
* Parameters set twice keep the last value, and list_params shows them
  by index, as the DLL's map does

The rest already matched 1.2.2.1: the overwrites belong to the script
that runs the comments (1.2.2), and all its comment commands.
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.

2 participants