MATTIE.randomiser

the main randomizer namespace for the randomizer mod
contains all methods used by the randomizer mod

Namespaces

config

Methods

static baseShuffleFilter(e, attrib) → {boolean}

the base filter callback for the shuffle method

Parameters:
Name Type Description
e *

the elemnt to check if it exists

attrib string

the attribute to use to check if element is defined

Returns:
boolean

static safeShuffle()

only randomize in places where it will not cause major issues.

static shuffle(arr, attrib, filterCb, cb) → {Array}

shuffle an array randomly and then ensure that if the elements had an
id property to fix the id to be the new index

Parameters:
Name Type Description
arr Array

the array to shuffle

attrib string

the atribute to use to check if an element is defined

filterCb function

the callback used by the filter method when filtering the original list.

cb function

(optional) a cb to call on each element after they are shuffled and the element and index are passed to it so (element, index)

Returns:
Array -

the shuffled array. Note this method is destructive so the original array is also modified

static shuffleAnimations()

shuffle the animations array and fix ids.
note: Fear and hunger doesn't really use animations the way it should so this might not be as chaotic as expected but will result in very
very weird things

static shuffleArmors()

shuffle the armor array and fix ids

static shuffleClasses()

shuffle the classes array and fix ids.
note: this will randomize starting abilities and stats IE: merc could have war cry or nash'ra abilities, etc...

static shuffleCommonEvents()

shuffle the common events array and fix ids.
Note: This will almost certainly break things completely, this is the most likely to crash the game.

static shuffleEnemies()

shuffle the enemies array and fix ids.
note: because funger stores limbs as enemies this will result in utter chaos with troops being composed of random limbs of random creatures

static shuffleItems()

shuffle the items array and fix ids

static shuffleMapInfo()

shuffle the mapsinfo array and fix ids.

static shuffleMaps()

shuffle the maps array and fix ids.

static shuffleSkills()

shuffle the skills array and fix ids.
note: because skills contain both player and enemy skills this will result in very very weird things

static shuffleStates()

shuffle the states array and fix ids.
Note: This will break things given the knockout state and resist death state will be shuffled, they will need to be hardcoded to stay put.

static shuffleTilesets()

shuffle the tilesets array and fix ids.
Note: this shouldn't break anything but will make the game very very ugly and not in a funny way (likely)

static shuffleTroops()

shuffle the troops array and fix ids

static shuffleWeapons()

shuffle the armor array and fix ids