Ask simple questions here! [READ ORIGINAL POST before posting]

hello there I am new to the site trying to join the site rooms, but to talk it is saying my account needs to be a week old, how do I check
 

HoeenHero

The Misspelled Hero!
is a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Smogon Discord Contributor Alumnus
PS Admin
hello there I am new to the site trying to join the site rooms, but to talk it is saying my account needs to be a week old, how do I check
Click on your name in the userlist, a box should show up with your username, avatar, and rooms. Click on your name in the box to go to your user page. It will look something like this https://pokemonshowdown.com/users/hoeenhero. On your user page, it should have the date you registered, add a week to that to know what day you should gain autoconfirmed status. Please note that autoconfirmed (AC) status is given at exactly 1 week after you registered (down to the second), so if you registered at 8:00 PM, you will be AC a week later at 8:00 PM, no sooner. You also must win a ladder battle to be autoconfirmed. A ladder battle is any battle found by clicking the "Battle!" button to find a battle except "Unrated Random Battle". A win in any format will work.
 
Hello, I have been part of some Pet Mods and looking to make some of my own moves or abilities. Is there a thread or possible site that will teach me to code for Pokemon Showdown?
 

HoeenHero

The Misspelled Hero!
is a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Smogon Discord Contributor Alumnus
PS Admin
Hello, I have been part of some Pet Mods and looking to make some of my own moves or abilities. Is there a thread or possible site that will teach me to code for Pokemon Showdown?
You can try looking at the server source code. https://github.com/Zarel/Pokemon-Showdown

The Super Staff Bros Brawl mod also does this so that specifically may be a good area to look https://github.com/Zarel/Pokemon-Showdown/tree/master/mods/ssb
Kind of a long story, but is it possible to run a headless instance of Showdown locally?
See this issue https://github.com/Zarel/Pokemon-Showdown-Client/issues/1148
 
Back with another question, or more of a problem. Also not sure if this counts as a simple question, if there's somewhere better to post this just let me know.

I'm trying to access Showdown via a websocket connection in Python; I can establish the connection and get the initial response just fine, but after that the server refuses to respond to me. This is what I have so far:
Python:
def on_message(ws, msg):
    print(msg)
    if msg[:10] == '|challstr|':
        challstr = msg[10:]
        login(challstr, ws)

def on_open(ws):
    print('### opened ###')

def login(challstr, ws):
    resp = requests.post('https://play.pokemonshowdown.com/action.php',
                         data={'act': 'login',
                               'name': creds['name'],
                               'pass': creds['password'],
                               'challstr': challstr})
    data = json.loads(resp.text[1:])
    assertion = data['assertion']
    ws.send('/trn ' + creds['name'] + ',0,' + assertion)


client = websocket.WebSocketApp('ws://sim.smogon.com:8000/showdown/websocket',
                                on_message=on_message)
client.on_open = on_open
client.run_forever()
And the output is as such:
### opened ###
|updateuser|Guest 6879553|0|102
|formats|,1|{FORMATS HERE}
|queryresponse|rooms|null
|challstr|4|{CHALLENGE STRING HERE}
When I make the login request and send the '/trn' message manually it succeeds in logging in and sends back some message, but as you can see with this program I don't get back anything other than the initial messages sent when you establish a connection. Even if I send '/help' or another request it never responds. Can anybody more familiar with the Showdown api and/or websockets than me see what's going wrong here?
 
Last edited:

Quite Quiet

I need a kitchen knife that doesn't whisper to me
is a Site Content Manageris a Member of Senior Staffis a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Top Smogon Media Contributoris a Top Dedicated Tournament Hostis a Tournament Director Alumnusis a Battle Simulator Moderator Alumnus
TFP Leader
Back with another question, or more of a problem. Also not sure if this counts as a simple question, if there's somewhere better to post this just let me know.

I'm trying to access Showdown via a websocket connection in Python; I can establish the connection and get the initial response just fine, but after that the server refuses to respond to me. This is what I have so far:
Python:
def on_message(ws, msg):
    print(msg)
    if msg[:10] == '|challstr|':
        challstr = msg[10:]
        login(challstr, ws)

def on_open(ws):
    print('### opened ###')

def login(challstr, ws):
    resp = requests.post('https://play.pokemonshowdown.com/action.php',
                         data={'act': 'login',
                               'name': creds['name'],
                               'pass': creds['password'],
                               'challstr': challstr})
    data = json.loads(resp.text[1:])
    assertion = data['assertion']
    ws.send('/trn ' + creds['name'] + ',0,' + assertion)


client = websocket.WebSocketApp('ws://sim.smogon.com:8000/showdown/websocket',
                                on_message=on_message)
client.on_open = on_open
client.run_forever()
And the output is as such:
Code:
### opened ###
|updateuser|Guest 6879553|0|102
|formats|,1|{FORMATS HERE}
|queryresponse|rooms|null
|challstr|4|{CHALLENGE STRING HERE}
When I make the login request and send the '/trn' message manually it succeeds in logging in and sends back some message, but as you can see with this program I don't get back anything other than the initial messages sent when you establish a connection. Even if I send '/help' or another request it never responds. Can anybody more familiar with the Showdown api and/or websockets than me see what's going wrong here?
You're missing a part of the challstr for your POST-request. The challstr contain two parts, the actual challstr and a challstrid. In your example this challstrid is 4. A correct POST-request looks something like:
Python:
        payload = { 'act':'login',
                    'name': username,
                    'pass': password,
                    'challengekeyid': challengekeyid,  # 4 in your example above
                    'challenge': challenge             # As you've already done
                    }
        r = requests.post('http://play.pokemonshowdown.com/action.php', data=payload)
        assertion = json.loads(r.text[1:])['assertion']
        send('|/trn {},0,{}'.format(username, assertion))
 
You're missing a part of the challstr for your POST-request. The challstr contain two parts, the actual challstr and a challstrid. In your example this challstrid is 4. A correct POST-request looks something like:
Python:
        payload = { 'act':'login',
                    'name': username,
                    'pass': password,
                    'challengekeyid': challengekeyid,  # 4 in your example above
                    'challenge': challenge             # As you've already done
                    }
        r = requests.post('http://play.pokemonshowdown.com/action.php', data=payload)
        assertion = json.loads(r.text[1:])['assertion']
        send('|/trn {},0,{}'.format(username, assertion))
Thanks, that solved the issue of logging in, so I'm now getting back the correct response for that. Unfortunately it still seems like the server won't listen to anything else. e.g. If I put a call to "send('/help')" at any point in the program, nothing ever comes back from the server (I know it is sending the request, so that's not the issue).
 

HoeenHero

The Misspelled Hero!
is a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Smogon Discord Contributor Alumnus
PS Admin
Thanks, that solved the issue of logging in, so I'm now getting back the correct response for that. Unfortunately it still seems like the server won't listen to anything else. e.g. If I put a call to "send('/help')" at any point in the program, nothing ever comes back from the server (I know it is sending the request, so that's not the issue).
You need to send message in the forme of roomid|message exclude the roomid when your sending to lobby or its not needed.
EX: |/join mafia mafia|Hello World! mafia|/roomban hoeenhero, stop helping him make me work
 
You need to send message in the forme of roomid|message exclude the roomid when your sending to lobby or its not needed.
EX: |/join mafia mafia|Hello World! mafia|/roomban hoeenhero, stop helping him make me work
That doesn't seem to be the issue, /help doesn't need a roomid. i.e. I can send just /help in the Chrome console and it comes back as you'd expect:
Untitled.png

Additionally, I tried sending /join lobby in my program and it didn't work either.
 

Quite Quiet

I need a kitchen knife that doesn't whisper to me
is a Site Content Manageris a Member of Senior Staffis a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Top Smogon Media Contributoris a Top Dedicated Tournament Hostis a Tournament Director Alumnusis a Battle Simulator Moderator Alumnus
TFP Leader
That doesn't seem to be the issue, /help doesn't need a roomid. i.e. I can send just /help in the Chrome console and it comes back as you'd expect:
View attachment 144511
Additionally, I tried sending /join lobby in my program and it didn't work either.
window.app.send('/help') added the | by default. If you look at the next line of what was actually sent, you see that the message was |/help
 
is it possible to clear a ranking for a certain ladder from your user page?

like, i know you can if you click reset if your rating is 1000, but what if it's for some ladder that is no longer playable, so it's not like you could purposefully lose just to set your ranking to 1000. i'm just not big on extra clutter, or whatever.
 

HoeenHero

The Misspelled Hero!
is a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Smogon Discord Contributor Alumnus
PS Admin
is it possible to clear a ranking for a certain ladder from your user page?

like, i know you can if you click reset if your rating is 1000, but what if it's for some ladder that is no longer playable, so it's not like you could purposefully lose just to set your ranking to 1000. i'm just not big on extra clutter, or whatever.
You cant sorry
 
"/is" outputs
/itemsearch [move description] - finds items that match the given key words.
Command accepts natural language. (tip: fewer words tend to work better)
Searches with "fling" in them will find items with the specified Fling behavior.
Searches with "natural gift" in them will find items with the specified Natural Gift behavior.
Is it supposed to say "move description"?

Why does "/ds gen=1,uber" not find mega Kangaskhan?
This was probably asked already, but how did you guys get permission to make Showdown! and use copyrighted stuff?

Edit: What are all the soundtracks that Showdown! has now?
 
Pokemon Let's Go Pikachu and Eevee were recently released and their system for Pokemon Battles is very different from that of previous Pokemon Games. Pokemon Showdown will have to be edited to play in this format. What I am concerned about is how Let's Go is still in the gen 7 family of games. Will it replace the USUM style of gameplay that is currently the main gen 7 format? I refuse to play in a meta that is missing abilities and items!
 

Lionyx

is a Battle Simulator Administratoris a Community Leaderis a Smogon Media Contributor Alumnus
PS Admin
You can already battle in Let's Go! formats, it's in the second column of formats under Other Metagames.
As for the official competitions & tournaments, the main OU battles will still be held in USUM OU, and the whole tiering system still depends on the USUM metagame until further notice, it doesn't take Let's Go! into account.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 3)

Top