Skip to content

Releases: OpenLoco/ObjectEditor

4.2.0-alpha.2

02 Mar 05:04
Compare
Choose a tag to compare
4.2.0-alpha.2 Pre-release
Pre-release

What's Changed

  • Add "crop images" button and functionality, by @LeftofZen in #172
  • Add palette remap for image table, by @LeftofZen in #173
  • Use absolute path when displaying objects, by @LeftofZen in #174
  • Add a better pan-and-zoom control to the image previewer, as well as make the border and offset display pixel-perfect, by @LeftofZen in f38e7cc
  • Allow importing any number of images into objects (previous was locked to having the same number as the existing object). Be careful though! There is currently no automated support for updating the animation, body, bogey, or any other part of the image data. You will need to update these manually! By @LeftofZen in b261174

Full Changelog: 4.1.3...4.2.0-alpha.2

Object Editor 4.2.0-alpha.1

20 Feb 11:55
Compare
Choose a tag to compare
Pre-release

What's Changed

  • Add "crop images" button and functionality by @LeftofZen in #172
  • Add a better pan-and-zoom control to the image previewer, as well as make the border and offset display pixel-perfect, by @LeftofZen in f38e7cc
  • Allow importing any number of images into objects (previous was locked to having the same number as the existing object). Be careful though! There is currently no automated support for updating the animation, body, bogey, or any other part of the image data. You will need to update these manually! By @LeftofZen in b261174

Full Changelog: 4.1.3...4.2.0-alpha

ObjectEditor 4.1.3

12 Feb 01:50
Compare
Choose a tag to compare

What's Changed

  • Fix a bug in object saving where the checksum was calculated on encoded object data, not the unencoded data, by @LeftofZen in #169. Credit to @spacek531 for discovering/naming these in the main project.
  • Update interface object and vehicle sound object variable names from OpenLoco, by @LeftofZen in 091cf9c

Full Changelog: 4.1.2...4.1.3

ObjectEditor 4.1.2

05 Feb 04:16
Compare
Choose a tag to compare

What's Changed

Features

Despite being a bug-fix release, a few small updates also snuck in

  • Add recently-named vehicle object flags, by @LeftofZen in 0705b68. Credit to @spacek531 for discovering/naming these in the main project.
  • Update the cost factor property for land and water objects from int8 to int16, by @LeftofZen in 31ebcad. Credit to @duncanspumpkin for finding these in the main project.
  • Rename colourType in vehicle object to SpecialColourSchemeIndex since that's what it does in-game. By @LeftofZen in 797f2e7. Credit to @spacek531 for finding this.

Bug fixes

  • Fix a bug where the compatible cargo categories for a vehicle were being incorrectly written to file, resulting in the corruption of the remainder of the file. By @LeftofZen in 4b7da73

Full Changelog: 4.1.1...4.1.2

Object Editor 4.1.1

03 Feb 14:41
Compare
Choose a tag to compare

What's Changed

Bug fixes

  • Set "object type" properties back to editable as it was inadvertently preventing the user changing dependent object types for other objects. A better solution will need to be found to disallow changing the object type of the object you're editing. By @LeftofZen in 5c02c5c
  • Fix regression in Region save code that caused it to generate corrupt objects.

Full Changelog: 4.1.0...4.1.1

Object Editor 4.1.0

02 Feb 15:37
Compare
Choose a tag to compare

Editor

Features

  • Add Close All and Close Others right-click options to the UI tab control, by @LeftofZen in #161
  • Add a confirmation box when
  • Move hex viewer to a dedicated window for performance reasons, by @LeftofZen in080fedbd85dcc8c067ec816109a3f6ee5ebc070e
  • Set minimum size for hex viewer so you can see the whole table, by @LeftofZen in f356792
  • Add extra spacing in the image table view so the scrollbar can be seen, by @LeftofZen in 4b0ddf2

Bug Fixes

  • Fix image offsets not being applied when loading from json file, by @LeftofZen in 8fb8943
  • Fix sound objects not saving correctly with imported sounds, by @LeftofZen in e1dbcd8
  • Fix compatible cargo categories crashing the UI and not saving correctly. Also added better UI for them. By @LeftofZen in 080fedb

Object Service

  • Add routes for authors, tags, licences, object packs and sc5 packs by @LeftofZen in #162
    • /v1/authors/list
    • v1/tags/list
    • /v1/licences/list
    • /v1/objectpacks/list and /v1/objectpacks/getpack
    • /v1/sc5filepacks/list and /v1/sc5filepacks/getpack

Full Changelog: 4.0.1...4.1.0

Object Editor 4.0.1

17 Jan 01:53
Compare
Choose a tag to compare

What's Changed

  • When importing images into the editor, there is a conversion from RGBA to indexed palette colour. In the code I have specified (0, 0, 0, 0) as "transparent" and to be mapped to palette index 0, but technically anything with an Alpha component of 0 is transparent, for example (10, 124, 253, 0) is still transparent. Previously the editor only recognised the (0, 0, 0, 0) case but with this change, all pixels with Alpha=0 are marked as transparent, preventing issues where functionally transparent pixels were not converted into the correct transparent palette index, resulting in noise like this:
    image.
    By @LeftofZen in c88411a

Full Changelog: 4.0.0...4.0.1

Object Editor 4.0.0

15 Jan 04:11
Compare
Choose a tag to compare

What's Changed

As per semantic versioning rules, a breaking change requires a new major release, and so here we are with the big 4.0.0! There are a couple of big features in this version:

Updated object service

I've been putting off some updates to the object service for a while, and here they are. The end user won't really notice anything, but there are few new things:

  • New routes
    • /v1/objects/getobjectimages will return a zip file of decoded images for the object you asked for. Handy for websites so they don't have to write a client-side image decoding library!
    • /v1/scenarios/list - the start of the scenario service. For now it just lists the vanilla scenarios I placed in the folder, but in the future this will be fleshed out into a usable way to download scenarios and scenario packs.
  • API versioning - an experiment to see if adding versions helps to reduce downtime to service consumers, which are going to be websites built off the service. If I change the service, I don't want to immediately break all the websites, so adding in versions is a way for downstream consumers to update at their leisure. Maybe this is overkill for a hobby project, but it feels like the right thing to work towards.
  • Preliminary support for all locomotion files and for object packs and scenario packs. Whilst not exposed to the client, the backend side (database schema, server code, etc) are all in place to allow grouping of objects and scenarios into packs that the user can create and distribute. The only limiting thing here is actually the editor - I haven't added code to let users create these packs! I also haven't let users edit any of the existing metadata (eg author, tags, license, etc) but this is nearing completion and will be available soon!

DAT encoding

Prior to this, the editor would only save dat/g1 files in uncompressed format. This wasn't really an issue, but it does bloat the file size if the object contains a lot of easily-compressible graphics data. With this release, I've implemented the methods to encode the G1/graphics table, as well as all the DAT encoding methods (RunLengthSingle, RunLengthMulti and Rotate). This means you can now save objects in the exact same format as they originally came in!

This feature itself isn't that big, but as part of this work I added a lot of unit tests and fixed all the existing unit tests for loading and saving objects, and there were a lot of bugs, so many such that I'm surprised openloco even loaded some of the objects the editor made. One example is the 2nd last image in G1.dat just failing to save at all. But having fixed all these, I'm now much more confident in the correctness of the editor, and all that remains in this department is to add proper testing to the UI-to-DAT conversion code.

Tabbed document view

Previously the editor only let you view one object at a time. Viewing a new object closed the old view. No more! Now you can view as many objects at once as you like view the tabbed browser.

Indexing optimisation

One big feature I want to add is the ability to properly search all fields of all objects. However this requires all those fields being loaded in memory, in a database, or similar; just anything other than encoded in DAT format, which is unsearchable. However to decode all of those objects takes a long time currently, and whilst there is plenty of optimisation to go still, I've done another round and you should now see indexing of all 31k custom objects take around 10 seconds (at least on my 5 year old computer!), which is considerably faster than the previous version. These speed increases work towards making it feasible to decode the entire object, for all objects, in a reasonable time.

There were also some bugfixes here to prevent obnoxious re-indexing when starting up the editor if you had faulty/bad objects in your objData folder. Previously a single bad object would trigger a re-index of everything, which just wasn't necessary.

Misc

  • Added a very basic Tutorial viewmodel that simply loads the file and groups the data by my best guess at the 'command' the tutorial wants to perform, by @LeftofZen in #153
  • Fixed a bug that meant savegames loaded but scenarios did not load. Now, you can load both!
  • Update the codebase to .NET 9, by @LeftofZen in #158
  • Backend work to allow proper searching for objects by arbitrary properties (eg DesignedYear, Author, etc)
  • Updated some of the dat object type icons, by @LeftofZen in 5b5ca6e
  • Multiple bug fixes to loading/displaying scenarios, by @LeftofZen in 99fb2b5, d6bbdf3, 0636126. You should now be able to view all scenarios, even if just partially, and they shouldn't crash the editor either.

Full Changelog: 3.10.1...4.0.0

Object Editor 3.10.1

25 Dec 06:57
Compare
Choose a tag to compare

What's Changed

Bug Fixes

  • Fix crash when parsing version number when starting up the editor, by @LeftofZen in aa0f465

Full Changelog: 3.10.0...3.10.1

Object Editor 3.10.0

22 Dec 23:36
Compare
Choose a tag to compare

What's Changed

Features

Bug Fixes

  • Fix object index repeated reindexing by @LeftofZen in #148
  • Fix changes from UI for Building and Airport not being copied back to the DAT object, by @LeftofZen in f3ff1b0
  • Fix crash when clicking the "Delete" button twice in a row, from #147, by @LeftofZen in cac40e4

Full Changelog: 3.9.0...3.10