Phases Documentation - Glidias/fechtbot GitHub Wiki

Alpha 1.0 Guide

This is the guide for gamemasters (by default assigned to those that set up the Fecht), for configuring the phases to suit any given game system/game situation.

To set up a single phase, you can use the !phase {} command. TO set up multiple phases, you can set up the !phase [] command where within the [] array, you can set any combination of settings for each phase {}. Whatever you supply in the contents after !phase is a JSON-decodable string and must be valid JSON.

If you wish to see some examples...head on over to the https://github.com/Glidias/fechtbot/wiki/Phases-Examples link.


  • name - (string) The label of the phase

How to determine fixed turn initiative values for a phase that is enforced upon everyone?

  • initVal - (number) Set this to a non-zero value to enforce everyone to use this initiative value as his default.
  • initTeam - (number) Set this to 1 to use a character's listed Side index number (starting from base count 1: 1., 2., etc.) as initiative value if he belongs to a listed Side in the Fecht settings. Use this typically for games that control as team-based initiative. Set this to 2 to cause other characters that don't belong to any given listed side as having an initiative value of zero.
  • initReact - (number) Set this to 1 to use a character's last reaction manuever dice roll result (for a reaction-related phase) as initiative value, if available. Set this to 2 to enforce an initiative value of zero in the event he fails to react for the last reaction-related phase.

How to further control initiatives among characters found with similar initiative values?

  • floatUseCharInitInt (boolean) In a situation where initiatives among characters happen to have the same initiative value due to fixed initiative values being set from above (initVal, initTeam or initReact), a secondary value using the character's own initaitive value is used to help determine who comes first. ( lower character's individual initiative value will have his declaration turn arrive first).

How to always enforce single individual character turns even if characters happen to have the same initiative value?

  • initSingle (boolean) Use this instead. Set this to true.

How to determine sorting scheme of turns for declaration and resolution order of manuevers?

  • initSort - (int) Determine sorting scheme (0 - 3) for sorting turn initiatives (for declaring actions/manuevers)
  • initIncludeZero - (boolean) By default, any resulting initiative value of zero is filtered out of the sorting list for turn initiative ladder (for declaring actions/manuevers). If you wish to have it included, set this to true. Zero values are always found sorted in the middle of the list in between positive/negative values.
  • resolveSort - (int) Determine sorting scheme (0 - 3) for sorting resolution order. (top to bottom stored manuever list on Fechtboard body)
  • negativeSlots - (boolean) Set this to true to ensure any manuevers made by characters with negative initiative values, have their manuever slot values represented as negative slot values as well. Depending on the resolveSort setup (odd values 1 and 1), this can often be used to ensure characters with negative initiative values will always have their manuevers be listed last. (stipulated to typially execute last.)

Sorting schemes are from 0 to 3 are: (examples)

0: Lowest first

`-3`
`-2.2`
`-2.1`
`-2`
`-1`
`1`
`1.1`
`1.2`
`2`
`2.1`
`3`
`4`
`4.1`

1: Lowest first (negative tier flip)

`1`
`1.1`
`1.2`
`2`
`2.1`
`3`
`4`
`4.1`
`-1`
`-2`
`-2.1`
`-2.2`
`-3`

2: Highest first

`4`
`4.1`
`3`
`2`
`2.1`
`1`
`1.1`
`1.2`
`-1`
`-2`
`-2.1`
`-2.2`
`-3`

3:: Highest first (negative tier flip)

`4`
`4.1`
`3`
`2`
`2.1`
`1`
`1.1`
`1.2`
`-3`
`-2`
`-2.1`
`-2.2`
`-1`

Reaction-buttons related configuration

  • reactOnly - Set this to 1 to enforce a turn where it only finishes once everyone has submitted their required reactions via the buttons and no other (typing) manuevers are allowed. Set this to 2 to allow turns to end (via End turn button) with reaction buttons also needed to be pressed. Set this to 0 (default value if undefined) to only allow turns to end (via End turn button) with reaction buttons being optionally needed to be pressed.

Configure emoticon choices, description, and assosiated manuever rolls as an array of buttons each:

For public channel reaction button rolls

  • reacts - (Array) of public channel set of emoticons that is selectable
  • reactsD - (string) public channel description of reacts
  • reactsM - (Array) public channel set of react Manuevers (use manuever:roll #comment) format.

For Direct Message (DM) reaction button rolls

  • dmReacts (Array) DM channel set of emoticons that is selectable
  • dmReactsD (string) DM channel description of reacts
  • dmReactsM (Array) DM channel set of react Manuevers (use manuever:roll #comment) format.

MongoDB Schema reference

name: {  // The label of the phase
    type: String,
    trim: true,
    default: ""
},
reactOnly: {   
    type: Number
},
reacts: [{
    type: String,
    trim: true,
    default: ""
}],
initVal: {
    type: Number,
    default: 0
},
initSingle: {
    type: Boolean,
    default: false
},
dmReacts: [{
    type: String,
    trim: true,
    default: ""
}],
reactsM: [{
    type: String,
    trim: true,
    default: ""
}],
dmReactsM: [{
    type: String,
    trim: true,
    default: ""
}],
reactsD: [{
    type: String,
    trim: true,
    default: ""
}],
dmReactsD: [{
    type: String,
    trim: true,
    default: ""
}],
floatUseCharInitInt: {
    type: Boolean,
    default: false
},
initReact: {
    type: Number,
    default: 0
},
initIncludeZero: {  
    type: Boolean,
    default: false
},
initSort: {
    type: Number,
    default: 0
},
initTeam: {
    type: Number,
    default: 0
},
resolveSort: {  
    type: Number,
    default: 0
},
negativeSlots: {
    type: Boolean,
    default: false
}