Hi Neiv,
I’m working on a personal offline/LAN project for StarCraft: Remastered 1.23.10. I’ve recently been refactoring it to use the official Samase plugin API wherever possible instead of directly patching game addresses.
So far, I’ve been able to move several important parts onto Samase APIs:
- Per-unit order processing through `hook_step_order`
- Build, train, morph, lift, research, upgrade, and cancellation commands through `hook_ingame_command`
- Unit, order, technology, and upgrade data access through `extended_dat`
This has substantially reduced the amount of version-specific code and should make the project behave more consistently alongside other Samase plugins.
However, I still have to use low-level game hooks for several areas where I have not found a suitable higher-level Samase API:
- Selection behavior, including processing selection changes and larger control groups
- Related selection-panel and command-card UI behavior
- Keyboard input handling for additional in-game hotkeys
- A once-per-frame map/game-screen drawing stage suitable for drawing world-positioned rally lines
I saw `hook_draw_image`, `hook_renderer`, and `hook_draw_graphic_layers` in the public interface, but I have not found a supported callback with the appropriate timing and context for the rally-line use case. `hook_draw_image` appears to operate per image rather than as a general map-layer drawing callback.
Are there existing Samase interfaces that I may have overlooked for any of these areas?
If not, would you be open to contributions toward adding higher-level hooks for them? I can provide proposed API signatures, callback timing and behavior requirements, research identifying the relevant Remastered routines, test plugins, and testing against the current 64-bit Remastered version. I could also help add corresponding support to the public 1.16.1 shim where feasible.
I also noticed the public `samase_scarf` and `samase_plugin` repositories. If address-finding work, API declarations, tests, or another form of contribution would be useful, please let me know what contribution route you would prefer.
Thanks for maintaining Samase.
None.