-
Notifications
You must be signed in to change notification settings - Fork 199
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
DynRPG: High Level Emulation of some functionality #1091
Comments
Nice! I feel honored ;) |
As this finally makes progress in upstreaming I started to update the DynTextPlugin to the latest codebase. https://github.com/EasyRPG/Player/compare/master...Ghabry:dyntext?expand=1 We have to do some API design discussion but PendingMessage and Game_Message can be nicely used. For PendingMessage one could replace the hardcoded V and N handling with a callback function: Game_Message can export ParseParamImpl (under a better name) and add a ParseStringParam function. Then the TextPlugin works nicely and uses all our well tested parsers :). Much simpler than before. |
An observation I made years ago when porting the Plugin for Deep8: The text rendering is off by 2 pixel (easily shown by rendering an exfont). Though not sure why this happens, the plugin just does |
There is no sourcecode for DynPEC but this is easy to reverse engineer, here is what the plugin does:
The
More interesting stuff (this is not saved!)
|
Does this mean that things such as the Overdrive patch might be compatible with the engine? Dynrpg has patches which uncap stats beyond the editor's limit, not entirely related to DynRPG though since most of them patch the game file itself but adding compatibilty with these plugins does seem encouraging. |
Can you link this overdrive patch? |
Sure. |
Everlong :
Also tons of plugins and Quick Patches: NOOOOOOOPE |
Here the DynRPG stuff used by DQ+ (sorted by usage count) No quickpatches 🥳 Worst is obviously this Mode7 plugin. PEC is planned anyway and GetMessageInfo is not thaaat hard to do.
There is also the opengl plugin but this is only for showing shaders in the settings so not critical for gameplay.
Blending has a patch here: |
@DynPec Source Code |
Oh there is sourcecode. Problem is that it is from Kazesui who already implemented the dyn particles plugin where I still do not understand why the rendering works 😅 The Mode 7 plugin has glorious code like srcX += 24*(ev->step&((((ev->step&0x1)^((ev->step&0x2)>>1))<<1)+0x1));
srcY += 32*((ev->facing - ((int)t_angle+135)/90 + 4)&0x3 );
scanline[screen_x] = background->appliedPalette[pixels[(screen_x+(int)(t_angle*deltaBG))%BG_size+BG_size*screen_y]]; Half of it is a custom map renderer to get the map onto a texture. This is something we could skip as we already have full access to the map. |
List of currently implemented DynRPG plugins (upstream):
Under development:
tl;dr: You can suggest DynRPG plugins here. No QuickPatches and no RPGSS.
Obviously supporting QuickPatches and DLLs is not possible due to how EasyRPG works but what is possible is HLE (High level emulation) which is a common technique used in emulators:
When the emulated/interpreted game calls a function, the function call is intercepted and the emulator executes a reimplementation of the function which returns to the game what it would expect.
So e.g. when a game would call the hyphothetical function "@add V1, V2, 3" instead of running the code from calc.dll (which is not possible without an emulator) EasyRPG calls the HLE-Add function and adds 3 to Variable 2 and writes the result in Variable 1. The game is happy.
The important thing is that the code base is not polluted, so QuickPatches are a no-go. HLEing RPGSS is also not possible because everybody can alter the Lua code. Games with custom DLLs will also break (obviously), only unmodified, documented features of a DynRPG plugin can be supported.
Since many months I have a DynRPG parser in https://github.com/Ghabry/easyrpg-player/tree/dynrpg
The text was updated successfully, but these errors were encountered: