Mafia Engine Development

Talk about Forum Mafia feedback, suggestions, etc here.

Moderators: Varanus, FM Game Moderators

Mafia Engine Development

Postby JacksonVirgo » Thu Dec 17, 2020 9:48 am

Howdy fellow Homosapiens,

Easy Access Link

I've been working on a sort of tool that I'm hoping is going to be expanded into the following areas and perhaps further.
  • Role Card Formatting
  • Semi-Automatic Role PM Handler
  • Game Rander
  • CSV Role Card Formatting
  • Fully Customized Components

I have already made the barebones of the Role Card Formatting and the Semi-Automatic Role PM Handler. I have linked unlisted YouTube links to demonstrate the functionality that I have right now. URL's have a maximum length so some role-card, if too long, will have to be sent manually and that's nothing I can fix as of right now.

I am designing for both MafiaScum and Town of Salem Forums, it's generally fine to do both as they are both using phpbb right now so it's only a matter of a few smaller changes. Although the role card formatting should work for any site that uses markdown such as bbcode.

Role Templating and URL Cleaning
I need a better name for this but you can make completely unique roles by just changing the template in which the tool uses to generate roles. I am calling it a Lexer as it works fairly similar to one but not exactly one. Anything you input will be cleaned and able to be safely used in a URL without the high risk of it breaking if you use reserved characters.

Fully Customized Components
Right now there is a select few components in which you can add to your role-card. That being the role name, colour etc. But I'm planning on making that modular and allowing the user to add as many as they want of different types to make as complicated as a role as you want.

CSV Role Card Formatting
Relatively soon I am going to implement an easy way to mass-produce role-cards easily. Using CSV files (in other words, spreadsheets) as seen as an example in the following Google Spreadsheet.

Game Rander
At its core, this will use the spreadsheet and/or combination of manually made role-cards whether using the tool or otherwise to rand a game securely. If you use the CSV Role Card Formatting etc you will also be given the ability to quickly send role PMs to the randed players by using the Semi-Automatic Role PM Handler.

I'm doing this for the FM community, ease in my future setup designs and also to put on my portfolio. The worst thing about setup design is making the role-cards by far and I'm trying to help make that much easier and faster. I haven't got this for public use at the moment as it's in a prototype phase, but I may need a few testers later down the line so if you're up for that please let me know either in this thread or via PM (or discord if you got mine). If you have any ideas or feedback on my ideas also feel free to say so, brutal constructive criticism needed!
Last edited by JacksonVirgo on Mon Jan 18, 2021 7:40 am, edited 2 times in total.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Fri Dec 18, 2020 5:03 am

CSV file support has been added, although the functionality to send role-cards individually has not been made just yet.


EDIT 1: With CSV files, you can name the headers whatever you please and have as many as you want and they will be picked up by the Lexer. If you want to have something there but not put it in the RC yet for X reason you can do so it just disregards the information.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby lemonader666 » Fri Dec 18, 2020 5:07 am

Good job mate

you can email me at lemonader666@gmail.com if need be
User avatar
lemonader666
[Forum Mafia XVI] Winner
[Forum Mafia XVI] Winner
 
Posts: 1703
Joined: Tue Nov 08, 2016 9:24 pm

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Fri Dec 18, 2020 5:08 am

lemonader666 wrote:*insert supportive post here*

*insert epic thanks response here*
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Fri Dec 18, 2020 5:19 am

To showcase the custom dynamic headers and a closer look at how the Lexer recognizes your input over just the text you can check out this video.



Also you're allowed to egopost and tell me your thoughts if you want to. If I can get people to care about this project I want to discuss things about it :D
If nobody cares, that's fine too as I am doing this for myself as well owo
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby ejjinami » Fri Dec 18, 2020 12:49 pm

damn, if this ever comes out, it will be huge!

great job, man!


15 : 14,5

Last updated: 18.02.2021
User avatar
ejjinami
Medium
Medium
 
Posts: 152
Joined: Sun May 14, 2017 12:22 pm

Re: FMHelp Tool Development (name pending)

Postby ICECLIMBERS » Fri Dec 18, 2020 2:45 pm

This is definitely something that I could see saving me a lot of time.

One recommendation I have is about the colors. I don’t have hex codes memorized so having another way to select the more common ones (red, blue, green) like a drop down menu maybe? Text could work but then you’d get color=#red

Looking forward to the more complex versions.
Spoiler: Image

in the distance the shelves
rode three shadows of blue
User avatar
ICECLIMBERS
[Forum Mafia VII] Winner
[Forum Mafia VII] Winner
 
Posts: 3080
Joined: Wed Nov 19, 2014 11:50 pm
Location: Eastern Time

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Fri Dec 18, 2020 11:06 pm

Thanks you both :D

Currently I removed the inbuilt # from the logic so that you can put in words like you’ve said. Planning on making a button next to the input which opens a colour wheel to select from as well as a few commonly used colours like red, green, grey etc

Thanks for the support :D
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby cob709 » Fri Dec 18, 2020 11:39 pm

whoa how is this possible
I SEE ALL
User avatar
cob709
Mayor
Mayor
 
Posts: 874
Joined: Sat Aug 12, 2017 9:44 am

Re: FMHelp Tool Development (name pending)

Postby lemonader666 » Sat Dec 19, 2020 12:07 am

cob709 wrote:whoa how is this possible

magic
JacksonVirgo wrote:Thanks you both :D

Currently I removed the inbuilt # from the logic so that you can put in words like you’ve said. Planning on making a button next to the input which opens a colour wheel to select from as well as a few commonly used colours like red, green, grey etc

Thanks for the support :D

Here you go
Spoiler: Brown
██████Wheat
██████Tan
██████Khaki
██████Burlywood
██████Darkkhaki
██████Rosybrown
██████Sandybrown
██████Peru
██████Chocolate
██████Sienna
██████Saddlebrown
██████Brown
Red
██████Mistyrose
██████Pink
██████Lightpink
██████Darksalmon
██████Lightsalmon
██████Lightcoral
██████Salmon
██████Tomato
██████Coral
██████Indianred
██████Hotpink
██████Firebrick
██████Crimson
██████Red
██████Darkred
██████Maroon
Orange
██████Peachpuff
██████Moccasin
██████Navajowhite
██████Orange
██████Darkorange
██████Orangered
Yellow
██████Lightgoldenrodyellow
██████Lightyellow
██████Lemonchiffon
██████Palegoldenrod
██████Yellow
██████Gold
██████Goldenrod
██████Darkgoldenrod
Green
██████Mintcream
██████Honeydew
██████Darkseagreen
██████Lightgreen
██████Palegreen
██████Mediumspringgreen
██████Springgreen
██████Mediumseagreen
██████Lightseagreen
██████Seagreen
██████Yellowgreen
██████Greenyellow
██████Lawngreen
██████Chartreuse
██████Lime
██████Limegreen
██████Forestgreen
██████Green
██████Darkgreen
██████Darkolivegreen
██████Olivedrab
██████Olive
Blue
██████Aliceblue
██████Azure
██████Lightcyan
██████Paleturquoise
██████Powderblue
██████Lightblue
██████Lightsteelblue
██████Skyblue
██████Lightskyblue
██████Aquamarine
██████Mediumaquamarine
██████Cadetblue
██████Mediumturquoise
██████Turquoise
██████Aqua
██████Cyan
██████Darkturquoise
██████Deepskyblue
██████Dodgerblue
██████Darkcyan
██████Teal
██████Cornflowerblue
██████Steelblue
██████Royalblue
██████Blue
██████Mediumblue
██████Darkblue
██████Navy
██████Midnightblue
██████Darkslateblue
██████Slateblue
Purple
██████Gainsboro
██████Lavender
██████Thistle
██████Plum
██████Violet
██████Palevioletred
██████Orchid
██████Mediumorchid
██████Mediumpurple
██████Mediumslateblue
██████Blueviolet
██████Darkorchid
██████Darkviolet
██████Darkmagenta
██████Purple
██████Mediumvioletred
██████Deeppink
██████Magenta
██████Fuchsia
██████Indigo
Other
██████Antiquewhite
██████Beige
██████Bisque
██████Blanchedalmond
██████Cornsilk
██████Floralwhite
██████Ghostwhite
██████Ivory
██████Lavenderblush
██████Linen
██████Oldlace
██████Papayawhip
██████Seashell
██████Snow
██████White
██████Whitesmoke
██████Darkgray
██████Gray
██████Lightgray
██████Silver
██████Dimgray
██████Lightslategray
██████Slategray
██████Darkslategray
██████Black

you can email me at lemonader666@gmail.com if need be
User avatar
lemonader666
[Forum Mafia XVI] Winner
[Forum Mafia XVI] Winner
 
Posts: 1703
Joined: Tue Nov 08, 2016 9:24 pm

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sat Dec 19, 2020 2:41 am

You're a legend, also

Azure blue? Pfffffffft, you mean white.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sat Dec 19, 2020 9:49 am

A major update is being down right now. Afterwards I will likely host the prototype and get people to test it whether for real setups or for mock ones.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby ICECLIMBERS » Sat Dec 19, 2020 3:32 pm

What about this color?
Spoiler: Image

in the distance the shelves
rode three shadows of blue
User avatar
ICECLIMBERS
[Forum Mafia VII] Winner
[Forum Mafia VII] Winner
 
Posts: 3080
Joined: Wed Nov 19, 2014 11:50 pm
Location: Eastern Time

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sat Dec 19, 2020 10:34 pm

ICECLIMBERS wrote:What about this color?


Why did you make a blank post?
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby cob709 » Sat Dec 19, 2020 10:36 pm

JacksonVirgo wrote:
ICECLIMBERS wrote:What about this color?


Why did you make a blank post?

e1ecf2
I SEE ALL
User avatar
cob709
Mayor
Mayor
 
Posts: 874
Joined: Sat Aug 12, 2017 9:44 am

Re: FMHelp Tool Development (name pending)

Postby lemonader666 » Sat Dec 19, 2020 10:36 pm

JacksonVirgo wrote:
ICECLIMBERS wrote:What about this color?


Why did you make a blank post?

He didn't

you can email me at lemonader666@gmail.com if need be
User avatar
lemonader666
[Forum Mafia XVI] Winner
[Forum Mafia XVI] Winner
 
Posts: 1703
Joined: Tue Nov 08, 2016 9:24 pm

Re: FMHelp Tool Development (name pending)

Postby cob709 » Sat Dec 19, 2020 10:41 pm

lemonader666 wrote:
JacksonVirgo wrote:
ICECLIMBERS wrote:What about this color?


Why did you make a blank post?

He didn't

yes he did
I SEE ALL
User avatar
cob709
Mayor
Mayor
 
Posts: 874
Joined: Sat Aug 12, 2017 9:44 am

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sun Dec 20, 2020 2:23 am

I've added custom singular fields, you can change the name/handle and type of field. I am slowly going to add different types of fields including a colour wheel which converts to a hex colour.

Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sun Dec 20, 2020 8:53 am

I've also added functionality to send individual role-cards (but still can send the whole boi) if you're using the CSV format.

A new addition I was thinking of adding is giving the ability to mass-create role-cards using the singular role section (by storing the file into a table so it's editable) so that you can send individual role-cards without needing to specifically use CSV files. Perhaps allowing to save/load files from CSV into the singular role card section and vice versa. If you like that idea lemme know.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Wed Dec 23, 2020 7:03 am

I've got temporary heroku hosting for testing (no use paying for paid services or using a dedicated server which I'm slowly planning on getting for other projects + this if it kicks off).

You can find the link here but I do not promise reliable up-time but it's probably not going to be an issue for anyone, if it IS down or crashes feel free to PM me. It would likely have to do with me testing out a screen-scraping API of my creation.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sat Dec 26, 2020 9:09 am

Since I've done some work, including making the link URLs much nicer to look at, a latest link was broken (fixed now). A link to the main website is linked at the top of the OP, just click the appropriate link within that to be redirected to the role cards. The replacement thing is for MafiaScum.
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Sun Jan 10, 2021 2:16 am

I just realised I've been updating my progress to MS but not here. I'll do that now.

Screen-Scraper
I've created an API to help with reworking the Replacement Form which is a MS thing not a ToSFM thing I am planning on adapting the logic for this API for use in vote-counters in time. Right now the screen-scraper finds the following:
  • Author of the Thread
  • Title of the Thread
  • Current Page Index
  • Last Page in the Thread

Role Formatting
I've reworked the logic to be server-side to make the logic more modular as if anybody knows front-end javascript you know how absolutely tedious making large logic is as well as me being able to make a desktop version of this tool if it gets popular enough to do so. I've added "global" variables which you can reference within the spreadsheet to avoid copy+pasting a lot of data (and then changing every. single. one if you need to change a word or two). These global variables can also be referenced within the template itself if EVERY role uses is such as a game thread link and/or asking for confirmation etc. Example can be seen in the following spoiler.

Spoiler: Image

Global Variables
I'm going to showcase both the Global Variables and also Role Specific information which is a new addition, but a cool one!

You can now make specific information that only shows under specific conditions, such as if their alignment is Mafia etc (such as for Mafia PTs). This took a bit to actually fix all the bugs that appeared but it's fully workable now. I am planning to add a more in depth boolean functions such as "and/or" operators as well as "not" operator instead of just "equals" so every role BUT Mafia sees someone etc.

Spoiler:
Game Randing and Name Referencing
One issue I had when designing a few mock setups was that you can't make role-cards referring to a players name similar to.
Spoiler:
Welcome JacksonVirgo, you are a...


I've created a way to rand a game, which randoms the order of the player list, searches for new handles which I'm coining {{Player}} which gets the current players name such as in the example above and {{Player_X}} gets another players name, where X is the index of the role you're wanting the players name for, 1 being the first line in the spreadsheet and 4 being the fourth etc. With this you can effectively create Mafia PTs that show players names without having to manually add them to the card before sending it, which is the goal of this project. Example of this in practice can be found in the video below and in the spoiler for the Role Card of one of the Mafia.

Spoiler:
Welcome Trash Can! You are a Mafia Tracker

Each night you may check a player to see who they visited, if anyone.

You are aligned with the worst


Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby TheFluffyWaffleV2 » Sun Jan 10, 2021 2:38 pm

JacksonVirgo wrote:
ICECLIMBERS wrote:What about this color?


Why did you make a blank post?



also this is fuckin awesome
Retired Goop God
Spoiler:

jumpscare
Image
User avatar
TheFluffyWaffleV2
Retributionist
Retributionist
 
Posts: 368
Joined: Sun Aug 19, 2018 10:24 am
Location: Bama

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Mon Jan 11, 2021 5:12 am

Saving / Loading Information To File
You can now save and load the global variables and template to a JSON file for use with custom templates etc.


Beta Release #2
The progress has been updated to the site, you can now access the updated version of the tool with the link in the OP. Please if you give it a try let me know how it goes :D
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)

Re: FMHelp Tool Development (name pending)

Postby JacksonVirgo » Mon Jan 18, 2021 7:40 am

I've created a mock main menu, and I think I've decided on a name for now (at least it's better than FMHelp).

Image

Thoughts?
Pronouns - They/Them

On-site FM Record: 11-0-11
Spoiler: Latest Town Game: VFM75 - Citizen - Win
Latest Scum Game: SFM79 - Coroner - Win
Latest Neutral Game: SFM72 - Failed Assassin - Win
Last updated 02.12.20 AEST
User avatar
JacksonVirgo
Sheriff
Sheriff
 
Posts: 542
Joined: Mon Jul 13, 2015 12:00 am
Location: Australia (AEST)


Return to FM Discussion

Who is online

Users browsing this forum: No registered users and 6 guests