OpenRCT2 / OpenRCT2/OpenRCT2

Staff hire game action broken/breaking change for plugins

Open
#23,790 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug plug-in
Dominant language
C++
Stars
16.2k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
80

Description

Operating System

Windows 10, 64-bit

OpenRCT2 build

OpenRCT2, v0.4.19.1 (0886df6244 on develop) provided by GitHub

Base game

RollerCoaster Tycoon 2

Area(s) with this issue?

No response

Describe the issue

PR #23328 broke plugins that used the StaffHireNewAction game action by changing one of the properties without a proper backwards compatibility check. Furthermore, the API declaration file was not updated, which still reflects the old API, and the new required constume ids cannot yet be retrieved from the API to properly use the game action.

To fix this I would suggest the following fixes:

  • Update openrct2.d.ts with the new API.
  • Add a proper method to, for example, get available costume objects which can be used with the game action.
  • Add a backwards compatibility check for plugins using a plugin API version prior to the game action breaking change or fix.
Steps to reproduce
  1. Write a plugin that queries or executes the StaffNewHire action.
  2. Get an error for incorrect parameters.
Attachments

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with StaffHireNewAction.cpp and distribution/openrct2.d.ts, comparing the changed action properties with the declared plugin API. Trace how plugin API versions are identified and how available costume objects could be exposed. Done means existing plugins remain compatible or receive an intentional compatibility path, while the declaration and required costume IDs match the working action.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
api, game-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.