Presenting here my a new tool that every theme maker will find useful: the Mafia Simulator (Beta version)! Link: http://icekirby.github.io/PO-stuff/simulator/ What is this? The Mafia Simulator is a simple page where you can load a mafia theme and run a game to check if things are working as you intended. What the Mafia Simulator is not: -The Mafia Simulator is not a place to play mafia. Games that you start there can only be seen on your browser, no other player can connect to it. -The Simulator will not do any action by itself. It will only run the game, and you will be given the chance to change names and control the players you want. If you don't control them, they will not do anything on their own. -The Simulator is also not PO. Lots of commands and features you can use on PO are not available on the simulator (examples: /me and /rules, which are server commands, not mafia commands). What is this useful for? The Simulator is ideally aimed for people who need to test if a role's coding do what you want. It's also useful to see how the game messages are displayed. The Simulator is not intended to test game balance, as that is not possible in an environment where you know everyone's role. How to use? 1. Copy your theme's code and paste it into the first box. 2. Click Load Theme. If your theme has no errors, it will be loaded. 3. With your theme loaded, choose the number of players you want in the game and then press Start Game. 4. The game will then start. You can use the controls near the Send button to make the current phase stop indefinitely, to skip to the next phase or to change the current player you are in. Tips: -If you are using a decent web browser, you can resize both the Theme Code box and the Chat box by dragging the hook at the corner of those boxes. -You can use /start to start a theme as you do on the server, but it's advised that you use the Start Game button because 1) You can automatically push the number of players you need and 2) You can bypass the "Theme started 5 games ago" restriction. Known Issues: -There's currently a limit of 49 players you can push into a game. This is easy to fix, but it's unlikely someone will actually need that much. -"Watch" commands may throw an error/not work. Fixed (I think) Closing words: Remember that this is a beta version. If you find any error, please report them on this thread. Suggestions are also welcome. If you are reporting an error, remember to state which web browser you are using.
This is great before i used my localhost with po, now is more easy thanks Icekirby and dont have errors for now
I have a suggestion ^_^ Instead of forcing the user to finish their theme to test, what if you remove that restriction? I know a lot of people want to test some type of mechanics before they finish the code.
If the theme is valid according to the Mafia Checker, then you can test it. You could very easily leave some roles unfinished while you test others, as long as the theme as a whole is valid.
This is an awesome theme... I found out whether all my commands are correct or not and also other few things... This thread must be made sticky...
Two new features added: -Auto-complete names with TAB is now possible. Practically the same as with PO, except it will only pick names from players still alive in the game. -Pressing Up and Down on the chat input field now allows you to browser previous messages sent, just like in PO.
Can you make it so each person is a specific character rather than randomly picked? When I test out bigger games, I often take a long time to find to role I want. I know there is a pause feature, but it would save a bit of time.
I guess he wants to say as follows... In 40 player game of SI he dont want to start and end the game 100 times to become Laser Cannon but he wants he feature to choose the role Laser Cannon at the start itself...
I think he wants something else. Because Kirby's simulator already permits the testers to change what player/role they control any time during the test. Probably what Natsu wants is to assign a precise role to a precise bot instead then randomly. Something like : the bot Aarion always get the first role of the spawn list and the bot Zorua the 45th role of the used spawn list, or something like this more or less.
Unfortunately, that's not really possible. The Simulator shares the same script that the actual mafia channel uses, so not everything can be implemented easily on the simulator unless some changes are made to the mafia script. What I could try is something closer to VirajVora's suggestion: create a field where you can pick a role you want before the game starts, and then if that role spawns then you are automatically put on the player that got that role. If you have another idea to achieve the same goal, feel free to suggest.
I made an interface update that greatly improves usability: The players list now appears as an actual list, which makes it quicker to change players (less clicks necessary) and easier to read the names/roles still in the game. Check it out, test it, bork it and report any bugs you can find.
No, there' none currently. I once thought about adding a 2nd "window" for those occasions, but never put a priority on that.
Suggestion: when changing between players, why not return the role/the role proto instead of the player's name? This: (03:06:33) You are now Mew! Turns into: (03:06:33) You are now Samurai! Or this: (03:06:33) You are now Samurai (samurai)! It just makes sense since the role name/role proto has more relevance than the player name does.