For players
For quest makers
For translators
For artists
For Solarus developers
Useful links
For players
For quest makers
For translators
For artists
For Solarus developers
Useful links
Solarus 1.4 provides a brand new quest editor that was rewritten from scratch. There are almost no new features in the engine itself. The only change is that fonts are now a resource. This means they now appear in the tree of the quest editor, so they are now much easier to manage. But right now, this may require manual adjustement to your scripts.
As always, you should make a backup before any upgrade.
In this page, we only focus on the incompatibilities. See the anouncement or the ChangeLog to know what is new.
Data files other than scripts can be upgraded automatically with the editor. Open your quest with Solarus Quest Editor 1.4 and a dialog will let you to perform the upgrade.
In case of trouble, please ask for help on the Solarus forums.
Note that the operation can also be done from the command line, by running the script update_quest.lua
in the resources/quest_converter
directory of the git repository of Solarus Quest Editor. (Internally, the quest editor actually calls this script.)
For information, the changes in data files are:
text/fonts.dat
no longer exists. Fonts are now listed as a resource (like maps, tilesets, musics, etc.) and there is no explicit default font anymore.fonts
folder instead of text
.font
property.The Lua scripting API of Solarus 1.3 introduces an incompatibility due to the new way fonts are handled. We explain below how to adjust your scripts to this change.
When you create a text surface, with sol.text_surface.create(), the font file and the font size are now set separately. Before, there was a font id that referred to both a font file and a size. Now, the font id is the name of a font file with extension. This is more consistent with all other resources: sounds, musics, maps, etc. If you don't set the font, it will be by default the first one in alphabetical order. If you don't set the font size, the default value is 11.
fixed
referring to the font file minecraftia.ttf
, the new font id to use is minecraftia
.fonts.dat
), then you should set the font to use, because otherwise the default font would now be the first one in alphabetical order. You can do this in the table parameter of sol.text_surface.create() (the font
field) or with text_surface:set_font().size
field) or with text_surface:set_font_size().We can help you if you have any question or if you have problems to do the upgrade.