Comments (6)
You might have trouble with the tests - you need to subpkg link
to make sure the packages interconnect to each other (this is coincidentally why GH reports the repo as failing currently, its not set up to do the subpkg link
step and instead is dependent on new packages being released. This is somewhat intentional - it's valuable to have a way to verify the released packages work with each other, but when developing locally you want them all to be linked together). Furthermore, to run the tests just from the protocol
package you'll want to run subpkg test protocol
from the root. I think https://github.com/pkmn/ps/blob/master/CONTRIBUTING.md covers more of this.
from ps.
I'd welcome any PRs in this space. I'm only confident I've reverse engineered the undocumented messages relevant for simulation, but messages relevant to creating a client are also desirable (consider also just opening a pull request against the upstream PS repo so that everyone benefits for any messages you have found that have slipped through the cracks)
from ps.
OK, from git grep send.*\|
I find the following:
|deinit|
- seems to indicate a room should be closed|selectorhtml|{selector}|${content}
- whereselector
is some string, don't know if its range is limited, andcontent
is an arbitrary string|refresh|
- tells the client to refresh the page|tempnotify|${key}|${message}
?|tempnotifyoff|
- seems like the second arg is alwayspendingapprovals
in the case of theshow
command, but can also be a room id when used to notify a rank?|noinit|
- blocks joining a room. seems like it can optionally take the form|noinit|${type}|${message}
?|hidelines|${type}|${userid}|${linecount}
wherelink
can either beunlink
,delete
orhide
andlinecount
is optional?|expire|${message}
- sent when a room has been deleted (really i feel PS shouldn't need adeinit
,noinit
ANDexpire
message, but what do I know?)|modaction|${msg}
/ -|c~|
- can't tell if actual protocol or just hacky internal crap?|askreg|${userid}
- asks the winner of a rated battle to register
There's also all the MiscArgs
which weren't documented either:
Lines 643 to 654 in 4ff6f1e
Let's see if we can't find someone to document this mess upstream...
from ps.
Maybe for now I could just add them to MiscArgs and Protocol.parse
. Would anything have to change in the import scripts?
from ps.
No. To add support for the args you need to add them to MiscArgs (and make sure theyre corrected typed), to the map tracking all the protocol keys in the same file, and then add support to the verifier to validate the messages type at run time. If you want to take a stab at this that would be great, otherwise I will probably crank something out tomorrow before the release
from ps.
Sure, I'll see what I can do.
from ps.
Related Issues (20)
- Initializing BattleStream class in Javascript HOT 1
- Unexpected Token error when loading pkmn/sim library? HOT 3
- provide event based battle handling for /client HOT 2
- PocketMon HOT 1
- @pkmn/data: `Learnsets.learnable` results are overwritten instead of merged for evolved species HOT 3
- @pkmn/dex: G-Max Move Handling Changed Unexpectedly HOT 6
- ditto sometimes fails to be interpreted by @poke/client battle HOT 2
- team validator HOT 4
- Pack/Unpack does not follow showdown formatting when including team name, format and folder. HOT 1
- No way to load a ModdedDex into battle simulator HOT 8
- @pkmn/client: Only the set info for the first Pokemon on each side is propagated
- @pkmn/client: Level is always overwritten to be 100
- @pkmn/sim: Running `Dex.formats.getRuleTable(Dex.formats.get('gen9lc'))` crashes HOT 2
- @pkmn/sim: Running `Dex.formats.getRuleTable(Dex.formats.get('gen9vgc2023regulatione'))` crashes
- @pkmn/img Wrong icons for certain Pokémon HOT 1
- Unable to easily add custom formats
- gen7vgc2017 team validation HOT 4
- Questions about learnset data HOT 8
- Protocol typings: Challenges and SearchState interfaces are swapped HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ps.