• The moderators of this forum are the PS! staff.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon.

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

Tiksi

intelleon gang
is a Battle Simulator Driveris a Battle Simulator Moderator Alumnus
Since registered accounts apply across Main to/and actual registered sub-servers of PS like Azure, you should be able to get that reset by posting a thread in Other Admin Requests, unless I misunderstand something specific about what you're asking.
 
My friend and I have been doing a CageLocke and we haven't played in a while so we forget who we gave TMs and items to and we would like to see if there is a way to look back at our battle history to see the fights we have done. Is this possible? Unfortunately we delete our teams afterwards since it is a one time battle for them so that won't be of use.
 

HoeenHero

The Misspelled Hero!
is a Battle Simulator Administratoris a Community Leaderis a Programmer
PS Leader
My friend and I have been doing a CageLocke and we haven't played in a while so we forget who we gave TMs and items to and we would like to see if there is a way to look back at our battle history to see the fights we have done. Is this possible? Unfortunately we delete our teams afterwards since it is a one time battle for them so that won't be of use.
Unless you saved replays no. If there are replays check https://replay.pokemonshowdown.com/ for them
 
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 Community Leaderis a Programmer
PS Leader
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 Community Leaderis a Programmer
PS Leader
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

Tournament Banner
is a Tournament Directoris a member of the Site Staffis a Super Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Top Smogon Media Contributoris 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 Community Leaderis a Programmer
PS Leader
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

Tournament Banner
is a Tournament Directoris a member of the Site Staffis a Super Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogonis a Top Smogon Media Contributoris 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 Community Leaderis a Programmer
PS Leader
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?
 

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

Top