Programming sim2pkm

Antar

is a Battle Server Administratoris a Programmeris a Super Moderatoris a Community Contributor
Official Data Miner
#1


sim2pkm is a project that grew out of Challenge Cup for Wi-Fi, but while sim2pkm makes CC4Wifi obsolete, it's a far more ambitious--and, I hope, useful--application.

sim2pkm will take any plaintext or json-format team export from the teambuilders for Pokemon Online or Pokemon Showdown and make them into pkm files for easy importing into Pokegen (or Pokesav if you're not doing BW2 stuff). While these pkm files are NOT designed to pass hack checks (and thus are unlikely to be usable for Nintendo events, random matchups or the GBU competition), the program does do some rudimentary "legality checking," meaning, for example, that an Entei that knows Extremespeed will be forced to be shiny, to have no nickname and will be put in a Cherish Ball.

Unlike CC4Wifi, sim2pkm comes with an easy-to-use graphical interface and should be simple enough for anyone to use.

For those of you who love random battles, the sim2pkm interface includes links to web scripts that generate either Challenge Cup or PS-style "randbats" teams.

sim2pkm is written in Python and should be usable on all modern desktop operating systems.

Download links:

Other links:
 

Antar

is a Battle Server Administratoris a Programmeris a Super Moderatoris a Community Contributor
Official Data Miner
#4
No auto-updates, sorry.

SPEAKING OF, I recommend re-downloading if you already downloaded it: there was a pretty big bug in v1.1 regarding formes.
 

NixHex

Doing just fine, here at the top of the world
is a Site Staff Alumnusis a Forum Moderator Alumnusis a Researcher Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus
#6
Antar, you should note that since they aren't designed to pass hack checks, these Pokemon will not even be GBU legal either.
 
#8
THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! THE BEST! </grohl>
 
#9
I'm just posting in this thread to show off how many more posts i have than all the other youtube people

but this program looks legit. Only thing better than this would be to make a thing that converts battle logs into vs recorder matches. now that would be pwr ful
 

Kaphotics

Remodeling Kitchens
is a Researcher Alumnusis a Contributor Alumnus
#18
I've been trying on and off to get Zarel/bmelts and Xfr/Bond697/Kaphotics into a room together to make this happen.
It wouldn't be too hard to make replays (and upload them); we've done that many months ago.

If the Replay -> Video were to happen, all that would need to be done is just overwrite a previously existing a WiFi battle video file with a proper team / player name, the battle instructions (move choice & target) and the Battle RNG Seed. The game essentially carries out the battle again with pre-defined choices. There's a small concern with uploading: they only let you store a certain amount of battle videos per player. At Pokecheck we don't do submitting, only fetching. (because submitting tons of videos is fishy)

I know there's other customizations that can be done like using a different trainer sprite, background, and music.

Good place to start on 'structure' of videos is here. Even though it's from B/W times it's still the same.
 

Antar

is a Battle Server Administratoris a Programmeris a Super Moderatoris a Community Contributor
Official Data Miner
#19
It's the replay -> battle vid direction that I think most of us are interested in (the convenience of battling on a simulator married to the quality of a DS battle video).

all that would need to be done is just overwrite a previously existing a WiFi battle video file with a proper team / player name, the battle instructions (move choice & target) and the Battle RNG Seed. The game essentially carries out the battle again with pre-defined choices.
This, as I understand it, is the reason we don't have this today: basically, the simulator would have to written in such a way as to reproduce exactly the same instructions, based on the same seed.

So basically, Pokemon Showdown would have to run the reverse-engineered battle engine that you guys are working on with the Vs. Player. We'd need to marry the two projects, and I'm guessing that's not an easy task.
 
#21
Regardless of whether or not we would be able to convert battle logs into VS Recorder matches, having the sim run the exact same RNG as the cartridges would be something really, really neat to have. Even tough that crits/misses/whatever happen with the same frequency they would on the DS, the fact that they don't do so exactly when they would on the DS kind of bothers me, tbh.

As Antar said, I think that most people would have no interest in uploading the matches to the Nintendo servers, but would just like to be able to record the actual playback as a video file. At least that's what I would like to do. Does the replay video really have to conform to the RNG if people don't plan on uploading it to the Nintendo servers? Correct me if I'm wrong, but the video you linked doesn't even follow the game mechanics, right?

Btw, sorry for not thanking you for the program, Antar. I got so excited with the possibility of turning PS logs into VS recorder matches that I forgot. Thank you very much for your work!
 

WreckDra

crackling abuser
is a Contributor Alumnus
#22
Found this error when converting. This is what Terminal said:File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 1410, in __call__
File "gui.py", line 51, in doTheThing
pokes.append(sim2pkm.sim2poke(entry))
File "/Users/russellschreiner/Downloads/sim2pkm-mac/sim2pkm/sim2pkm.py", line 286, in sim2poke
if species[0] not in string.lowercase + string.uppercase:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 26: ordinal not in range(128)

I am using the OSX version BTW but i am not quite sure what this means.
I bet it is nothing a little Antar Magic won't fix though :]
 

WreckDra

crackling abuser
is a Contributor Alumnus
#23
And now the script is telling terminal to quit whenever i open sim2pkm
i am beginning to wonder if the convert and quit command is still in effect for some reason.
 

Antar

is a Battle Server Administratoris a Programmeris a Super Moderatoris a Community Contributor
Official Data Miner
#24
File "/Users/russellschreiner/Downloads/sim2pkm-mac/sim2pkm/sim2pkm.py", line 286, in sim2poke
if species[0] not in string.lowercase + string.uppercase:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 26: ordinal not in range(128)
Macs are weird--on neither Linux nor Windows do the pastes somehow incorporate these non-ascii characters. Anyway, I fixed it. Delete the old version and install the new version at your earliest convenience.

And yeah, if sim2pkm throws an error like that, you have to close it before reopening and trying again.