Mafia Engine Tool Development

This forum is for discussion related to the game.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Mafia Engine Tool Development

Post Post #0 (ISO) » Sat Dec 19, 2020 9:19 pm

Post by JacksonVirgo »

Howdy Scummers,

I've been working on a tool that game moderators can use to remove any and all tedious aspects of hosting a game. This can include sending out day-start messages, creating role-cards, counting votes and much more.

Current we are in an early beta stage, but the tool is out there to be used regardless at mafiaengine.com. The uptime for the website at this current moment is unpredictable, once the website is in a more stable release I will make sure the servers are up almost 100% of the time.

Browser Extension

In addition to the website, I have been creating a browser extension to make the processes of using some of the tools within the website even easier, without even needing to leave mafiascum. In each thread you can see "Vote Count" and "Replace User" buttons which do exactly what they say, generate votecounts and creates a replacement post that sends you directly to the appropriate replacements thread.

Website Functionality

Currently the only two semi-reliable tools are the vote counter and the replacement form, all of which are super easy to use and can access them immediately from mafiaengine.com, assuming the servers are up. Currently I am working on the moderation panel, and all in one area for majority of the tools I am creating for moderators such as the beforementioned day-start messager.

Old Functionality

I will be recreating the old role-card formatting section of the tool later into the new UI, so don't be upset that it is not accessible at this very moment.


OP History

Spoiler: OP v1
Howdy Scummers,

I've been working on a tool for the past few days to aid in the process of hosting games, more specifically at this time making and distributing role-cards. The full-list of functionality can be found in the following spoiler and more additions are planned.
  • Role Card Formatting via a Lexer+Parser
  • Semi-Automatic Role PM Handler
  • CSV Role Card Formatting
  • Fully Customized Components for Singular Roles.
I'll give a quick overview of each of those.

Role Card Formatting

Using a custom lexer/parser, the tool inputs custom variables into the role-card template, this can be for both individual and mass production of roles for using the singular or the CSV sections.

Semi-Automatic Role PM Handler

You're able to send the produced role-cards through to PMs from a click of a button by utilizing the ucp.php file which PhpBB uses for private messaging (and other stuff). You can designate the content (usually the generated RCs), subject, and recipients of the message for yourself or leave them blank for a default response. I am planning on adding functionality to send each individual role-card separately if using the CSV format.

CSV Role Card Formatting

You're able to utilize the sheer simplicity of using CSV files to generate your roles. If the header of each column is the variables handle, you can make as many roles as your device allows you to. This will go through each role in the file and produce role-cards for each. Functionality for sending each RC separately in a PM is planned but not yet made.

Prototype Showcase V1



Conclusion

I'm doing this for the FM community in general, ease in my future setup designs, and also to put on my portfolio. In my opinion, the worse thing about setup design is making the role-cards by far and I'm trying to make that much faster and easier to do. This isn't for public use at the moment but as soon as the first prototype has been completed I will search for a few testers to make mock (or even real setups) using this tool so if you're interested in helping to test (or trying to break the tool) feel free to let me know here or via PM (or discord if you have mine). If you have any ideas or feedback on my ideas feel free to let me know. Brutal constructive criticism needed.
Last edited by JacksonVirgo on Wed Jun 30, 2021 10:29 am, edited 2 times in total.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #1 (ISO) » Sat Dec 19, 2020 9:20 pm

Post by JacksonVirgo »

Duckyboi has been helping me out with ideas and stuff :D
User avatar
the worst
the worst
Snuggly Duckling
User avatar
User avatar
the worst
Snuggly Duckling
Snuggly Duckling
Posts: 36293
Joined: November 7, 2015
Location: pond

Post Post #2 (ISO) » Sun Dec 20, 2020 1:31 am

Post by the worst »

hells yeah this project is awesome / egopost!
who's scum? i haven't read up yet but like, it's me
--
intermittent v/la until late march
User avatar
skitter30
skitter30
she/her
Last Laugh
User avatar
User avatar
skitter30
she/her
Last Laugh
Last Laugh
Posts: 36539
Joined: March 26, 2017
Pronoun: she/her
Location: Est

Post Post #3 (ISO) » Sun Dec 20, 2020 2:47 am

Post by skitter30 »

Oh wow this looks awesome! Happy to help test!
Show
Hiatus once more.

'skitter is fucking terrifying' ~ town-bork about scum-me

'Skitter [was] terrifying to play against ngl' ~ scum-bork about town-me

'Going into lylo against scum!skit unprepared is like having someone force feed you dull razor blades. It's painful, and once it starts, you're pretty much dead' ~ NMSA

'Skitter you're a spirit animal's spirit animal' ~ slaxx
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #4 (ISO) » Sun Dec 20, 2020 3:40 am

Post by JacksonVirgo »

In post 3, skitter30 wrote:Oh wow this looks awesome! Happy to help test!
Thanks heaps :D



---


Also if anyone has any brilliant ideas for names please throw them at my eyes
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #5 (ISO) » Sun Dec 20, 2020 3:46 am

Post by JacksonVirgo »

In post 0, JacksonVirgo wrote:I am planning on adding functionality to send each individual role-card separately if using the CSV format.
I've finished adding this functionality, a post describing how it works now etc will be incoming. Testing phase 1 will being relatively soon I believe unless setbacks happen.

EDIT: A new addition I was just thinking of is 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 and convertible to a CSV format) 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.
User avatar
Gypyx
Gypyx
She/Her
Virtute Ex Machina
User avatar
User avatar
Gypyx
She/Her
Virtute Ex Machina
Virtute Ex Machina
Posts: 7232
Joined: March 25, 2020
Pronoun: She/Her
Location: France

Post Post #6 (ISO) » Sun Dec 20, 2020 5:50 am

Post by Gypyx »

Wow that looks epic

Also yes agreed making role cards is a pain in the ass lol
bottom text
User avatar
Ircher
Ircher
He / Him / His
What A Grand Idea
User avatar
User avatar
Ircher
He / Him / His
What A Grand Idea
What A Grand Idea
Posts: 15170
Joined: November 9, 2015
Pronoun: He / Him / His
Location: CST/CDT

Post Post #7 (ISO) » Sun Dec 20, 2020 10:10 am

Post by Ircher »

This looks cool, and it's right in time for Christmas!
Links: User Page | GTKAS | Ratings
Do you have questions, ideas, or feedback for the Scummies? Please pm me!
Hosting: The Grand Neighborhood [In Signups: 6/9]
User avatar
Gamma Emerald
Gamma Emerald
She/It
Survivor
User avatar
User avatar
Gamma Emerald
She/It
Survivor
Survivor
Posts: 69101
Joined: August 9, 2016
Pronoun: She/It
Location: Hell on Earth (aka Texas)

Post Post #8 (ISO) » Sun Dec 20, 2020 7:14 pm

Post by Gamma Emerald »

Can it do more than role PMs? It mostly seems useful for theme games, since newbies/opens/normals have standardized role PMs.
<Embrace The Void>


My pronouns are she and it, please respect that. I don't mind the occasional slip.
User avatar
Jake The Wolfie
Jake The Wolfie
he/they
Mafia Scum
User avatar
User avatar
Jake The Wolfie
he/they
Mafia Scum
Mafia Scum
Posts: 3577
Joined: July 13, 2019
Pronoun: he/they
Location: Floorda

Post Post #9 (ISO) » Sun Dec 20, 2020 7:37 pm

Post by Jake The Wolfie »

Suggestion:cAdd boilerplate "Cop", "Doctor", "Vig", "VT", and "Goon" abilities
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #10 (ISO) » Sun Dec 20, 2020 7:39 pm

Post by JacksonVirgo »

In post 8, Gamma Emerald wrote:Can it do more than role PMs? It mostly seems useful for theme games, since newbies/opens/normals have standardized role PMs.
This was
originally
built to handle creating role cards easily but I moved to make it a universal FM helper so I have a few planned additions including an inbuilt game-rander to replace needing to use random.org and you can send the appropriate Role PM to the right player with a click of a button by utilising the Send PM feature I've already created.

If you want to use pre-made role-cards and use this functionality I will have to add that to the tool as I hadn't thought of that just yet but is a great idea.

Although what would you think it should also do?

Perhaps an addition could be an inbuilt screen-scraper for votes, unvotes, heals and hurt tags (utilising a closest-match function for spelling errors and shorthand names such as VOTE: Jackson) and generating a VC using the same lexer/parser functions although that's already a tool that exists I believe.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #11 (ISO) » Sun Dec 20, 2020 7:40 pm

Post by JacksonVirgo »

In post 9, Jake The Wolfie wrote:Suggestion:cAdd boilerplate "Cop", "Doctor", "Vig", "VT", and "Goon" abilities
Oh that's a good idea actually, thank you
User avatar
Gamma Emerald
Gamma Emerald
She/It
Survivor
User avatar
User avatar
Gamma Emerald
She/It
Survivor
Survivor
Posts: 69101
Joined: August 9, 2016
Pronoun: She/It
Location: Hell on Earth (aka Texas)

Post Post #12 (ISO) » Sun Dec 20, 2020 7:46 pm

Post by Gamma Emerald »

Yeah the screen-scraper vote counter seems like a good idea, what it should probably do is give a list of all things that look like votes, and the mod can just prune out things that aren’t, typically the most arduous part of vote counting is skimming the thread for votes. I personally haven’t modded a large without utilizing an auto-votecounter (kinda, I had one where I counted manually but my co-mod used the auto-VC iirc)
I like that it’ll catch heals+hurts, most auto-votecounters don’t do that I believe

Having a game-rander is also good, since random.org limits your uses unless you pay them money
<Embrace The Void>


My pronouns are she and it, please respect that. I don't mind the occasional slip.
User avatar
Jake The Wolfie
Jake The Wolfie
he/they
Mafia Scum
User avatar
User avatar
Jake The Wolfie
he/they
Mafia Scum
Mafia Scum
Posts: 3577
Joined: July 13, 2019
Pronoun: he/they
Location: Floorda

Post Post #13 (ISO) » Sun Dec 20, 2020 7:51 pm

Post by Jake The Wolfie »

Suggestion: Create a targeting visualizer, to see who is targeting who with what ability.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #14 (ISO) » Sun Dec 20, 2020 7:57 pm

Post by JacksonVirgo »

In post 13, Jake The Wolfie wrote:Suggestion: Create a targeting visualizer, to see who is targeting who with what ability.
Could you explain this further? I don't fully understand
User avatar
Jake The Wolfie
Jake The Wolfie
he/they
Mafia Scum
User avatar
User avatar
Jake The Wolfie
he/they
Mafia Scum
Mafia Scum
Posts: 3577
Joined: July 13, 2019
Pronoun: he/they
Location: Floorda

Post Post #15 (ISO) » Sun Dec 20, 2020 7:59 pm

Post by Jake The Wolfie »

Like a flowchart or something.
User avatar
Gamma Emerald
Gamma Emerald
She/It
Survivor
User avatar
User avatar
Gamma Emerald
She/It
Survivor
Survivor
Posts: 69101
Joined: August 9, 2016
Pronoun: She/It
Location: Hell on Earth (aka Texas)

Post Post #16 (ISO) » Sun Dec 20, 2020 9:26 pm

Post by Gamma Emerald »

A spreadsheet is good enough for that imo
<Embrace The Void>


My pronouns are she and it, please respect that. I don't mind the occasional slip.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #17 (ISO) » Mon Dec 21, 2020 2:16 pm

Post by JacksonVirgo »

In post 15, Jake The Wolfie wrote:Like a flowchart or something.
I'm not exactly sure how I would implement that but I'll add it to my list for now.
In post 12, Gamma Emerald wrote:Yeah the screen-scraper vote counter seems like a good idea, what it should probably do is give a list of all things that look like votes, and the mod can just prune out things that aren’t, typically the most arduous part of vote counting is skimming the thread for votes. I personally haven’t modded a large without utilizing an auto-votecounter (kinda, I had one where I counted manually but my co-mod used the auto-VC iirc)
I like that it’ll catch heals+hurts, most auto-votecounters don’t do that I believe

Having a game-rander is also good, since random.org limits your uses unless you pay them money
I want all the tools to be modular and adaptable to all forms of Forum Mafia, so I would probably make a list to catch different types of "commands". For mafiascum it will likely catch VOTE: , HURT: ,HEAL: but I'd like the host to be able add custom commands or posts that it catches such as
POTATO:
or
/vote
etc.

Does random.org do that? I've never used it that much to know

EDIT #1: Maybe it will search for the words, not the tags themselves so
VOTE:
and VOTE: will both trigger the screen-scraper.
User avatar
Isis
Isis
she/her, not they
Best in Class
User avatar
User avatar
Isis
she/her, not they
Best in Class
Best in Class
Posts: 11219
Joined: April 6, 2020
Pronoun: she/her, not they
Location: Seattle

Post Post #18 (ISO) » Tue Dec 22, 2020 6:58 pm

Post by Isis »

Interesting. There's not a metric ton of things getting automated her but there's, like, a bit?
"Let us say that you are right and there are two worlds. How much, then, is this 'other world' worth to you? What do you have there that you do not have here? Money? Power? Something worth causing the prince so much pain for?'"
"Well, I..."
"What? Nothing? You would make the prince suffer over... nothing?"
User avatar
Jake The Wolfie
Jake The Wolfie
he/they
Mafia Scum
User avatar
User avatar
Jake The Wolfie
he/they
Mafia Scum
Mafia Scum
Posts: 3577
Joined: July 13, 2019
Pronoun: he/they
Location: Floorda

Post Post #19 (ISO) » Tue Dec 22, 2020 7:09 pm

Post by Jake The Wolfie »

Name idea:

Tool
Assisted
Scumming
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #20 (ISO) » Wed Dec 23, 2020 2:00 am

Post by JacksonVirgo »

The tool is hosted on a temporary heroku server which you can find here. Feel free to mess with it and try and break it etc and tell me what you've done with it. Feel free to spam my PMs with random roles.

I'm hosting it right now to work on an API for a hidden thing myself and ducky are working on so if the server is down for a bit it's probably because I am testing out functionality.
Last edited by JacksonVirgo on Sun Dec 27, 2020 11:12 am, edited 1 time in total.
User avatar
Gamma Emerald
Gamma Emerald
She/It
Survivor
User avatar
User avatar
Gamma Emerald
She/It
Survivor
Survivor
Posts: 69101
Joined: August 9, 2016
Pronoun: She/It
Location: Hell on Earth (aka Texas)

Post Post #21 (ISO) » Sun Dec 27, 2020 10:20 am

Post by Gamma Emerald »

In post 19, Jake The Wolfie wrote:Name idea:

Tool
Assisted
Scumming
It’s for mods over players, so that’s not right
<Embrace The Void>


My pronouns are she and it, please respect that. I don't mind the occasional slip.
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #22 (ISO) » Wed Jan 06, 2021 9:29 pm

Post by JacksonVirgo »

Screen-Scraper

I've created an API to help with reworking the Replacement Form which a special someone, unsure if they want it public, was considering doing. 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 Figure 1.

Spoiler: Figure 1
Image
User avatar
JacksonVirgo
JacksonVirgo
they/him
Survivor
User avatar
User avatar
JacksonVirgo
they/him
Survivor
Survivor
Posts: 12417
Joined: October 29, 2019
Pronoun: they/him
Location: ɐılɐɹʇsn∀
Contact:

Post Post #23 (ISO) » Wed Jan 06, 2021 9:32 pm

Post by JacksonVirgo »

I was thinking maybe Mafia Engine, Mafia Mod or something that I definitely didn't get from a name generator.
User avatar
BBmolla
BBmolla
Open Book
User avatar
User avatar
BBmolla
Open Book
Open Book
Posts: 24301
Joined: May 29, 2011

Post Post #24 (ISO) » Fri Jan 08, 2021 2:53 pm

Post by BBmolla »

Hey this kicks ass
Come see me in the Great American Melodrama in Oceano
Post Reply

Return to “Mafia Discussion”