Solarus 1.5 brings important new features: a quest launcher GUI, an execution console, a customizable camera as entity, maps with more than 3 layers, and more. It also improves global performance, fixes a lot of issues. Dozens of new functions were added to the Lua API.
As always, you should make a backup before any upgrade.
In this page, we only focus on the incompatibilities. See the changelog to know more about the new features.
Data files other than scripts can be upgraded automatically with the editor. Open your quest with Solarus Quest Editor 1.5 and a dialog will let you to perform the upgrade.
A new user interface allows users to select a quest, to run it and to change some settings like video and audio settings.
In this new quest launcher, each quest can now have a logo and some icons that are displayed.
The logo and icons are optional, but it is recommended to make some for your quest to be better identified in the quest list of the launcher GUI.
The logo of your quest should be a PNG image of size 200*140 pixels called logos/logo.png. It is optional.
An icon is also useful for the Solarus GUI to distinguish your quest. Like the logo, the icon is optional. Multiple icon sizes are allowed, and each size should be in a separate PNG file. The following icon file names are allowed, with the corresponding sizes from 16*16 pixels to 1024*1024 pixels:
It is possible (and recommended) to provide an icon with multiple sizes. The Solarus GUI will then automatically pick the most suitable one(s) to fit its needs.
The Lua scripting API of Solarus 1.5 introduces some incompabilities in order to get rid of legacy design choices. Luckily, most of them are very simple or will not impact you. Yet, we give below the exhaustive list of potential problems you may encounter.
chest:on_empty() no longer exists. It is replaced by the more general chest:on_opened(item, variant, savegame_variable), which is called no matter if the chest is empty or has a treasure.
chest:on_opened(item, variant, savegame_variable)
This is more natural: if you don't define the event, then the built-in behavior of the engine is executed (giving the treasure if any), and if you define it you can customize what happens.
In almost all cases, you can simply replace function chest:on_empty() by function chest:on_opened().
When walking into deep water without the swim ability, the hero no longer automatically jumps over the water: by default, he simply drowns instead. Most users don't want the jump.
If you need the jump like before, there is a new ability "jump_over_water". Just call game:set_ability("jump_over_water", 1) when starting the savegame and you will get the old behavior back.
The rank property of enemies no longer exist. It is automatically removed from your map data files when upgrading. Its only effect was to set the initial hurt style to "boss".
Instead, just call enemy:set_hurt_style("boss") from enemy scripts that are bosses or minibosses.
Because of a bug, when brandishing a treasure, for example from a chest or by calling hero:start_treasure(), the treasure sprite was not animated (it remained stuck at its first frame). The same was true for shop treasures.
This problem is now fixed, but you may be surprised if a fixed image was actually what you wanted!
If like me, you want hearts to be animated when they are appear as pickable treasures on the map (to make them fall nicely), but fixed when they are brandished from a treasure chest, then you need two different heart animations in the entities/items sprite. You should rename the heart animation to heart_falling, and make a fresh heart animation with only one frame. The heart item script should then explicitly set the heart_falling animation to pickable hearts:
Collision checks were greatly improved. Collisions with non-moving entities were not always detected. Similarly, notifications of position or ground changes were not always sent, in particular at map initialization time.
It means that events like entity:on_position_changed(), movement:on_position_changed(), custom_entity:on_ground_below_changed() and custom entity collision callbacks are now called in situations where they were missed before due to bugs.
You might want to check that your enemies and custom entities still work as expected.
The following functions are now deprecated. You can still use them in Solarus 1.5, but they will show a warning. They might be removed in a future version.
The remaining incompatibilities in the Solarus API are less disruptive. They don't have any consequence in most games, and if they do, they should be easy to address.