Mafia Theme Checker

Discussion in 'Review' started by IceKirby, Jul 4, 2012.

  1. Stocke

    Stocke Wat is dis I don't even

    Joined:
    Mar 27, 2013
    Messages:
    128
    Likes Received:
    77
    It seems Chrome is working again.
     
  2. Crystal Moogle

    Crystal Moogle Ayaya~ Administrator Administrator

    Joined:
    Jul 19, 2010
    Messages:
    3,205
    Likes Received:
    531
    PO Trainer Name:
    Hanako
    I noticed something about the built in version when I was uploading all the old themes again.
    It's really minor, but can be confusing for someone.
    The theme was http://pastebin.com/raw.php?i=CEC6EgPj
    I realise it's because it's looking for the boolean true, whereas the theme uses the string "true", but both should work the same way I believe
     
  3. Sky Sentinel

    Sky Sentinel You see?

    Joined:
    Oct 21, 2012
    Messages:
    814
    Likes Received:
    24
    PO Trainer Name:
    Sky Sentinel
    Can you look at Fuzzy's new messages thing and whitelist all those because I keep getting like 15 minor errors, lol
    Minor errors found in your script:
    Role joker.actions.night.kill has an extra attribute "convertfailmsg".
    Role lastlaugh.actions.night.poison has an extra attribute "poisontarmsg".
    Role harley.actions.night.kill has an extra attribute "convertfailmsg".
    Role flash.actions.night.kill has an extra attribute "convertfailmsg".
    Role flashslow.actions.night.kill has an extra attribute "convertfailmsg".
    Role raven.actions.night.detox has an extra attribute "detoxfailmsg".
    Role marvel.actions.night.kill has an extra attribute "convertfailmsg".
    Role deathstroke.actions.night.kill has an extra attribute "convertfailmsg".
    Role pznivy.actions.night.poison has an extra attribute "poisontarmsg".
    Role pznivy.actions.night.kiss has an extra attribute "poisontarmsg".
    Role zod.actions.night.kill has an extra attribute "convertfailmsg".
    Role non.actions.night.kill has an extra attribute "convertfailmsg".
    Role faora.actions.night.kill has an extra attribute "convertfailmsg".
    Role cheetah.actions.night.kill has an extra attribute "convertfailmsg".
    Role zoom.actions.night.kill has an extra attribute "convertfailmsg".
    Role deathstrokeninja.actions.night.kill has an extra attribute "convertfailmsg".
    Role scorpion.actions.night.kill has an extra attribute "convertfailmsg".
     
  4. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Finally updated the Checker page. Server's theme checker update is pending.
    Tell me if you find any attribute still not added to the checker (for now, only on the webpage).
     
  5. Sky Sentinel

    Sky Sentinel You see?

    Joined:
    Oct 21, 2012
    Messages:
    814
    Likes Received:
    24
    PO Trainer Name:
    Sky Sentinel
    All of the ones that were in DC are fixed now, thank you
     
  6. NotMafia

    NotMafia Miltank: Destroyer of Souls

    Joined:
    Feb 21, 2012
    Messages:
    73
    Likes Received:
    47
    PO Trainer Name:
    NotMafia
    I'm working on a theme and the checker is not recognizing some of the role's actions but I don't understand why, will the actions still work, if not how do I fix them?
     
  7. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Hard to answer without knowing the errors or your code.
     
  8. NotMafia

    NotMafia Miltank: Destroyer of Souls

    Joined:
    Feb 21, 2012
    Messages:
    73
    Likes Received:
    47
    PO Trainer Name:
    NotMafia
    I meant to post the pastebin link but brainfarted. http://pastebin.com/1nTHbK9b

    Thank you
     
  9. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    All those are coding errors. You have some attributes on the wrong place (some actions not under 'actions', and a protect not under 'night'). Nothing wrong with the checker.
     
  10. NotMafia

    NotMafia Miltank: Destroyer of Souls

    Joined:
    Feb 21, 2012
    Messages:
    73
    Likes Received:
    47
    PO Trainer Name:
    NotMafia
    I've managed to fix everything, thanks for your help
     
  11. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Small update to checker: The Priority tab will now gray out lines that would be automatically hidden by server's /priority command.
     
  12. Scatterbrain

    Scatterbrain You only live once*

    Joined:
    Jul 5, 2012
    Messages:
    865
    Likes Received:
    4
    For some reason, it shows up as a minor error if you have a specific poison ignore. Fuzzy said it should work on the server, but I'm posting here anyways.

    Code snippet:
    Code (text):
    1.  
    2.                 "kill": {
    3.                     "mode": {
    4.                         "ignore": [
    5.                             "skivkocheck"
    6.                         ]
    7.                     },
    8.  
    Message given to me by the Checker:
    • Role pl.actions.poison has an extra attribute "ignore".
     
  13. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    The message and the code are not even related at all.
    In any way, the error message you got is actually pointing that you should put "ignore" under "mode": {}. Nothing wrong with the checker.
     
  14. Scatterbrain

    Scatterbrain You only live once*

    Joined:
    Jul 5, 2012
    Messages:
    865
    Likes Received:
    4
    >.>

    I posted the wrong code snippet, ofc.

    But thank you, wow I feel like a complete idiot lol
     
  15. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    I'm almost positive its a flaw with the theme checker...

    Spawn Lists:
    List 1(4~11 players):
    1. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    2. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    3. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    4. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    5. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    6. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    7. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    8. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    9. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    10. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    11. Pack a: 1. Villager (vm) [50.00%] | 2. Villager (vw) [50.00%]
    Code (text):
    1. "spawnPacks": {
    2.         "a": {
    3.             "chance": [0.5, 0.5],
    4.             "roles": [
    5.                 ["vm", "cm", "sm", "mm", "vm", "mm", "vm", "vm", "mm", "vm", "vm"],
    6.                 ["vw", "cw", "sw", "mw", "vw", "mw", "vw", "vw", "mw", "vw", "vw"]
    7.             ]          
    8.         }
    9.     },
    10.     "roles1": ["pack:a", "pack:a", "pack:a", "pack:a", "pack:a", "pack:a", "pack:a", "pack:a", "pack:a", "pack:a", "pack:a"]

    Shouldn't that be
    1. VM/VW
    2. CM/CW
    3. SM/SW
    and so on?
     
  16. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Yes, it should. I will check the checker.

    Edit: Should be fixed now.

    Apr 7 Edit:
    I added some fancy stuff to the checker:
    -Roles that are hidden from /sides on server will also be greyed on the Sides tab on the checker.
    -Added a checkbox to hide grey lines on the Sides and Priority tabs (AKA lines that would be hidden on the server can be hidden on the checker now too).
    -On the spawn tab, some lines will be on a dark red tone. Those are the roles that will always spawn when that list is used.
    -Also on the Spawn tab, each entry will now have a square with a color different for each side. Note that random spawn and packaged spawns will only show the color for one of the roles that can spawn.

    May 31 Edit:
    New feature to the checker.
    I added a button to the Spawn tab that will give you the Spawn Lists formatted in BBCode. Ideal for when you are submitting a theme to Mafia Review, you can copy/paste the BBCode to get all the colors and stuff here too.
     
    Last edited: Jul 2, 2014
  17. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Double post because important (kinda).
    I have been thinking, do anyone actually use the Roles Summary tab for anything? I've been thinking about replacing it with something different, since it's kind of a pain to keep it up-to-date.

    Some stuff I've been thinking about for its place:
    -A /roles simulator (would create the text exactly how it will appear on server when you use /roles).
    -A message dump (would extract help messages, info and other text to make grammar/spelling check easier).
    -Keep the Roles Summary, but use a simpler format for easier reading.

    Opinions, please.
     
  18. Dreadpool

    Dreadpool Inb4 I die N1...

    Joined:
    Jun 21, 2014
    Messages:
    41
    Likes Received:
    4
    PO Trainer Name:
    Dreadpool
    Personally I would say the simulator would be the best, surely it is expected or people to check for spelling anyway?
     
  19. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    I decided to replace the Roles Summary tab by a identical version of the /roles command on the server, so you can have a preview of how it will look like before uploading to the server.

    If anyone miss the old Summary tab, too bad, should have said it earlier :x
    ...Nah, just kidding, just tell me what you used it for and I will see what I can do about.
     
  20. Dreadpool

    Dreadpool Inb4 I die N1...

    Joined:
    Jun 21, 2014
    Messages:
    41
    Likes Received:
    4
    PO Trainer Name:
    Dreadpool
    That is a lot better IMO, has made writing the messages so much easier.
     
  21. Sky Sentinel

    Sky Sentinel You see?

    Joined:
    Oct 21, 2012
    Messages:
    814
    Likes Received:
    24
    PO Trainer Name:
    Sky Sentinel
    I'd prefer a way to switch between the two, a check box or a new tab, especially since now I'm making a theme where everyone evades dummy so the roles thing doesn't say "Can't be dummyed" and I have to scroll through the code to make sure everyone has it, and I also go over the help messages there so I don't have to see a bunch of extra lines. It's a lot easier to review information with the way the old tab was, and considering I make themes almost purely within mafia checker itself (I validate a lot and go over summary tab to make sure everything works) the new thing is not helping. I do like the way it looks though, it's kinda crappy for me because my computer screen is small so all the text is bunched up and wraps more.

    Also yeah I should've said it earlier but I didn't realize that you were replacing the tab entirely
     
  22. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Death Flag detected. Notepad++, please.

    If you actually use the old roles tab, you can use this backup page: [Removed - not supported anymore] (you need to give special permission to the page or something, check if any warning icon appears close to the URL), but be aware that I probably won't update it with new features (the most recent features were not updated there either).
     
    Last edited: Aug 14, 2014
  23. Shazan

    Shazan Obey to Kyubey

    Joined:
    Jan 21, 2013
    Messages:
    591
    Likes Received:
    14
    PO Trainer Name:
    Obey to Kyubey
    Right now I use the old version of the roles summary only to see the roles ordered by team when an author has their roles coded in a random order but I can live without it.
    Personally I used that feature often when i was new on theme coding, because i always thought it was useful for the newbie authors for to check if their code does what they want as checking if their poison countdown takes the right amount of turns or if they should use bomb, revengekill or changetarget as feature.
    But I can understand that it could take a huge amount of time to maintain it updated especially if you do it alone and it's not a strictly necessary feature so I think it's better to remove it as you did if you have problems to keep it updated.
     
    Last edited: Jul 6, 2014
  24. Sky Sentinel

    Sky Sentinel You see?

    Joined:
    Oct 21, 2012
    Messages:
    814
    Likes Received:
    24
    PO Trainer Name:
    Sky Sentinel
    Uh, no.

    I just like the old feature better. A lot better.
    Will be using the backup.
     
  25. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    It's not a "huge amount of time" (it's actually easy to add the new stuff), it's just that I don't feel like it has any meaningful use. It was mostly a translation to what the code represents, which if the author itself is not aware, then they should try to learn the theme features before trying to code.
    It would be another case if the summary were smarter and able to report more complex codes like different versions of a role for themes like Trainers and Rulers, but coding that would truly be a pain.

    BRB removing the backup version then.
    On a more serious note, you really, really shouldn't code directly on the checker. That only increases the chances of you losing your code if your browser crash, it has no syntax highlighting and it's terrible to format the code. With Notepad++ you can even drop the JSONlint site forever.
     
  26. Dreams

    Dreams Active Member

    Joined:
    Dec 4, 2013
    Messages:
    166
    Likes Received:
    76
    I hope people still view this thread.

    ran this on the theme checker and got the following errors
    Fatal errors found in your script:
    • Couldn't check the entire code. The following error has occured: TypeError: role.toLowerCase is not a function
    Minor errors found in your script:
    • Attribute "Hide" for "Your role "doran"" should be written as "hide".
    Any ideas on how to fix this? I did bug a certain user for a few fixes but this thing still persisted

    Edit: @Pangaea Fixed. Thanks .Anything on the fatal error?
     
    Last edited: Jun 24, 2015
  27. Pangaea

    Pangaea resto en peaco

    Joined:
    Mar 20, 2014
    Messages:
    329
    Likes Received:
    46
    I don't know about the fatal error, but the minor error is telling you to lowercase the 'h' in 'hide' for your 'doran' role.
     
  28. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    That fatal error is an error so big that the Checker couldn't even believe someone made such a mistake, and as such it malfunctioned. The doctor said the Checker should be fine now (as in, throwing the proper error message).

    P.S.: Use a decent web browser.
     
    Fate Testarossa and Dreams like this.
  29. Pangaea

    Pangaea resto en peaco

    Joined:
    Mar 20, 2014
    Messages:
    329
    Likes Received:
    46
    Is it possible to make the actions of a mafia teammate restrict the actions of another? For example, if Mafia A uses /inspect, then Mafia B with not be able to use /distract, etc.
     
  30. Shazan

    Shazan Obey to Kyubey

    Joined:
    Jan 21, 2013
    Messages:
    591
    Likes Received:
    14
    PO Trainer Name:
    Obey to Kyubey
    I am unsure but try to give to Mafia A a dummy command called /distract with 0 charge and shared with team and add inside the /inspect the feature "restrict the /distract command", if my theory is right it should work more or less like the General inside the Oracle theme.
     
  31. Pangaea

    Pangaea resto en peaco

    Joined:
    Mar 20, 2014
    Messages:
    329
    Likes Received:
    46
    Hi bumping this because of a problem I'm having.

    So the theme checker is giving me this fatal error:

    Fatal errors found in your script:

    • Couldn't check the entire code. The following error has occured: TypeError: invalid 'in' operand action on line: 915
    And I don't know what that means as I've never encountered such a problem. Do you know what's wrong?

    Here is the code I am putting in: http://pastebin.com/raw/VTC5FGBn.
     
  32. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    Fixed. It was an error in your theme that the checker didn't know how to detect.
     
    Pangaea and Fate Testarossa like this.