Creating a turn based battle setup in Inform 7

hey all, I am experimenting with pushing the bounds of text fiction and implementing a turn based, dragon quest / pokemon style battle system and I thought I would open it up to group input and develop it opening up to the contribution of the forum seeing as: it sounds really tedious to do on my own and it may help someone in the future for their projects to understand the process or even just interest some people who are interested in exploring it.

my idea is that an encounter can begin by spending an amount of turns in room with a combatable enemy will cause them to initiate battle, where you cannot input anything the printed table does not imply, and that which you do input will open sub menus, alternatively attacking a combatable enemy will initiate the battle state, of which you can choose to input

Fight - Opening a sub menu which contains a moves list - the moves list then being the available inputs with different chances and descriptions

(for my particular version of this im intending for the moves list to change depending on what weapon you have ready and more options the more you have experienced using said weapon)

Items - Opening a sub menu which prints the inventory in a table-like format and allows input of battle friendly items, otherwise declaring “this wouldn’t be useful here.” also allowing you to ready and equip other weapons mid battle, also drink potions or consume food or specialty items

Spells - Opening a sub menu which prints known spells, similar to items allowing input of battle friendly known spells, (I have a spellbook / custom inventory for known spells set up for my specific project)

Flee - escaping the battle and returning you to regular input and gameplay based on chance, effected by a “flee-ability” value assigned to each combatable enemy, with a default value

and a basic chance based attack system with a danger level for the combatable enemy and a space to add narrative sentences that may print when creating a combatable enemy

if anyone is interested in helping me develop this system I’d love to get started.

I’d like to accomplish this in a way where the combatable enemy is interchangeable so the entire fight script doesn’t need to be copied for every single enemy

You might want to consider using scenes to handle this mechanism and…

…Emily Short’s “Menus” extension (included pre-downloaded with Inform 7), if you’re going to strictly lock down the player’s commands like that.

From there it mostly sounds like a matter of making tables, enemies with stats, and throwing random numbers around (though my personal suggestion is to build a system that prevents rolling twenty misses in a row instead of using completely unvarnished chance).

Yeah, Inform already has a good conception of “turns”, and while its built-in menu systems aren’t perfect (they don’t let you click for example), JRPG fans will be plenty used to using arrow buttons to select menu options.

1 Like

your input is highly valued and clears things up for me thank you so much

I intend to make missing quite rare but come with some entertaining literature to pay for the frustration of missing :slight_smile:

1 Like

do you know of any examples of i7 games with a neat menu with arrow key navigation? id love to demo what im trying to make

If you just type “help” as a command into this simple code you can at least see how Emily Short’s menus play out.

Include Basic Help Menu by Emily Short.

The Garden is a room.

You can also consider Wade Clarke’s Menus extension, which is more screen-reader friendly and uses numbers for options instead. That can be downloaded from Inform 7’s built in public library.

2 Likes

just a little update for the thread its coming along fantastic thank you to the advice above from @Draconis and @EphemeralHorror

When complete i will try and release a template version with basic features and documentation to help out future IF creators :slight_smile:

2 Likes