dndrp

package module
v0.0.0-...-25753cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2017 License: MIT Imports: 17 Imported by: 0

README

Diaper Roleplay Bot

GoDoc Go Report Card

A matrix bot that allows groups of players to have a Dungeon & Dragons style roleplay that's filled to the brim with diaper-related themantics.

Forward Notes

Only self-hosting the bot is supported. To do so, you must first be familiar with Matrix, the extensible, federated chat protocol: https://matrix.org

If this is your first time hearing of such a thing, I recommend you make a quick account on Riot.im (no email or phone needed) and hop into one of the suggested rooms (like #MatrixHQ or #Offtopic). Riot is essentially an open-source slack/Discord alternative that uses the Matrix protocol.

Right, so now you should be at least somewhat familiar with Matrix and what it's all about. Let's get to installing the bot.

Building

First follow the instructions on installing Go-NEB, the official Matrix bot framework.

Once Go-NEB is installed and working, place the contents of this repo into go-neb/src/github.com/matrix-org/services/ then in the go-neb directory, run:

gb vendor restore

to download the bot's dependencies. Then:

gb build

to build the source.

Running

After setup, you should be able to run the bot with the following command (make sure to replace https://public.facing.endpoint with the public domain of a Matrix home server):

BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 CONFIG_URL=config.yaml BASE_URL=https://public.facing.endpoint bin/go-neb

Documentation

Overview

Package dndrp implements a Service that acts as a helpful RPG bot for DnD-style RPs

Index

Constants

View Source
const ServiceType = "dndrp"

Configure service type

Variables

This section is empty.

Functions

This section is empty.

Types

type Diaper

type Diaper struct {
	Thickness int    `json:"thickness"`
	StatMods  *Stats `json:"statmods"`
}

type DiscordMessage

type DiscordMessage struct {
	ID      string
	Content string
	Channel string
}

type Item

type Item struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Consumable  bool   `json:"consumable"`
	StatMods    *Stats `json:"statmods"`
}

type Player

type Player struct {
	Name      string   `json:"name"`
	RoomId    string   `json:"roomid"`
	ChannelId string   `json:"channelid"`
	Items     []string `json:"items"`
	AvatarURL string   `json:"avatarurl"`

	BladderWarningGiven bool      `json:"bladderwarninggiven"`
	BowelWarningGiven   bool      `json:"bowelwarninggiven"`
	Diapers             []*Diaper `json:"diapers"`
	DiaperFullness      int       `json:"diaperfullness"`

	HoldCount int `json:"holdcount"`
	MaxHold   int `json:"maxhold"`

	Stats *Stats `json:"stats"`

	IsBig bool `json:"isbig"`

	GroupId []string `json:"groupid"`

	// TODO: Integrate with an eqiup system, where the mouth component has a "mute amount"
	// Normal pacifier would be like 50%, whereas a ball gag would be 100%
	IsMuted bool `json:"ismuted"`
}

Stats for each player

func (*Player) Change

func (p *Player) Change(newThickness int) interface{}

Change will change the player back into just a single, thin diaper

func (*Player) ConsumeItem

func (p *Player) ConsumeItem(item *Item) interface{}

ConsumeItem will remove an item from a player's inventory and add the item's attributes to the player's own attributes

func (*Player) Diaper

func (p *Player) Diaper(diaper *Diaper) interface{}

Diaper is a helper function that puts a diaper on a player

func (Player) DiaperThickness

func (p Player) DiaperThickness() int

DiaperThickness is a helper function that returns the total thickness of all of the given player's diapers as a sum representing the amount of centimeters

func (*Player) GetItems

func (p *Player) GetItems(itemSlice []*Item)

GetItems is a helper function that returns a slice of Item objects that the player has access to

func (*Player) Hold

func (p *Player) Hold()

Hold will hold in a players mess for a certain amount of time.

func (*Player) ListItems

func (p *Player) ListItems() interface{}

ListItems will return a formatted message that lists all currently known items for a specific user

func (*Player) MessDiaper

func (p *Player) MessDiaper()

MessDiaper will empty the contents of a player's bowels into their diaper

func (*Player) RemoveItem

func (p *Player) RemoveItem(itemname string)

RemoveItem is a helper function that removes a single instance of an item from a player's item list given only an item name

func (*Player) WetDiaper

func (p *Player) WetDiaper()

WetDiaper will empty the contents of a player's bowels into their diaper

type Service

type Service struct {
	types.DefaultService
}

TODO: Add config fields?

func (*Service) Commands

func (s *Service) Commands(cli *gomatrix.Client) []types.Command

Commands

  Currently supported:
	 !echo

func (*Service) Expansions

func (s *Service) Expansions(cli *gomatrix.Client) []types.Expansion

Expansions Currently used to run a method every time someone talks

type Stats

type Stats struct {
	Strength     int `json:"strength"`
	Constitution int `json:"constitution"`
	Dexterity    int `json:"dexterity"`
	Intelligence int `json:"intelligence"`
	Wisdom       int `json:"wisdom"`
	Charisma     int `json:"charisma"`
	Regression   int `json:"regression"`
	Incontinence int `json:"incontinence"`

	Bladder int `json:"bladder"`
	Bowels  int `json:"bowels"`
}

Stats define a series of attributes that a player can have. They can also be modified by items or spells TODO: Be able to influence a player's stats in a simple format: !ch playername st:+1 in:-5

type StatusMsg

type StatusMsg struct {
	Description string   `json:"description"`
	StatusTexts []string `json:"statustexts"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL