LTH Tutorials: Introduction

What is Lovely Tactics Hex?

Lovely Tactics Hex (LTH) is a 2D game engine made for developing tactical role-playing games (TRPG), built upon LÖVE 2D Engine. It offers a basic implementation for common systems in TRPG, such as:

  • Party and individual turn-based battle systems;
  • Out-of-battle field exploration;
  • Grid and path finders;
  • Mouse and keyboard input;
  • NPC basic behaviors;
  • Basic GUI;
  • etc.

Any modification in the game is possible with Lua scripting. Any custom GUI, NPC behavior, battle skill, battle status, character attribute formulas, etc. may be programmed for the game.

The engine is divided into two parts: the game code, which is written in Lua and run with LÖVE 2D (and open for any modifications), and the database editor, which was made in Java. The communication between the parts happens with Json files, where the game data is stored.

The LTH Editor

It’s the game’s database editor. It’s divided into three parts:

  • Field Editor: it’s where you create your fields. They may be for battle, exploration or even both;
  • Database Editor: it’s where you edit general game data – Animations, Obstacles, Status, Skills, Items, Battlers, Troops, Classes, Characters and Terrains;
  • System Editor: other settings that have direct effect in the core (player and grid settings, default graphics, character attributes, etc).

All the information generated by the editor is saved in a few Json files, that may be even edited manually in a text editor. They will be read by the game’s code.

The Game Code

Here is the game itself. The code is divided into two main folders, “core” and “custom”.

The core folder holds the scripts that define the overall of the game mechanics. By default, it’s possible to develop an entire game without touching any of the code in the “core” folder, but it may be freely modified if needed.

The main hot spots for the game are in the “custom” folder, where the scripts for NPC, GUI, skill, and animations can be found. There are a few default scripts in the custom folder to exemplify usages. In some of the topics of this material, we’re gonna explain how this core code works.

Next: Field Editor