Mafia Engine Tool Development
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I'm going to showcase both the Global Variables which I've already announced 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.
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Thank youIn post 24, BBmolla wrote:Hey this kicks ass
I agree-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I'm going to add a way for the user to change all the things the lexer uses to find handles etc. As well as possibly using cookies to store preferences, only if the user allows ofc to prevent paranoia for me stealing all yo passwords.-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10908
- Joined: April 28, 2011
- Pronoun: he/they
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
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:
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:
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Thank you, for right now the code is a real mess so I've got to refactor a lot of it, may spend a day or two focusing just on that. I don't think I really need it at the moment as it's just a casual tool I'm working on but I might get back to you after I refactor.In post 28, Psyche wrote:I really dig your interface. i'd be happy to make small scale contributions to your project on a weekly basis if it's designed in a way conducive to that-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
When trying to remake my old Mini Normal setup + rand to test. I ran into an issue where referencing a second player's name fails to work. I will be focusing on fixing that and if all goes well I'll get this version hosted to get it tested.
EDIT: The logic I was using to find them gets conflicted with previous {{Player_X}} tags, I'm going to rework the way I reference them. Right now I'm thinking making {{Player}}[4] like tags. Where that accesses player 4's name. {{Player}}[0] may get the current players name.
EDIT 2: I've found the problem so I am going to revert back to my old code and fix it, it was dumb.-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
An example of how it works in practice, I've created a google spreadsheet of all the information within the spreadsheet which you can find here
And using the following JSON file as the saved template/globals. It looks confusing but it's simply just storing the template string and an array of all of the global variables. Which is the winconditions, mafia PT link, game thread, confirmation message and describing the mafia factional kill.
Spoiler:
I randed the game using the same player-list and roles as my Mini Normal setup (which has finished don't sweat your butt cheeks)
Spoiler: Example Role-Cards
I'm currently planning on making a way to reference the attributes of the roles such as the role name for confirmation etc. Also I've found sending the ENTIRE setup through PM is too large to send through a link. Just click the copy button and paste it into the PM.-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Current version is now hosted if anyone can test it in a mock-setup please do so and help me out. Send me a message on Discord or via PM here if you do so and/or need help. Any issues, no matter how big or small, let me know it so I can change it as the only tester I've had so far is myself and a few others in the very early stages.-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
-
-
Jake The Wolfie he/theyMafia Scumhe/they
- Mafia Scum
- Mafia Scum
- Posts: 3610
- Joined: July 13, 2019
- Pronoun: he/they
- Location: Floorda
Idea:
I CAT
I Created A ToolShow"I'm sorry that you put asbestos in your coffee."
"All dictionaries aught to have one typo."
Here's some text to break up all the links in my sig.
Currently my favorite role I've seen in a Normal.
Get to know a Wolf-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Purrfection
-
-
Gypyx She/HerJack of All TradesShe/Her
- Jack of All Trades
- Jack of All Trades
- Posts: 9266
- Joined: March 25, 2020
- Pronoun: She/Her
- Location: France
2 + 2 = 3In post 35, JacksonVirgo wrote:I've created a mock main menu. Two of the three sections are functional the other two does nothing. Thoughts? I've also semi-made a decision on the name change.
interesting... *sips coffee*ShowWhite Flag : Carebear Edition is ongoing ! (13/13) hit me up if you wanna get on the priority replacement list / spectate
i also have a Mini Normal !
bottom text-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Screen-scraping is fully functional for the replacement form as I've replaced the original logic and dependencies which broke heavily. You can see the showcase in the video below. All that's needed is the link to the game and the player that's getting replaced. That's it. The screen-scraper will find the Moderator name, which is the user who created the thread, it grabs the thread title (which should include the game type/number/name/phase anyway) and also the page count.
I am going to eventually add ways to manually add information that they don't want the screen scraper to grab. This includes the moderator, as if the game has been taken over by another moderator you don't want the old hosts name on it (and I want to avoid users having to still manually change the result as much as possible).
Now that the screen-scraping for that is functional, I am now slowly moving towards vote count territory. I know plenty already exist but I want this to be a main hub for a lot of different forum mafia related tools.
-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10908
- Joined: April 28, 2011
- Pronoun: he/they
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
The general goal for this project is to have any tools regarding FM all in one place and easily accessible to avoid needing twenty billion links for all sorts of tools.In post 40, Psyche wrote:so are you aiming for extensibility? i'd love for there to be an easy way to plug tools i've been developing into your UI
That being said, that does include aiming for extensibility and thus if I could think of an effective way to do so that would be great, although I am not sure exactly on how I could do so, at least for right now.-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I'm currently in the process of moving from using Web Sockets into using a REST API as much as I can, the role formatting currently isn't functioning due to the changes but I'm planning to have that working again by the end of the weel.
You can effectively use my API to make your own tools if you wish and/or make it possible for me to make a desktop version of my site without redoing all the logic that I've made up to this point if that's something people are wanting once it's all completed.
How to use the API
The tool is currently being hosted by Heroku, meaning you can access the API via http://mafia-engine.herokuapp.com/api. This link doesn't go anywhere but it's the root access to all the http request URLs you will need.
http://mafia-engine.herokuapp.com/api/replacements which you can be seen utilised here by encoding the games URL into a value that can be safely passed through the URL and then decoded on the other side (using encodeURIComponent and decodeURIComponent respectively).
A Vote Counting version of it has been made as well, utilising a similar VC Settings as MathBlades Vote Counter to make things cross-compatible. I'm planning on making this compatible with other Vote Counting settings as well as not needing one at all if you want to simply check the last vote of all users that posted on the thread (if they voted at all).-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
If you thought I abandoned this project... you thought wrong!
I have added a lot more features and am very close to releasing this to the public!
If you have been excited for this project so far... I have a new addition I think will have you explode with even more!
If you want to be notified via PM once a public release for this project airs feel free to reply with a/notifyor PM me directly.
Be patient...-
-
Ythan SheWelcome to the HaystackShe
- Welcome to the Haystack
- Welcome to the Haystack
- Posts: 15157
- Joined: August 11, 2009
- Pronoun: She
-
-
OkaPoka
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
-
-
Cook SheMafia ScumShe
- Mafia Scum
- Mafia Scum
- Posts: 3095
- Joined: December 5, 2020
- Pronoun: She
- Location: Stapling Internet Together [89.9%]
:OIn post 46, JacksonVirgo wrote:It has come to my attention that someone has spoken about myself and this tool in a pub near where I am staying at the moment. Small world
it's a scum world after all-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Chrome Browser Extension
I am now announcing that I have been working on a Chrome Browser Extension to make votecounting and replacement forms as seamless as possible. Why is it seamless? It creates buttons directly onto the MafiaScum web page and thus you have no need to ever leave the website to do what you need to do.
Currently it has two buttons.
- Vote Counter
- Replace User
Vote Counter
Assuming you have the correct settings in the OP of the game, this button will make a votecount for your game and place the formatted VC in the edit box.
Replace User
This button is below a users "details" and by pressing it you will be pushed towards the Replacement Thread where the replacement post will be placed in that edit box making the whole process seamless.
---
Why am I posting this now? Well I need some testers!
If anybody has a Chrome desktop browser or any Chromium based browsers such as Brave please hit me up so we can test this and make this project the best it can be!-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13494
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I will use this post to explain how the vote count settings work.
Firstly, you have to have format things correctly to have the tool correctly grab the settings in the first place. In the following spoiler I will explain how to do exactly that.
Spoiler: Formatting
Now for the settings themselves. I will also update this post as I add more
First Column -> The recommended setting name.
Second Column -> All possible setting names, all works the same.
Third Column -> Description on what the setting does.
If you find any confusing, let me know so I can have it reworded.
Setting Alternate Handles (N/A means it has none) Description players playerList List each player separated by commas (,). You can shorthand replacements as well by splitting replacements by a colon (:) with the most recent slot being on the left. slots slotList, replacementList, replacements List each slot separated by commas (,). Split replacements by a colon (:) where the most recent slot being on the left. It is recommended you use the shorthand part of the players setting, this is only here for cross-compatibility with MathBlades VoteScrubber. alias nicknames, nicknameList, aliasList If a player goes by a name that isn't what the votecounter recognizes (e.g. JV for myself) then list the nicknames like this (JacksonVirgo: JV) and seperate each individual nickname by a comma, even if it is for the same user. e.g. (JacksonVirgo: JV, JacksonVirgo: Jackson) moderators moderatorList, moderatorNames List each moderator or anyone that is not a player that needs to access the votecounter here (such as possible overseers, backups, co-mods etc), seperated by a comma (,) dead deadList, eliminated List each player that has been eliminated/died here seperated by a comma (,) deadline timer Place here the EXACT time that you would put in the countdown tags for the End of Day. If this is shown, it will add a "Day ends in X" section at the bottom of the votecount. edash edashweight Enter a number of which what amount of votes before hammer you would like to show the [E-X] suffix to each wagon. Default is 2 and that means that only those at E-2, E-1 and eliminated will be shown. edashOnTop N/A Enter a number (I will refer as X), the top X players will have their edash suffix attached. Default is 1 (meaning just the top wagon/s)
Copyright © MafiaScum. All rights reserved.
-