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

Plan for custom RPG_RT patches at the data level? #272

Open
fmatthew5876 opened this issue Oct 30, 2018 · 4 comments
Open

Plan for custom RPG_RT patches at the data level? #272

fmatthew5876 opened this issue Oct 30, 2018 · 4 comments
Labels

Comments

@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Oct 30, 2018

There are many different kinds of patches out there. Some of them overlap in behavior. For example I think there are several that do additive blending in pictures.

Some of them may add new chunks. Other ones can hijack existing chunks such as 8 bit bools use the extra bits to store data.

If we setup fields.csv for the way one patch does things we might prohibit others. We should figure out a plan for how to handle this at the data layer.

  1. What patches are out there?
  2. Which do we want to support?
  3. Of those we want to support, how do they store data in lcf structures?
  4. How can we autodetect them?

I think we should collect a superset of features of all the patches we want to support, and then add Player specific chunks to liblcf for them. Then in liblcf we can have a translation layer which detects third party patches and converts them to Player format on the fly.

For example we could read all bools as standard delphi integers, and then convert them to bool for our C++ types and also add a layer that can take the other bits and store them somewhere else for patch data.

Also, all patch data should have presentifdefault == false, so vanilla games don't get the extra chunks by mistake.

This can also be a base for additional Player customizations.

Other devs, your thoughts?

@Ghabry
Copy link
Member

Ghabry commented Oct 30, 2018

List of patches (in German): https://www.multimediaxis.de/threads/105858-Liste-der-Patches-Tools-f%C3%BCr-den-RM2k%283%29

Most popular seem to be AutoEnterPatch/AEP (skips the Title screen, kinda what, RPG2k3E supports but we can't support this without breaking games),
Ineluki MP3 Patch (most features supported),
Ineluki Key Patch (WIP branch Ghabry/easyrpg-player@1dcf81b)
PicPointer (supported, also supported by RPG2k3E btw),
DynRPG (bad, can't be supported, DLLs)

DestinyPatch (Custom scripting language, only found 3 games that use it)

Except for some DynRPG Patches (which are close to impossible to support as they run custom code in DLLs ...) I don't know of any other patches that modify save values.

You could parse the RPG_RT.exe to detect patches but we are not really fans of doing RPG_RT-parsing from Player.
iirc @CherryDT proposed to provide us with notes how the most common patches can be detected (can't find this comment anymore)

@fmatthew5876
Copy link
Contributor Author

fmatthew5876 commented Oct 30, 2018

Whats in those DynRPG dlls? Is it just code or also data?

If it's just code (i.e code to do an additive blend) but the data (bit to select additive for this picture) is in the LDB/LMT/LMU, we can support it. We just need the game data that says where the features are used and then we can implement them in Player.

If it's also data in the dll, the yes I agree it's probably not worth it.

You could parse the RPG_RT.exe to detect patches but we are not really fans of doing RPG_RT-parsing from Player.

I wonder if its feasible to detect by parsing patched chunks from the database without RPG_RT.exe?

@Ghabry
Copy link
Member

Ghabry commented Oct 30, 2018

Here is the documentation: http://rpg-maker.cherrytree.at/dynrpg/group__game__objects.html

The calling into the DLLs happens via "@commands" in Event comments. Basicly you can HLE (High Level Emulate) the behaviour, like we already do for Ineluki MP3.
Because Deep8 uses DynRPG stuff I got the task to implement DynRPG stuff for him. Is not public yet because the game is not out yet but you can take a look at this outdated branch: https://github.com/Ghabry/easyrpg-player/tree/dynrpg-plugins/src Supports DynParticle (directly from the DynRPG plugin, under MIT), DynPec and DynTextPlugin.

There is also DynRPG RPGSS which adds LUA-scripting, good luck emulating this ;).

What can't be emulated in a sane way are the "quick patches" which just do arbitrary memory read/write to modify stuff like coordinates of windows... (but not all DynRPG games use Quickpatches).

@fdelapena fdelapena added the RFC label Oct 31, 2018
@CherryDT
Copy link

CherryDT commented Nov 1, 2018

@fmatthew5876 Here the source of a typical plugin (it allows to assign switches to keys so that arbitrary keypresses can be detected by whether the assigned switches are on or off as well as assigning two variables to mouse position, additionally to allowing a comment command to check specific keys): https://gist.github.com/CherryDT/421a17d9fae9df3f1f9ceec1e9b48976

@fdelapena fdelapena changed the title Plan for custom RPT_RT patches at the data level? Plan for custom RPG_RT patches at the data level? Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants