Wednesday, 30 January 2013

Lua

Yeah. Surrounded is going to be scriptable. Primarily this will enable mods to alter the way weapons are used and the way levels and actors are generated, but I also intend to make an event system and allow scripts to stick dialogue/narration/info on the screen.

Weapons in particular are going to be very flexible. They could require a pattern match for the user, target, both (classic Encircled), or neither (classic RL), and each square of the pattern could match any subset of up to 16 terrain types. Patterns could be transformed according to any subgroup of the octagonal symmetry group. Weapon range could be any integer from 1 upwards (but to make it fair on the player, mods should restrict maximum range to fit the number of tiles on the screen). Weapons could hit any number of targets from 1 upwards. Weapon damage could be any number (and damage could even be inflicted dynamically by the script, enabling Hydra Slayer-like mechanics). Actors could have movement types that restrict them to a particular subset of terrain types (Like the red-blue things in HyperRogue II/III or the ghosts in Angband). Ranged weapons could require line of sight that only passes specific terrain types (so that a bullet, but not an arrow, can be shot over lava), and the user and target locations could be included or excluded in this line-of-sight (so that a ghost hiding inside a wall can or cannot attack or be attacked). Actors could potentially inherit their movement type from their weapon's line of sight, or vice versa. This could lead to lock-and-key type puzzles. Some weapons could also work by counting the number of tiles matching subsets of terrain. Sprite sheets of course would be redefinable.

Depending on how crazy I'm feeling, I might allow pattern matching to include tiles at arbitrary offsets from the pattern's centre. That would be rather difficult to represent in the UI, though.

Using all of these features in the same mod would likely lead to confusion, imbalance, and unplayability, but I'll assume that modders (and I) have enough restraint to use subsets of the available features that lead to entertaining and comprehensible games*. The point is that not having to recompile every time I change game content will allow me to balance the game much faster. If it's done in time, I could even make a mod in for 7DRL this year (which I expect is going to be a busy time in real life).

* But I promise to include one mod that uses every mechanic in the game. It might be difficult to make it winnable...

No comments:

Post a Comment