Welcome to the Shining Force Central Forums!
SFC Forums Index Shining Forums Shining Force II
Register for your free forum account now or Login to remove this advert.

[SF2TILED] SF2 Map-making with Tiled Map Editor

With auto-mapping, templates, and SF2DISASM import.

Discussion about this classic Genesis/Mega Drive game.

[SF2TILED] SF2 Map-making with Tiled Map Editor

Postby Wiz » Tue Sep 03 2019 11:25pm

This thread will cover progress on a new map-making solution I'm working on : SF2TILED.


Just a bit of context first :
Project SF2DISASM's recent tool SF2MapCreator now provides the ability to create whole new maps from a simple image file.
This opens up the possibilities quite dramatically, as you're now free to use any tool you want to produce this kind of input image.
More details about the image import process in this post :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=36269&p=780101#p780101

But while importing existing maps from other games or minor editing could be fun, creating actual new maps from scratch can be tedious, as adjusting simple details like borders and corners can take a long time.

The purpose of SF2TILED is to provide base content, templates and best practices in order to work as efficiently as possible with the most appropriate map editor I could find : Tiled Map Editor.

Tiled comes with a brilliant feature : automapping.
In a few words, you can create a map with basic tiles which represent surface types, and then launch automapping to apply rules to automatically recognize patterns and set the appropriate tiles accordingly : borders, corners, multi-tile patterns, randomized tiles, etc.
More details on how it works here :
https://docs.mapeditor.org/en/stable/manual/automapping/
My goal with SF2TILED is to provide map templates which will make full use of automapping, to save as much time as possible on managing silly borders and corners everytime you want to create something new.


First iteration of this process : Overworld Maps ! :)
Detailed explanation for those interested :
WARNING: SPOILER!
TL;DR I now have more than 550 overworld automapping rules :excited: and here's what you can do with it :
(images link to whole map export)

- Re-creation of Granseal with base tiles :
Image

- Trigger automapping, and here's the automated result only a few seconds later :
Image

Another example with SF Final Conflict's battle 3 :
WARNING: SPOILER!


Constraints and best practices :
- Mountains and hills require to be setup only with 3-tile blocks, aligned with the block grid. The template maps have specific layers to display block grids in black or white.
- ...
- ...
- ... to complete.
- When importing with SF2MapCreator, make sure to use the original tilesets 101,102,103,104,105. For more advanced purposes you can avoid pre-importing tilesets 101,102,103,104, but tileset 105 contains water tiles, so it should be re-used to make sure water animations still work by pointing to the same tile indexes.
- To test your new map, you can replace an existing map's blocks and layouts, or you can create a new map at index 79 and so on (more on declaring new maps in the disassembly in a future HOWTO thread). Then you can edit the following file to apply your map's index as the first map for a new game :
disasm\code\specialscreens\witch\witchactions.asm
Line 86 : "move.b #3,d0 ; HARDCODED new game starting map"
Change value 3 to your new map index, build and start a new game.

I'll complete this post with more details on the methodology, and the best practices to keep in mind.
Hopefully at some point I'll be able to create equivalent templates and rulesets for other kind of maps like town and castle environments.
But let's just enjoy this first step for a bit now. Overworld map creation is a lot of fun with Tiled, and I'm sure we can make some real good use of it ! ;)
Wiz

User avatar
Shining Member
Shining Member
 
Posts: 169
Joined: Sun Mar 18 2007 2:43pm
Location: Blois, France

Re: [SF2TILED] SF2 Map-making with Tiled Map Editor

Postby Stordarth » Fri Oct 04 2019 10:57am

This is amazing! I wish this had existed 10 years ago.

I've been out of the loop for a long time, do some of the maps still break the rom if you edit them?

Code: Select all
Dice Codes
Attack/Marked Target: /roll 8d100
Damage Variance (Rebels): /roll d18 [Blake with Blade], /roll d26 [Other cases.]
Damage Variance (Emissaries): /roll d16 [Zuberi with Blade], /roll d21 [Rain with Katana, Thrald with Blade], /roll d26 [Other cases.]
Magic: /roll d26
Status Effects: /roll d100
Level-Ups (No/Fixed MP): /roll 4d11
Level-Ups (Has MP): /roll 5d11

---
SFCW-A: Durandar
Sunken Castle: Fintan Kahn

Code: Select all
Dice Codes
Attack/Marked Target: /roll 8d100
Damage Variance (Rebels): /roll d18 [Blake with Blade], /roll d26 [Other cases.]
Damage Variance (Emissaries): /roll d16 [Zuberi with Blade], /roll d21 [Rain with Katana, Thrald with Blade], /roll d26 [Other cases.]
Magic: /roll d26
Status Effects: /roll d100
Level-Ups (No/Fixed MP): /roll 4d11
Level-Ups (Has MP): /roll 5d11

---
SFCW-A: Durandar
Sunken Castle: Fintan Kahn
Stordarth

User avatar
The L-Block Anomaly
Administrator
 
Posts: 17735
Joined: Thu Sep 16 2004 3:30pm
Location: The Midlands, Staffordshire, England

Re: [SF2TILED] SF2 Map-making with Tiled Map Editor

Postby Wiz » Fri Oct 04 2019 2:29pm

Not anymore, thanks to your own detailed research about it, Stor ! :)
Details here :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=36269&start=20#p754655

But in SF2MapEditor, editing an existing map still isn't quite flexible enough in my opinion, as you can rely on the map's existing blocks only. Nevertheless you can still do great things just by arranging blocks, of course, but finer tuning needs tile-level editing.
Now creating new maps from an image file has become a good complementary approach, as you can work on a tile-level from Tiled map editor.
Wiz

User avatar
Shining Member
Shining Member
 
Posts: 169
Joined: Sun Mar 18 2007 2:43pm
Location: Blois, France

Re: [SF2TILED] SF2 Map-making with Tiled Map Editor

Postby Stordarth » Fri Oct 04 2019 3:53pm

Good to know my old endeavours proved helpful.

I don't really hack these days, but if you keep developing tools like this, I may have to dip my toe back in.

Code: Select all
Dice Codes
Attack/Marked Target: /roll 8d100
Damage Variance (Rebels): /roll d18 [Blake with Blade], /roll d26 [Other cases.]
Damage Variance (Emissaries): /roll d16 [Zuberi with Blade], /roll d21 [Rain with Katana, Thrald with Blade], /roll d26 [Other cases.]
Magic: /roll d26
Status Effects: /roll d100
Level-Ups (No/Fixed MP): /roll 4d11
Level-Ups (Has MP): /roll 5d11

---
SFCW-A: Durandar
Sunken Castle: Fintan Kahn

Code: Select all
Dice Codes
Attack/Marked Target: /roll 8d100
Damage Variance (Rebels): /roll d18 [Blake with Blade], /roll d26 [Other cases.]
Damage Variance (Emissaries): /roll d16 [Zuberi with Blade], /roll d21 [Rain with Katana, Thrald with Blade], /roll d26 [Other cases.]
Magic: /roll d26
Status Effects: /roll d100
Level-Ups (No/Fixed MP): /roll 4d11
Level-Ups (Has MP): /roll 5d11

---
SFCW-A: Durandar
Sunken Castle: Fintan Kahn
Stordarth

User avatar
The L-Block Anomaly
Administrator
 
Posts: 17735
Joined: Thu Sep 16 2004 3:30pm
Location: The Midlands, Staffordshire, England


Return to Shining Force II

Who is online

Users viewing this topic: No registered users and 0 guests