• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

GAF Mafia/Werewolf |OT| A forum game of secrets and treachery - sign up to play!

  • Thread starter Deleted member 231381
  • Start date

Ourobolus

Banned
This is a totally random question, but does anyone know how to print a backslash in python? I'm trying to make a script to do my votes, and "\\" doesn't print only one, it prints two. Making a raw string seems to -double- the amount of backslashes, too. Driving me nuts.
 

Fireblend

Banned
This is a totally random question, but does anyone know how to print a backslash in python? I'm trying to make a script to do my votes, and "\\" doesn't print only one, it prints two. Making a raw string seems to -double- the amount of backslashes, too. Driving me nuts.

Are you doing print(string) or just string?

RFlTvqc.png

Escaping backslashes works when printing. If not, use raw strings as you said.
 

Ourobolus

Banned
Are you doing print(string) or just string?



Escaping backslashes works when printing. If not, use raw strings as you said.
Code:
votes[x][votes[x].index(row[0])] = "[s]"+votes[x][votes[x].index(row[0])]+[U][B]"[\\strike]"[/B][/U]
And then a "print" later.

The bolded part shows up exactly like that.

r"[\strike]" shows up as [\\strike] for some reason in the output.
 

Mazre

Member
Code:
votes[x][votes[x].index(row[0])] = "[s]"+votes[x][votes[x].index(row[0])]+[U][B]"[\\strike]"[/B][/U]
And then a "print" later.

The bolded part shows up exactly like that.

r"[\strike]" shows up as [\\strike] for some reason in the output.

Aren't tags close with forward /?
 

Ourobolus

Banned
Finally got it to work, if anyone wants it.

I do my votes like this:
kOU7FZg.png


Then I save it to a votes.csv file.

Code:
import csv
players = []
votes = {}
number = []
#open file votes.csv - needs items in format Voter, Vote/Unvote, Target
with open("votes.csv", "rb") as csvfile:
    vote = csv.reader(csvfile,delimiter=",")
    for row in vote:
        #checks to see if target exists inb player list. Adds if it does not.
        if row[2] not in players:
            players.append(row[2])
            number.append(0)
            votes[players.index(row[2])]=[]
        #If it is a Vote, checks to see if player already has a vote and strikes it.
        if row[1]=="Vote":
            for x in range(len(players)):
                if row[0] in votes[x]:
                    votes[x][votes[x].index(row[0])] = "[ strike ]"+votes[x][votes[x].index(row[0])]+"[ /strike ]"
                    number[x]-=1    
                    #add in the vote
            votes[players.index(row[2])].append(row[0])
            number[players.index(row[2])]+=1
        if row[1]=="Unvote":
            if row[0] in votes[players.index(row[2])]:
                votes[players.index(row[2])][votes[players.index(row[2])].index(row[0])] = "[ strike ]"+votes[players.index(row[2])][votes[players.index(row[2])].index(row[0])]+"[ /strike ]"
                number[players.index(row[2])]-=1
    file = open("results.txt","w")
    for y in range(len(players)):
        num = str(number[y])
        file.write("[ b ][ u ]"+players[y]+" ("+num+")[ /b ][ /u ]")
        for z in range(len(votes[y])):
            file.write("\n"+votes[y][z])
        file.write("\n\n")
    file.close()

(spaces added to the strike, b, and u tags).
Probably not the most efficient, but it works for me.
 

Swamped

Banned
The end of Day 2 got me kinda down in the dumps.

I really hope kgtrep checks in. Would love to play with him again sometime.

Changing subjects, regarding volume of posts and such: what if we had one experimental game next season in which we limit the number of posts the players can make during the first 3 Day phases or so? If there are 23 players, maybe a max of 20 posts per player per day phase (that's 460 posts max in a day phase, seems like plenty). You are not required to reach the limit, just not cross it.
 

CzarTim

Member
I really hope kgtrep checks in. Would love to play with him again sometime.

Changing subjects, regarding volume of posts and such: what if we had one experimental game next season in which we limit the number of posts the players can make during the first 3 Day phases or so? If there are 23 players, maybe a max of 20 posts per player per day phase (that's 460 posts max in a day phase, seems like plenty). You are not required to reach the limit, just not cross it.

:(

But seriously, I think we should experiment with smaller games next season. Maybe 15 people or so. That would solve the problem of early game being way too long and also lower turn around.
 

Sorian

Banned
I really hope kgtrep checks in. Would love to play with him again sometime.

Changing subjects, regarding volume of posts and such: what if we had one experimental game next season in which we limit the number of posts the players can make during the first 3 Day phases or so? If there are 23 players, maybe a max of 20 posts per player per day phase (that's 460 posts max in a day phase, seems like plenty). You are not required to reach the limit, just not cross it.

Swamped doesn't like me.
 

Sawneeks

Banned
I really hope kgtrep checks in. Would love to play with him again sometime.

Changing subjects, regarding volume of posts and such: what if we had one experimental game next season in which we limit the number of posts the players can make during the first 3 Day phases or so? If there are 23 players, maybe a max of 20 posts per player per day phase (that's 460 posts max in a day phase, seems like plenty). You are not required to reach the limit, just not cross it.

I hope so too. He brought up a lot of good stuff and was really devoted to the game, hopefully he will come back for another round. :(

That might work? Keeping posts limited might make it easier for Mafia to hide ( I couldn't post more because I hit the post count! ) but it would also make people cut down on fluff posts and get to the point. Would be a really cool experiment to try out. o:
 

Karkador

Banned
I don't think it has to be a draconian measure, just a friendly reminder that it's quality over quantity and people have a right to not say anything
 

Flame_AC

Member
I hope so too. He brought up a lot of good stuff and was really devoted to the game, hopefully he will come back for another round. :(

That might work? Keeping posts limited might make it easier for Mafia to hide ( I couldn't post more because I hit the post count! ) but it would also make people cut down on fluff posts and get to the point. Would be a really cool experiment to try out. o:

Or people make their fluff posts anyways, and then say they reached their limit and couldn't contribute anymore.
 

Sawneeks

Banned
Or people make their fluff posts anyways, and then say they reached their limit and couldn't contribute anymore.

It would probably depend on how active everyone was. If most of the players were hitting the cap with thought-out posts than those who were more fluff-filled would stand out way more. But if it was a laid back group it might not matter.
 

Swamped

Banned
Swamped doesn't like me.

<3 Never change, Sora

That might work? Keeping posts limited might make it easier for Mafia to hide ( I couldn't post more because I hit the post count! ) but it would also make people cut down on fluff posts and get to the point. Would be a really cool experiment to try out. o:

Right? Maybe CzarTim's idea of smaller games could work too. I'm just trying to think of ways to make the first few day phases more welcoming to new people/people who can't post from school, work etc.

Or people make their fluff posts anyways, and then say they reached their limit and couldn't contribute anymore.

I mean, if you are making 20 fluff posts you deserve to be lynched XD
 

Sawneeks

Banned
Right? Maybe CzarTim's idea of smaller games could work too. I'm just trying to think of ways to make the first few day phases more welcoming to new people/people who can't post from school, work etc.

Yeah, I've noticed it's been really rough for a good handful of people for these first few rounds. It sucks too because Mafia is great but getting killed so early can really sour the whole experience. Splitting up into smaller groups might help, maybe also a 'new players' game? I'm not sure how many new players there are vs veteran players but maybe splitting them off into separate groups might help?
 
D

Deleted member 231381

Unconfirmed Member
I'm somewhat wary about a "veterans"/"newbies" game, because mafia is a social game and newbies learn *from* veterans. I don't actually think you improve as much if you only play with other newbies, even if you play a lot of games. Smaller games can definitely work, I think we just ended up with the current situation because all this round's gamerunners wanted big games. We can definitely start a "small game" now, it just depends on someone wanting to run it and there being people available - I know Karkador was mulling over the idea?
 

Haly

One day I realized that sadness is just another word for not enough coffee.
If I do choose to run a game I can do small. Right now I'm thinking The Thick of It would make a nice theme. Labour vs Conservative, maybe Liberal Democrat as neutrals.
 
D

Deleted member 231381

Unconfirmed Member
If I do choose to run a game I can do small. Right now I'm thinking The Thick of It would make a nice theme. Labour vs Conservative, maybe Liberal Democrat as neutrals.

Don't you mean Liberal Democrat as the neutral?
 

Burbeting

Banned
*Looks at Cthulu mafia*
*Sees all those Danganronpa pics used in it*

Yoo you guys are using completely wrong pics :p! Where are the Lovecraftian monsters making all "objection!" poses and dramatic anime reactions!
 

Sorian

Banned
*Looks at Cthulu mafia*
*Sees all those Danganronpa pics used in it*

Yoo you guys are using completely wrong pics :p! Where are the Lovecraftian monsters making all "objection!" poses and dramatic anime reactions!

That involves a level of photoshop and creativity that I don't have. Plus danganronpa is the best so I can't complain.
 

Burbeting

Banned
"What am I doing with my life again?"

But what the hell, behold my kawaii-cthulu that was made in exactly... four minutes!

jQ0qDbA.png


Just to counter all those kawaii Danganronpa pictures :p
 

RetroMG

Member
My wife suggested that we do Ninja Warrior Mafia. Kacey Catanzaro and Joe Moravsky as power roles, Mafia are the Obstacles.

I thought it was funny.
 

Sawneeks

Banned
I'm somewhat wary about a "veterans"/"newbies" game, because mafia is a social game and newbies learn *from* veterans. I don't actually think you improve as much if you only play with other newbies, even if you play a lot of games. Smaller games can definitely work, I think we just ended up with the current situation because all this round's gamerunners wanted big games. We can definitely start a "small game" now, it just depends on someone wanting to run it and there being people available - I know Karkador was mulling over the idea?

Eh, I'm just throwing around ideas. Who knows what will work and what won't, but a smaller game might help people who are new and ease them into it.

My wife suggested that we do Ninja Warrior Mafia. Kacey Catanzaro and Joe Moravsky as power roles, Mafia are the Obstacles.

I thought it was funny.

Only if the neutral role is that naked guy who ran the course and aced it.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Naked Guy

You must get voted once by every alive player in order to win the game.
 

RetroMG

Member
Top Bottom