Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I'll certainly be adding more road encounters as time goes by as they're not difficult to add. At first it may be difficult to understand how the data structures are linked together but you can copy an existing encounter and experiment with it. Here's an example.

Firstly the encounter needs to be added to the zones dictionary in explorationregions.gd. It also needs a weight to say how often it occurs compared to other encounters.

    zones.undercitytunnels.enemies = [{value = 'solospider', weight = 2}, {value = 'oozesgroup', weight = 2}, {value = 'troglodytesmall', weight = 2}, {value = 'mutant', weight = 3},{value = 'treasurechest', weight = 1},{value = 'blockedsection', weight = 0.2}, {value = 'deadend', weight = 1}]

The value='deadend' refers to a new element in the enemygrouppools dictionary in combatdata.gd. This is mostly placeholder data so there isn't an actual wolf.

    enemygrouppools.deadend = {

        units = [['wolf',1,1]], awareness = 0, captured = null, special = 'deadend',

        description = 'The path comes to a dead end.',

        descriptionambush = '',

    }

When this encounter is met, since it has a special value of 'deadend' the function exploration.deadend will be called. It builds a menu with two options: continue if you have a ranger or restart if you have not.


func deadend(): #Leo rangers can find paths, others have progress set to zero

    var text = "The path comes to a dead end. You seem to be lost."

    var array = [{name = "Start again", function = 'restartpath'}]

    for i in globals.state.playergroup:

        if globals.state.findslave(i).spec == 'ranger':

            array.append({name = "Follow " + globals.state.findslave(i).name, function = 'enemyleave'})

    mansion.maintext = text

    outside.buildbuttons(array, self)


func restartpath(): #Leo restart zone progress - alternative to enemyleave()

    progress = 0

    zoneenter(currentzone.code)