In post 8, Psyche wrote:could initially require a setup.txt file like
Code: Select all
Players:
Psyche
Alisae
...
Mathdino
Lycanfire
Roles:
Role Name: (text)
Alignment: (text)
Custom: """multiline
text"""
Win Condition 1: (text)
Win Condition 2: (text)
Ability 1:
Ability 2:
...
Role PM Template:
Welcome, {Player Name}! You are a [b]{Role Name}[/b].
{Custom}
[b]Abilities:[/b]
[list]
[*]{Ability }
[/list]
[b]Win Conditions:[/b]
[list]
[*]{Win Condition }
[/list]
Basically, you start with a player list under "Players:". Then you have a roles list under "Roles:" where you associate each role with role-specific information that will then populate a role pm template. Under "Role PM Template" you specify said template. The result is a document that can be straightforwardly read and shared with others for pre- or post-game review on the one hand, and passed to a bot for automated activity on the other. Eventually, I can add headers for votecount templating and so on.
Let me elaborate how I think the roles section could interface with the Role PM Template section. In the roles section, you define content specific to each role by associating a set of tags with role-specific content. You have total freedom over defining exactly what these tags are. Instead of having any "Ability" tag like above, for example, you could have a "Power" tag, or "Custom" could instead be "Flavor". Later, in your role pm template, you reference these tags with "{<tag>}" to indicate that you want the tag placed here in your template.
What's important is that every role in the roles section have the same set of tags, with some exceptions. These exceptions are as follows:
- If you don't specify a tag for a role but the tag is referenced in the template, the bot will just ignore the line associated with that tag when generating a pm for that role. In the example setup.txt above, for instance, if "Custom" isn't specified for a role, then the entire line associated with {Custom} will just be ignored, and there'll be a two line gap between the "Welcome" line and the "Abilities" line.
- For tags that you want there to be a variable number of in between roles (ex a variable number of abilities or win conditions), just use the same name for each tag except with the tag's indexing appended to the end of the name ("Ability 1, Ability 2"). If your template ever refers just to {Ability } (the space would be important to include here), then a processed pm for a role with multiple "Ability " tags will produce a line for each one of those with the formatting you specify in the template and order them according to your included index. In the example above, for instance, the result would be a list of 2 abilities and a list of 2 win conditions. If you need any formatting to occur uniquely to one of the instances in a set of tags, just include that formatting when you initially specify the instance of that set in the roles section.
Finally, if you want the content associated with a tag to span more than one line, you need to wrap that in triple quotation marks, as is demonstrated in the "Custom" tag for one role in the example above.
I know I just typed a lot, but if you look at the example above, it seems like all this is pretty intuitive? idk