Skip to content

Don't export OpenLoco / OpenGraphics objects with scenario or save files - #4033

Open
shusaura85 wants to merge 5 commits into
OpenLoco:masterfrom
shusaura85:save-no-OG-objects
Open

shusaura85 wants to merge 5 commits into
OpenLoco:masterfrom
shusaura85:save-no-OG-objects

Conversation

@shusaura85

Copy link
Copy Markdown
Contributor

Description of changes

Adds isOpenLoco() function to Object.h mirroring isCustom() and isVanilla functions and expanded the check when exporting plug-in objects to also check isOpenLoco() before saving objects.
Also updates Object Selection window replacing the raw comparison with the new function for the object source filtering options.

Rationale behind changes

This affects what objects are saved in scenario or save files. Objects marked as OpenLoco (such as OpenGraphics objects) should not be included in saved scenarios or save games (when "export plug-in objects with save games" is enabled).
OpenGraphics are part of every OpenLoco install so there's no point in including them with each save increasing the file size (using "North America Expanded" region included in v26.09 (with no other changes to other scenario creation options) would create a scenario file of around 15MB compared to around 0.8MB if OG objects not included)

Suggested testing steps

  1. Make sure "export plug-in objects with save games" is enabled in options.
  2. Create a new scenario with v26.09 using "North America Expanded" region to use OG objects and save.
  3. Check scenario file size
  4. Repeat steps 2 and 3 with the artifact build for this PR
  5. Compare file sizes (or check saved objects in files using object editor)

Did you use AI to help find, test, or implement this issue or feature?

No AI was used for these changes.

Mirror isCustom() and isVanilla() functions. Returns true is source game is openLoco
Move it under isVanilla() function to keep order with SourceGame options
Check if the object's source is openLoco and skips it if it is.
Since we now have a function for checking if an object is OpenLoco source.
@AaronVanGeffen AaronVanGeffen added the changelog Requires a changelog entry label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Requires a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants