Conversation
This reverts commit 96e0402.
- Support for implicit tile properties on objects - Add instantiators of map tiles - Correct logic for map objects in the case of traps/small medals
This helps avoid bringing in <codecvt> and Boost.Locale just for converting between UTF-8 and UTF-16 on Windows in a locale-agnostic way. See also ThePhD/sol2#571.
ceb880c to
9b7c741
Compare
| %NEEDDEPENDS% mkdir %PREFIX% | ||
| %NEEDDEPENDS% cp deps\install.bat %PREFIX% | ||
| %NEEDDEPENDS% cd %PREFIX% | ||
| %NEEDDEPENDS% git clone https://www.github.com/Ruin0x11/foobar_windows_deps windows |
There was a problem hiding this comment.
This URL should be changed to ElonaFoobar/windows_deps, too.
| extra { | ||
| show_menu = "F1: 追加オプションの表示" | ||
| export_tilesets = "タイルセットを書き出す" | ||
| exporting = "${_1}の書き出し…" |
There was a problem hiding this comment.
"インポート" and "エクスポート" have become Japanese.
export_tilesets = "タイルセットをエクスポート"
exporting = "${_1}をエクスポート中…"
| type = "core.buff", | ||
| id = "grow_" .. attribute_name, | ||
| legacy_id = attribute_index + 20, | ||
| id = attribute_index + 20, |
There was a problem hiding this comment.
It may be an unintended change.
| @@ -0,0 +1,24 @@ | |||
| local data = { _table = {} } | |||
There was a problem hiding this comment.
This file is for old-style data declaration, should be removed.
|
|
||
| # Only enable tileset export on platforms besides Android to avoid a | ||
| # libpng dependency. There is no map editor on Android anyway. | ||
| if(NOT ANDROID_GENERATE_BUILD_FILES) |
There was a problem hiding this comment.
if(ANDROID) is more suitable for just detection of Android.
| return _map; | ||
| } | ||
|
|
||
| std::string MapLoader::read_string() |
There was a problem hiding this comment.
Currently we don't want to embed NUL character in a string at all, but it cannot be said that we never want to.
|
|
||
| void init() | ||
| { | ||
| lib::Stopwatch watch; |
|
|
||
| MainMenuResult main_title_menu() | ||
| { | ||
| // fmp::export_tsx( |
There was a problem hiding this comment.
Please remove this debug code.
| cyinit = y_at_m167; | ||
| rc = chara_index; | ||
| chara_place(); | ||
| std::cerr << "map place player " << chara_index << " " << entrance_type |
There was a problem hiding this comment.
Please remove this debug code.
|
|
||
| // For get_executable_path() | ||
| #if BOOST_OS_WINDOWS | ||
| #include <codecvt> // std::codecvt_utf8_utf16 |
There was a problem hiding this comment.
This header looks unused.
|
Closed the PR because it is hard to merge it into the current develop. |
Summary
This PR implements a new map format,
.fmp, that allows for much better modding support than the vanilla.mapformat..idx,.objand.mapis rolled into one file.zlib. (It is added as a new dependency). This gives a ~10x filesize reduction.atlasproperty of the map.core.tile_exporteris run for each object and passed the object's data. This function can then call something likeChara.create. This concept is generalizable to new data formats also (although currently unimplemented), as long as they have a map position. Since objects can be given arbitrary properties, the kinds of behavior that can be ran to instantiate objects is greatly increased.core.map_objectis added to support adding map features like stairs.core.map.There is a new feature added to the game client to export the needed tilesets for Tiled to load. The tilesets and needed plugins will be output to Tiled's config directory,
~./tiled. Once this step is done, both vanilla (gzipped).idxand.fmpfiles should be loadable as long as all the data they used was also loaded intoElona_foobarat the time of export. If mod data is changed afterward, then the tilesets need to be regenerated also..fmpcontains a list of mods and semver versions of the data used at the time of saving, so incompatibilities can be detected.Although this is a replacement for the vanilla
.mapformat, there is no effect on existing saves..fmpis an interchange format, intended to be converted into the in-memory map representation.No maps have been converted to the new format yet. The map initialization code should be moved to Lua first.
Other changes
zlibandlibpngare added as dependencies.zlibis a dependency oflibpngitself and is used for map compression.libpngis used to output the tile images displayed in Tiled.boostversion is changed to1.69because of an API incompatibility in Boost.GIL introduced in1.68(see here).sol2are used to provide UTF-16 conversion on Windows (see here).luais now prepatched forwstringsupport on Windows.core.tile_exporteris created to handle export/instantiation logic of data from map files.core.map_objectis added.Example
Here is Tiled with the format's plugin support.
Format
Following is the map format.
Details