Shatterwaltz / SugoiTomodachiQuest

Discord-based text adventure game for the ♥SuperFriends♥
1 stars 0 forks source link

Config File #21

Open corysabol opened 7 years ago

corysabol commented 7 years ago

Implementing a JSON based config file as follows:

{
  "strs": {
  "greetings": ["Hello {}! I hope your a P O S I T I V E person today.", "etc"],
    "help": {
      "topic here" : []
    },
    "dialogue": {
      "type here" : []
    }
  },
  "custommobs": {
    "mobname" : {
    "desc": "desc here",
    "maxlvl": 10,
    "rarities": ["list of possible rarities"],
    "etc"
    }
  },
  "customitems": {
    "item props here"
  },
  "maxsessions": 10,
  "sessionttl": 1000,
  "maxfloors": 100,
  "maxplayerlvl": 100000,
  "maxmoblvl": 1000,
  "playerafktime": "3h",
  "kickondeath": true,
  "etc etc"
}

We can have a set of possible fields that can be overridden from a default config file if the user one is present. This way the interface from code to config file is always the same but users may modify the strings present in the help messages, etc.

@Shatterwaltz for discussion

corysabol commented 7 years ago

Also possible to allow for server DMs to upload a config file and have the bot download it and apply it that way too. Might can just pin it to the server, and the bot will first look for a pinned config.json in it's server, if it doesn't find that one then it will look for a local toplevel config.json in it's running dir, and if it doesn't find that then it will source the default one that will be in a config dir or something like that.

corysabol commented 7 years ago

The part about looking for pinned conf isn't something I really want to implement actually.

corysabol commented 7 years ago

Maybe eventually something like that. But, I just really don't wanna, hah.

Shatterwaltz commented 7 years ago

copied from discord conversation:

All the debug messages it puts out should be in character for being tomochan, not kobayashi so like a command to check and make sure it's running responds "hai hai tomochan desu"