homm3tools
homm3tools copied to clipboard
[h3mlib] Conversion: magic plains and cursed land conversion
Currently magic planes and cursed land with SoD sprites are dropped during conversion. On some maps they are crucical for gameplay (for battles specifically designed for no-magic combat, or some strategic moves e.g. when hero who not posessed expert earth magic cast a Town Portal from magic plain and goes to any town and not just the nearest). There should be attempt to replace them by multiple standard sprites. There still may remains problems with SoD sprite which is cover smaller cells than RoE/HD original one.
Code: https://github.com/potmdehex/homm3tools/blob/master/h3m/h3mlib/h3m_conversion/convert.c
Done definition: SoD sprites for magic plains and cursed lands should be replaced by original RoE sprites which covers same cells.
Note:
@Dergash, proposed solution would be an improvement to the current h3mlib.
As you mention, while it lacks several of the Cursed Ground and Magic Plains objects of various sizes of SoD, the single object it does have for each respectively could be used to cover the same area using a "Tetris-like" algorithm conceptually similar to what is already used for replacing non-RoE impassable terrain with RoE terrain: https://github.com/potmdehex/homm3tools/blob/master/h3m/h3mlib/h3m_editing/h3mlib_impassable.c
An alternative solution is to add support for the additional objects in HD Edition through a HD Edition mod, #11 contains more info on this. However, in the particular case of Cursed Ground and Magic Plains which this issue covers, the suggested solution would probably be a pretty good one as it allows to retain compatibility with unmodified HD Edition. Ideally as mentioned at the end of the comment in #11, there would be parameters influencing the conversion so that it can either produce backward compatible maps or ones that require a modified HD Edition to run.